preloader-matrix

Alfasith

Calculate SalesTotal class and related information in X++

Hi,

static void SalesTotalAlfasith(Args _args)
{
    SalesTotals   salesTotals;
    SalesTable   salesTable;
    container   displayFields;
    str    totalTax, amountWithoutTax, amountInclTax;

    salesTable = salesTable::find(‘SO-101269’);
    salesTotals  =  SalesTotals::construct(salesTable, salesUpdate::All);
    salesTotals.calc();
    displayFields =  salesTotals.displayFieldsCurrency(salesTotals.currencyCode());

    print   conpeek(displayFields, TradeTotals::posBalance());
    print   conpeek(displayFields, TradeTotals::posEndDisc());
    print   conpeek(displayFields,TradeTotals::posTaxTotal());
    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.