Hi,
We integrated TNT Parcelware based on the White Paper of the shipment interface. Now barcodes for shipments are automatically printed and that saves a lot of time. However, if a packing slip of a return order is posted or a negative quantity is posted to credit an item already posted to the packing slip...also a shipment request is sent. This should not the case since no shipment takes actually place.
I have investigated the code and this problem can be avoided by setting up a delivery mode = 'none' with misc. on the sales order header. However, the sales header will also influence all existing sales order lines: _custPackingSlipJour.DlvMode. To be frank, I would expect that no request should be created if the sum of quantity of the sales lines is 0 or negative. In that case no goods will be shipped through a carrier.
Is this a good evaluation or did I not understand what SHIPCARRIERSHIPPINGREQUEST means? I think next code has a bug.
public static void createShippingRequest(
CustPackingSlipJour _custPackingSlipJour,
SalesTable _salesTable,
SalesLine _salesLine,
WMSShipmentId _shipmentId,
AmountCur _totalAmount)
{
ShipCarrierShippingRequest shippingRequest;
;
//if delviery type is pickup or misc, no shipping request needed
if (!DlvMode::shipCarrierService(_custPackingSlipJour.DlvMode))
{
return;
}
I would suggest next code is more in line with the business process to be supported.
public static void createShippingRequest(
CustPackingSlipJour _custPackingSlipJour,
SalesTable _salesTable,
SalesLine _salesLine,
WMSShipmentId _shipmentId,
AmountCur _totalAmount)
{
ShipCarrierShippingRequest shippingRequest;
;
//if delviery type is pickup or misc, no shipping request needed
if (!DlvMode::shipCarrierService(_custPackingSlipJour.DlvMode))
{
return;
}
if(_custPackingSlipJour.Qty <=0)
{
return;
}
if (!_custPackingSlipJour.ShipCarrierId)
{
return;
}
Any feedback is welcomed.
J.
*This post is locked for comments
I have the same question (0)

Report
All responses (
Answers (