Hi Martin,
Here is code and record. I double checked record, there is nothing wrong or different with others. Please understand, I changed some names for privacy.
------------------------------------------------------------
while select Table1
where Table1.SessionId == _SessionId
join Table2
where Table2.PickingRef == Table1.WaveReferenceId
join salesTable
where salesTable.salesId == Table2.transRefId
&& salesTable.Sentflag == NoYes::No
{
if (salesTable.checkExistLineFlag())
{
this.logDetail();
salesOrdersCount++;
salesOrder = this.exportSalesOrder(Table2, salesTable);
salesOrderLinesCount += salesOrder.parmSalesOrderLine().lastIndex();
salesOrderArray.value(salesOrdersCount,salesOrder);
salesOrderStatusLog::logStatusChange(salesOrder.parmSalesId(),
salesStatus::Submitted,
salesOrder.parmPickingRoute(),
OEMLog,
this.getXMLForSalesOrder(salesOrder));
}
}
-------------------------------------------------------
We grab the result set, then check if there are sales lines are not sent out(xml), then
get all lines, create xml, update status.
Here is the record:
-------------------------------------------------------
<SalesOrderOutbound>
<FileId></FileId>
<OrderCount>0</OrderCount>
<OrderLineCount>0</OrderLineCount>
<SalesOrder>
<SalesId>S04145376</SalesId>
<PickingRoute>PRT3340569</PickingRoute>
<Customer>40295614</Customer>
<OrderDate>08/04/2015</OrderDate>
<Payment>CreditCard</Payment>
<MerchTotal>439.70</MerchTotal>
<ShippingTotal>25.00</ShippingTotal>
<CouponTotal>10.00</CouponTotal>
<CouponId>TDFZ</CouponId>
<CouponDescription>$10 Off Any Order</CouponDescription>
<TaxTotal>0.00</TaxTotal>
<TaxJurisdiction></TaxJurisdiction>
<OrderTotal>464.70</OrderTotal>
<PaymentTotal>464.70</PaymentTotal>
<Currency>USD</Currency>
<BillingName>John Doe</BillingName>
<BillingStreet1>main</BillingStreet1>
<BillingStreet2></BillingStreet2>
<BillingCity>New York</BillingCity>
<BillingState>NY</BillingState>
<BillingZip>10001</BillingZip>
<BillingCountry>US</BillingCountry>
<DeliveryMode>FX SP</DeliveryMode>
<ShipToName>John Doe</ShipToName>
<ShipToStreet1>Main</ShipToStreet1>
<ShipToStreet2></ShipToStreet2>
<ShipToCity>New York</ShipToCity>
<ShipToState>NY</ShipToState>
<ShipToZip>10001</ShipToZip>
<ShipToCountry>US</ShipToCountry>
<ShipToPhone>0000000000</ShipToPhone>
<SpecialHandling>0.0</SpecialHandling>
<SpecialNotes></SpecialNotes>
<IsReplacement>0</IsReplacement>
<IsGift>0</IsGift>
<GiftMessage></GiftMessage>
<BoxType>B</BoxType>
<PiecesTotal>0</PiecesTotal>
<WeightTotal>0.00</WeightTotal>
<OtherShipmentsExist>1</OtherShipmentsExist>
</SalesOrder>
</SalesOrderOutbound>
-------------------------------------------------------