Description
This method builds the "header" level payment attributes for the specified Payment Format.
Parameters
icPayFormatTypeCode | input | character | |
icParentRowID | input | character | PaySel Rowid |
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
unused
program code (program3/bpaymentselection.p)
empty temp-table tPaySelPayCodeRef.
/* Check if this is request for existing data or not */
if icParentRowID <> '':U and
icParentRowID <> ? and
can-find(tPaySel where
tPaySel.tc_Rowid = icParentRowID and
tPaySel.tcPayFormatTypeCode = icPayFormatTypeCode)
then do:
for each tPaySelPayCode where
tPaySelPayCode.tc_ParentRowid = icParentRowID:
create tPaySelPayCodeRef.
buffer-copy tPaySelPayCode to tPaySelPayCodeRef.
end.
end.
/* this is newly selected payment format */
else do:
<Q-4 run PayFormatCodeByDefault (all) (Read) (NoCache)
(input icPayFormatTypeCode, (PayFormatTypeCode)
input ?, (PayFormatGroupSequence)
input yes, (PayFormatGroupIsActive)
input yes, (PayFormatCodeIsActive)
input yes, (PayFormatCodeIsDefault)
output dataset tqPayFormatCodeByDefault) in BPaymentFormat >
for each tqPayFormatCodeByDefault where
tqPayFormatCodeByDefault.tcPayFormatGroupLevel = {&PAYFORMATGROUPLEVEL-HEADER}:
create tPaySelPayCodeRef.
assign tPaySelPayCodeRef.PayFormatGroup_ID = tqPayFormatCodeByDefault.tiPayFormatGroup_ID
tPaySelPayCodeRef.tcPayFormatCodeValue = tqPayFormatCodeByDefault.tcPayFormatCode
tPaySelPayCodeRef.tcPayFormatCodeDescription = tqPayFormatCodeByDefault.tcPayFormatCodeDescription
tPaySelPayCodeRef.tcPayFormatGroupDescription = tqPayFormatCodeByDefault.tcPayFormatGroupDescription
tPaySelPayCodeRef.tiPayFormatGroupSequence = tqPayFormatCodeByDefault.tiPayFormatGroupSequence
tPaySelPayCodeRef.tcPayFormatGroupInputOption = tqPayFormatCodeByDefault.tcPayFormatGroupInputOption
tPaySelPayCodeRef.tcPayFormatGroupCode = tqPayFormatCodeByDefault.tcPayFormatGroupCode
tPaySelPayCodeRef.tlPayFormatGroupIsMandatory = tqPayFormatCodeByDefault.tlPayFormatGroupIsMandatory
tPaySelPayCodeRef.tcPayFormatGroupDataType = tqPayFormatCodeByDefault.tcPayFormatGroupDataType
tPaySelPayCodeRef.tc_ParentRowid = icParentRowID
tPaySelPayCodeRef.tc_Rowid = string(rowid(tPaySelPayCodeRef))
/* defect # 10249-0147 sdo */
tPaySelPayCodeRef.PayFormatCode_ID = tqPayFormatCodeByDefault.tiPayFormatCode_ID.
for first tPaySelPayCode:
assign tPaySelPayCodeRef.PaySelPayCode_ID = tPaySelPayCode.PaySelPayCode_ID.
end.
end. /* for each tqPayFormatCodeByDefault where */
end.