preloader-matrix

Alfasith

Get purchase Lines Sales tax in AX 2012

    TaxJournalTrans      taxJournal;

    select SourceTaxAmountCur,TaxAmount from taxJournal where taxJournal.TransRecId  == vendPurchOrderJour.RecId
                        &&  taxJournal.TransTableId     == tableNum(vendPurchOrderJour)
                        &&  taxJournal.InventTransId    == purchLineAllVersions.InventTransId;
    if(vendFormletterParameters.TaxSpecPrintLevel == TaxSpecPrintLevel::Currency)
    {
        purchPurchaseOrderTmp.VAT = taxJournal.SourceTaxAmountCur;
    }
    else if(vendFormletterParameters.TaxSpecPrintLevel == TaxSpecPrintLevel::CurrencyMST)
    {
        purchPurchaseOrderTmp.VAT = taxJournal.TaxAmount;
    }
    else
        purchPurchaseOrderTmp.VAT = 0.0;

Regards,

Leave a Reply

Your email address will not be published.