project QadFinancials > class BPeriod > method CalcAllSelectPeriodForAccVat
query calculated fields procedure
Description
This method is used to calculate the calculate fields for query.
Parameters
iiCompanyId | input | integer | Company id |
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
QadFinancials
program code (program1/bperiod.p)
create query vhQuery in widget-pool "non-persistent".
vhQuery:set-buffers(ih_Buffer).
vhQuery:query-prepare("for each ":U + ih_Buffer:table).
vhQuery:query-open().
vhQuery:get-first().
do while not vhQuery:query-off-end:
assign
{&tdPostingVatBalanceCCCalc} = {&tdPostingVatTaxDebitCC} - {&tdPostingVatTaxCreditCC}
{&tdPostingVatBalanceLCCalc} = {&tdPostingVatTaxDebitLC} - {&tdPostingVatTaxCreditLC}
{&tdPostingVatBalanceTCCalc} = {&tdPostingVatTaxDebitTC} - {&tdPostingVatTaxCreditTC}.
vhQuery:get-next().
end.
vhQuery:query-close().
delete object vhQuery.