Commit 810ca84bfce7ca2331582b188906717478d5bb2c

Authored by Isaac Lewis
1 parent 8e39c81d

wip purchase order query and purchase order transaction

lib/syspro.rb
... ... @@ -21,18 +21,24 @@ require 'syspro/version'
21 21  
22 22 require 'syspro/api_operations/request'
23 23 require 'syspro/api_operations/query'
  24 +require 'syspro/api_operations/transaction'
24 25  
25 26 require 'syspro/business_objects/combrw'
26 27 require 'syspro/business_objects/comfch'
27 28 require 'syspro/business_objects/comfnd'
28 29 require 'syspro/business_objects/sorqry'
  30 +require 'syspro/business_objects/portor'
  31 +require 'syspro/business_objects/porqry'
29 32  
  33 +require 'syspro/business_objects/models/sor'
30 34 require 'syspro/business_objects/models/sor_detail'
  35 +require 'syspro/business_objects/models/por'
31 36  
32 37 require 'syspro/business_objects/parsers/combrw_parser'
33 38 require 'syspro/business_objects/parsers/comfch_parser'
34 39 require 'syspro/business_objects/parsers/comfnd_parser'
35 40 require 'syspro/business_objects/parsers/sorqry_parser'
  41 +require 'syspro/business_objects/parsers/portor_parser'
36 42  
37 43 # Main Module
38 44 module Syspro
... ...
lib/syspro/api_operations/transaction.rb 0 → 100644
  1 +# frozen_string_literal: true
  2 +
  3 +module Syspro
  4 + module ApiOperations
  5 + module Transaction
  6 + module ClassMethods
  7 + def post(params)
  8 + request(:get, '/Transaction/Post', params)
  9 + end
  10 +
  11 + private
  12 +
  13 + def warn_on_opts_in_params(params)
  14 + Util::OPTS_USER_SPECIFIED.each do |opt|
  15 + if params.key?(opt)
  16 + warn("WARNING: #{opt} should be in opts instead of params.")
  17 + end
  18 + end
  19 + end
  20 + end # ClassMethods
  21 +
  22 + def self.included(base)
  23 + base.extend(ClassMethods)
  24 + end
  25 +
  26 + protected
  27 +
  28 + def request(method, url, params = {}, opts ={})
  29 + opts = @opts.merge(Util.normalize_opts(opts))
  30 + Request.request(method, url, params, opts)
  31 + end
  32 + end
  33 + end
  34 +end
  35 +
... ...
lib/syspro/business_objects/models/por_detail.rb 0 → 100644
  1 +module Syspro
  2 + module BusinessObjects
  3 + module Models
  4 + class PorDetail
  5 + attr_accessor :grn, :lot_number, :purchase_order, :purchase_order_line
  6 + end
  7 + end
  8 + end
  9 +end
  10 +
... ...
lib/syspro/business_objects/parsers/porqry_parser.rb 0 → 100644
  1 +# frozen_string_literal: true
  2 +
  3 +module Syspro
  4 + module BusinessObjects
  5 + module Parsers
  6 + class PorQryParser
  7 + attr_reader :doc
  8 +
  9 + def initialize(doc)
  10 + @doc = doc
  11 + end
  12 +
  13 + def parse
  14 + por = Syspro::BusinessObjects::Models::PorDetail.new()
  15 +
  16 + por.purchase_order = doc.first_element_child.xpath('PurchaseOrder').text
  17 + por.supplier = doc.first_element_child.xpath('Supplier').text
  18 + por.supplier_name = doc.first_element_child.xpath('SupplierName').text
  19 + por.supplier_class = doc.first_element_child.xpath('SupplierClass').text
  20 + por.customer = doc.first_element_child.xpath('Customer').text
  21 + por.customer_name = doc.first_element_child.xpath('CustomerName').text
  22 + por.customer_po_number = doc.first_element_child.xpath('CustomerPoNumber').text
  23 + por.supplier_addr_1 = doc.first_element_child.xpath('SupplierAddr1').text
  24 + por.supplier_addr_2 = doc.first_element_child.xpath('SupplierAddr2').text
  25 + por.supplier_addr_3 = doc.first_element_child.xpath('SupplierAddr3').text
  26 + por.supplier_addr_3_locality = doc.first_element_child.xpath('SupplierAddr3Locality').text
  27 + por.supplier_addr_4 = doc.first_element_child.xpath('SupplierAddr4').text
  28 + por.supplier_addr_5 = doc.first_element_child.xpath('SupplierAddr5').text
  29 + por.sup_postal_code = doc.first_element_child.xpath('SupPostalCode').text
  30 + por.currency = doc.first_element_child.xpath('Currency').text
  31 + por.local_supplier = doc.first_element_child.xpath('LocalSupplier').text
  32 + por.description = doc.first_element_child.xpath('Description').text
  33 + por.delivery_name = doc.first_element_child.xpath('DeliveryName').text
  34 + por.delivery_addr_1 = doc.first_element_child.xpath('DeliveryAddr1').text
  35 + por.delivery_addr_2 = doc.first_element_child.xpath('DeliveryAddr2').text
  36 + por.delivery_addr_3 = doc.first_element_child.xpath('DeliveryAddr3').text
  37 + por.delivery_addr_3_locality = doc.first_element_child.xpath('DeliveryAddr3Locality').text
  38 + por.delivery_addr_4 = doc.first_element_child.xpath('DeliveryAddr4').text
  39 + por.delivery_addr_5 = doc.first_element_child.xpath('DeliveryAddr5').text
  40 + por.postal_code = doc.first_element_child.xpath('PostalCode').text
  41 + por.delivery_gps_lat = doc.first_element_child.xpath('DeliveryGpsLat').text
  42 + por.delivery_gps_long = doc.first_element_child.xpath('DeliveryGpsLong').text
  43 + por.order_status = doc.first_element_child.xpath('OrderStatus').text
  44 + por.order_status_description = doc.first_element_child.xpath('OrderStatusDescription').text
  45 + por.exchange_rate_fixed_flag = doc.first_element_child.xpath('ExchangeRateFixedFlag').text
  46 + por.po_exchange_rate = doc.first_element_child.xpath('PoExchangeRate').text
  47 + por.blanket_po_contract = doc.first_element_child.xpath('BlanketPoContract').text
  48 + por.ap_invoice_terms = doc.first_element_child.xpath('ApInvoiceTerms').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
  51 + por.warehouse = doc.first_element_child.xpath('Warehouse').text
  52 + por.warehouse_desc
  53 + end
  54 + end
  55 + end
  56 + end
  57 +end
  58 +
... ...
lib/syspro/business_objects/parsers/portor_parser.rb 0 → 100644
  1 +# frozen_string_literal: true
  2 +
  3 +module Syspro
  4 + module BusinessObjects
  5 + module Parsers
  6 + class PorTorParser
  7 + attr_reader :doc
  8 +
  9 + def initialize(doc)
  10 + @doc = doc
  11 + end
  12 +
  13 + def parse
  14 + gl_journal = doc.first_element_child.xpath('GlJournal')
  15 + gl_journal_obj = gl_journal.children.map do |el|
  16 + next if el.name == 'text'
  17 + {
  18 + name: el.name,
  19 + text: el.text
  20 + }
  21 + end.compact
  22 +
  23 + key = {}
  24 + key[:jnl_year] = doc.first_element_child.xpath('JnlYear')
  25 + key[:jnl_month] = doc.first_element_child.xpath('JnlMonth')
  26 + key[:journal] = doc.first_element_child.xpath('Journal')
  27 + key[:entry_number] = doc.first_element_child.xpath('EntryNumber')
  28 + key[:warehouse] = doc.first_element_child.xpath('Warehouse')
  29 + key[:gl_journal] = gl_journal_obj
  30 +
  31 + binding.pry
  32 +
  33 + receipts = doc.first_element_child.xpath('Receipt')
  34 + receipts_obj = receipts.flat_map do |el|
  35 + el.elements.map do |inner|
  36 + [inner.name,
  37 + inner.value]
  38 + end
  39 + end.compact.to_h
  40 +
  41 + receipt_models = receipts_obj.map do |receipt|
  42 + Por.new(
  43 + grn: receipt.grn,
  44 + lot_number: receipt.lot_number,
  45 + purchase_order: receipt.purchase_order,
  46 + purchase_order_line: receipt.purchase_order_line
  47 + )
  48 + end
  49 +
  50 + PorTorObject.new(
  51 + key,
  52 + receipt_models
  53 + )
  54 + end
  55 +
  56 + PorTorObject = Struct.new(:key, :receipts)
  57 + end
  58 + end
  59 + end
  60 +end
  61 +
... ...
lib/syspro/business_objects/porqry.rb 0 → 100644
  1 +# frozen_string_literal: true
  2 +
  3 +require 'syspro/business_objects/parsers/porqry_parser'
  4 +require 'erb'
  5 +
  6 +module Syspro
  7 + module BusinessObjects
  8 + class PorQry < ApiResource
  9 + include Syspro::ApiOperations::Query
  10 + include Syspro::BusinessObjects::Parsers
  11 +
  12 + attr_accessor :purchase_order, :include_stocked_lines, :include_non_stocked_lines,
  13 + :include_freight_lines, :include_miscellaneous_lines, :include_comment_lines,
  14 + :include_completed_lines, :include_grns, :include_history, :include_lct_details,
  15 + :include_requisition_details, :include_requisition_routing, :include_sales_orders,
  16 + :include_custom_forms, :filter_type, :filter_value
  17 +
  18 + def call(user_id)
  19 + xml_in = template.result(binding)
  20 + business_object = 'PORQRY'
  21 + params = {
  22 + 'UserId' => user_id,
  23 + 'BusinessObject' => business_object,
  24 + 'XmlIn' => xml_in
  25 + }
  26 + resp = PorQry.query(params)
  27 +
  28 + parse_response(resp)
  29 + end
  30 +
  31 + def template
  32 + ERB.new File.read(File.expand_path('schemas/porqry.xml.erb', File.dirname(__FILE__))), nil, '%'
  33 + end
  34 +
  35 + def parse_response(resp)
  36 + handle_errors(resp)
  37 + parser = PorQryParser.new(resp[0].data)
  38 + parser.parse
  39 + end
  40 +
  41 + def handle_errors(resp)
  42 + body = resp[0].http_body
  43 + raise SysproError, body if body =~ /^(ERROR)/
  44 + end
  45 + end
  46 + end
  47 +end
  48 +
... ...
lib/syspro/business_objects/portor.rb 0 → 100644
  1 +# frozen_string_literal: true
  2 +
  3 +require 'syspro/business_objects/parsers/portor_parser'
  4 +require 'erb'
  5 +
  6 +module Syspro
  7 + module BusinessObjects
  8 + class PorTor < ApiResource
  9 + include Syspro::ApiOperations::Transaction
  10 + include Syspro::BusinessObjects::Parsers
  11 +
  12 + attr_accessor :transaction_date, :ignore_warnings, :non_stocked_wh_to_use, :grn_matching_action,
  13 + :allow_blank_supplier, :apply_if_entire_document_valid, :validate_only,
  14 + :manual_serial_transfers_allowed, :ignore_analysis
  15 +
  16 + def call(user_id)
  17 + raise NotImplementedError.new("PORTOR not implemented yet.")
  18 + #xml_parameters = params_template.result(binding)
  19 + #xml_in = template.result(binding)
  20 + #business_object = 'PORTOR'
  21 + #params = { 'UserId' => user_id,
  22 + #'BusinessObject' => business_object,
  23 + #'XmlParameters' => xml_parameters,
  24 + #'XmlIn' => xml_in }
  25 + #resp = PorTor.post(params)
  26 +
  27 + #parse_response(resp)
  28 + end
  29 +
  30 + def template
  31 + ERB.new File.read(File.expand_path('schemas/portor.xml.erb', File.dirname(__FILE__))), nil, '%'
  32 + end
  33 +
  34 + def params_template
  35 + ERB.new File.read(File.expand_path('schemas/portor_doc.xml.erb', File.dirname(__FILE__))), nil, '%'
  36 + end
  37 +
  38 + def parse_response(resp)
  39 + handle_errors(resp)
  40 + parser = PorTorParser.new(resp[0].data)
  41 + parser.parse
  42 + end
  43 +
  44 + def handle_errors(resp)
  45 + body = resp[0].http_body
  46 + raise SysproError, body if body =~ /^(ERROR)/
  47 + end
  48 + end
  49 + end
  50 +end
  51 +
... ...
lib/syspro/business_objects/schemas/porqry.xml.erb 0 → 100644
  1 +<?xml version="1.0" encoding="Windows-1252"?>
  2 +<Query xmlns:xsd="http://www.w3.org/2001/XMLSchema-instance" xsd:noNamespaceSchemaLocation="PORQRY.XSD">
  3 + <Key>
  4 + <PurchaseOrder><%= @purchase_order %></PurchaseOrder>
  5 + </Key>
  6 + <Option>
  7 + <IncludeStockedLines><%= @include_stocked_lines ? "N" : "Y" %></IncludeStockedLines>
  8 + <IncludeNonStockedLines><%= @include_non_stocked_lines ? "N" : "Y" %></IncludeNonStockedLines>
  9 + <IncludeFreightLines><%= @include_freight_lines ? "N" : "Y" %></IncludeFreightLines>
  10 + <IncludeMiscellaneousLines><%= @include_miscellaneous_lines ? "N" : "Y" %></IncludeMiscellaneousLines>
  11 + <IncludeCommentLines><%= @include_comment_lines ? "N" : "Y" %></IncludeCommentLines>
  12 + <IncludeCompletedLines><%= @include_completed_lines ? "N" : "Y" %></IncludeCompletedLines>
  13 + <IncludeGrns><%= @include_grns ? "N" : "Y" %></IncludeGrns>
  14 + <IncludeHistory><%= @include_history ? "N" : "Y" %></IncludeHistory>
  15 + <IncludeLctDetails><%= @include_lct_details ? "N" : "Y" %></IncludeLctDetails>
  16 + <IncludeRequisitionDetails><%= @include_requisition_details ? "N" : "Y" %></IncludeRequisitionDetails>
  17 + <IncludeRequisitionRouting><%= @include_requisition_routing ? "N" : "Y" %></IncludeRequisitionRouting>
  18 + <IncludeSalesOrders><%= @include_sales_orders ? "N" : "Y" %></IncludeSalesOrders>
  19 + <IncludeCustomForms><%= @include_custom_forms ? "N" : "Y" %></IncludeCustomForms>
  20 + <XslStylesheet/>
  21 + </Option>
  22 + <Filter>
  23 + <LineNo FilterType="<%= @filter_type %>" FilterValue="<%= @filter_value %>"/>
  24 + </Filter>
  25 +</Query>
  26 +
... ...
lib/syspro/business_objects/schemas/portor.xml.erb 0 → 100644
  1 +<?xml version="1.0" encoding="Windows-1252"?>
  2 +<!-- Copyright 1994-2010 SYSPRO Ltd.-->
  3 +<!--
  4 + This is an example XML instance to demonstrate
  5 + use of the Purchase Order Receipts Business Object
  6 +-->
  7 +<PostPurchaseOrderReceipts xmlns:xsd="http://www.w3.org/2001/XMLSchema-instance" xsd:noNamespaceSchemaLocation="portordoc.xsd">
  8 + <Item>
  9 + <Receipt>
  10 + <Journal/>
  11 + <PurchaseOrder>436</PurchaseOrder>
  12 + <PurchaseOrderLine>1</PurchaseOrderLine>
  13 + <Warehouse/>
  14 + <StockCode/>
  15 + <Quantity>750.000</Quantity>
  16 + <UnitOfMeasure/>
  17 + <Units/>
  18 + <Pieces/>
  19 + <DeliveryNote/>
  20 + <Cost/>
  21 + <CostBasis>P</CostBasis>
  22 + <SwitchOnGRNMatching>N</SwitchOnGRNMatching>
  23 + <GRNNumber>311</GRNNumber>
  24 + <Reference/>
  25 + <GRNSource>1</GRNSource>
  26 + <UseSingleTypeABCElements>N</UseSingleTypeABCElements>
  27 + <Lot/>
  28 + <LotExpiryDate/>
  29 + <Certificate/>
  30 + <Concession/>
  31 + <Bins>
  32 + <BinLocation>A1</BinLocation>
  33 + <BinQuantity>750.000</BinQuantity>
  34 + <BinUnits/>
  35 + <BinPieces/>
  36 + </Bins>
  37 + <Serials>
  38 + <SerialNumber>0205</SerialNumber>
  39 + <SerialQuantity>1</SerialQuantity>
  40 + <SerialUnits/>
  41 + <SerialPieces/>
  42 + <SerialExpiryDate/>
  43 + <SerialLocation/>
  44 + </Serials>
  45 + <SerialRange>
  46 + <SerialPrefix>999</SerialPrefix>
  47 + <SerialSuffix>1</SerialSuffix>
  48 + <StartSerialNumber/>
  49 + <SerialQuantity>8</SerialQuantity>
  50 + <SerialExpiryDate/>
  51 + <SerialLocation/>
  52 + </SerialRange>
  53 + <PurchaseOrderLineComplete>N</PurchaseOrderLineComplete>
  54 + <IncreaseSalesOrderQuantity>N</IncreaseSalesOrderQuantity>
  55 + <ChangeSalesOrderStatus>N</ChangeSalesOrderStatus>
  56 + <ApplyCostMultiplier>Y</ApplyCostMultiplier>
  57 + <CostMultiplier/>
  58 + <NonMerchandiseCost>150.00</NonMerchandiseCost>
  59 + <NonMerchandiseDistribution>
  60 + <NmReference>Cost Ref</NmReference>
  61 + <NmLedgerCode>00-1170</NmLedgerCode>
  62 + <NmSupplier>0000026</NmSupplier>
  63 + <NmAmount>150.00</NmAmount>
  64 + <NmAnalysisEntry/>
  65 + <NmAnalysisLineEntry>
  66 + <AnalysisCode1>Air</AnalysisCode1>
  67 + <AnalysisCode2>Conf</AnalysisCode2>
  68 + <AnalysisCode3>East</AnalysisCode3>
  69 + <AnalysisCode4/>
  70 + <AnalysisCode5/>
  71 + <StartDate/>
  72 + <EndDate/>
  73 + <EntryAmount>100</EntryAmount>
  74 + <Comment>Analysis entry details</Comment>
  75 + </NmAnalysisLineEntry>
  76 + <DebitNmAnalysisEntry/>
  77 + <DebitNmAnalysisLineEntry>
  78 + <AnalysisCode1>Air</AnalysisCode1>
  79 + <AnalysisCode2>Conf</AnalysisCode2>
  80 + <AnalysisCode3>East</AnalysisCode3>
  81 + <AnalysisCode4/>
  82 + <AnalysisCode5/>
  83 + <StartDate/>
  84 + <EndDate/>
  85 + <EntryAmount>100</EntryAmount>
  86 + <Comment>Analysis entry details</Comment>
  87 + </DebitNmAnalysisLineEntry>
  88 + </NonMerchandiseDistribution>
  89 + <Notation>P/O Receipt note</Notation>
  90 + <LedgerCode>00-1540</LedgerCode>
  91 + <PasswordForLedgerCode/>
  92 + <DebitLedgerCode/>
  93 + <PasswordForDebitLedgerCode/>
  94 + <CountryOfOrigin/>
  95 + <DeliveryTerms/>
  96 + <NatureOfTransaction/>
  97 + <ModeOfTransport/>
  98 + <TradersReference/>
  99 + <TariffCode/>
  100 + <UnitMass/>
  101 + <SupplementaryUnits>N</SupplementaryUnits>
  102 + <SupplementaryUnitsFactor></SupplementaryUnitsFactor>
  103 + <AnalysisEntry/>
  104 + <AnalysisLineEntry>
  105 + <AnalysisCode1>Air</AnalysisCode1>
  106 + <AnalysisCode2>Conf</AnalysisCode2>
  107 + <AnalysisCode3>East</AnalysisCode3>
  108 + <AnalysisCode4/>
  109 + <AnalysisCode5/>
  110 + <StartDate/>
  111 + <EndDate/>
  112 + <EntryAmount>100</EntryAmount>
  113 + <Comment>Analysis entry details</Comment>
  114 + </AnalysisLineEntry>
  115 + <DebitAnalysisEntry/>
  116 + <DebitAnalysisLineEntry>
  117 + <AnalysisCode1>Air</AnalysisCode1>
  118 + <AnalysisCode2>Conf</AnalysisCode2>
  119 + <AnalysisCode3>East</AnalysisCode3>
  120 + <AnalysisCode4/>
  121 + <AnalysisCode5/>
  122 + <StartDate/>
  123 + <EndDate/>
  124 + <EntryAmount>100</EntryAmount>
  125 + <Comment>Analysis entry details</Comment>
  126 + </DebitAnalysisLineEntry>
  127 + <eSignature/>
  128 + </Receipt>
  129 + </Item>
  130 + <Item>
  131 + <ReceiptIntoInspection>
  132 + <Journal/>
  133 + <PurchaseOrder>436</PurchaseOrder>
  134 + <PurchaseOrderLine>2</PurchaseOrderLine>
  135 + <Warehouse/>
  136 + <StockCode/>
  137 + <Quantity>50.000</Quantity>
  138 + <UnitOfMeasure/>
  139 + <Units/>
  140 + <Pieces/>
  141 + <CountedQuantityComplete>N</CountedQuantityComplete>
  142 + <DeliveryNote/>
  143 + <DeliveryDate/>
  144 + <Certificate/>
  145 + <Narration/>
  146 + <SwitchOnGRNMatching>N</SwitchOnGRNMatching>
  147 + <GRNNumber>301</GRNNumber>
  148 + <Lot/>
  149 + <LotExpiryDate/>
  150 + <PurchaseOrderLineComplete>N</PurchaseOrderLineComplete>
  151 + <Serials>
  152 + <SerialNumber>0205</SerialNumber>
  153 + <SerialQuantity>50</SerialQuantity>
  154 + <SerialUnits/>
  155 + <SerialPieces/>
  156 + <SerialExpiryDate/>
  157 + <SerialLocation/>
  158 + </Serials>
  159 + <SerialRange>
  160 + <SerialPrefix>98</SerialPrefix>
  161 + <SerialSuffix>1</SerialSuffix>
  162 + <StartSerialNumber/>
  163 + <SerialQuantity>8</SerialQuantity>
  164 + <SerialExpiryDate/>
  165 + <SerialLocation/>
  166 + </SerialRange>
  167 + <eSignature/>
  168 + </ReceiptIntoInspection>
  169 + </Item>
  170 + <Item>
  171 + <ReceiptFromInspection>
  172 + <Journal/>
  173 + <GRNNumber>312</GRNNumber>
  174 + <Quantity>10.000</Quantity>
  175 + <Units/>
  176 + <Pieces/>
  177 + <DeliveryNote/>
  178 + <Concession/>
  179 + <Cost/>
  180 + <CostBasis>P</CostBasis>
  181 + <Reference/>
  182 + <GRNSource>1</GRNSource>
  183 + <UseSingleTypeABCElements>N</UseSingleTypeABCElements>
  184 + <Bins>
  185 + <BinLocation>A1</BinLocation>
  186 + <BinQuantity>10.000</BinQuantity>
  187 + <BinUnits/>
  188 + <BinPieces/>
  189 + </Bins>
  190 + <SelectAvailableSerials>N</SelectAvailableSerials>
  191 + <Serials>
  192 + <SerialNumber>0205</SerialNumber>
  193 + <SerialQuantity>1</SerialQuantity>
  194 + <SerialUnits/>
  195 + <SerialPieces/>
  196 + <SerialExpiryDate/>
  197 + <SerialLocation/>
  198 + </Serials>
  199 + <IncreaseSalesOrderQuantity>N</IncreaseSalesOrderQuantity>
  200 + <ChangeSalesOrderStatus>N</ChangeSalesOrderStatus>
  201 + <ApplyCostMultiplier>Y</ApplyCostMultiplier>
  202 + <CostMultiplier/>
  203 + <NonMerchandiseCost>150.00</NonMerchandiseCost>
  204 + <NonMerchandiseDistribution>
  205 + <NmReference>Cost Ref</NmReference>
  206 + <NmLedgerCode>30-4400</NmLedgerCode>
  207 + <NmSupplier/>
  208 + <NmAmount>150.00</NmAmount>
  209 + </NonMerchandiseDistribution>
  210 + <Notation>P/O Receipt note</Notation>
  211 + <LedgerCode>00-1540</LedgerCode>
  212 + <PasswordForLedgerCode/>
  213 + <DebitLedgerCode/>
  214 + <PasswordForDebitLedgerCode/>
  215 + <CountryOfOrigin/>
  216 + <DeliveryTerms/>
  217 + <NatureOfTransaction/>
  218 + <ModeOfTransport/>
  219 + <TradersReference/>
  220 + <TariffCode/>
  221 + <UnitMass/>
  222 + <SupplementaryUnits>N</SupplementaryUnits>
  223 + <SupplementaryUnitsFactor></SupplementaryUnitsFactor>
  224 + </ReceiptFromInspection>
  225 + </Item>
  226 +</PostPurchaseOrderReceipts>
  227 +
... ...
lib/syspro/business_objects/schemas/portor_doc.xml.erb 0 → 100644
  1 +<?xml version="1.0" encoding="Windows-1252"?>
  2 +<PostPurchaseOrderReceipts xmlns:xsd="http://www.w3.org/2001/XMLSchema-instance" xsd:noNamespaceSchemaLocation="portor.xsd">
  3 + <Parameters>
  4 + <TransactionDate><%= @transaction_date %></TransactionDate>
  5 + <IgnoreWarnings><%= @ignore_warnings ? "N" : "Y"%></IgnoreWarnings>
  6 + <NonStockedWhToUse><%= @non_stocked_wh_to_use %></NonStockedWhToUse>
  7 + <GRNMatchingAction><%= @grn_matching_action %></GRNMatchingAction>
  8 + <AllowBlankSupplier><%= @allow_blank_supplier ? "N" : "Y" %></AllowBlankSupplier>
  9 + <ApplyIfEntireDocumentValid><%= @apply_if_entire_document_valid ? "N" : "Y" %></ApplyIfEntireDocumentValid>
  10 + <ValidateOnly><%= @validate_only ? "N" : "Y" %></ValidateOnly>
  11 + <ManualSerialTransfersAllowed><%= @manual_serial_transfers_allowed ? "N" : "Y" %></ManualSerialTransfersAllowed>
  12 + <IgnoreAnalysis><%= @ignore_analysis ? "N" : "Y" %></IgnoreAnalysis>
  13 + </Parameters>
  14 +</PostPurchaseOrderReceipts>
  15 +
... ...
test/cassettes/test_client_block_execution.yml
... ... @@ -27,10 +27,10 @@ http_interactions:
27 27 Server:
28 28 - Microsoft-HTTPAPI/2.0
29 29 Date:
30   - - Mon, 14 May 2018 20:17:40 GMT
  30 + - Tue, 15 May 2018 00:53:44 GMT
31 31 body:
32 32 encoding: UTF-8
33 33 string: 7.0.0.6
34 34 http_version:
35   - recorded_at: Mon, 14 May 2018 20:17:40 GMT
  35 + recorded_at: Tue, 15 May 2018 00:53:43 GMT
36 36 recorded_with: VCR 4.0.0
... ...
test/cassettes/test_get_syspro_version.yml
... ... @@ -27,10 +27,10 @@ http_interactions:
27 27 Server:
28 28 - Microsoft-HTTPAPI/2.0
29 29 Date:
30   - - Mon, 14 May 2018 20:17:40 GMT
  30 + - Tue, 15 May 2018 00:53:44 GMT
31 31 body:
32 32 encoding: UTF-8
33 33 string: 7.0.0.6
34 34 http_version:
35   - recorded_at: Mon, 14 May 2018 20:17:40 GMT
  35 + recorded_at: Tue, 15 May 2018 00:53:43 GMT
36 36 recorded_with: VCR 4.0.0
... ...
test/cassettes/test_logoff_error.yml
... ... @@ -27,10 +27,10 @@ http_interactions:
27 27 Server:
28 28 - Microsoft-HTTPAPI/2.0
29 29 Date:
30   - - Mon, 14 May 2018 20:17:51 GMT
  30 + - Tue, 15 May 2018 00:53:22 GMT
31 31 body:
32 32 encoding: UTF-8
33 33 string: 'ERROR: Unable to read the SYSPRO base directory registry string BaseDir8'
34 34 http_version:
35   - recorded_at: Mon, 14 May 2018 20:17:50 GMT
  35 + recorded_at: Tue, 15 May 2018 00:53:21 GMT
36 36 recorded_with: VCR 4.0.0
... ...
test/cassettes/test_logon.yml
... ... @@ -27,10 +27,10 @@ http_interactions:
27 27 Server:
28 28 - Microsoft-HTTPAPI/2.0
29 29 Date:
30   - - Mon, 14 May 2018 20:17:49 GMT
  30 + - Tue, 15 May 2018 00:54:50 GMT
31 31 body:
32 32 encoding: UTF-8
33   - string: 'DC3EC6C004B7FF4B8BF56FF221315DAA00 '
  33 + string: 'B83836D0602F4447B5F1473EF76DFE8200 '
34 34 http_version:
35   - recorded_at: Mon, 14 May 2018 20:17:48 GMT
  35 + recorded_at: Tue, 15 May 2018 00:54:49 GMT
36 36 recorded_with: VCR 4.0.0
... ...
test/cassettes/test_logon_error.yml
... ... @@ -27,10 +27,10 @@ http_interactions:
27 27 Server:
28 28 - Microsoft-HTTPAPI/2.0
29 29 Date:
30   - - Mon, 14 May 2018 20:17:51 GMT
  30 + - Tue, 15 May 2018 00:54:41 GMT
31 31 body:
32 32 encoding: UTF-8
33 33 string: 'ERROR: Invalid operator password'
34 34 http_version:
35   - recorded_at: Mon, 14 May 2018 20:17:50 GMT
  35 + recorded_at: Tue, 15 May 2018 00:54:40 GMT
36 36 recorded_with: VCR 4.0.0
... ...
test/cassettes/test_por_query.yml 0 → 100644
  1 +---
  2 +http_interactions:
  3 +- request:
  4 + method: get
  5 + uri: http://syspro.wildlandlabs.com:90/SYSPROWCFService/Rest/logon?CompanyId=L&CompanyPassword=&Operator=wland&OperatorPassword=piperita2016
  6 + body:
  7 + encoding: US-ASCII
  8 + string: ''
  9 + headers:
  10 + User-Agent:
  11 + - Syspro/7 RubyBindings/1.0.0.alpha.1
  12 + Content-Type:
  13 + - application/x-www-form-urlencoded
  14 + Accept-Encoding:
  15 + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
  16 + Accept:
  17 + - "*/*"
  18 + response:
  19 + status:
  20 + code: 200
  21 + message: OK
  22 + headers:
  23 + Content-Length:
  24 + - '36'
  25 + Content-Type:
  26 + - application/octet-stream
  27 + Server:
  28 + - Microsoft-HTTPAPI/2.0
  29 + Date:
  30 + - Tue, 15 May 2018 21:00:23 GMT
  31 + body:
  32 + encoding: UTF-8
  33 + string: '3087FDA601939146B2D8AD4FA1CD2F2600 '
  34 + http_version:
  35 + recorded_at: Tue, 15 May 2018 21:00:22 GMT
  36 +- request:
  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
  39 + body:
  40 + encoding: US-ASCII
  41 + string: ''
  42 + headers:
  43 + User-Agent:
  44 + - Syspro/7 RubyBindings/1.0.0.alpha.1
  45 + Content-Type:
  46 + - application/x-www-form-urlencoded
  47 + Accept-Encoding:
  48 + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
  49 + Accept:
  50 + - "*/*"
  51 + response:
  52 + status:
  53 + code: 200
  54 + message: OK
  55 + headers:
  56 + Content-Length:
  57 + - '20348'
  58 + Content-Type:
  59 + - application/octet-stream
  60 + Server:
  61 + - Microsoft-HTTPAPI/2.0
  62 + Date:
  63 + - Tue, 15 May 2018 21:00:28 GMT
  64 + body:
  65 + encoding: UTF-8
  66 + string: "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\n<PorDetail Language='05'
  67 + Language2='EN' CssStyle='' DecFormat='1' DateFormat='01' Role='01' Version='7.0.021'
  68 + OperatorPrimaryRole=' ' >\n<PurchaseOrder> 00001</PurchaseOrder>\n<Supplier>UTE002</Supplier>\n<SupplierName>UTEXAM
  69 + LOGISTICS LIMITED(ZERO)</SupplierName>\n<SupplierClass/>\n<Customer/>\n<CustomerName/>\n<CustomerPoNumber/>\n<SupplierAddr1/>\n<SupplierAddr2/>\n<SupplierAddr3/>\n<SupplierAddr3Locality/>\n<SupplierAddr4/>\n<SupplierAddr5/>\n<SupPostalCode/>\n<Currency>$</Currency>\n<LocalSupplier>Y</LocalSupplier>\n<Description>DOLLAR</Description>\n<DeliveryName>ULL
  70 + OWNED @ PDI</DeliveryName>\n<DeliveryAddr1/>\n<DeliveryAddr2/>\n<DeliveryAddr3/>\n<DeliveryAddr3Locality/>\n<DeliveryAddr4/>\n<DeliveryAddr5/>\n<PostalCode/>\n<DeliveryGpsLat>
  71 + \ 0.000000</DeliveryGpsLat>\n<DeliveryGpsLong> 0.000000</DeliveryGpsLong>\n<OrderStatus>*</OrderStatus>\n<OrderStatusDescription>Cancelled</OrderStatusDescription>\n<ExchangeRateFixedFlag>No</ExchangeRateFixedFlag>\n<PoExchangeRate>
  72 + \ 1.000000</PoExchangeRate>\n<BlanketPoContract>No</BlanketPoContract>\n<ApInvoiceTerms>A</ApInvoiceTerms>\n<ApInvoiceTermsDescription>NET
  73 + 30</ApInvoiceTermsDescription>\n<CompletedDate/>\n<Warehouse>U8</Warehouse>\n<WarehouseDesc>ULL
  74 + OWNED @ PDI</WarehouseDesc>\n<OrderEntryDate>2007-04-24</OrderEntryDate>\n<OrderDueDate>2007-04-24</OrderDueDate>\n<MemoDate>2007-04-24</MemoDate>\n<MemoCode/>\n<OrderType>Local</OrderType>\n<PaymentTerms/>\n<TaxStatus>Exempt
  75 + from tax</TaxStatus>\n<ShippingInstrs/>\n<OrderDiscount/>\n<AmendedCount>2</AmendedCount>\n<Buyer>BRH</Buyer>\n<Name>BILL
  76 + HOLLOWAY</Name>\n<DocumentFormat>0</DocumentFormat>\n<IncludeInMrp>Y</IncludeInMrp>\n<CustomForm>\n<Field>\n<Sequence>1</Sequence>\n<Name>TempPO</Name>\n<Prompt>Temporary
  77 + PO</Prompt>\n<Column>TemporaryPo</Column>\n<Type>A</Type>\n<Length>1</Length>\n<Decimals>0</Decimals>\n<Default>{Spaces}</Default>\n<AllowNull>Y</AllowNull>\n<ValidationType>1</ValidationType>\n<Value/>\n<ValueNull>N</ValueNull>\n</Field>\n<Field>\n<Sequence>2</Sequence>\n<Name>BUY001</Name>\n<Prompt>Buyer
  78 + Order Number</Prompt>\n<Column>BuyerOrderNumber</Column>\n<Type>A</Type>\n<Length>15</Length>\n<Decimals>0</Decimals>\n<Default>{Spaces}</Default>\n<AllowNull>Y</AllowNull>\n<ValidationType>1</ValidationType>\n<Value>1</Value>\n<ValueNull>N</ValueNull>\n</Field>\n</CustomForm>\n<PurchaseOrderLine>\n<Merchandise>\n<Line>1</Line>\n<LineType>1</LineType>\n<LineTypeDescription>Stocked
  79 + line</LineTypeDescription>\n<MStockCode>2804011COL</MStockCode>\n<MStockDes>SBL</MStockDes>\n<LongDesc>SPEARMINT
  80 + BLEND</LongDesc>\n<TraceableType>T</TraceableType>\n<Mass>1.000000</Mass>\n<Volume>0.000000</Volume>\n<ReceiptIntoFlag>I</ReceiptIntoFlag>\n<MWarehouse>U8</MWarehouse>\n<MWarehouseDesc>ULL
  81 + OWNED @ PDI</MWarehouseDesc>\n<MOutstandingQty>38,400.000</MOutstandingQty>\n<Unedited_MOutstandingQty>
  82 + \ 38400.000000</Unedited_MOutstandingQty>\n<MOrderQty>38,400.000</MOrderQty>\n<Unedited_MOrderQty>
  83 + \ 38400.000000</Unedited_MOrderQty>\n<MReceivedQty>0.000</MReceivedQty>\n<Unedited_MReceivedQty>
  84 + \ 0.000000</Unedited_MReceivedQty>\n<MOrderUom>LB</MOrderUom>\n<MCompleteFlag/>\n<MJob/>\n<IncludeInMrp>Y</IncludeInMrp>\n<MPrice>0.00000</MPrice>\n<Edit_MPrice>0.000</Edit_MPrice>\n<OrderValue>0.00000</OrderValue>\n<MDiscPct1>
  85 + \ 0.00</MDiscPct1>\n<MDiscPct2> 0.00</MDiscPct2>\n<MDiscPct3>
  86 + \ 0.00</MDiscPct3>\n<MDiscValue> 0.00</MDiscValue>\n<MDiscValFlag/>\n<MPriceUom>LB</MPriceUom>\n<MLatestDueDate>2007-04-24</MLatestDueDate>\n<MSupCatalogue/>\n<MProductClass>SBL</MProductClass>\n<MProductClassDescription>SPEARMINT
  87 + BLEND LAB-CP</MProductClassDescription>\n<MStockingUom>LB</MStockingUom>\n<MDecimalsToPrt>1</MDecimalsToPrt>\n<MConvFactPrcUm>1.000000</MConvFactPrcUm>\n<MMulDivPrc>M</MMulDivPrc>\n<MTaxCode/>\n<MTaxCodeDescription/>\n<MConvFactOrdUm>1.000000</MConvFactOrdUm>\n<MMulDivAlloc>M</MMulDivAlloc>\n<MGlCode>1908-00</MGlCode>\n<MGlCodeDescription>HARRAH-CUSTOMER
  88 + OWNED</MGlCodeDescription>\n<MOrigDueDate>2007-04-24</MOrigDueDate>\n<MLctConfirmed/>\n<MSubcontractOp>00000</MSubcontractOp>\n<MVersion/>\n<MRelease/>\n<AssetFlag/>\n<CapexCode/>\n<AssetCapexLine/>\n<Discount/>\n<LastReceipt/>\n<Ledger>1908-00</Ledger>\n<RequisitionLine/>\n<RequisitionNo/>\n<RequisitionUser/>\n<Reschedule>No</Reschedule>\n<Rev/>\n<Release/>\n<SelectionCode/>\n<SelectionType/>\n<Currency>$</Currency>\n<MInspectionReqd>Yes</MInspectionReqd>\n<InspectedReceived>P</InspectedReceived>\n<StockAndAltUm>N</StockAndAltUm>\n<DefaultCostingMethod>P</DefaultCostingMethod>\n<DefaultPrice>0.00000</DefaultPrice>\n<Edit_DefaultPrice>0.000</Edit_DefaultPrice>\n<DefaultPrum>LB</DefaultPrum>\n<CostingMethodsAvailable>\n<ManualMethodCode>M</ManualMethodCode>\n<ManualMethodDesc>Manual
  89 + entry</ManualMethodDesc>\n<ManualMethodPrice>0.00000</ManualMethodPrice>\n<Edit_ManualMethodPrice>0.000</Edit_ManualMethodPrice>\n<ManualMethodCostingPrum>LB</ManualMethodCostingPrum>\n<TotalCostMethodCode>V</TotalCostMethodCode>\n<TotalCostMethodDesc>Total
  90 + cost</TotalCostMethodDesc>\n<TotalCostMethodPrice>0.00000</TotalCostMethodPrice>\n<Edit_TotalCostMethodPrice>0.000</Edit_TotalCostMethodPrice>\n<TotalCostCostingPrum>LB</TotalCostCostingPrum>\n<PurchasePriceMethodCode>P</PurchasePriceMethodCode>\n<PurchasePriceMethodDesc>Purchase
  91 + price</PurchasePriceMethodDesc>\n<PurchasePriceMethodPrice>0.00000</PurchasePriceMethodPrice>\n<Edit_PurchasePriceMethodPrice>0.000</Edit_PurchasePriceMethodPrice>\n<PurchasePriceCostingPrum>LB</PurchasePriceCostingPrum>\n<PriceTaxMethodCode>T</PriceTaxMethodCode>\n<PriceTaxMethodDesc>Price+tax</PriceTaxMethodDesc>\n<PriceTaxMethodPrice>0.00000</PriceTaxMethodPrice>\n<Edit_PriceTaxMethodPrice>0.000</Edit_PriceTaxMethodPrice>\n<PriceTaxCostingPrum>LB</PriceTaxCostingPrum>\n</CostingMethodsAvailable>\n</Merchandise>\n</PurchaseOrderLine>\n<PurchaseOrderLine>\n<Merchandise>\n<Line>2</Line>\n<LineType>1</LineType>\n<LineTypeDescription>Stocked
  92 + line</LineTypeDescription>\n<MStockCode>2804011COL</MStockCode>\n<MStockDes>SBL</MStockDes>\n<LongDesc>SPEARMINT
  93 + BLEND</LongDesc>\n<TraceableType>T</TraceableType>\n<Mass>1.000000</Mass>\n<Volume>0.000000</Volume>\n<ReceiptIntoFlag>I</ReceiptIntoFlag>\n<MWarehouse>U8</MWarehouse>\n<MWarehouseDesc>ULL
  94 + OWNED @ PDI</MWarehouseDesc>\n<MOutstandingQty>38,400.000</MOutstandingQty>\n<Unedited_MOutstandingQty>
  95 + \ 38400.000000</Unedited_MOutstandingQty>\n<MOrderQty>38,400.000</MOrderQty>\n<Unedited_MOrderQty>
  96 + \ 38400.000000</Unedited_MOrderQty>\n<MReceivedQty>0.000</MReceivedQty>\n<Unedited_MReceivedQty>
  97 + \ 0.000000</Unedited_MReceivedQty>\n<MOrderUom>LB</MOrderUom>\n<MCompleteFlag/>\n<MJob/>\n<IncludeInMrp>Y</IncludeInMrp>\n<MPrice>0.00000</MPrice>\n<Edit_MPrice>0.000</Edit_MPrice>\n<OrderValue>0.00000</OrderValue>\n<MDiscPct1>
  98 + \ 0.00</MDiscPct1>\n<MDiscPct2> 0.00</MDiscPct2>\n<MDiscPct3>
  99 + \ 0.00</MDiscPct3>\n<MDiscValue> 0.00</MDiscValue>\n<MDiscValFlag/>\n<MPriceUom>LB</MPriceUom>\n<MLatestDueDate>2007-04-24</MLatestDueDate>\n<MSupCatalogue/>\n<MProductClass>SBL</MProductClass>\n<MProductClassDescription>SPEARMINT
  100 + BLEND LAB-CP</MProductClassDescription>\n<MStockingUom>LB</MStockingUom>\n<MDecimalsToPrt>1</MDecimalsToPrt>\n<MConvFactPrcUm>1.000000</MConvFactPrcUm>\n<MMulDivPrc>M</MMulDivPrc>\n<MTaxCode/>\n<MTaxCodeDescription/>\n<MConvFactOrdUm>1.000000</MConvFactOrdUm>\n<MMulDivAlloc>M</MMulDivAlloc>\n<MGlCode>1908-00</MGlCode>\n<MGlCodeDescription>HARRAH-CUSTOMER
  101 + OWNED</MGlCodeDescription>\n<MOrigDueDate>2007-04-24</MOrigDueDate>\n<MLctConfirmed/>\n<MSubcontractOp>00000</MSubcontractOp>\n<MVersion/>\n<MRelease/>\n<AssetFlag/>\n<CapexCode/>\n<AssetCapexLine/>\n<Discount/>\n<LastReceipt/>\n<Ledger>1908-00</Ledger>\n<RequisitionLine/>\n<RequisitionNo/>\n<RequisitionUser/>\n<Reschedule>No</Reschedule>\n<Rev/>\n<Release/>\n<SelectionCode/>\n<SelectionType/>\n<Currency>$</Currency>\n<MInspectionReqd>Yes</MInspectionReqd>\n<InspectedReceived>P</InspectedReceived>\n<StockAndAltUm>N</StockAndAltUm>\n<DefaultCostingMethod>P</DefaultCostingMethod>\n<DefaultPrice>0.00000</DefaultPrice>\n<Edit_DefaultPrice>0.000</Edit_DefaultPrice>\n<DefaultPrum>LB</DefaultPrum>\n<CostingMethodsAvailable>\n<ManualMethodCode>M</ManualMethodCode>\n<ManualMethodDesc>Manual
  102 + entry</ManualMethodDesc>\n<ManualMethodPrice>0.00000</ManualMethodPrice>\n<Edit_ManualMethodPrice>0.000</Edit_ManualMethodPrice>\n<ManualMethodCostingPrum>LB</ManualMethodCostingPrum>\n<TotalCostMethodCode>V</TotalCostMethodCode>\n<TotalCostMethodDesc>Total
  103 + cost</TotalCostMethodDesc>\n<TotalCostMethodPrice>0.00000</TotalCostMethodPrice>\n<Edit_TotalCostMethodPrice>0.000</Edit_TotalCostMethodPrice>\n<TotalCostCostingPrum>LB</TotalCostCostingPrum>\n<PurchasePriceMethodCode>P</PurchasePriceMethodCode>\n<PurchasePriceMethodDesc>Purchase
  104 + price</PurchasePriceMethodDesc>\n<PurchasePriceMethodPrice>0.00000</PurchasePriceMethodPrice>\n<Edit_PurchasePriceMethodPrice>0.000</Edit_PurchasePriceMethodPrice>\n<PurchasePriceCostingPrum>LB</PurchasePriceCostingPrum>\n<PriceTaxMethodCode>T</PriceTaxMethodCode>\n<PriceTaxMethodDesc>Price+tax</PriceTaxMethodDesc>\n<PriceTaxMethodPrice>0.00000</PriceTaxMethodPrice>\n<Edit_PriceTaxMethodPrice>0.000</Edit_PriceTaxMethodPrice>\n<PriceTaxCostingPrum>LB</PriceTaxCostingPrum>\n</CostingMethodsAvailable>\n</Merchandise>\n</PurchaseOrderLine>\n<PurchaseOrderLine>\n<Merchandise>\n<Line>3</Line>\n<LineType>1</LineType>\n<LineTypeDescription>Stocked
  105 + line</LineTypeDescription>\n<MStockCode>2804011COL</MStockCode>\n<MStockDes>SBL</MStockDes>\n<LongDesc>SPEARMINT
  106 + BLEND</LongDesc>\n<TraceableType>T</TraceableType>\n<Mass>1.000000</Mass>\n<Volume>0.000000</Volume>\n<ReceiptIntoFlag>I</ReceiptIntoFlag>\n<MWarehouse>U8</MWarehouse>\n<MWarehouseDesc>ULL
  107 + OWNED @ PDI</MWarehouseDesc>\n<MOutstandingQty>35,200.000</MOutstandingQty>\n<Unedited_MOutstandingQty>
  108 + \ 35200.000000</Unedited_MOutstandingQty>\n<MOrderQty>35,200.000</MOrderQty>\n<Unedited_MOrderQty>
  109 + \ 35200.000000</Unedited_MOrderQty>\n<MReceivedQty>0.000</MReceivedQty>\n<Unedited_MReceivedQty>
  110 + \ 0.000000</Unedited_MReceivedQty>\n<MOrderUom>LB</MOrderUom>\n<MCompleteFlag/>\n<MJob/>\n<IncludeInMrp>Y</IncludeInMrp>\n<MPrice>0.00000</MPrice>\n<Edit_MPrice>0.000</Edit_MPrice>\n<OrderValue>0.00000</OrderValue>\n<MDiscPct1>
  111 + \ 0.00</MDiscPct1>\n<MDiscPct2> 0.00</MDiscPct2>\n<MDiscPct3>
  112 + \ 0.00</MDiscPct3>\n<MDiscValue> 0.00</MDiscValue>\n<MDiscValFlag/>\n<MPriceUom>LB</MPriceUom>\n<MLatestDueDate>2007-04-24</MLatestDueDate>\n<MSupCatalogue/>\n<MProductClass>SBL</MProductClass>\n<MProductClassDescription>SPEARMINT
  113 + BLEND LAB-CP</MProductClassDescription>\n<MStockingUom>LB</MStockingUom>\n<MDecimalsToPrt>1</MDecimalsToPrt>\n<MConvFactPrcUm>1.000000</MConvFactPrcUm>\n<MMulDivPrc>M</MMulDivPrc>\n<MTaxCode/>\n<MTaxCodeDescription/>\n<MConvFactOrdUm>1.000000</MConvFactOrdUm>\n<MMulDivAlloc>M</MMulDivAlloc>\n<MGlCode>1908-00</MGlCode>\n<MGlCodeDescription>HARRAH-CUSTOMER
  114 + OWNED</MGlCodeDescription>\n<MOrigDueDate>2007-04-24</MOrigDueDate>\n<MLctConfirmed/>\n<MSubcontractOp>00000</MSubcontractOp>\n<MVersion/>\n<MRelease/>\n<AssetFlag/>\n<CapexCode/>\n<AssetCapexLine/>\n<Discount/>\n<LastReceipt/>\n<Ledger>1908-00</Ledger>\n<RequisitionLine/>\n<RequisitionNo/>\n<RequisitionUser/>\n<Reschedule>No</Reschedule>\n<Rev/>\n<Release/>\n<SelectionCode/>\n<SelectionType/>\n<Currency>$</Currency>\n<MInspectionReqd>Yes</MInspectionReqd>\n<InspectedReceived>P</InspectedReceived>\n<StockAndAltUm>N</StockAndAltUm>\n<DefaultCostingMethod>P</DefaultCostingMethod>\n<DefaultPrice>0.00000</DefaultPrice>\n<Edit_DefaultPrice>0.000</Edit_DefaultPrice>\n<DefaultPrum>LB</DefaultPrum>\n<CostingMethodsAvailable>\n<ManualMethodCode>M</ManualMethodCode>\n<ManualMethodDesc>Manual
  115 + entry</ManualMethodDesc>\n<ManualMethodPrice>0.00000</ManualMethodPrice>\n<Edit_ManualMethodPrice>0.000</Edit_ManualMethodPrice>\n<ManualMethodCostingPrum>LB</ManualMethodCostingPrum>\n<TotalCostMethodCode>V</TotalCostMethodCode>\n<TotalCostMethodDesc>Total
  116 + cost</TotalCostMethodDesc>\n<TotalCostMethodPrice>0.00000</TotalCostMethodPrice>\n<Edit_TotalCostMethodPrice>0.000</Edit_TotalCostMethodPrice>\n<TotalCostCostingPrum>LB</TotalCostCostingPrum>\n<PurchasePriceMethodCode>P</PurchasePriceMethodCode>\n<PurchasePriceMethodDesc>Purchase
  117 + price</PurchasePriceMethodDesc>\n<PurchasePriceMethodPrice>0.00000</PurchasePriceMethodPrice>\n<Edit_PurchasePriceMethodPrice>0.000</Edit_PurchasePriceMethodPrice>\n<PurchasePriceCostingPrum>LB</PurchasePriceCostingPrum>\n<PriceTaxMethodCode>T</PriceTaxMethodCode>\n<PriceTaxMethodDesc>Price+tax</PriceTaxMethodDesc>\n<PriceTaxMethodPrice>0.00000</PriceTaxMethodPrice>\n<Edit_PriceTaxMethodPrice>0.000</Edit_PriceTaxMethodPrice>\n<PriceTaxCostingPrum>LB</PriceTaxCostingPrum>\n</CostingMethodsAvailable>\n</Merchandise>\n</PurchaseOrderLine>\n<PurchaseOrderLine>\n<Merchandise>\n<Line>4</Line>\n<LineType>1</LineType>\n<LineTypeDescription>Stocked
  118 + line</LineTypeDescription>\n<MStockCode>2804011COL</MStockCode>\n<MStockDes>SBL</MStockDes>\n<LongDesc>SPEARMINT
  119 + BLEND</LongDesc>\n<TraceableType>T</TraceableType>\n<Mass>1.000000</Mass>\n<Volume>0.000000</Volume>\n<ReceiptIntoFlag>I</ReceiptIntoFlag>\n<MWarehouse>U8</MWarehouse>\n<MWarehouseDesc>ULL
  120 + OWNED @ PDI</MWarehouseDesc>\n<MOutstandingQty>38,400.000</MOutstandingQty>\n<Unedited_MOutstandingQty>
  121 + \ 38400.000000</Unedited_MOutstandingQty>\n<MOrderQty>38,400.000</MOrderQty>\n<Unedited_MOrderQty>
  122 + \ 38400.000000</Unedited_MOrderQty>\n<MReceivedQty>0.000</MReceivedQty>\n<Unedited_MReceivedQty>
  123 + \ 0.000000</Unedited_MReceivedQty>\n<MOrderUom>LB</MOrderUom>\n<MCompleteFlag/>\n<MJob/>\n<IncludeInMrp>Y</IncludeInMrp>\n<MPrice>0.00000</MPrice>\n<Edit_MPrice>0.000</Edit_MPrice>\n<OrderValue>0.00000</OrderValue>\n<MDiscPct1>
  124 + \ 0.00</MDiscPct1>\n<MDiscPct2> 0.00</MDiscPct2>\n<MDiscPct3>
  125 + \ 0.00</MDiscPct3>\n<MDiscValue> 0.00</MDiscValue>\n<MDiscValFlag/>\n<MPriceUom>LB</MPriceUom>\n<MLatestDueDate>2007-04-24</MLatestDueDate>\n<MSupCatalogue/>\n<MProductClass>SBL</MProductClass>\n<MProductClassDescription>SPEARMINT
  126 + BLEND LAB-CP</MProductClassDescription>\n<MStockingUom>LB</MStockingUom>\n<MDecimalsToPrt>1</MDecimalsToPrt>\n<MConvFactPrcUm>1.000000</MConvFactPrcUm>\n<MMulDivPrc>M</MMulDivPrc>\n<MTaxCode/>\n<MTaxCodeDescription/>\n<MConvFactOrdUm>1.000000</MConvFactOrdUm>\n<MMulDivAlloc>M</MMulDivAlloc>\n<MGlCode>1908-00</MGlCode>\n<MGlCodeDescription>HARRAH-CUSTOMER
  127 + OWNED</MGlCodeDescription>\n<MOrigDueDate>2007-04-24</MOrigDueDate>\n<MLctConfirmed/>\n<MSubcontractOp>00000</MSubcontractOp>\n<MVersion/>\n<MRelease/>\n<AssetFlag/>\n<CapexCode/>\n<AssetCapexLine/>\n<Discount/>\n<LastReceipt/>\n<Ledger>1908-00</Ledger>\n<RequisitionLine/>\n<RequisitionNo/>\n<RequisitionUser/>\n<Reschedule>No</Reschedule>\n<Rev/>\n<Release/>\n<SelectionCode/>\n<SelectionType/>\n<Currency>$</Currency>\n<MInspectionReqd>Yes</MInspectionReqd>\n<InspectedReceived>P</InspectedReceived>\n<StockAndAltUm>N</StockAndAltUm>\n<DefaultCostingMethod>P</DefaultCostingMethod>\n<DefaultPrice>0.00000</DefaultPrice>\n<Edit_DefaultPrice>0.000</Edit_DefaultPrice>\n<DefaultPrum>LB</DefaultPrum>\n<CostingMethodsAvailable>\n<ManualMethodCode>M</ManualMethodCode>\n<ManualMethodDesc>Manual
  128 + entry</ManualMethodDesc>\n<ManualMethodPrice>0.00000</ManualMethodPrice>\n<Edit_ManualMethodPrice>0.000</Edit_ManualMethodPrice>\n<ManualMethodCostingPrum>LB</ManualMethodCostingPrum>\n<TotalCostMethodCode>V</TotalCostMethodCode>\n<TotalCostMethodDesc>Total
  129 + cost</TotalCostMethodDesc>\n<TotalCostMethodPrice>0.00000</TotalCostMethodPrice>\n<Edit_TotalCostMethodPrice>0.000</Edit_TotalCostMethodPrice>\n<TotalCostCostingPrum>LB</TotalCostCostingPrum>\n<PurchasePriceMethodCode>P</PurchasePriceMethodCode>\n<PurchasePriceMethodDesc>Purchase
  130 + price</PurchasePriceMethodDesc>\n<PurchasePriceMethodPrice>0.00000</PurchasePriceMethodPrice>\n<Edit_PurchasePriceMethodPrice>0.000</Edit_PurchasePriceMethodPrice>\n<PurchasePriceCostingPrum>LB</PurchasePriceCostingPrum>\n<PriceTaxMethodCode>T</PriceTaxMethodCode>\n<PriceTaxMethodDesc>Price+tax</PriceTaxMethodDesc>\n<PriceTaxMethodPrice>0.00000</PriceTaxMethodPrice>\n<Edit_PriceTaxMethodPrice>0.000</Edit_PriceTaxMethodPrice>\n<PriceTaxCostingPrum>LB</PriceTaxCostingPrum>\n</CostingMethodsAvailable>\n</Merchandise>\n</PurchaseOrderLine>\n<PurchaseOrderLine>\n<Merchandise>\n<Line>5</Line>\n<LineType>1</LineType>\n<LineTypeDescription>Stocked
  131 + line</LineTypeDescription>\n<MStockCode>2804011COL</MStockCode>\n<MStockDes>SBL</MStockDes>\n<LongDesc>SPEARMINT
  132 + BLEND</LongDesc>\n<TraceableType>T</TraceableType>\n<Mass>1.000000</Mass>\n<Volume>0.000000</Volume>\n<ReceiptIntoFlag>I</ReceiptIntoFlag>\n<MWarehouse>U8</MWarehouse>\n<MWarehouseDesc>ULL
  133 + OWNED @ PDI</MWarehouseDesc>\n<MOutstandingQty>38,400.000</MOutstandingQty>\n<Unedited_MOutstandingQty>
  134 + \ 38400.000000</Unedited_MOutstandingQty>\n<MOrderQty>38,400.000</MOrderQty>\n<Unedited_MOrderQty>
  135 + \ 38400.000000</Unedited_MOrderQty>\n<MReceivedQty>0.000</MReceivedQty>\n<Unedited_MReceivedQty>
  136 + \ 0.000000</Unedited_MReceivedQty>\n<MOrderUom>LB</MOrderUom>\n<MCompleteFlag/>\n<MJob/>\n<IncludeInMrp>Y</IncludeInMrp>\n<MPrice>0.00000</MPrice>\n<Edit_MPrice>0.000</Edit_MPrice>\n<OrderValue>0.00000</OrderValue>\n<MDiscPct1>
  137 + \ 0.00</MDiscPct1>\n<MDiscPct2> 0.00</MDiscPct2>\n<MDiscPct3>
  138 + \ 0.00</MDiscPct3>\n<MDiscValue> 0.00</MDiscValue>\n<MDiscValFlag/>\n<MPriceUom>LB</MPriceUom>\n<MLatestDueDate>2007-04-24</MLatestDueDate>\n<MSupCatalogue/>\n<MProductClass>SBL</MProductClass>\n<MProductClassDescription>SPEARMINT
  139 + BLEND LAB-CP</MProductClassDescription>\n<MStockingUom>LB</MStockingUom>\n<MDecimalsToPrt>1</MDecimalsToPrt>\n<MConvFactPrcUm>1.000000</MConvFactPrcUm>\n<MMulDivPrc>M</MMulDivPrc>\n<MTaxCode/>\n<MTaxCodeDescription/>\n<MConvFactOrdUm>1.000000</MConvFactOrdUm>\n<MMulDivAlloc>M</MMulDivAlloc>\n<MGlCode>1908-00</MGlCode>\n<MGlCodeDescription>HARRAH-CUSTOMER
  140 + OWNED</MGlCodeDescription>\n<MOrigDueDate>2007-04-24</MOrigDueDate>\n<MLctConfirmed/>\n<MSubcontractOp>00000</MSubcontractOp>\n<MVersion/>\n<MRelease/>\n<AssetFlag/>\n<CapexCode/>\n<AssetCapexLine/>\n<Discount/>\n<LastReceipt/>\n<Ledger>1908-00</Ledger>\n<RequisitionLine/>\n<RequisitionNo/>\n<RequisitionUser/>\n<Reschedule>No</Reschedule>\n<Rev/>\n<Release/>\n<SelectionCode/>\n<SelectionType/>\n<Currency>$</Currency>\n<MInspectionReqd>Yes</MInspectionReqd>\n<InspectedReceived>P</InspectedReceived>\n<StockAndAltUm>N</StockAndAltUm>\n<DefaultCostingMethod>P</DefaultCostingMethod>\n<DefaultPrice>0.00000</DefaultPrice>\n<Edit_DefaultPrice>0.000</Edit_DefaultPrice>\n<DefaultPrum>LB</DefaultPrum>\n<CostingMethodsAvailable>\n<ManualMethodCode>M</ManualMethodCode>\n<ManualMethodDesc>Manual
  141 + entry</ManualMethodDesc>\n<ManualMethodPrice>0.00000</ManualMethodPrice>\n<Edit_ManualMethodPrice>0.000</Edit_ManualMethodPrice>\n<ManualMethodCostingPrum>LB</ManualMethodCostingPrum>\n<TotalCostMethodCode>V</TotalCostMethodCode>\n<TotalCostMethodDesc>Total
  142 + cost</TotalCostMethodDesc>\n<TotalCostMethodPrice>0.00000</TotalCostMethodPrice>\n<Edit_TotalCostMethodPrice>0.000</Edit_TotalCostMethodPrice>\n<TotalCostCostingPrum>LB</TotalCostCostingPrum>\n<PurchasePriceMethodCode>P</PurchasePriceMethodCode>\n<PurchasePriceMethodDesc>Purchase
  143 + price</PurchasePriceMethodDesc>\n<PurchasePriceMethodPrice>0.00000</PurchasePriceMethodPrice>\n<Edit_PurchasePriceMethodPrice>0.000</Edit_PurchasePriceMethodPrice>\n<PurchasePriceCostingPrum>LB</PurchasePriceCostingPrum>\n<PriceTaxMethodCode>T</PriceTaxMethodCode>\n<PriceTaxMethodDesc>Price+tax</PriceTaxMethodDesc>\n<PriceTaxMethodPrice>0.00000</PriceTaxMethodPrice>\n<Edit_PriceTaxMethodPrice>0.000</Edit_PriceTaxMethodPrice>\n<PriceTaxCostingPrum>LB</PriceTaxCostingPrum>\n</CostingMethodsAvailable>\n</Merchandise>\n</PurchaseOrderLine>\n<PurchaseOrderTotals>\n<LocalValues>\n<LocalOrderValue>
  144 + \ 0.00</LocalOrderValue>\n<LocalReceivedToDateValue> 0.00</LocalReceivedToDateValue>\n<LocalOutstandingValue>
  145 + \ 0.00</LocalOutstandingValue>\n<Edited_LocalOrderValue>0.00</Edited_LocalOrderValue>\n<Edited_LocalReceivedToDateValue>0.00</Edited_LocalReceivedToDateValue>\n<Edited_LocalOutstandingValue>0.00</Edited_LocalOutstandingValue>\n</LocalValues>\n<CurrentValues>\n<CurrentOrderValue>0.00</CurrentOrderValue>\n<CurrentReceivedToDateValue>
  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 "
  148 + http_version:
  149 + recorded_at: Tue, 15 May 2018 21:00:26 GMT
  150 +recorded_with: VCR 4.0.0
... ...
test/cassettes/test_query_browse.yml
... ... @@ -27,15 +27,15 @@ http_interactions:
27 27 Server:
28 28 - Microsoft-HTTPAPI/2.0
29 29 Date:
30   - - Mon, 14 May 2018 20:17:02 GMT
  30 + - Tue, 15 May 2018 00:54:01 GMT
31 31 body:
32 32 encoding: UTF-8
33   - string: 'B417B48864C0814DA59D1F349AEC8D8A00 '
  33 + string: '391E9C831A05AC4CAEE55E3092F4352D00 '
34 34 http_version:
35   - recorded_at: Mon, 14 May 2018 20:17:01 GMT
  35 + recorded_at: Tue, 15 May 2018 00:54:00 GMT
36 36 - request:
37 37 method: get
38   - uri: http://syspro.wildlandlabs.com:90/SYSPROWCFService/Rest/Query/Browse?UserId=B417B48864C0814DA59D1F349AEC8D8A00%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=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
39 39 body:
40 40 encoding: US-ASCII
41 41 string: ''
... ... @@ -60,7 +60,7 @@ http_interactions:
60 60 Server:
61 61 - Microsoft-HTTPAPI/2.0
62 62 Date:
63   - - Mon, 14 May 2018 20:17:06 GMT
  63 + - Tue, 15 May 2018 00:54:06 GMT
64 64 body:
65 65 encoding: UTF-8
66 66 string: "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\n<InvMaster Language='05'
... ... @@ -68,5 +68,5 @@ http_interactions:
68 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 69 code</Header>\n<Key>StockCode</Key>\n<KeyDescription>Stock code</KeyDescription>\n<Table>InvMaster</Table>\n</HeaderDetails>\n</InvMaster>\n "
70 70 http_version:
71   - recorded_at: Mon, 14 May 2018 20:17:05 GMT
  71 + recorded_at: Tue, 15 May 2018 00:54:05 GMT
72 72 recorded_with: VCR 4.0.0
... ...
test/cassettes/test_query_fetch.yml
... ... @@ -27,15 +27,15 @@ http_interactions:
27 27 Server:
28 28 - Microsoft-HTTPAPI/2.0
29 29 Date:
30   - - Mon, 14 May 2018 20:17:15 GMT
  30 + - Tue, 15 May 2018 00:54:14 GMT
31 31 body:
32 32 encoding: UTF-8
33   - string: '9A5B2797B021A04DA9E933CBCF3CB59700 '
  33 + string: '18E80C621C869848B726D01FF3A134A100 '
34 34 http_version:
35   - recorded_at: Mon, 14 May 2018 20:17:14 GMT
  35 + recorded_at: Tue, 15 May 2018 00:54:13 GMT
36 36 - request:
37 37 method: get
38   - uri: http://syspro.wildlandlabs.com:90/SYSPROWCFService/Rest/Query/Fetch?UserId=9A5B2797B021A04DA9E933CBCF3CB59700%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=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
39 39 body:
40 40 encoding: US-ASCII
41 41 string: ''
... ... @@ -60,7 +60,7 @@ http_interactions:
60 60 Server:
61 61 - Microsoft-HTTPAPI/2.0
62 62 Date:
63   - - Mon, 14 May 2018 20:17:23 GMT
  63 + - Tue, 15 May 2018 00:54:23 GMT
64 64 body:
65 65 encoding: UTF-8
66 66 string: "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\n<InvMaster Language='05'
... ... @@ -92,5 +92,5 @@ http_interactions:
92 92 \ 0.000</LoadingFactor>\n<SupplUnitCode/>\n<StorageSecurity/>\n<StorageHazard/>\n<StorageCondition/>\n<ProductShelfLife>
93 93 \ 0</ProductShelfLife>\n<InternalShelfLife> 0</InternalShelfLife>\n<AltMethodFlag/>\n<AltSisoFlag/>\n<AltReductionFlag/>\n<WithTaxExpenseType/>\n</InvMaster>\n "
94 94 http_version:
95   - recorded_at: Mon, 14 May 2018 20:17:22 GMT
  95 + recorded_at: Tue, 15 May 2018 00:54:22 GMT
96 96 recorded_with: VCR 4.0.0
... ...
test/cassettes/test_query_query.yml
... ... @@ -27,15 +27,15 @@ http_interactions:
27 27 Server:
28 28 - Microsoft-HTTPAPI/2.0
29 29 Date:
30   - - Mon, 14 May 2018 20:17:32 GMT
  30 + - Tue, 15 May 2018 00:54:32 GMT
31 31 body:
32 32 encoding: UTF-8
33   - string: '34C603B5A0981D40BCB1B2E4111B1A5900 '
  33 + string: 'BE36CA1559EBC34985FC2D5EF166D75B00 '
34 34 http_version:
35   - recorded_at: Mon, 14 May 2018 20:17:31 GMT
  35 + recorded_at: Tue, 15 May 2018 00:54:31 GMT
36 36 - request:
37 37 method: get
38   - uri: http://syspro.wildlandlabs.com:90/SYSPROWCFService/Rest/Query/Query?BusinessObject=COMFND&UserId=34C603B5A0981D40BCB1B2E4111B1A5900%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=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
39 39 body:
40 40 encoding: US-ASCII
41 41 string: ''
... ... @@ -60,7 +60,7 @@ http_interactions:
60 60 Server:
61 61 - Microsoft-HTTPAPI/2.0
62 62 Date:
63   - - Mon, 14 May 2018 20:17:40 GMT
  63 + - Tue, 15 May 2018 00:54:40 GMT
64 64 body:
65 65 encoding: UTF-8
66 66 string: "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\n<InvMaster Language='05'
... ... @@ -68,5 +68,5 @@ http_interactions:
68 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 69 \ 1</RowsReturned>\n</InvMaster>\n "
70 70 http_version:
71   - recorded_at: Mon, 14 May 2018 20:17:39 GMT
  71 + recorded_at: Tue, 15 May 2018 00:54:39 GMT
72 72 recorded_with: VCR 4.0.0
... ...
test/cassettes/test_sor_query.yml
... ... @@ -27,15 +27,15 @@ http_interactions:
27 27 Server:
28 28 - Microsoft-HTTPAPI/2.0
29 29 Date:
30   - - Mon, 14 May 2018 20:16:48 GMT
  30 + - Tue, 15 May 2018 00:53:39 GMT
31 31 body:
32 32 encoding: UTF-8
33   - string: 'C525B53B5C1C0F4DA6A5DE07E7FE1D0000 '
  33 + string: '88B1144955783D4386011BDD954453CC00 '
34 34 http_version:
35   - recorded_at: Mon, 14 May 2018 20:16:48 GMT
  35 + recorded_at: Tue, 15 May 2018 00:53:38 GMT
36 36 - request:
37 37 method: get
38   - uri: http://syspro.wildlandlabs.com:90/SYSPROWCFService/Rest/Query/Query?BusinessObject=SORQRY&UserId=C525B53B5C1C0F4DA6A5DE07E7FE1D0000%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=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
39 39 body:
40 40 encoding: US-ASCII
41 41 string: ''
... ... @@ -60,7 +60,7 @@ http_interactions:
60 60 Server:
61 61 - Microsoft-HTTPAPI/2.0
62 62 Date:
63   - - Mon, 14 May 2018 20:16:53 GMT
  63 + - Tue, 15 May 2018 00:53:44 GMT
64 64 body:
65 65 encoding: UTF-8
66 66 string: "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\n<SorDetail Language='05'
... ... @@ -82,5 +82,5 @@ http_interactions:
82 82 \ 0.000000</ShipGpsLat>\n<ShipGpsLong> 0.000000</ShipGpsLong>\n<ShipComplete>N</ShipComplete>\n<Email/>\n<FixExchangeRate>N</FixExchangeRate>\n<ExchangeRate>
83 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 84 http_version:
85   - recorded_at: Mon, 14 May 2018 20:16:52 GMT
  85 + recorded_at: Tue, 15 May 2018 00:53:43 GMT
86 86 recorded_with: VCR 4.0.0
... ...
test/cassettes/test_successful_logoff.yml
... ... @@ -27,15 +27,15 @@ http_interactions:
27 27 Server:
28 28 - Microsoft-HTTPAPI/2.0
29 29 Date:
30   - - Mon, 14 May 2018 20:17:59 GMT
  30 + - Tue, 15 May 2018 00:53:30 GMT
31 31 body:
32 32 encoding: UTF-8
33   - string: '305EC4843488A34FA16A50494B42BA7C00 '
  33 + string: 'BDEE07496905C3498683CDCAF0C7BB8100 '
34 34 http_version:
35   - recorded_at: Mon, 14 May 2018 20:17:58 GMT
  35 + recorded_at: Tue, 15 May 2018 00:53:30 GMT
36 36 - request:
37 37 method: get
38   - uri: http://syspro.wildlandlabs.com:90/SYSPROWCFService/Rest/logoff?UserId=305EC4843488A34FA16A50494B42BA7C00%20%20
  38 + uri: http://syspro.wildlandlabs.com:90/SYSPROWCFService/Rest/logoff?UserId=BDEE07496905C3498683CDCAF0C7BB8100%20%20
39 39 body:
40 40 encoding: US-ASCII
41 41 string: ''
... ... @@ -60,10 +60,10 @@ http_interactions:
60 60 Server:
61 61 - Microsoft-HTTPAPI/2.0
62 62 Date:
63   - - Mon, 14 May 2018 20:17:59 GMT
  63 + - Tue, 15 May 2018 00:53:30 GMT
64 64 body:
65 65 encoding: UTF-8
66 66 string: '0'
67 67 http_version:
68   - recorded_at: Mon, 14 May 2018 20:17:59 GMT
  68 + recorded_at: Tue, 15 May 2018 00:53:30 GMT
69 69 recorded_with: VCR 4.0.0
... ...
test/por_test.rb 0 → 100644
  1 +require 'test_helper'
  2 +
  3 +class PorTest < Minitest::Test
  4 + extend Minitest::Spec::DSL
  5 + before { VCR.insert_cassette name }
  6 + after { VCR.eject_cassette }
  7 +
  8 + let(:username) { 'wland' }
  9 + let(:password) { 'piperita2016' }
  10 + let(:company) { 'L' }
  11 + let(:company_password) { '' }
  12 + let(:user_id) do
  13 + Syspro::Logon.logon(username, password, company, company_password)
  14 + end
  15 +
  16 + #def test_por_transaction
  17 + #portor = Syspro::BusinessObjects::PorTor.new
  18 +
  19 + #portor.transaction_date = "2006-04-08"
  20 + #portor.ignore_warnings = "N"
  21 + #portor.grn_matching_action = "A"
  22 + #portor.allow_blank_supplier = "N"
  23 + #portor.apply_if_entire_document_valid = "Y"
  24 + #portor.validate_only = "N"
  25 + #portor.manual_serial_transfers_allowed = "N"
  26 + #portor.ignore_analysis = "Y"
  27 +
  28 + #por_result = portor.call(user_id.guid)
  29 + #assert_kind_of Syspro::BusinessObjects::Models::Por
  30 + #end
  31 +
  32 + def test_por_query
  33 + porqry = Syspro::BusinessObjects::PorQry.new
  34 +
  35 + porqry.purchase_order = " 00001"
  36 + porqry.include_stocked_lines = false
  37 + porqry.include_non_stocked_lines = false
  38 + porqry.include_freight_lines = false
  39 + porqry.include_miscellaneous_lines = false
  40 + porqry.include_comment_lines = false
  41 + porqry.include_completed_lines = false
  42 + porqry.include_grns = false
  43 + porqry.include_history = false
  44 + porqry.include_lct_details = false
  45 + porqry.include_requisition_details = false
  46 + porqry.include_requisition_routing = false
  47 + porqry.include_sales_orders = false
  48 + porqry.include_custom_forms = false
  49 + porqry.filter_type = "A"
  50 + porqry.filter_value = ""
  51 +
  52 + por_result = porqry.call(user_id.guid)
  53 + assert_kind_of(Syspro::BusinessObjects::Models::Por, por_result)
  54 + end
  55 +end
... ...