project QadFinancials > class BVAT > method InitialValues

Description

Add code here to initialize the calculated fields of a 'new' record (= a record that must be created in the application database) in a class temp-table.


Parameters


icTableNameinputcharacterName of the database table of which a record is created in the class temp-table.
oiReturnStatusoutputinteger


Internal usage


unused


program code (program/bvat.p)

<ANCESTOR-CODE>

if icTableName = "Vat":U
then do:
    assign tVat.VatIsActive        = true
           tVat.VatInOut           = {&VATINOUT-OUTPUT}
           tVat.VatTransactionType = {&VATTRANSACTIONTYPE-SALES}
           tVat.TxuTaxUsage        = {&VATDELIVERYTYPE-SERVICE}
           tVat.VatPercentageLevel = {&VATPERCENTAGELEVEL-NONE}
           tVat.VatIsGlobalTax     = true.
end.
if icTableName = "VatRule":U
then do:
    assign tVatRule.VatRuleIsPosting        = false
           tVatRule.VatRuleIsDelayed        = false
           tVatRule.VatRuleDelayCorrection  = 0
           tVatRule.VatRuleMovementType     = {&VATRULEMOV-DEBIT}
           tVatRule.VatRuleIsPassBaseValue  = false
           tVatRule.VatRuleUsage            = {&VATRULEUSAGE-NONE}
           tVatRule.VatRuleRounding         = {&VATRULEROUNDING-NOROUNDING}
           tVatRule.VatRuleOperator         = "*":U
           tVatRule.VatRuleRef2             = {&VATRULEREF-NONE}.
end.