project QadFinancials > class BPaymentSelection > method CalcAllPaySelLineInBrowse

query calculated fields procedure

Description

Assign a value to query calculated fields


Parameters


iiCompanyIdinputintegerCompany id
oiReturnStatusoutputintegerReturn status of the method.


Internal usage


QadFinancials
query PaySelLineInBrowse


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.