Showing posts with label GST. Show all posts
Showing posts with label GST. Show all posts

Wednesday, February 21, 2018

AX 2009 AX 2012 Find India GST posted sales tax value AX2009 AX2012

Below job will bring the posted/estimated invoice tax for the sales order.

We can change the module as per the requirement and find the tax value


//Refer GSTInvoiceReport_IN class
static void _122173_Tax(Args _args)
{
    CustInvoiceJour                     invoiceJournal;
    ITaxDocument                        taxDocument;
    ITaxDocumentLine                    taxDocumentLine;
    ITaxDocumentLineEnumerator          taxDocumentLineEnumerator;
    ITaxDocumentComponentLine           taxDocumentComponentLine;
    ITaxDocumentComponentLineEnumerator componentLines;
;
    invoiceJournal = CustInvoiceJour::find('vouchernumber');
    taxDocument = TaxBusinessService::getTaxDocumentBySource(invoiceJournal.TableId, invoiceJournal.RecId);
    taxDocumentLineEnumerator = taxDocument.lines();
    while (taxDocumentLineEnumerator.moveNext())
    {
        taxDocumentLine = taxDocumentLineEnumerator.current();
        componentLines = taxDocumentLine.componentLines('GST');
        while (componentLines.moveNext())
        {
            taxDocumentComponentLine = componentLines.current();
            info (strfmt('%1', TaxGSTInvoiceHelper_IN::getTaxPayableAmount(taxDocumentComponentLine)));
        }
    }
}

Regards,
Arun S Keerthi