project QadFinancials > class BAPMatchingReport > method CrossCompanyValues

Description

Get company code based on the iterator.


Parameters


iiEntryNumberinputintegerIterator to identify the entry in the company code list.
oiReturnStatusoutputintegerReturn status of the method.


Internal usage


QadFinancials
method BAPMatchingReport.InvoiceMatching


program code (program1/bapmatchingreport.p)

/* Assign company ID based on code */

if vcCompanyFilter = ?
then do:
    assign viAPCurrentCompany_ID = viCompanyId.
    find first tqCompanyPrim
    where tqCompanyPrim.tiCompany_ID = viCompanyId no-error.
    if available tqCompanyPrim 
    then assign vcAPCurrentCompany = tqCompanyPrim.tcCompanyCode.
end.
else do:
    assign vcAPCurrentCompany = entry(iiEntryNumber,vcCompanyFilter,",":U).
    find first tqCompanyPrim 
    where tqCompanyPrim.tcCompanyCode = vcAPCurrentCompany no-error.
    if available tqCompanyPrim
    then assign viAPCurrentCompany_ID = tqCompanyPrim.tiCompany_ID.
end.