Getting item unit price in sales line :
unit price of item comes from
1. item master sales unit price
2. if any sales trade agreement against that item it will come
code for pulling unit price in sales line of item.
public Price getPriceFromSalesPriceAgreement()
{
SalesLine salesLine;
InventDim inventDim;
InventTable inventTable;
EcoResProductParameters ecoResProductParameters;
InventTableModule inventTableModule;
select firstonly CustAccount, CurrencyCode from salesLine
where salesLine.RecId == this.SalesLine
join inventDim
where inventDim.inventDimId == salesLine.InventDimId
join inventTable
where inventTable.ItemId == this.ItemNumber
join FBHAdditiveReleaseUOM from ecoResProductParameters;
return conPeek(inventTable.salesPriceAgreement(
DateTimeUtil::getSystemDate(DateTimeUtil::getUserPreferredTimeZone()),
inventDim,
this.totalAdditiveQty(),
ecoResProductParameters.FBHAdditiveReleaseUOM,
SalesLine.CustAccount,
SalesLine.CurrencyCode), 1);
}
or in standard we have method in inventtable
need to pass parameters
inventtable.salesPriceAgreement(XXX);
unit price of item comes from
1. item master sales unit price
2. if any sales trade agreement against that item it will come
code for pulling unit price in sales line of item.
public Price getPriceFromSalesPriceAgreement()
{
SalesLine salesLine;
InventDim inventDim;
InventTable inventTable;
EcoResProductParameters ecoResProductParameters;
InventTableModule inventTableModule;
select firstonly CustAccount, CurrencyCode from salesLine
where salesLine.RecId == this.SalesLine
join inventDim
where inventDim.inventDimId == salesLine.InventDimId
join inventTable
where inventTable.ItemId == this.ItemNumber
join FBHAdditiveReleaseUOM from ecoResProductParameters;
return conPeek(inventTable.salesPriceAgreement(
DateTimeUtil::getSystemDate(DateTimeUtil::getUserPreferredTimeZone()),
inventDim,
this.totalAdditiveQty(),
ecoResProductParameters.FBHAdditiveReleaseUOM,
SalesLine.CustAccount,
SalesLine.CurrencyCode), 1);
}
or in standard we have method in inventtable
need to pass parameters
inventtable.salesPriceAgreement(XXX);