Parameters
icBankNumberParentType | input | character | |
iiBankNumberParentObjectID | input | integer | |
iiBankNumberID | input | integer | The banknumber ID passed possibly from the payment selection. |
ocBankNumber | output | character | |
ocBankNumberValidation | output | character | |
ocBankNumberExtension | output | character | |
ocBankNumberSwiftCode | output | character | |
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
QadFinancials
program code (program7/bpaymentselection.p)
assign oiReturnStatus = -98.
/* ZJL : the BankNumberIsDefault should not be set to true or false as the query can possibly */
/* return multiple bank accounts for a creditor */
<Q-1 run BankNumberByParentID (all) (Read) (NoCache)
(input iiBankNumberParentObjectID, (ParentObjectId)
input icBankNumberParentType, (BankNumberParentType)
input ?, (BankNumberIsDefault)
input viCompanyId, (CompanyId)
output dataset tqBankNumberByParentID) in BBankNumber >
/* Find the banknumber account using the banknumber id */
find first tqBankNumberByParentID where
tqBankNumberByParentID.tcBankNumberParentType = icBankNumberParentType and
tqBankNumberByParentID.tiParentObject_ID = iiBankNumberParentObjectID and
tqBankNumberByParentID.tiBankNumber_ID = iiBankNumberID
no-lock no-error.
/* Find the default banknumber account */
if not available tqBankNumberByParentID
then find first tqBankNumberByParentID where
tqBankNumberByParentID.tcBankNumberParentType = icBankNumberParentType and
tqBankNumberByParentID.tiParentObject_ID = iiBankNumberParentObjectID and
tqBankNumberByParentID.tlBankNumberIsDefault = true
no-lock no-error.
/* Find another banknumber account */
if not available tqBankNumberByParentID
then find first tqBankNumberByParentID where
tqBankNumberByParentID.tcBankNumberParentType = icBankNumberParentType and
tqBankNumberByParentID.tiParentObject_ID = iiBankNumberParentObjectID
no-lock no-error.
if not available(tqBankNumberByParentID)
then do:
assign vcPaySelMsg = trim(#T-2'The bank account specified is not defined in the system.':200(15795)T-2#) + chr(10) +
trim(substitute(#T-3'Technical Info: BankNumberParenType=&1 ; BankNumberParentObjectID=&2':200(15796)T-3#,
trim(icBankNumberParentType),
string(iiBankNumberParentObjectID)) )
oiReturnStatus = -1.
<M-4 run SetMessage (input trim(vcPaySelMsg) (icMessage),
input '':U (icArguments),
input '':U (icFieldName),
input '':U (icFieldValue),
input 'E':U (icType),
input 3 (iiSeverity),
input '':U (icRowid),
input 'QADFIN-3803':U (icFcMsgNumber),
input '':U (icFcExplanation),
input '':U (icFcIdentification),
input '':U (icFcContext),
output viFcReturnSuper (oiReturnStatus)) in BPaymentSelection>
return.
end.
assign ocBankNumber = tqBankNumberByParentID.tcBankNumber
ocBankNumberValidation = tqBankNumberByParentID.tcBankNumberValidation
ocBankNumberExtension = tqBankNumberByParentID.tcBankNumberExtension
ocBankNumberSwiftCode = tqBankNumberByParentID.tcBankNumberSwiftCode.
if oiReturnStatus = - 98
then assign oiReturnStatus = 0.