Alfasith AX

Alfasith AX
اللَّهُمَّ انْفَعْنِي بِمَا عَلَّمْتَنِي، وَعَلِّمْنِي مَا يَنْفَعُنِي، وَزِدْنِي عِلْمًا

Monday, March 5, 2018

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,

No comments:

Post a Comment

SQL code to upate one Legal entity banner to all the legal entity in D365

 Hi, update companyimage set  companyimage.Image  = companyimageA.Image  from  ( select Image from companyimage where dataAreaid = 'USF...