Sunday, September 20, 2020

How to Show GST % PO report

 purchTable = purchTable::find('02-000164');

taxDocument = TaxBusinessService::getTaxDocumentBySource(purchTable.TableId, purchTable.RecId);
 
 if(taxDocument)
  {
        componentLineEnumerator = taxDocument.componentLines();

        while(componentLineEnumerator.moveNext())
        {
            componentLineObject = componentLineEnumerator.current();

            taxComponent= componentLineObject.metaData().taxComponent();
            taxValue = componentLineObject.getMeasure("Rate").value().value() * 100;
            taxAmount = componentLineObject.getMeasure("Tax Amount").value().value();      

            info(strFmt("Component %1 ,Rate %2, Amount%3",taxComponent,taxValue,taxAmount));
        }
    }

No comments:

Post a Comment