query calculated fields procedure
Description
Assign a value to query calculated fields
Parameters
iiCompanyId | input | integer | Company id |
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
QadFinancials
program code (program1/bpaymentselection.p)
create query vhQuery in widget-pool "non-persistent".
vhQuery:forward-only = yes.
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 {&tdCInvoiceOpenAmountTC} = 0 - {&tdCInvoiceBalanceCreditTC}
{&tcInternalNumber} = string({&tiPeriodYear}) + "/":U +
{&tcJournalCode} + "/":U +
string({&tiCInvoiceVoucher},"999999999":U)
{&tcBankAccountNumber} = (if {&tcBankNumberFormatted} <> ? and
{&tcBankNumberFormatted} <> '':U
then {&tcBankNumberFormatted}
else {&tcBankNumber}).
vhQuery:get-next().
end.
vhQuery:query-close().
delete object vhQuery.