Tax value

There is the way to find the value of tax amount for a specific salesLine and for a specific taxCode

display Qty taxValue()
{
    real            ret;
    TmpTaxWorkTrans tmpTaxWorkTrans;
    ;

    tmpTaxWorkTrans = SalesTotals::construct(custInvoiceJour.salesTable()).tax().tmpTaxWorkTrans();
    
    while select tmpTaxWorkTrans
    where tmpTaxWorkTrans.TaxCode           like "DEEE*"
    &&      tmpTaxWorkTrans.InventTransId   == custInvoiceTrans.InventTransId
    {
        ret += tmpTaxWorkTrans.showTaxValue();
    }
    
    return ret;
}
Advertisements