project QadFinancials > class BVAT > method Calculate
Description
Add code here to initialize the calculated fields of the class temp-tables after loading existing records from the application database.
Parameters
oiReturnStatus | output | integer | |
Internal usage
unused
program code (program/bvat.p)
<ANCESTOR-CODE>
for each tVat:
if vlDataLoadKeepPrevious and
can-find (tAlreadyCalculatedRecords where
tAlreadyCalculatedRecords.tcTableName = "Vat" and
tAlreadyCalculatedRecords.tc_Rowid = tVat.tc_Rowid)
then next.
for each tVatRule where
tVatRule.tc_ParentRowid = tVat.tc_Rowid and
tVatRule.VatRuleUsage = {&VATRULEUSAGE-PERCENTAGE}:
<M-1 run ApiGetPercentageFormula
(input tVatRule.tcVatPercentCode (icVatPercentCode),
input tVatRule.VatRuleOperator (icOperator),
output tVatRule.tcPercentageFormula (ocPercentageFormula),
output tVatRule.VatRuleValue (odValue),
output viFcReturnSuper (oiReturnStatus)) in BVAT>
end. /* for each tVatRule where */
end. /* for each tVat: */