Friday, January 17, 2014

Total purchase invoice amount through X++

How to get a total invoice amount for a purchase order table, You had to take it in consideration for all the charges calculated (ex: tax). I tried to search the purchtable and purcline table for any existing methods. I found one class called purchtotals. there Microsoft calculating all the total amounts of incoice amount, order amount etc. Her...e is the code for this total calculation

PurchtotalsForm totalsForm;
;
totalsForm = PurchtotalsForm::newPurchTotalsForm(this, 1);
totalsForm.calctotals();
return totalsForm.invoiceAmountValue();

not only you can calculate invoice amount here is the list things you can get it from this class.

purchTaxTotal,
purchRoundOff,
purchTotalAmount,
purchTaxRoundOff,
purchCashDiscDate,
purchPrepayLimit,
purchPrepayAvailable,
purchTaxWithholdTotal

No comments:

Post a Comment