Parameters
iiPayFormatGroupId | input | integer | |
iiPayFormatCodeId | input | integer | |
icPayCodeValue | input | character | |
ilCheckMandatory | input | logical | |
iiYear | input | integer | |
icDaybook | input | character | |
iiVoucherNumber | input | integer | |
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
QadFinancials
program code (program1/bpaymentformat.p)
if iiPayFormatGroupId = ? or iiPayFormatGroupId = 0
then do:
assign vcMessage = trim(#T-1'You must specify the payment format group ID.':50(55846)t-1#)
oiReturnStatus = -1.
<M-2 run SetMessage
(input vcMessage (icMessage),
input '':U (icArguments),
input '':U (icFieldName),
input '':U (icFieldValue),
input 'E':U (icType),
input 3 (iiSeverity),
input '':U (icRowid),
input 'QadFin-5555':U (icFcMsgNumber),
input '':U (icFcExplanation),
input '':U (icFcIdentification),
input '':U (icFcContext),
output viFcReturnSuper (oiReturnStatus)) in BPaymentFormat>
return.
end.
<Q-3 run PayFormatGroupPrim (all) (Read) (NoCache)
(input iiPayFormatGroupId, (PayFormatGroupID)
input ?, (PayFormatTypeCode)
input ?, (PayFormatGroupSequence)
output dataset tqPayFormatGroupPrim) in BPaymentFormat >
for first tqPayFormatGroupPrim:
if ilCheckMandatory and tqPayFormatGroupPrim.tlPayFormatGroupIsMandatory and
(icPayCodeValue = ? or icPayCodeValue = "":U) and
(iiPayFormatCodeId = ? or iiPayFormatCodeId = 0) and
(iiYear <> ? or iiYear <> 0) and
(icDaybook <> ? or icDaybook <> "":U) and
(iiVoucherNumber <> ? or iiVoucherNumber <> 0)
then do:
assign vcMessage = trim(substitute(#T-37'You must specify a value for the &1 payment attribute. To resolve this, click the Header Fields button and enter a value for the attribute.':255(149964276)T-37#,tqPayFormatGroupPrim.tcPayFormatGroupCode))
oiReturnStatus = -1.
<M-5 run SetMessage
(input vcMessage (icMessage),
input '':U (icArguments),
input '':U (icFieldName),
input '':U (icFieldValue),
input 'E':U (icType),
input 3 (iiSeverity),
input '':U (icRowid),
input 'QadFin-5556':U (icFcMsgNumber),
input '':U (icFcExplanation),
input '':U (icFcIdentification),
input '':U (icFcContext),
output viFcReturnSuper (oiReturnStatus)) in BPaymentFormat>
end.
else if ilCheckMandatory and tqPayFormatGroupPrim.tlPayFormatGroupIsMandatory and
(icPayCodeValue = ? or icPayCodeValue = "":U) and
(iiPayFormatCodeId = ? or iiPayFormatCodeId = 0)
then do:
assign vcMessage = trim(substitute(#T-33'Payment attribute &1 is mandatory.':100(55849)T-33#, tqPayFormatGroupPrim.tcPayFormatGroupCode))
oiReturnStatus = -1.
<M-52 run SetMessage
(input vcMessage (icMessage),
input '':U (icArguments),
input '':U (icFieldName),
input '':U (icFieldValue),
input 'E':U (icType),
input 3 (iiSeverity),
input '':U (icRowid),
input 'qadfin-881245':U (icFcMsgNumber),
input '':U (icFcExplanation),
input '':U (icFcIdentification),
input '':U (icFcContext),
output viFcReturnSuper (oiReturnStatus)) in BPaymentFormat>
end.
if (icPayCodeValue <> ? and icPayCodeValue <> "":U) or
(iiPayFormatCodeId <> ? and iiPayFormatCodeId <> 0)
then do:
assign vcMessage = "":U.
if tqPayFormatGroupPrim.tcPayFormatGroupInputOption = {&PAYFORMATGROUPINPUTOPTION-SELECTABLE}
then do:
if iiPayFormatCodeId = ? or iiPayFormatCodeId = 0
then assign vcMessage = trim(#T-6'The attribute value must be defined in Payment Format Maintenance.':100(55848)t-6#)
oiReturnStatus = -1.
end.
if iiPayFormatCodeId <> ? and iiPayFormatCodeId <> 0
then do:
<Q-7 assign vlFcQueryRecordsAvailable = PayFormatCodePrim (NoCache)
(input iiPayFormatCodeId, (PayFormatCodeID)
input ?, (PayFormatCode)) in BPaymentFormat >
if vlFcQueryRecordsAvailable = false
then assign vcMessage = trim(#T-8'The attribute value must be defined in Payment Format Maintenance.':100(55848)t-8#)
oiReturnStatus = -1.
end.
if vcMessage <> "":U
then do:
<M-9 run SetMessage
(input vcMessage (icMessage),
input '':U (icArguments),
input '':U (icFieldName),
input '':U (icFieldValue),
input 'E':U (icType),
input 3 (iiSeverity),
input '':U (icRowid),
input 'QadFin-5557':U (icFcMsgNumber),
input '':U (icFcExplanation),
input '':U (icFcIdentification),
input '':U (icFcContext),
output viFcReturnSuper (oiReturnStatus)) in BPaymentFormat>
end.
if iiPayFormatCodeId = ? or iiPayFormatCodeId = 0
then do:
<M-10 run ApiTypeChecking
(input tqPayFormatGroupPrim.tcPayFormatGroupCode (icFieldName),
input icPayCodeValue (icFieldValue),
input tqPayFormatGroupPrim.tcPayFormatGroupDataType (icFieldType),
output viFcReturnSuper (oiReturnStatus)) in BPaymentFormat>
if viFcReturnSuper <> 0
then do:
if viFcReturnSuper < 0
then oiReturnStatus = viFcReturnSuper.
end.
else do:
if oiReturnStatus = 0
then do:
assign oiReturnStatus = viFcReturnSuper.
end.
end.
end. /* iiPayFormatCodeId = ? or iiPayFormatCodeId = 0 */
end. /* either code or value is defined */
end. /* for first tqPayFormatGroupPrim */