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
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
No comments:
Post a Comment