Commit 0e38c1172b8e0121670ea7b1ad7944adf13ff80e

Authored by Chad Zink
1 parent 810ca84b

Finished POR parser completed

@@ -32,7 +32,7 @@ require 'syspro/business_objects/porqry' @@ -32,7 +32,7 @@ require 'syspro/business_objects/porqry'
32 32
33 require 'syspro/business_objects/models/sor' 33 require 'syspro/business_objects/models/sor'
34 require 'syspro/business_objects/models/sor_detail' 34 require 'syspro/business_objects/models/sor_detail'
35 -require 'syspro/business_objects/models/por' 35 +require 'syspro/business_objects/models/por_detail'
36 36
37 require 'syspro/business_objects/parsers/combrw_parser' 37 require 'syspro/business_objects/parsers/combrw_parser'
38 require 'syspro/business_objects/parsers/comfch_parser' 38 require 'syspro/business_objects/parsers/comfch_parser'
lib/syspro/business_objects/models/por_detail.rb
@@ -2,9 +2,142 @@ module Syspro @@ -2,9 +2,142 @@ module Syspro
2 module BusinessObjects 2 module BusinessObjects
3 module Models 3 module Models
4 class PorDetail 4 class PorDetail
5 - attr_accessor :grn, :lot_number, :purchase_order, :purchase_order_line 5 + attr_accessor :grn, :lot_number, :purchase_order, :purchase_order_line, :supplier, :supplier_name,
  6 + :supplier_class, :customer, :customer_name, :customer_po_number, :warehouse, :warehouse_desc,
  7 + :supplier_addr_1, :supplier_addr_2, :supplier_addr_3, :supplier_addr_3_locality,
  8 + :supplier_addr_4, :supplier_addr_5, :sup_postal_code, :currency, :local_supplier,
  9 + :description, :delivery_name, :delivery_addr_1, :delivery_addr_2, :delivery_addr_3,
  10 + :delivery_addr_3_locality, :delivery_addr_4, :delivery_addr_5, :postal_code, :delivery_gps_lat,
  11 + :delivery_gps_long, :order_status, :order_status_description, :exchange_rate_fixed_flag,
  12 + :po_exchange_rate, :blanket_po_contract, :ap_invoice_terms, :ap_invoice_terms_description,
  13 + :completed_date, :order_entry_date, :order_due_date, :memo_date, :memo_code, :order_type,
  14 + :payment_terms, :tax_status, :shipping_instrs, :order_discount, :amended_count, :buyer, :name,
  15 + :document_format, :include_in_mrp, :customform_fields, :purchase_order_line_merchandise,
  16 + :purchase_order_totals
  17 +
  18 + class CustomFormField
  19 + attr_accessor :sequence, :name, :prompt, :column, :type, :length, :decimals, :default, :allow_null,
  20 + :validation_type, :value_null
  21 + end
  22 +
  23 + class Merchandise
  24 + attr_accessor :line,
  25 + :line_type,
  26 + :line_Type_description,
  27 + :m_stock_code,
  28 + :m_stock_des,
  29 + :long_desc,
  30 + :traceable_type,
  31 + :mass,
  32 + :volume,
  33 + :receipt_into_flag,
  34 + :m_warehouse,
  35 + :m_warehouse_desc,
  36 + :m_outstanding_qty,
  37 + :unedited__m_outstanding_qty,
  38 + :m_order_qty,
  39 + :unedited__m_order_qty,
  40 + :m_received_qty,
  41 + :unedited__m_received_qty,
  42 + :m_order_uom,
  43 + :m_complete_flag,
  44 + :m_job,
  45 + :include_in_mrp,
  46 + :m_price,
  47 + :edit_m_price,
  48 + :order_value,
  49 + :m_disc_pct1,
  50 + :m_disc_pct2,
  51 + :m_disc_pct3,
  52 + :m_disc_value,
  53 + :m_disc_val_flag,
  54 + :m_price_uom,
  55 + :m_latest_due_date,
  56 + :m_sup_catalogue,
  57 + :m_product_class,
  58 + :m_product_class_description,
  59 + :m_stocking_uom,
  60 + :m_decimals_to_prt,
  61 + :m_conv_fact_prc_um,
  62 + :m_mul_div_prc,
  63 + :m_tax_code,
  64 + :m_tax_code_description,
  65 + :m_conv_fact_ord_um,
  66 + :m_mul_div_alloc,
  67 + :m_gl_code,
  68 + :m_gl_code_description,
  69 + :m_orig_due_date,
  70 + :m_lct_confirmed,
  71 + :m_subcontract_op,
  72 + :m_version,
  73 + :m_release,
  74 + :asset_flag,
  75 + :capex_code,
  76 + :asset_capex_line,
  77 + :discount,
  78 + :last_receipt,
  79 + :ledger,
  80 + :requisition_line,
  81 + :requisition_no,
  82 + :requisition_user,
  83 + :reschedule,
  84 + :rev,
  85 + :release,
  86 + :selection_code,
  87 + :selection_type,
  88 + :currency,
  89 + :m_inspection_reqd,
  90 + :inspected_received,
  91 + :stock_and_alt_um,
  92 + :default_costing_method,
  93 + :default_price,
  94 + :edit_default_price,
  95 + :default_prum,
  96 + :costing_methods_available
  97 +
  98 + end # end of class MerchandiseDetail
  99 +
  100 + class CostingMethodsAvailable
  101 + attr_accessor :manual_method_code,
  102 + :manual_method_desc,
  103 + :manual_method_price,
  104 + :edit__manual_method_price,
  105 + :manual_method_costing_prum,
  106 + :total_cost_method_code,
  107 + :total_cost_method_desc,
  108 + :total_cost_method_price,
  109 + :edit__total_cost_method_price,
  110 + :total_cost_costing_prum,
  111 + :purchase_price_method_code,
  112 + :purchase_price_method_desc,
  113 + :purchase_price_method_price,
  114 + :edit__purchase_price_method_price,
  115 + :purchase_price_costing_prum,
  116 + :price_tax_method_code,
  117 + :price_tax_method_desc,
  118 + :price_tax_method_price,
  119 + :edit__price_tax_method_price,
  120 + :price_tax_costing_prum
  121 + end # end of class CostingMethodsAvailable
  122 +
  123 + class PurchaseOrderTotals
  124 + attr_accessor :local_values, :current_values, :first_receipt_date, :order_complete_date
  125 +
  126 + end
  127 +
  128 + class PurchaseOrderTotalsLocalValues
  129 + attr_accessor :local_order_value, :local_received_to_date_value, :local_outstanding_value,
  130 + :edited_local_order_value, :edited_local_received_to_date_value,
  131 + :edited_local_outstanding_value
  132 + end
  133 +
  134 + class PurchaseOrderTotalsCurrentValues
  135 + attr_accessor :current_order_value, :current_received_to_date_value, :current_outstanding_value,
  136 + :edited_current_order_value, :edited_current_received_to_date_value,
  137 + :edited_current_outstanding_value
  138 + end
  139 +
6 end 140 end
7 end 141 end
8 end 142 end
9 end 143 end
10 -  
lib/syspro/business_objects/parsers/porqry_parser.rb
@@ -49,10 +49,178 @@ module Syspro @@ -49,10 +49,178 @@ module Syspro
49 por.ap_invoice_terms_description = doc.first_element_child.xpath('ApInvoiceTermsDescription').text 49 por.ap_invoice_terms_description = doc.first_element_child.xpath('ApInvoiceTermsDescription').text
50 por.completed_date = doc.first_element_child.xpath('CompletedDate').text 50 por.completed_date = doc.first_element_child.xpath('CompletedDate').text
51 por.warehouse = doc.first_element_child.xpath('Warehouse').text 51 por.warehouse = doc.first_element_child.xpath('Warehouse').text
52 - por.warehouse_desc 52 + por.warehouse_desc = doc.first_element_child.xpath('WarehouseDesc').text
  53 + por.order_entry_date = doc.first_element_child.xpath('OrderEntryDate').text
  54 + por.order_due_date = doc.first_element_child.xpath('OrderDueDate').text
  55 + por.memo_date = doc.first_element_child.xpath('MemoDate').text
  56 + por.memo_code = doc.first_element_child.xpath('MemoCode').text
  57 + por.order_type = doc.first_element_child.xpath('OrderType').text
  58 + por.payment_terms = doc.first_element_child.xpath('PaymentTerms').text
  59 + por.tax_status = doc.first_element_child.xpath('TaxStatus').text
  60 + por.shipping_instrs = doc.first_element_child.xpath('ShippingInstrs').text
  61 + por.order_discount = doc.first_element_child.xpath('OrderDiscount').text
  62 + por.amended_count = doc.first_element_child.xpath('AmendedCount').text
  63 + por.buyer = doc.first_element_child.xpath('Buyer').text
  64 + por.name = doc.first_element_child.xpath('Name').text
  65 + por.document_format = doc.first_element_child.xpath('DocumentFormat').text
  66 + por.include_in_mrp = doc.first_element_child.xpath('IncludeInMrp').text
  67 +
  68 + por.customform_fields = doc.first_element_child.xpath("CustomForm").children.select{|item| item.name === "Field"}.map do |field_el|
  69 + if field_el && field_el.children.count > 0
  70 + Syspro::BusinessObjects::Models::PorDetail::CustomFormField.new.tap do |field_obj|
  71 + field_obj.sequence = field_el.children.select{|el| el.name === "Sequence"}[0].children.text
  72 + field_obj.name = field_el.children.select{|el| el.name === "Name"}[0].children.text
  73 + field_obj.prompt = field_el.children.select{|el| el.name === "Prompt"}[0].children.text
  74 + field_obj.column = field_el.children.select{|el| el.name === "Column"}[0].children.text
  75 + field_obj.type = field_el.children.select{|el| el.name === "Type"}[0].children.text
  76 + field_obj.length = field_el.children.select{|el| el.name === "Length"}[0].children.text
  77 + field_obj.decimals = field_el.children.select{|el| el.name === "Decimals"}[0].children.text
  78 + field_obj.default = field_el.children.select{|el| el.name === "Default"}[0].children.text
  79 + field_obj.allow_null = field_el.children.select{|el| el.name === "AllowNull"}[0].children.text
  80 + field_obj.validation_type = field_el.children.select{|el| el.name === "ValidationType"}[0].children.text
  81 + field_obj.value_null = field_el.children.select{|el| el.name === "ValueNull"}[0].children.text
  82 + end
  83 + end
  84 + end.compact
  85 +
  86 + por.purchase_order_line_merchandise = doc.first_element_child.xpath("PurchaseOrderLine").children.select{|item| item.name === "Merchandise"}.map do |merch_el|
  87 + if merch_el && merch_el.children.count > 0
  88 + Syspro::BusinessObjects::Models::PorDetail::Merchandise.new.tap do |merch_obj|
  89 + merch_obj.line = merch_el.children.select{|el| el.name === "Line"}[0].children.text
  90 + merch_obj.line_type = merch_el.children.select{|el| el.name === "LineType"}[0].children.text
  91 + merch_obj.line_Type_description = merch_el.children.select{|el| el.name === "LineTypeDescription"}[0].children.text
  92 + merch_obj.m_stock_code = merch_el.children.select{|el| el.name === "MStockCode"}[0].children.text
  93 + merch_obj.m_stock_des = merch_el.children.select{|el| el.name === "MStockDes"}[0].children.text
  94 + merch_obj.long_desc = merch_el.children.select{|el| el.name === "LongDesc"}[0].children.text
  95 + merch_obj.traceable_type = merch_el.children.select{|el| el.name === "TraceableType"}[0].children.text
  96 + merch_obj.mass = merch_el.children.select{|el| el.name === "Mass"}[0].children.text
  97 + merch_obj.volume = merch_el.children.select{|el| el.name === "Volume"}[0].children.text
  98 + merch_obj.receipt_into_flag = merch_el.children.select{|el| el.name === "ReceiptIntoFlag"}[0].children.text
  99 + merch_obj.m_warehouse = merch_el.children.select{|el| el.name === "MWarehouse"}[0].children.text
  100 + merch_obj.m_warehouse_desc = merch_el.children.select{|el| el.name === "MWarehouseDesc"}[0].children.text
  101 + merch_obj.m_outstanding_qty = merch_el.children.select{|el| el.name === "MOutstandingQty"}[0].children.text
  102 + merch_obj.unedited__m_outstanding_qty = merch_el.children.select{|el| el.name === "Unedited_MOutstandingQty"}[0].children.text
  103 + merch_obj.m_order_qty = merch_el.children.select{|el| el.name === "MOrderQty"}[0].children.text
  104 + merch_obj.unedited__m_order_qty = merch_el.children.select{|el| el.name === "Unedited_MOrderQty"}[0].children.text
  105 + merch_obj.m_received_qty = merch_el.children.select{|el| el.name === "MReceivedQty"}[0].children.text
  106 + merch_obj.unedited__m_received_qty = merch_el.children.select{|el| el.name === "Unedited_MReceivedQty"}[0].children.text
  107 + merch_obj.m_order_uom = merch_el.children.select{|el| el.name === "MOrderUom"}[0].children.text
  108 + merch_obj.m_complete_flag = merch_el.children.select{|el| el.name === "MCompleteFlag"}[0].children.text
  109 + merch_obj.m_job = merch_el.children.select{|el| el.name === "MJob"}[0].children.text
  110 + merch_obj.include_in_mrp = merch_el.children.select{|el| el.name === "IncludeInMrp"}[0].children.text
  111 + merch_obj.m_price = merch_el.children.select{|el| el.name === "MPrice"}[0].children.text
  112 + merch_obj.edit_m_price = merch_el.children.select{|el| el.name === "Edit_MPrice"}[0].children.text
  113 + merch_obj.order_value = merch_el.children.select{|el| el.name === "OrderValue"}[0].children.text
  114 + merch_obj.m_disc_pct1 = merch_el.children.select{|el| el.name === "MDiscPct1"}[0].children.text
  115 + merch_obj.m_disc_pct2 = merch_el.children.select{|el| el.name === "MDiscPct2"}[0].children.text
  116 + merch_obj.m_disc_pct3 = merch_el.children.select{|el| el.name === "MDiscPct3"}[0].children.text
  117 + merch_obj.m_disc_value = merch_el.children.select{|el| el.name === "MDiscValue"}[0].children.text
  118 + merch_obj.m_disc_val_flag = merch_el.children.select{|el| el.name === "MDiscValFlag"}[0].children.text
  119 + merch_obj.m_price_uom = merch_el.children.select{|el| el.name === "MPriceUom"}[0].children.text
  120 + merch_obj.m_latest_due_date = merch_el.children.select{|el| el.name === "MLatestDueDate"}[0].children.text
  121 + merch_obj.m_sup_catalogue = merch_el.children.select{|el| el.name === "MSupCatalogue"}[0].children.text
  122 + merch_obj.m_product_class = merch_el.children.select{|el| el.name === "MProductClass"}[0].children.text
  123 + merch_obj.m_product_class_description = merch_el.children.select{|el| el.name === "MProductClassDescription"}[0].children.text
  124 + merch_obj.m_stocking_uom = merch_el.children.select{|el| el.name === "MStockingUom"}[0].children.text
  125 + merch_obj.m_decimals_to_prt = merch_el.children.select{|el| el.name === "MDecimalsToPrt"}[0].children.text
  126 + merch_obj.m_conv_fact_prc_um = merch_el.children.select{|el| el.name === "MConvFactPrcUm"}[0].children.text
  127 + merch_obj.m_mul_div_prc = merch_el.children.select{|el| el.name === "MMulDivPrc"}[0].children.text
  128 + merch_obj.m_tax_code = merch_el.children.select{|el| el.name === "MTaxCode"}[0].children.text
  129 + merch_obj.m_tax_code_description = merch_el.children.select{|el| el.name === "MTaxCodeDescription"}[0].children.text
  130 + merch_obj.m_conv_fact_ord_um = merch_el.children.select{|el| el.name === "MConvFactOrdUm"}[0].children.text
  131 + merch_obj.m_mul_div_alloc = merch_el.children.select{|el| el.name === "MMulDivAlloc"}[0].children.text
  132 + merch_obj.m_gl_code = merch_el.children.select{|el| el.name === "MGlCode"}[0].children.text
  133 + merch_obj.m_gl_code_description = merch_el.children.select{|el| el.name === "MGlCodeDescription"}[0].children.text
  134 + merch_obj.m_orig_due_date = merch_el.children.select{|el| el.name === "MOrigDueDate"}[0].children.text
  135 + merch_obj.m_lct_confirmed = merch_el.children.select{|el| el.name === "MLctConfirmed"}[0].children.text
  136 + merch_obj.m_subcontract_op = merch_el.children.select{|el| el.name === "MSubcontractOp"}[0].children.text
  137 + merch_obj.m_version = merch_el.children.select{|el| el.name === "MVersion"}[0].children.text
  138 + merch_obj.m_release = merch_el.children.select{|el| el.name === "MRelease"}[0].children.text
  139 + merch_obj.asset_flag = merch_el.children.select{|el| el.name === "AssetFlag"}[0].children.text
  140 + merch_obj.capex_code = merch_el.children.select{|el| el.name === "CapexCode"}[0].children.text
  141 + merch_obj.asset_capex_line = merch_el.children.select{|el| el.name === "AssetCapexLine"}[0].children.text
  142 + merch_obj.discount = merch_el.children.select{|el| el.name === "Discount"}[0].children.text
  143 + merch_obj.last_receipt = merch_el.children.select{|el| el.name === "LastReceipt"}[0].children.text
  144 + merch_obj.ledger = merch_el.children.select{|el| el.name === "Ledger"}[0].children.text
  145 + merch_obj.requisition_line = merch_el.children.select{|el| el.name === "RequisitionLine"}[0].children.text
  146 + merch_obj.requisition_no = merch_el.children.select{|el| el.name === "RequisitionNo"}[0].children.text
  147 + merch_obj.requisition_user = merch_el.children.select{|el| el.name === "RequisitionUser"}[0].children.text
  148 + merch_obj.reschedule = merch_el.children.select{|el| el.name === "Reschedule"}[0].children.text
  149 + merch_obj.rev = merch_el.children.select{|el| el.name === "Rev"}[0].children.text
  150 + merch_obj.release = merch_el.children.select{|el| el.name === "Release"}[0].children.text
  151 + merch_obj.selection_code = merch_el.children.select{|el| el.name === "SelectionCode"}[0].children.text
  152 + merch_obj.selection_type = merch_el.children.select{|el| el.name === "SelectionType"}[0].children.text
  153 + merch_obj.currency = merch_el.children.select{|el| el.name === "Currency"}[0].children.text
  154 + merch_obj.m_inspection_reqd = merch_el.children.select{|el| el.name === "MInspectionReqd"}[0].children.text
  155 + merch_obj.inspected_received = merch_el.children.select{|el| el.name === "InspectedReceived"}[0].children.text
  156 + merch_obj.stock_and_alt_um = merch_el.children.select{|el| el.name === "StockAndAltUm"}[0].children.text
  157 + merch_obj.default_costing_method = merch_el.children.select{|el| el.name === "DefaultCostingMethod"}[0].children.text
  158 + merch_obj.default_price = merch_el.children.select{|el| el.name === "DefaultPrice"}[0].children.text
  159 + merch_obj.edit_default_price = merch_el.children.select{|el| el.name === "Edit_DefaultPrice"}[0].children.text
  160 + merch_obj.default_prum = merch_el.children.select{|el| el.name === "DefaultPrum"}[0].children.text
  161 + merch_obj.costing_methods_available = merch_el.children.select{|el| el.name === "CostingMethodsAvailable"}.map do |field_el_2|
  162 + if field_el_2 && field_el_2.children.count > 0
  163 + Syspro::BusinessObjects::Models::PorDetail::CostingMethodsAvailable.new.tap do |avail_obj|
  164 + avail_obj.manual_method_code = field_el_2.children.select{|el_2| el_2.name === "ManualMethodCode"}[0].children.text
  165 + avail_obj.manual_method_desc = field_el_2.children.select{|el_2| el_2.name === "ManualMethodDesc"}[0].children.text
  166 + avail_obj.manual_method_price = field_el_2.children.select{|el_2| el_2.name === "ManualMethodPrice"}[0].children.text
  167 + avail_obj.edit__manual_method_price = field_el_2.children.select{|el_2| el_2.name === "Edit_ManualMethodPrice"}[0].children.text
  168 + avail_obj.manual_method_costing_prum = field_el_2.children.select{|el_2| el_2.name === "ManualMethodCostingPrum"}[0].children.text
  169 + avail_obj.total_cost_method_code = field_el_2.children.select{|el_2| el_2.name === "TotalCostMethodCode"}[0].children.text
  170 + avail_obj.total_cost_method_desc = field_el_2.children.select{|el_2| el_2.name === "TotalCostMethodDesc"}[0].children.text
  171 + avail_obj.total_cost_method_price = field_el_2.children.select{|el_2| el_2.name === "TotalCostMethodPrice"}[0].children.text
  172 + avail_obj.edit__total_cost_method_price = field_el_2.children.select{|el_2| el_2.name === "Edit_TotalCostMethodPrice"}[0].children.text
  173 + avail_obj.total_cost_costing_prum = field_el_2.children.select{|el_2| el_2.name === "TotalCostCostingPrum"}[0].children.text
  174 + avail_obj.purchase_price_method_code = field_el_2.children.select{|el_2| el_2.name === "PurchasePriceMethodCode"}[0].children.text
  175 + avail_obj.purchase_price_method_desc = field_el_2.children.select{|el_2| el_2.name === "PurchasePriceMethodDesc"}[0].children.text
  176 + avail_obj.purchase_price_method_price = field_el_2.children.select{|el_2| el_2.name === "PurchasePriceMethodPrice"}[0].children.text
  177 + avail_obj.edit__purchase_price_method_price = field_el_2.children.select{|el_2| el_2.name === "Edit_PurchasePriceMethodPrice"}[0].children.text
  178 + avail_obj.purchase_price_costing_prum = field_el_2.children.select{|el_2| el_2.name === "PurchasePriceCostingPrum"}[0].children.text
  179 + avail_obj.price_tax_method_code = field_el_2.children.select{|el_2| el_2.name === "PriceTaxMethodCode"}[0].children.text
  180 + avail_obj.price_tax_method_desc = field_el_2.children.select{|el_2| el_2.name === "PriceTaxMethodDesc"}[0].children.text
  181 + avail_obj.price_tax_method_price = field_el_2.children.select{|el_2| el_2.name === "PriceTaxMethodPrice"}[0].children.text
  182 + avail_obj.edit__price_tax_method_price = field_el_2.children.select{|el_2| el_2.name === "Edit_PriceTaxMethodPrice"}[0].children.text
  183 + avail_obj.price_tax_costing_prum = field_el_2.children.select{|el_2| el_2.name === "PriceTaxCostingPrum"}[0].children.text
  184 + end
  185 + end
  186 + end.compact
  187 + end
  188 + end
  189 + end.compact
  190 +
  191 + por.purchase_order_totals = doc.first_element_child.xpath("PurchaseOrderTotals").map do |total_el|
  192 + Syspro::BusinessObjects::Models::PorDetail::PurchaseOrderTotals.new.tap do |total_obj|
  193 +
  194 + total_obj.local_values = total_el.children.select{|el| el.name === "LocalValues"}.map do |loc_val_el|
  195 + Syspro::BusinessObjects::Models::PorDetail::PurchaseOrderTotalsLocalValues.new.tap do |loc_obj|
  196 + loc_obj.local_order_value = loc_val_el.children.select{|el_2| el_2.name === "LocalOrderValue"}[0].text
  197 + loc_obj.local_received_to_date_value = loc_val_el.children.select{|el_2| el_2.name === "LocalReceivedToDateValue"}[0].text
  198 + loc_obj.local_outstanding_value = loc_val_el.children.select{|el_2| el_2.name === "LocalOutstandingValue"}[0].text
  199 + loc_obj.edited_local_order_value = loc_val_el.children.select{|el_2| el_2.name === "Edited_LocalOrderValue"}[0].text
  200 + loc_obj.edited_local_received_to_date_value = loc_val_el.children.select{|el_2| el_2.name === "Edited_LocalReceivedToDateValue"}[0].text
  201 + loc_obj.edited_local_outstanding_value = loc_val_el.children.select{|el_2| el_2.name === "Edited_LocalOutstandingValue"}[0].text
  202 + end
  203 + end
  204 +
  205 + total_obj.current_values = total_el.children.select{|el| el.name === "CurrentValues"}.map do |cur_val_el|
  206 + Syspro::BusinessObjects::Models::PorDetail::PurchaseOrderTotalsCurrentValues.new.tap do |cur_obj|
  207 + cur_obj.current_order_value = cur_val_el.children.select{|el_2| el_2.name === "CurrentOrderValue"}[0].text
  208 + cur_obj.current_received_to_date_value = cur_val_el.children.select{|el_2| el_2.name === "CurrentReceivedToDateValue"}[0].text
  209 + cur_obj.current_outstanding_value = cur_val_el.children.select{|el_2| el_2.name === "CurrentOutstandingValue"}[0].text
  210 + cur_obj.edited_current_order_value = cur_val_el.children.select{|el_2| el_2.name === "Edited_CurrentOrderValue"}[0].text
  211 + cur_obj.edited_current_received_to_date_value = cur_val_el.children.select{|el_2| el_2.name === "Edited_CurrentReceivedToDateValue"}[0].text
  212 + cur_obj.edited_current_outstanding_value = cur_val_el.children.select{|el_2| el_2.name === "Edited_CurrentOutstandingValue"}[0].text
  213 + end
  214 + end
  215 +
  216 + total_obj.first_receipt_date = total_el.children.select{|el| el.name === "FirstReceiptDate"}[0].text
  217 + total_obj.order_complete_date = total_el.children.select{|el| el.name === "OrderCompleteDate"}[0].text
  218 + end
  219 + end.compact
  220 +
  221 + por
53 end 222 end
54 end 223 end
55 end 224 end
56 end 225 end
57 end 226 end
58 -  
lib/syspro/business_objects/porqry.rb
@@ -45,4 +45,3 @@ module Syspro @@ -45,4 +45,3 @@ module Syspro
45 end 45 end
46 end 46 end
47 end 47 end
48 -  
test/cassettes/test_client_block_execution.yml
@@ -27,10 +27,10 @@ http_interactions: @@ -27,10 +27,10 @@ http_interactions:
27 Server: 27 Server:
28 - Microsoft-HTTPAPI/2.0 28 - Microsoft-HTTPAPI/2.0
29 Date: 29 Date:
30 - - Tue, 15 May 2018 00:53:44 GMT 30 + - Thu, 17 May 2018 16:51:34 GMT
31 body: 31 body:
32 encoding: UTF-8 32 encoding: UTF-8
33 string: 7.0.0.6 33 string: 7.0.0.6
34 http_version: 34 http_version:
35 - recorded_at: Tue, 15 May 2018 00:53:43 GMT 35 + recorded_at: Thu, 17 May 2018 16:51:34 GMT
36 recorded_with: VCR 4.0.0 36 recorded_with: VCR 4.0.0
test/cassettes/test_get_syspro_version.yml
@@ -27,10 +27,10 @@ http_interactions: @@ -27,10 +27,10 @@ http_interactions:
27 Server: 27 Server:
28 - Microsoft-HTTPAPI/2.0 28 - Microsoft-HTTPAPI/2.0
29 Date: 29 Date:
30 - - Tue, 15 May 2018 00:53:44 GMT 30 + - Thu, 17 May 2018 16:51:34 GMT
31 body: 31 body:
32 encoding: UTF-8 32 encoding: UTF-8
33 string: 7.0.0.6 33 string: 7.0.0.6
34 http_version: 34 http_version:
35 - recorded_at: Tue, 15 May 2018 00:53:43 GMT 35 + recorded_at: Thu, 17 May 2018 16:51:34 GMT
36 recorded_with: VCR 4.0.0 36 recorded_with: VCR 4.0.0
test/cassettes/test_logoff_error.yml
@@ -27,10 +27,10 @@ http_interactions: @@ -27,10 +27,10 @@ http_interactions:
27 Server: 27 Server:
28 - Microsoft-HTTPAPI/2.0 28 - Microsoft-HTTPAPI/2.0
29 Date: 29 Date:
30 - - Tue, 15 May 2018 00:53:22 GMT 30 + - Thu, 17 May 2018 16:53:03 GMT
31 body: 31 body:
32 encoding: UTF-8 32 encoding: UTF-8
33 string: 'ERROR: Unable to read the SYSPRO base directory registry string BaseDir8' 33 string: 'ERROR: Unable to read the SYSPRO base directory registry string BaseDir8'
34 http_version: 34 http_version:
35 - recorded_at: Tue, 15 May 2018 00:53:21 GMT 35 + recorded_at: Thu, 17 May 2018 16:53:03 GMT
36 recorded_with: VCR 4.0.0 36 recorded_with: VCR 4.0.0
test/cassettes/test_logon.yml
@@ -27,10 +27,10 @@ http_interactions: @@ -27,10 +27,10 @@ http_interactions:
27 Server: 27 Server:
28 - Microsoft-HTTPAPI/2.0 28 - Microsoft-HTTPAPI/2.0
29 Date: 29 Date:
30 - - Tue, 15 May 2018 00:54:50 GMT 30 + - Thu, 17 May 2018 16:53:03 GMT
31 body: 31 body:
32 encoding: UTF-8 32 encoding: UTF-8
33 - string: 'B83836D0602F4447B5F1473EF76DFE8200 ' 33 + string: 'CED6A1CD9634DD409665A876B0722D0900 '
34 http_version: 34 http_version:
35 - recorded_at: Tue, 15 May 2018 00:54:49 GMT 35 + recorded_at: Thu, 17 May 2018 16:53:03 GMT
36 recorded_with: VCR 4.0.0 36 recorded_with: VCR 4.0.0
test/cassettes/test_logon_error.yml
@@ -27,10 +27,10 @@ http_interactions: @@ -27,10 +27,10 @@ http_interactions:
27 Server: 27 Server:
28 - Microsoft-HTTPAPI/2.0 28 - Microsoft-HTTPAPI/2.0
29 Date: 29 Date:
30 - - Tue, 15 May 2018 00:54:41 GMT 30 + - Thu, 17 May 2018 16:52:54 GMT
31 body: 31 body:
32 encoding: UTF-8 32 encoding: UTF-8
33 string: 'ERROR: Invalid operator password' 33 string: 'ERROR: Invalid operator password'
34 http_version: 34 http_version:
35 - recorded_at: Tue, 15 May 2018 00:54:40 GMT 35 + recorded_at: Thu, 17 May 2018 16:52:54 GMT
36 recorded_with: VCR 4.0.0 36 recorded_with: VCR 4.0.0
test/cassettes/test_por_query.yml
@@ -27,15 +27,15 @@ http_interactions: @@ -27,15 +27,15 @@ http_interactions:
27 Server: 27 Server:
28 - Microsoft-HTTPAPI/2.0 28 - Microsoft-HTTPAPI/2.0
29 Date: 29 Date:
30 - - Tue, 15 May 2018 21:00:23 GMT 30 + - Thu, 17 May 2018 16:52:35 GMT
31 body: 31 body:
32 encoding: UTF-8 32 encoding: UTF-8
33 - string: '3087FDA601939146B2D8AD4FA1CD2F2600 ' 33 + string: 'C6897E2FC9768F4DA49CA2144341435700 '
34 http_version: 34 http_version:
35 - recorded_at: Tue, 15 May 2018 21:00:22 GMT 35 + recorded_at: Thu, 17 May 2018 16:52:35 GMT
36 - request: 36 - request:
37 method: get 37 method: get
38 - uri: http://syspro.wildlandlabs.com:90/SYSPROWCFService/Rest/Query/Query?BusinessObject=PORQRY&UserId=3087FDA601939146B2D8AD4FA1CD2F2600%20%20&XmlIn=%3C?xml%20version=%221.0%22%20encoding=%22Windows-1252%22?%3E%0A%3CQuery%20xmlns:xsd=%22http://www.w3.org/2001/XMLSchema-instance%22%20xsd:noNamespaceSchemaLocation=%22PORQRY.XSD%22%3E%0A%20%20%3CKey%3E%0A%20%20%20%20%3CPurchaseOrder%3E%2000001%3C/PurchaseOrder%3E%0A%20%20%3C/Key%3E%0A%20%20%3COption%3E%0A%20%20%20%20%3CIncludeStockedLines%3EY%3C/IncludeStockedLines%3E%0A%20%20%20%20%3CIncludeNonStockedLines%3EY%3C/IncludeNonStockedLines%3E%0A%20%20%20%20%3CIncludeFreightLines%3EY%3C/IncludeFreightLines%3E%0A%20%20%20%20%3CIncludeMiscellaneousLines%3EY%3C/IncludeMiscellaneousLines%3E%0A%20%20%20%20%3CIncludeCommentLines%3EY%3C/IncludeCommentLines%3E%0A%20%20%20%20%3CIncludeCompletedLines%3EY%3C/IncludeCompletedLines%3E%0A%20%20%20%20%3CIncludeGrns%3EY%3C/IncludeGrns%3E%0A%20%20%20%20%3CIncludeHistory%3EY%3C/IncludeHistory%3E%0A%20%20%20%20%3CIncludeLctDetails%3EY%3C/IncludeLctDetails%3E%0A%20%20%20%20%3CIncludeRequisitionDetails%3EY%3C/IncludeRequisitionDetails%3E%0A%20%20%20%20%3CIncludeRequisitionRouting%3EY%3C/IncludeRequisitionRouting%3E%0A%20%20%20%20%3CIncludeSalesOrders%3EY%3C/IncludeSalesOrders%3E%0A%20%20%20%20%3CIncludeCustomForms%3EY%3C/IncludeCustomForms%3E%20%0A%20%20%20%20%3CXslStylesheet/%3E%0A%20%20%3C/Option%3E%0A%20%20%3CFilter%3E%0A%20%20%20%20%3CLineNo%20FilterType=%22A%22%20FilterValue=%22%22/%3E%20%20%20%20%20%0A%20%20%3C/Filter%3E%0A%3C/Query%3E%0A%0A 38 + uri: http://syspro.wildlandlabs.com:90/SYSPROWCFService/Rest/Query/Query?BusinessObject=PORQRY&UserId=C6897E2FC9768F4DA49CA2144341435700%20%20&XmlIn=%3C?xml%20version=%221.0%22%20encoding=%22Windows-1252%22?%3E%0A%3CQuery%20xmlns:xsd=%22http://www.w3.org/2001/XMLSchema-instance%22%20xsd:noNamespaceSchemaLocation=%22PORQRY.XSD%22%3E%0A%20%20%3CKey%3E%0A%20%20%20%20%3CPurchaseOrder%3E%2000001%3C/PurchaseOrder%3E%0A%20%20%3C/Key%3E%0A%20%20%3COption%3E%0A%20%20%20%20%3CIncludeStockedLines%3EY%3C/IncludeStockedLines%3E%0A%20%20%20%20%3CIncludeNonStockedLines%3EY%3C/IncludeNonStockedLines%3E%0A%20%20%20%20%3CIncludeFreightLines%3EY%3C/IncludeFreightLines%3E%0A%20%20%20%20%3CIncludeMiscellaneousLines%3EY%3C/IncludeMiscellaneousLines%3E%0A%20%20%20%20%3CIncludeCommentLines%3EY%3C/IncludeCommentLines%3E%0A%20%20%20%20%3CIncludeCompletedLines%3EY%3C/IncludeCompletedLines%3E%0A%20%20%20%20%3CIncludeGrns%3EY%3C/IncludeGrns%3E%0A%20%20%20%20%3CIncludeHistory%3EY%3C/IncludeHistory%3E%0A%20%20%20%20%3CIncludeLctDetails%3EY%3C/IncludeLctDetails%3E%0A%20%20%20%20%3CIncludeRequisitionDetails%3EY%3C/IncludeRequisitionDetails%3E%0A%20%20%20%20%3CIncludeRequisitionRouting%3EY%3C/IncludeRequisitionRouting%3E%0A%20%20%20%20%3CIncludeSalesOrders%3EY%3C/IncludeSalesOrders%3E%0A%20%20%20%20%3CIncludeCustomForms%3EY%3C/IncludeCustomForms%3E%20%0A%20%20%20%20%3CXslStylesheet/%3E%0A%20%20%3C/Option%3E%0A%20%20%3CFilter%3E%0A%20%20%20%20%3CLineNo%20FilterType=%22A%22%20FilterValue=%22%22/%3E%20%20%20%20%20%0A%20%20%3C/Filter%3E%0A%3C/Query%3E%0A%0A
39 body: 39 body:
40 encoding: US-ASCII 40 encoding: US-ASCII
41 string: '' 41 string: ''
@@ -60,7 +60,7 @@ http_interactions: @@ -60,7 +60,7 @@ http_interactions:
60 Server: 60 Server:
61 - Microsoft-HTTPAPI/2.0 61 - Microsoft-HTTPAPI/2.0
62 Date: 62 Date:
63 - - Tue, 15 May 2018 21:00:28 GMT 63 + - Thu, 17 May 2018 16:52:40 GMT
64 body: 64 body:
65 encoding: UTF-8 65 encoding: UTF-8
66 string: "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\n<PorDetail Language='05' 66 string: "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\n<PorDetail Language='05'
@@ -146,5 +146,5 @@ http_interactions: @@ -146,5 +146,5 @@ http_interactions:
146 \ 0.00</CurrentReceivedToDateValue>\n<CurrentOutstandingValue> 0.00</CurrentOutstandingValue>\n<Edited_CurrentOrderValue> 146 \ 0.00</CurrentReceivedToDateValue>\n<CurrentOutstandingValue> 0.00</CurrentOutstandingValue>\n<Edited_CurrentOrderValue>
147 \ 0.00</Edited_CurrentOrderValue>\n<Edited_CurrentReceivedToDateValue>0.00</Edited_CurrentReceivedToDateValue>\n<Edited_CurrentOutstandingValue>0.00</Edited_CurrentOutstandingValue>\n</CurrentValues>\n<FirstReceiptDate/>\n<OrderCompleteDate/>\n</PurchaseOrderTotals>\n</PorDetail>\n " 147 \ 0.00</Edited_CurrentOrderValue>\n<Edited_CurrentReceivedToDateValue>0.00</Edited_CurrentReceivedToDateValue>\n<Edited_CurrentOutstandingValue>0.00</Edited_CurrentOutstandingValue>\n</CurrentValues>\n<FirstReceiptDate/>\n<OrderCompleteDate/>\n</PurchaseOrderTotals>\n</PorDetail>\n "
148 http_version: 148 http_version:
149 - recorded_at: Tue, 15 May 2018 21:00:26 GMT 149 + recorded_at: Thu, 17 May 2018 16:52:40 GMT
150 recorded_with: VCR 4.0.0 150 recorded_with: VCR 4.0.0
test/cassettes/test_query_browse.yml
@@ -27,15 +27,15 @@ http_interactions: @@ -27,15 +27,15 @@ http_interactions:
27 Server: 27 Server:
28 - Microsoft-HTTPAPI/2.0 28 - Microsoft-HTTPAPI/2.0
29 Date: 29 Date:
30 - - Tue, 15 May 2018 00:54:01 GMT 30 + - Thu, 17 May 2018 16:52:05 GMT
31 body: 31 body:
32 encoding: UTF-8 32 encoding: UTF-8
33 - string: '391E9C831A05AC4CAEE55E3092F4352D00 ' 33 + string: 'AA79E916A9C2814A887CB5F77952335400 '
34 http_version: 34 http_version:
35 - recorded_at: Tue, 15 May 2018 00:54:00 GMT 35 + recorded_at: Thu, 17 May 2018 16:52:05 GMT
36 - request: 36 - request:
37 method: get 37 method: get
38 - uri: http://syspro.wildlandlabs.com:90/SYSPROWCFService/Rest/Query/Browse?UserId=391E9C831A05AC4CAEE55E3092F4352D00%20%20&XmlIn=%3C?xml%20version=%221.0%22%20encoding=%22Windows-1252%22?%3E%0A%3CBrowse%20xmlns:xsd=%22http://www.w3.org/2001/XMLSchema-instance%22%20xsd:noNamespaceSchemaLocation=%22COMBRW.XSD%22%3E%0A%20%20%3CBrowseName%3EInvMaster%3C/BrowseName%3E%0A%20%20%3CStartAtKey/%3E%0A%20%20%3CStartCondition%3E%3C/StartCondition%3E%0A%20%20%3CReturnRows%3E5%3C/ReturnRows%3E%0A%20%20%0A%20%20%3CBrowseDetails%3E%0A%20%20%20%20%3CTableName%3EInvMaster%3C/TableName%3E%0A%20%20%20%20%3CTitle%3EStockCodes%3C/Title%3E%0A%20%20%20%20%0A%20%20%20%20%20%20%3CColumn%3E%0A%20%20%20%20%20%20%20%20%3CColumnName%3EStockCode%3C/ColumnName%3E%0A%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%3C/Column%3E%0A%20%20%20%20%0A%20%20%3C/BrowseDetails%3E%0A%3C/Browse%3E%0A%0A 38 + uri: http://syspro.wildlandlabs.com:90/SYSPROWCFService/Rest/Query/Browse?UserId=AA79E916A9C2814A887CB5F77952335400%20%20&XmlIn=%3C?xml%20version=%221.0%22%20encoding=%22Windows-1252%22?%3E%0A%3CBrowse%20xmlns:xsd=%22http://www.w3.org/2001/XMLSchema-instance%22%20xsd:noNamespaceSchemaLocation=%22COMBRW.XSD%22%3E%0A%20%20%3CBrowseName%3EInvMaster%3C/BrowseName%3E%0A%20%20%3CStartAtKey/%3E%0A%20%20%3CStartCondition%3E%3C/StartCondition%3E%0A%20%20%3CReturnRows%3E5%3C/ReturnRows%3E%0A%20%20%0A%20%20%3CBrowseDetails%3E%0A%20%20%20%20%3CTableName%3EInvMaster%3C/TableName%3E%0A%20%20%20%20%3CTitle%3EStockCodes%3C/Title%3E%0A%20%20%20%20%0A%20%20%20%20%20%20%3CColumn%3E%0A%20%20%20%20%20%20%20%20%3CColumnName%3EStockCode%3C/ColumnName%3E%0A%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%3C/Column%3E%0A%20%20%20%20%0A%20%20%3C/BrowseDetails%3E%0A%3C/Browse%3E%0A%0A
39 body: 39 body:
40 encoding: US-ASCII 40 encoding: US-ASCII
41 string: '' 41 string: ''
@@ -60,7 +60,7 @@ http_interactions: @@ -60,7 +60,7 @@ http_interactions:
60 Server: 60 Server:
61 - Microsoft-HTTPAPI/2.0 61 - Microsoft-HTTPAPI/2.0
62 Date: 62 Date:
63 - - Tue, 15 May 2018 00:54:06 GMT 63 + - Thu, 17 May 2018 16:52:09 GMT
64 body: 64 body:
65 encoding: UTF-8 65 encoding: UTF-8
66 string: "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\n<InvMaster Language='05' 66 string: "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\n<InvMaster Language='05'
@@ -68,5 +68,5 @@ http_interactions: @@ -68,5 +68,5 @@ http_interactions:
68 OperatorPrimaryRole=' '>\n<Title>StockCodes</Title>\n<Row>\n<StockCode>\n<Value>02</Value>\n<DataType>AlphaNumeric</DataType>\n</StockCode>\n</Row>\n<Row>\n<StockCode>\n<Value>021</Value>\n<DataType>AlphaNumeric</DataType>\n</StockCode>\n</Row>\n<Row>\n<StockCode>\n<Value>0214011IFF</Value>\n<DataType>AlphaNumeric</DataType>\n</StockCode>\n</Row>\n<Row>\n<StockCode>\n<Value>022</Value>\n<DataType>AlphaNumeric</DataType>\n</StockCode>\n</Row>\n<Row>\n<StockCode>\n<Value>023</Value>\n<DataType>AlphaNumeric</DataType>\n</StockCode>\n</Row>\n<NextPrevKey>\n<PrevKey>02</PrevKey>\n<NextKey>023</NextKey>\n<Fwd>True</Fwd>\n<Back>False</Back>\n</NextPrevKey>\n<HeaderDetails>\n<Header>Stock 68 OperatorPrimaryRole=' '>\n<Title>StockCodes</Title>\n<Row>\n<StockCode>\n<Value>02</Value>\n<DataType>AlphaNumeric</DataType>\n</StockCode>\n</Row>\n<Row>\n<StockCode>\n<Value>021</Value>\n<DataType>AlphaNumeric</DataType>\n</StockCode>\n</Row>\n<Row>\n<StockCode>\n<Value>0214011IFF</Value>\n<DataType>AlphaNumeric</DataType>\n</StockCode>\n</Row>\n<Row>\n<StockCode>\n<Value>022</Value>\n<DataType>AlphaNumeric</DataType>\n</StockCode>\n</Row>\n<Row>\n<StockCode>\n<Value>023</Value>\n<DataType>AlphaNumeric</DataType>\n</StockCode>\n</Row>\n<NextPrevKey>\n<PrevKey>02</PrevKey>\n<NextKey>023</NextKey>\n<Fwd>True</Fwd>\n<Back>False</Back>\n</NextPrevKey>\n<HeaderDetails>\n<Header>Stock
69 code</Header>\n<Key>StockCode</Key>\n<KeyDescription>Stock code</KeyDescription>\n<Table>InvMaster</Table>\n</HeaderDetails>\n</InvMaster>\n " 69 code</Header>\n<Key>StockCode</Key>\n<KeyDescription>Stock code</KeyDescription>\n<Table>InvMaster</Table>\n</HeaderDetails>\n</InvMaster>\n "
70 http_version: 70 http_version:
71 - recorded_at: Tue, 15 May 2018 00:54:05 GMT 71 + recorded_at: Thu, 17 May 2018 16:52:09 GMT
72 recorded_with: VCR 4.0.0 72 recorded_with: VCR 4.0.0
test/cassettes/test_query_fetch.yml
@@ -27,15 +27,15 @@ http_interactions: @@ -27,15 +27,15 @@ http_interactions:
27 Server: 27 Server:
28 - Microsoft-HTTPAPI/2.0 28 - Microsoft-HTTPAPI/2.0
29 Date: 29 Date:
30 - - Tue, 15 May 2018 00:54:14 GMT 30 + - Thu, 17 May 2018 16:51:47 GMT
31 body: 31 body:
32 encoding: UTF-8 32 encoding: UTF-8
33 - string: '18E80C621C869848B726D01FF3A134A100 ' 33 + string: '5302D42E29F95946813203EF51DF25CE00 '
34 http_version: 34 http_version:
35 - recorded_at: Tue, 15 May 2018 00:54:13 GMT 35 + recorded_at: Thu, 17 May 2018 16:51:47 GMT
36 - request: 36 - request:
37 method: get 37 method: get
38 - uri: http://syspro.wildlandlabs.com:90/SYSPROWCFService/Rest/Query/Fetch?UserId=18E80C621C869848B726D01FF3A134A100%20%20&XmlIn=%3C?xml%20version=%221.0%22%20encoding=%22Windows-1252%22?%3E%0A%3CFetch%20xmlns:xsd=%22http://www.w3.org/2001/XMLSchema-instance%22%20xsd:noNamespaceSchemaLocation=%22COMFCH.XSD%22%3E%0A%20%20%3CTableName%3EInvMaster%3C/TableName%3E%0A%20%20%3CKey%3E02%3C/Key%3E%0A%20%20%0A%20%20%3CFullKeyProvided%3EY%3C/FullKeyProvided%3E%0A%20%20%3CDefaultType%3E%3C/DefaultType%3E%0A%20%20%3CEspressoFetch%3EN%3C/EspressoFetch%3E%0A%3C/Fetch%3E%0A%0A 38 + uri: http://syspro.wildlandlabs.com:90/SYSPROWCFService/Rest/Query/Fetch?UserId=5302D42E29F95946813203EF51DF25CE00%20%20&XmlIn=%3C?xml%20version=%221.0%22%20encoding=%22Windows-1252%22?%3E%0A%3CFetch%20xmlns:xsd=%22http://www.w3.org/2001/XMLSchema-instance%22%20xsd:noNamespaceSchemaLocation=%22COMFCH.XSD%22%3E%0A%20%20%3CTableName%3EInvMaster%3C/TableName%3E%0A%20%20%3CKey%3E02%3C/Key%3E%0A%20%20%0A%20%20%3CFullKeyProvided%3EY%3C/FullKeyProvided%3E%0A%20%20%3CDefaultType%3E%3C/DefaultType%3E%0A%20%20%3CEspressoFetch%3EN%3C/EspressoFetch%3E%0A%3C/Fetch%3E%0A%0A
39 body: 39 body:
40 encoding: US-ASCII 40 encoding: US-ASCII
41 string: '' 41 string: ''
@@ -60,7 +60,7 @@ http_interactions: @@ -60,7 +60,7 @@ http_interactions:
60 Server: 60 Server:
61 - Microsoft-HTTPAPI/2.0 61 - Microsoft-HTTPAPI/2.0
62 Date: 62 Date:
63 - - Tue, 15 May 2018 00:54:23 GMT 63 + - Thu, 17 May 2018 16:51:56 GMT
64 body: 64 body:
65 encoding: UTF-8 65 encoding: UTF-8
66 string: "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\n<InvMaster Language='05' 66 string: "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\n<InvMaster Language='05'
@@ -92,5 +92,5 @@ http_interactions: @@ -92,5 +92,5 @@ http_interactions:
92 \ 0.000</LoadingFactor>\n<SupplUnitCode/>\n<StorageSecurity/>\n<StorageHazard/>\n<StorageCondition/>\n<ProductShelfLife> 92 \ 0.000</LoadingFactor>\n<SupplUnitCode/>\n<StorageSecurity/>\n<StorageHazard/>\n<StorageCondition/>\n<ProductShelfLife>
93 \ 0</ProductShelfLife>\n<InternalShelfLife> 0</InternalShelfLife>\n<AltMethodFlag/>\n<AltSisoFlag/>\n<AltReductionFlag/>\n<WithTaxExpenseType/>\n</InvMaster>\n " 93 \ 0</ProductShelfLife>\n<InternalShelfLife> 0</InternalShelfLife>\n<AltMethodFlag/>\n<AltSisoFlag/>\n<AltReductionFlag/>\n<WithTaxExpenseType/>\n</InvMaster>\n "
94 http_version: 94 http_version:
95 - recorded_at: Tue, 15 May 2018 00:54:22 GMT 95 + recorded_at: Thu, 17 May 2018 16:51:56 GMT
96 recorded_with: VCR 4.0.0 96 recorded_with: VCR 4.0.0
test/cassettes/test_query_query.yml
@@ -27,15 +27,15 @@ http_interactions: @@ -27,15 +27,15 @@ http_interactions:
27 Server: 27 Server:
28 - Microsoft-HTTPAPI/2.0 28 - Microsoft-HTTPAPI/2.0
29 Date: 29 Date:
30 - - Tue, 15 May 2018 00:54:32 GMT 30 + - Thu, 17 May 2018 16:52:18 GMT
31 body: 31 body:
32 encoding: UTF-8 32 encoding: UTF-8
33 - string: 'BE36CA1559EBC34985FC2D5EF166D75B00 ' 33 + string: '4D735EA6DD5ADB46B6E0058EA86DBC4D00 '
34 http_version: 34 http_version:
35 - recorded_at: Tue, 15 May 2018 00:54:31 GMT 35 + recorded_at: Thu, 17 May 2018 16:52:18 GMT
36 - request: 36 - request:
37 method: get 37 method: get
38 - uri: http://syspro.wildlandlabs.com:90/SYSPROWCFService/Rest/Query/Query?BusinessObject=COMFND&UserId=BE36CA1559EBC34985FC2D5EF166D75B00%20%20&XmlIn=%3C?xml%20version=%221.0%22%20encoding=%22Windows-1252%22?%3E%0A%3CQuery%20xmlns:xsd=%22http://www.w3.org/2001/XMLSchema-instance%22%20xsd:noNamespaceSchemaLocation=%22COMFND.XSD%22%3E%0A%20%20%3CTableName%3EInvMaster%3C/TableName%3E%0A%20%20%3CReturnRows%3E5%3C/ReturnRows%3E%0A%20%20%3CColumns%3E%0A%20%20%20%20%0A%20%20%20%20%20%20%3CColumn%3EStockCode%3C/Column%3E%0A%20%20%20%20%0A%20%20%3C/Columns%3E%0A%20%20%0A%20%20%20%20%3CWhere%3E%0A%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%3CExpression%3E%0A%20%20%20%20%20%20%20%20%20%20%3COpenBracket%3E(%3C/OpenBracket%3E%0A%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%3CAndOr%3EAnd%3C/AndOr%3E%0A%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%3CColumn%3EStockCode%3C/Column%3E%0A%20%20%20%20%20%20%20%20%20%20%3CCondition%3EEQ%3C/Condition%3E%0A%20%20%20%20%20%20%20%20%20%20%3CValue%3E02%3C/Value%3E%0A%20%20%20%20%20%20%20%20%20%20%3CCloseBracket%3E)%3C/CloseBracket%3E%0A%20%20%20%20%20%20%20%20%3C/Expression%3E%0A%20%20%20%20%20%20%0A%20%20%20%20%3C/Where%3E%0A%20%20%0A%20%20%3COrderBy%3E%0A%20%20%20%20%3CColumn%3EStockCode%3C/Column%3E%0A%20%20%3C/OrderBy%3E%0A%3C/Query%3E%0A 38 + uri: http://syspro.wildlandlabs.com:90/SYSPROWCFService/Rest/Query/Query?BusinessObject=COMFND&UserId=4D735EA6DD5ADB46B6E0058EA86DBC4D00%20%20&XmlIn=%3C?xml%20version=%221.0%22%20encoding=%22Windows-1252%22?%3E%0A%3CQuery%20xmlns:xsd=%22http://www.w3.org/2001/XMLSchema-instance%22%20xsd:noNamespaceSchemaLocation=%22COMFND.XSD%22%3E%0A%20%20%3CTableName%3EInvMaster%3C/TableName%3E%0A%20%20%3CReturnRows%3E5%3C/ReturnRows%3E%0A%20%20%3CColumns%3E%0A%20%20%20%20%0A%20%20%20%20%20%20%3CColumn%3EStockCode%3C/Column%3E%0A%20%20%20%20%0A%20%20%3C/Columns%3E%0A%20%20%0A%20%20%20%20%3CWhere%3E%0A%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%3CExpression%3E%0A%20%20%20%20%20%20%20%20%20%20%3COpenBracket%3E(%3C/OpenBracket%3E%0A%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%3CAndOr%3EAnd%3C/AndOr%3E%0A%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%3CColumn%3EStockCode%3C/Column%3E%0A%20%20%20%20%20%20%20%20%20%20%3CCondition%3EEQ%3C/Condition%3E%0A%20%20%20%20%20%20%20%20%20%20%3CValue%3E02%3C/Value%3E%0A%20%20%20%20%20%20%20%20%20%20%3CCloseBracket%3E)%3C/CloseBracket%3E%0A%20%20%20%20%20%20%20%20%3C/Expression%3E%0A%20%20%20%20%20%20%0A%20%20%20%20%3C/Where%3E%0A%20%20%0A%20%20%3COrderBy%3E%0A%20%20%20%20%3CColumn%3EStockCode%3C/Column%3E%0A%20%20%3C/OrderBy%3E%0A%3C/Query%3E%0A
39 body: 39 body:
40 encoding: US-ASCII 40 encoding: US-ASCII
41 string: '' 41 string: ''
@@ -60,7 +60,7 @@ http_interactions: @@ -60,7 +60,7 @@ http_interactions:
60 Server: 60 Server:
61 - Microsoft-HTTPAPI/2.0 61 - Microsoft-HTTPAPI/2.0
62 Date: 62 Date:
63 - - Tue, 15 May 2018 00:54:40 GMT 63 + - Thu, 17 May 2018 16:52:26 GMT
64 body: 64 body:
65 encoding: UTF-8 65 encoding: UTF-8
66 string: "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\n<InvMaster Language='05' 66 string: "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\n<InvMaster Language='05'
@@ -68,5 +68,5 @@ http_interactions: @@ -68,5 +68,5 @@ http_interactions:
68 OperatorPrimaryRole=' '>\n<HeaderDetails>\n<TableName>InvMaster</TableName>\n<Columns>\n<Column>StockCode</Column>\n</Columns>\n<OrderBy>\n<Column>StockCode</Column>\n</OrderBy>\n</HeaderDetails>\n<Row>\n<StockCode>02</StockCode>\n</Row>\n<RowsReturned> 68 OperatorPrimaryRole=' '>\n<HeaderDetails>\n<TableName>InvMaster</TableName>\n<Columns>\n<Column>StockCode</Column>\n</Columns>\n<OrderBy>\n<Column>StockCode</Column>\n</OrderBy>\n</HeaderDetails>\n<Row>\n<StockCode>02</StockCode>\n</Row>\n<RowsReturned>
69 \ 1</RowsReturned>\n</InvMaster>\n " 69 \ 1</RowsReturned>\n</InvMaster>\n "
70 http_version: 70 http_version:
71 - recorded_at: Tue, 15 May 2018 00:54:39 GMT 71 + recorded_at: Thu, 17 May 2018 16:52:26 GMT
72 recorded_with: VCR 4.0.0 72 recorded_with: VCR 4.0.0
test/cassettes/test_sor_query.yml
@@ -27,15 +27,15 @@ http_interactions: @@ -27,15 +27,15 @@ http_interactions:
27 Server: 27 Server:
28 - Microsoft-HTTPAPI/2.0 28 - Microsoft-HTTPAPI/2.0
29 Date: 29 Date:
30 - - Tue, 15 May 2018 00:53:39 GMT 30 + - Thu, 17 May 2018 16:52:48 GMT
31 body: 31 body:
32 encoding: UTF-8 32 encoding: UTF-8
33 - string: '88B1144955783D4386011BDD954453CC00 ' 33 + string: '6FDE76F80A298C409BEA62CB2CB0F58B00 '
34 http_version: 34 http_version:
35 - recorded_at: Tue, 15 May 2018 00:53:38 GMT 35 + recorded_at: Thu, 17 May 2018 16:52:48 GMT
36 - request: 36 - request:
37 method: get 37 method: get
38 - uri: http://syspro.wildlandlabs.com:90/SYSPROWCFService/Rest/Query/Query?BusinessObject=SORQRY&UserId=88B1144955783D4386011BDD954453CC00%20%20&XmlIn=%3C?xml%20version=%221.0%22%20encoding=%22Windows-1252%22?%3E%0A%3CQuery%20xmlns:xsd=%22http://www.w3.org/2001/XMLSchema-instance%22%20xsd:noNamespaceSchemaLocation=%22SORQRY.XSD%22%3E%0A%20%20%3CKey%3E%0A%20%20%20%20%3CSalesOrder%3E16R069%3C/SalesOrder%3E%0A%20%20%20%20%0A%20%20%3C/Key%3E%0A%20%20%3COption%3E%0A%20%20%20%20%3CIncludeStockedLines%3EN%3C/IncludeStockedLines%3E%0A%20%20%20%20%20%20%3CIncludeNonStockedLines%3EN%3C/IncludeNonStockedLines%3E%0A%20%20%20%20%20%20%3CIncludeFreightLines%3EN%3C/IncludeFreightLines%3E%0A%20%20%20%20%20%20%3CIncludeMiscLines%3EN%3C/IncludeMiscLines%3E%0A%20%20%20%20%20%20%3CIncludeCommentLines%3EN%3C/IncludeCommentLines%3E%0A%20%20%20%20%20%20%3CIncludeCompletedLines%3EN%3C/IncludeCompletedLines%3E%0A%20%20%20%20%20%20%3CIncludeSerials%3EN%3C/IncludeSerials%3E%0A%20%20%20%20%20%20%3CIncludeLots%3EN%3C/IncludeLots%3E%0A%20%20%20%20%20%20%3CIncludeBins%3EN%3C/IncludeBins%3E%0A%20%20%20%20%20%20%3CIncludeAttachedItems%3EN%3C/IncludeAttachedItems%3E%0A%20%20%20%20%20%20%3CIncludeCustomForms%3EN%3C/IncludeCustomForms%3E%0A%20%20%20%20%20%20%3CIncludeDetailLineCustomForms%3EN%3C/IncludeDetailLineCustomForms%3E%0A%20%20%20%20%20%20%3CIncludeValues%3EN%3C/IncludeValues%3E%0A%20%20%20%20%20%20%3CReturnLineShipDate%3EN%3C/ReturnLineShipDate%3E%0A%20%20%20%20%20%20%3CXslStylesheet/%3E%0A%20%20%3C/Option%3E%0A%3C/Query%3E%0A%0A 38 + uri: http://syspro.wildlandlabs.com:90/SYSPROWCFService/Rest/Query/Query?BusinessObject=SORQRY&UserId=6FDE76F80A298C409BEA62CB2CB0F58B00%20%20&XmlIn=%3C?xml%20version=%221.0%22%20encoding=%22Windows-1252%22?%3E%0A%3CQuery%20xmlns:xsd=%22http://www.w3.org/2001/XMLSchema-instance%22%20xsd:noNamespaceSchemaLocation=%22SORQRY.XSD%22%3E%0A%20%20%3CKey%3E%0A%20%20%20%20%3CSalesOrder%3E16R069%3C/SalesOrder%3E%0A%20%20%20%20%0A%20%20%3C/Key%3E%0A%20%20%3COption%3E%0A%20%20%20%20%3CIncludeStockedLines%3EN%3C/IncludeStockedLines%3E%0A%20%20%20%20%20%20%3CIncludeNonStockedLines%3EN%3C/IncludeNonStockedLines%3E%0A%20%20%20%20%20%20%3CIncludeFreightLines%3EN%3C/IncludeFreightLines%3E%0A%20%20%20%20%20%20%3CIncludeMiscLines%3EN%3C/IncludeMiscLines%3E%0A%20%20%20%20%20%20%3CIncludeCommentLines%3EN%3C/IncludeCommentLines%3E%0A%20%20%20%20%20%20%3CIncludeCompletedLines%3EN%3C/IncludeCompletedLines%3E%0A%20%20%20%20%20%20%3CIncludeSerials%3EN%3C/IncludeSerials%3E%0A%20%20%20%20%20%20%3CIncludeLots%3EN%3C/IncludeLots%3E%0A%20%20%20%20%20%20%3CIncludeBins%3EN%3C/IncludeBins%3E%0A%20%20%20%20%20%20%3CIncludeAttachedItems%3EN%3C/IncludeAttachedItems%3E%0A%20%20%20%20%20%20%3CIncludeCustomForms%3EN%3C/IncludeCustomForms%3E%0A%20%20%20%20%20%20%3CIncludeDetailLineCustomForms%3EN%3C/IncludeDetailLineCustomForms%3E%0A%20%20%20%20%20%20%3CIncludeValues%3EN%3C/IncludeValues%3E%0A%20%20%20%20%20%20%3CReturnLineShipDate%3EN%3C/ReturnLineShipDate%3E%0A%20%20%20%20%20%20%3CXslStylesheet/%3E%0A%20%20%3C/Option%3E%0A%3C/Query%3E%0A%0A
39 body: 39 body:
40 encoding: US-ASCII 40 encoding: US-ASCII
41 string: '' 41 string: ''
@@ -60,7 +60,7 @@ http_interactions: @@ -60,7 +60,7 @@ http_interactions:
60 Server: 60 Server:
61 - Microsoft-HTTPAPI/2.0 61 - Microsoft-HTTPAPI/2.0
62 Date: 62 Date:
63 - - Tue, 15 May 2018 00:53:44 GMT 63 + - Thu, 17 May 2018 16:52:53 GMT
64 body: 64 body:
65 encoding: UTF-8 65 encoding: UTF-8
66 string: "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\n<SorDetail Language='05' 66 string: "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\n<SorDetail Language='05'
@@ -82,5 +82,5 @@ http_interactions: @@ -82,5 +82,5 @@ http_interactions:
82 \ 0.000000</ShipGpsLat>\n<ShipGpsLong> 0.000000</ShipGpsLong>\n<ShipComplete>N</ShipComplete>\n<Email/>\n<FixExchangeRate>N</FixExchangeRate>\n<ExchangeRate> 82 \ 0.000000</ShipGpsLat>\n<ShipGpsLong> 0.000000</ShipGpsLong>\n<ShipComplete>N</ShipComplete>\n<Email/>\n<FixExchangeRate>N</FixExchangeRate>\n<ExchangeRate>
83 \ 1.000000</ExchangeRate>\n<Edited_ExchangeRate>1.000000</Edited_ExchangeRate>\n<MulDiv>M</MulDiv>\n<ConsolidatedOrder/>\n<GstDeduction>I</GstDeduction>\n<CreditedInvDate/>\n<Job/>\n<SerialisedFlag/>\n<CounterSalesFlag/>\n<Nationality/>\n<DeliveryTerms/>\n<ShippingLocation/>\n<TransactionNature>000</TransactionNature>\n<TransportMode>00</TransportMode>\n<ProcessFlag>0</ProcessFlag>\n<JobsExistFlag/>\n<AlternateKey/>\n<HierarchyFlag/>\n<DepositFlag/>\n<EdiSource/>\n<MultShipCode/>\n<CompanyTaxNo/>\n<LastOperator>MATTB</LastOperator>\n<Operator/>\n<State/>\n<CountyZip/>\n<ExtendedTaxCode/>\n<WebCreated/>\n<Quote/>\n<DispatchesMade/>\n<LiveDispExist/>\n<NumDispatches>0</NumDispatches>\n<IncludeInMrp>Y</IncludeInMrp>\n<HeaderText>\n</HeaderText>\n<HeaderNotes>\n</HeaderNotes>\n</SorDetail>\n " 83 \ 1.000000</ExchangeRate>\n<Edited_ExchangeRate>1.000000</Edited_ExchangeRate>\n<MulDiv>M</MulDiv>\n<ConsolidatedOrder/>\n<GstDeduction>I</GstDeduction>\n<CreditedInvDate/>\n<Job/>\n<SerialisedFlag/>\n<CounterSalesFlag/>\n<Nationality/>\n<DeliveryTerms/>\n<ShippingLocation/>\n<TransactionNature>000</TransactionNature>\n<TransportMode>00</TransportMode>\n<ProcessFlag>0</ProcessFlag>\n<JobsExistFlag/>\n<AlternateKey/>\n<HierarchyFlag/>\n<DepositFlag/>\n<EdiSource/>\n<MultShipCode/>\n<CompanyTaxNo/>\n<LastOperator>MATTB</LastOperator>\n<Operator/>\n<State/>\n<CountyZip/>\n<ExtendedTaxCode/>\n<WebCreated/>\n<Quote/>\n<DispatchesMade/>\n<LiveDispExist/>\n<NumDispatches>0</NumDispatches>\n<IncludeInMrp>Y</IncludeInMrp>\n<HeaderText>\n</HeaderText>\n<HeaderNotes>\n</HeaderNotes>\n</SorDetail>\n "
84 http_version: 84 http_version:
85 - recorded_at: Tue, 15 May 2018 00:53:43 GMT 85 + recorded_at: Thu, 17 May 2018 16:52:53 GMT
86 recorded_with: VCR 4.0.0 86 recorded_with: VCR 4.0.0
test/cassettes/test_successful_logoff.yml
@@ -27,15 +27,15 @@ http_interactions: @@ -27,15 +27,15 @@ http_interactions:
27 Server: 27 Server:
28 - Microsoft-HTTPAPI/2.0 28 - Microsoft-HTTPAPI/2.0
29 Date: 29 Date:
30 - - Tue, 15 May 2018 00:53:30 GMT 30 + - Thu, 17 May 2018 16:53:11 GMT
31 body: 31 body:
32 encoding: UTF-8 32 encoding: UTF-8
33 - string: 'BDEE07496905C3498683CDCAF0C7BB8100 ' 33 + string: 'A23FDE0669C9E64D9D0C165DDE9324AD00 '
34 http_version: 34 http_version:
35 - recorded_at: Tue, 15 May 2018 00:53:30 GMT 35 + recorded_at: Thu, 17 May 2018 16:53:11 GMT
36 - request: 36 - request:
37 method: get 37 method: get
38 - uri: http://syspro.wildlandlabs.com:90/SYSPROWCFService/Rest/logoff?UserId=BDEE07496905C3498683CDCAF0C7BB8100%20%20 38 + uri: http://syspro.wildlandlabs.com:90/SYSPROWCFService/Rest/logoff?UserId=A23FDE0669C9E64D9D0C165DDE9324AD00%20%20
39 body: 39 body:
40 encoding: US-ASCII 40 encoding: US-ASCII
41 string: '' 41 string: ''
@@ -60,10 +60,10 @@ http_interactions: @@ -60,10 +60,10 @@ http_interactions:
60 Server: 60 Server:
61 - Microsoft-HTTPAPI/2.0 61 - Microsoft-HTTPAPI/2.0
62 Date: 62 Date:
63 - - Tue, 15 May 2018 00:53:30 GMT 63 + - Thu, 17 May 2018 16:53:11 GMT
64 body: 64 body:
65 encoding: UTF-8 65 encoding: UTF-8
66 string: '0' 66 string: '0'
67 http_version: 67 http_version:
68 - recorded_at: Tue, 15 May 2018 00:53:30 GMT 68 + recorded_at: Thu, 17 May 2018 16:53:11 GMT
69 recorded_with: VCR 4.0.0 69 recorded_with: VCR 4.0.0
@@ -50,6 +50,6 @@ class PorTest &lt; Minitest::Test @@ -50,6 +50,6 @@ class PorTest &lt; Minitest::Test
50 porqry.filter_value = "" 50 porqry.filter_value = ""
51 51
52 por_result = porqry.call(user_id.guid) 52 por_result = porqry.call(user_id.guid)
53 - assert_kind_of(Syspro::BusinessObjects::Models::Por, por_result) 53 + assert_kind_of(Syspro::BusinessObjects::Models::PorDetail, por_result)
54 end 54 end
55 end 55 end