Commit 97edea7d31b7e8eb5fb690f9562cd710c1d66d21

Authored by chadzink
Committed by GitHub
1 parent 6a873e0f

Expanded PORTOR (#18)

* Expanded PORTOR

Added some needed attributes for Labbee project

* Added Narration (forgot before)
lib/syspro/business_objects/models/receipt_interospection.rb
... ... @@ -9,7 +9,23 @@ module Syspro
9 9 :counted_quantity_complete,
10 10 :delivery_note,
11 11 :certificate,
12   - :lot
  12 + :narration,
  13 + :lot,
  14 + :grn_number,
  15 + :concession,
  16 + :cost_basis,
  17 + :notation,
  18 + :reference,
  19 + :grn_source,
  20 + :bins
  21 + def initialize
  22 + @bins = []
  23 + end
  24 + end
  25 +
  26 + class InterospectionBin
  27 + attr_accessor :bin_location,
  28 + :bin_quantity
13 29 end
14 30 end
15 31 end
... ...
lib/syspro/business_objects/schemas/portor_doc.xml.erb
1 1 <?xml version="1.0" encoding="Windows-1252"?>
2 2 <PostPurchaseOrderReceipts xmlns:xsd="http://www.w3.org/2001/XMLSchema-instance" xsd:noNamespaceSchemaLocation="portordoc.xsd">
3 3 <%
4   - if receipt_interospections
  4 + if @receipt_interospections
5 5 @receipt_interospections.each do |interospection_item|
6 6 %>
7 7 <Item>
... ... @@ -13,7 +13,20 @@
13 13 <CountedQuantityComplete><%= render_xml(interospection_item.counted_quantity_complete, "Y")%></CountedQuantityComplete>
14 14 <DeliveryNote><%= render_xml(interospection_item.delivery_note)%></DeliveryNote>
15 15 <Certificate><%= render_xml(interospection_item.certificate)%></Certificate>
  16 + <Narration><%= render_xml(interospection_item.narration)%></Narration>
16 17 <Lot><%= render_xml(interospection_item.lot)%></Lot>
  18 + <GRNNumber><%= render_xml(interospection_item.grn_number) %></GRNNumber>
  19 + <Concession><%= render_xml(interospection_item.concession) %></Concession>
  20 + <CostBasis><%= render_xml(interospection_item.cost_basis) %></CostBasis>
  21 + <Notation><%= render_xml(interospection_item.notation) %></Notation>
  22 + <Reference><%= render_xml(interospection_item.reference) %></Reference>
  23 + <GRNSource><%= render_xml(interospection_item.grn_source) %></GRNSource>
  24 + <% @receipt_interospections.bins.each do |bin| %>
  25 + <Bins>
  26 + <BinLocation><%= render_xml(bin.bin_location) %></BinLocation>
  27 + <BinQuantity><%= render_xml(bin.bin_quantity) %></BinQuantity>
  28 + </Bins>
  29 + <% end %>
17 30 </ReceiptIntoInspection>
18 31 </Item>
19 32 <%
... ...