The following is to calculate the header level and line level misc charges for SalesQuotationDetails ..
I did this in my SalesQuotation report to show the misc charges at header level and line level
I did this in my SalesQuotation report to show the misc charges at header level and line level
display
AmountCur unitPrice()
{
AmountCur
totalTableValue, totalLineValue;
MarkupTrans markupTrans;
MarkupTable markTable;
;
while select markupTrans
where markupTrans.TransTableId == SalesQuotationJour.TableId
&& markupTrans.TransRecId ==
SalesQuotationJour.RecId
join markTable
where markTable.MarkupCode ==
markupTrans.MarkupCode
&& markTable.ModuleType
== ModuleInventCustVend::Cust
{
totalTableValue = totalTableValue +
markUp::calcTrans(markupTrans,SalesQuotationTrans.Qty,
SalesQuotationTrans.LineAmount);
}
while select markupTrans
where markupTrans.TransTableId ==SalesQuotationTrans.TableId
&& markupTrans.TransRecId ==
SalesQuotationTrans.RecId
join markTable
where markTable.MarkupCode ==
markupTrans.MarkupCode
&& markTable.ModuleType
== ModuleInventCustVend::Cust
{
totalLineValue = totalLineValue +
MarkUp::calcTrans(markupTrans,SalesQuotationTrans.Qty,
SalesQuotationTrans.LineAmout);
}
return totalLineValue;}