Description
Returns default values based on input GL Code
Parameters
icGLCode | input | character | GL Code |
ocAccountNumber | output | character | Account Number |
ocCurrencyCode | output | character | Currency Code |
ocOwnBankNumber | output | character | Own Bank Number |
ocPayFormatTypeCode | output | character | Payment Format Type |
ocPayFormatTypePayInstrument | output | character | Payment format type Payment Instrument |
oiBankPayFormat_ID | output | integer | Bank Payment Format ID |
oiBankNumber_ID | output | integer | |
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
unused
program code (program6/bdpaymentselection.p)
if icGLCode = ? or icGLCode = "":U
then return.
/* We only get the Payformat of AR module */
<Q-27 run GLForBankFormat (first) (Read) (NoCache)
(input viCompanyId, (CompanyId)
input icGLCode, (GLCode)
input {&PAYFORMATMODULE-AR}, (PayFormatTypeModule)
input ?, (GLID)
input true, (BankPayFormatIsActive)
input true, (PayFormatTypeIsActive)
output dataset tqGLForBankFormat) in BGL>
find first tqGLForBankFormat where
tqGLForBankFormat.tlBankPayFormatIsActive and
tqGLForBankFormat.tlPayFormatTypeIsActive
no-error.
if available tqGLForBankFormat
then do:
assign oiBankPayFormat_ID = tqGLForBankFormat.tiBankPayFormat_ID
oiBankNumber_ID = tqGLForBankFormat.tiBankNumber_ID
ocAccountNumber = tqGLForBankFormat.tcBankNumber
ocPayFormatTypeCode = tqGLForBankFormat.tcPayFormatTypeCode
ocPayFormatTypePayInstrument = tqGLForBankFormat.tcPayFormatTypePayInstrument
ocCurrencyCode = if tqGLForBankFormat.tlGLIsLocalCurrency
then vcCompanyLC
else tqGLForBankFormat.tcCurrencyCode.
<Q-69 run BankNumberOwnBankGLByID (all) (Read) (NoCache)
(input tqGLForBankFormat.tiBankNumber_ID, (BankNumber_ID)
input ?, (CompanyId)
output dataset tqBankNumberOwnBankGLByID) in BBankNumber>
find first tqBankNumberOwnBankGLByID where
tqBankNumberOwnBankGLByID.tiBankNumber_ID = tqGLForBankFormat.tiBankNumber_ID
no-error.
if available tqBankNumberOwnBankGLByID
then assign ocOwnBankNumber = tqBankNumberOwnBankGLByID.tcOwnBankNumber.
end. /* if available tqGLForBankFormat */