TmpTaxWorkTrans tmpTax; purchTotals purchTotals = PurchTotals::newPurchTable(PurchTable); purchTotals.calc(); tmpTax.setTmpData(purchTotals.tax().tmpTaxWorkTrans()); select firstonly tmpTax; real TaxValue = TaxData::percent(tmpTax.TaxCode,today(),0); Info(strFmt("%1",TaxValue)); TaxValue = TaxData::find(tmpTax.TaxCode, Systemdateget(), 0).TaxValue; Info(strFmt("%1",TaxValue)); NW_CertificationOfCompletionHeader.TaxValue = TaxValue; https://mycsharpdeveloper.wordpress.com/2015/07/03/how-to-get-salespurchase-taxgstvat-info-for-report/ // OR Line.TaxValue = strFmt("%1%",this.getTaxPercent(PurchLine.TaxGroup, PurchLine.TaxItemGroup)); public TaxValue getTaxPercent(TaxGroup _taxGroup, TaxItemGroup _taxItemGroup) { TaxGroupData taxGroupData; TaxOnItem taxOnItem; TaxData taxData; select firstonly TaxCode from taxGroupData index hint TaxGroupIdx where taxGroupData.TaxGroup == _taxGroup join taxOnItem where taxOnItem.TaxItemGroup == _taxItemGroup && taxOnItem.TaxCode == taxGroupData.TaxCode; select firstonly TaxValue from taxData where taxData.TaxCode == taxGroupData.TaxCode; //&& taxData.TaxFromDate <= systemDateGet() && taxData.TaxToDate >= systemDateGet(); return taxData.TaxValue; }