preloader-matrix

Alfasith

Calculate PurchTotal class and its related information in X++

Hi,

static void PurchTotalAlfasith(Args _args)
{
    PurchTotals   purchTotals;
    PurchTable   purchTable;
    container   displayFields;
    PurchtotalsForm         totalsForm;
    purchTable = PurchTable::find(‘000396’);          
    totalsForm   = PurchtotalsForm::newPurchTotalsForm(purchTable, 1);
    totalsForm.calctotals();
    print ” Total quantity = %1″, totalsForm.qtyValue();
    print ” Total Discount = %1″,totalsForm.endDiscValue();
    print ” Total Chanrges = %1″,totalsForm.sumMarkUpValue(); // this includes all the freight charges..
    print ” Total Invoiced = %1″,totalsForm.invoiceAmountValue();
    print ” Sub total      = &1″,totalsForm.sumLinesValue();
    pause;
}

Regards,

Share on email
Share on facebook
Share on twitter
Share on linkedin
Share on pinterest

Leave a Reply

Your email address will not be published.