Multiple SO selection info display issues

Hi Seniors,

We have a issue here,

  1. Selected both Sales Order

  2. Included Shipment Price in both Sales Order

  3. First SO Shipment Price displays in Report

  4. Second SO Shipment Price does not display in Report

  5. Total amount for both SO Shipment Price displays Correctly

Below is the screenshot and coding::

///////////////////////////////////////////////////////////////////////////////////Code///////////////////////////////////////////////////////////////////////////////////////

display SalesPrice PRS_getShipmentPrice()

{

SalesLine _salesLine;

select firstFast PRS_ShipmentPrice from _salesLine

where _salesLine.SalesId == CustPackingSlipTrans.SalesId

&& _salesLine.ItemId == CustPackingSlipTrans.ItemId

&& _salesLine.InventTransId == CustPackingSlipTrans.InventTransId;

return _salesLine.PRS_ShipmentPrice;

}

/////////////////////////////////////////////////////////////////////////////End Code///////////////////////////////////////////////////////////////////////////////////////

PRS_ShipmentPrice Code:

forms/SalesTable/DataSources/SalesLine/Fields

///////////////////////////////////////////////////////////////////////////////////Code///////////////////////////////////////////////////////////////////////////////////////

public void modified()

{

super();

ttsbegin;

if (SalesLine.SalesDeliverNow != 0)

SalesLine.PRS_CustomPrice = SalesLine.SalesDeliverNow * SalesLine.PRS_ShipmentPrice;

else

SalesLine.PRS_CustomPrice = SalesLine.SalesQty * SalesLine.PRS_ShipmentPrice;

ttscommit;

}

/////////////////////////////////////////////////////////////////////////////End Code///////////////////////////////////////////////////////////////////////////////////////

Please Advice.

Regards,
Bongcs

Anyone ?

Update From Anyone ?

Keywords: firstonly10 does not work.

You need to debug the shipment price method in the report to see what is wrong, whether you were able to get the correct packing sliptrans.

Hi

You have to modify the query below :

select firstFast PRS_ShipmentPrice from _salesLine

where _salesLine.SalesId == CustPackingSlipTrans.SalesId

&& _salesLine.ItemId == CustPackingSlipTrans.ItemId

&& _salesLine.InventTransId == CustPackingSlipTrans.InventTransId;

to

select firstFast PRS_ShipmentPrice from _salesLine

where _salesLine.SalesId == CustPackingSlipTrans.OrigSalesId

&& _salesLine.ItemId == CustPackingSlipTrans.ItemId

&& _salesLine.InventTransId == CustPackingSlipTrans.InventTransId;

So, you have to use OrigSalesId field.

SalesId is the first Sales Order involve in the posting and AX use for relation with the CustPackingSlipJour

Regards

Feedback:

Hi Denis & Kranthi,

//////////////////////////////////////////////////////////////////////////////////////////Code//////////////////////////////////////////////////////////////////////////////////////////////////////
select firstFast PRS_ShipmentPrice from _salesLine

where _salesLine.SalesId == CustPackingSlipTrans.OrigSalesId

&& _salesLine.ItemId == CustPackingSlipTrans.ItemId

&& _salesLine.InventTransId == CustPackingSlipTrans.InventTransId;

///////////////////////////////////////////////////////////////////////////////////////End Code//////////////////////////////////////////////////////////////////////////////////////////////////////

The Amendment of the following from keyword:
SalesId > OrigSalesId

Has proof to be a success.

Below is the screenshot:

:

Appreciate the knowledge that you’ve shared, Thanks Very Much.

Regards,

Bongcs

Great

Remember to set the post as verified solution

Thanks