report procedure
Parameters
icLanguageCode | input | character | |
tFilter | input | temp-table | |
dcrCreditorMasterCard | output | dataset | |
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
unused
program code (program7/bcreditorreport.p)
empty temp-table tqCreditorMasterCard.
empty temp-table tqDetailBankInfo.
empty temp-table tqDetailSafInfo.
<M-1 run GetReportLabels
(input 'CreditorMasterCard':U (icReportName),
input icLanguageCode (icLanguageCode),
input tFilter (tFilter),
output tqHeader (tqHeader),
output tqFilter (tqFilter),
output tqText (tqText),
output oiReturnStatus (oiReturnStatus)) in BCreditorReport>
if oiReturnStatus <> 0
then return.
<M-2 run SetDataItemsBasedOnFilterTT (output viFcReturnSuper (oiReturnStatus)) in BCreditorReport>
<Q-3 run CreditorAllItems (all) (Read) (NoCache)
(input viCompanyId, (CompanyId)
input vcCandoCreditorCodeFilter1, (CreditorCode)
input vcToCreditorCodeFilter1, (CreditorCodeTo)
input vcFromCreditorCodeFilter1, (CreditorCodeFrom)
input vcCandoBRCodeFilter1, (BusRelCode)
input vcFromBRCodeFilter1, (BusRelCodeFrom)
input vcToBRCodeFilter1, (BusRelCodeTo)
input vcCurrencyCodeFilter1, (CurrencyCode)
input vlCreditorIsActiveFilter, (CreditorIsActive)
input vlCreditorIsSendRemitFilter, (CreditorIsSendRemittance)
input vlCreditorIsIndivPaymentFilter, (CreditorIsIndividualPayment)
input vcVatDeliveryTypeFilter, (VatDeliveryType)
input vcVatPercentageLevelFilter, (VatPercentageLevel)
input vcAddressCityFilter, (AddressCity)
input vcAddressStreet1Filter, (AddressStreet1)
input vcBusinessRelationNameFilter, (BusinessRelationName)
input vcProfileCodeCnFilter, (ProfileCodeCnFilter)
input vcProfileCodeDivFilter, (ProfileCodeDivFilter)
input vcProfileCodeInvFilter, (ProfileCodeInvFilter)
input vcPaymentCondCodeNmFilter, (PaymentCondCodeNmFilter)
input vcDeliveryCondCodeFilter, (DeliveryCondCodeFilter)
input vcReasonCodeFilter, (ReasonCodeFilter)
input vcBLWIGroupCodeFilter, (BLWIGroupCodeFilter)
input vcPaymentGroupCodeFilter, (PaymentGroupCodeFilter)
input vcTaxIdFederal, (FederalTaxID)
input vcTaxIdState, (StateTaxID)
output dataset tqCreditorAllItems) in BCreditorReport >
<Q-4 run GetBankNumbers (Start) in BCreditorReport >
<Q-7 run GetSAFDefaultByCreditor (Start) in BCreditorReport >
for each tqCreditorAllItems break by tqCreditorAllItems.tiCreditor_ID:
create tqCreditorMasterCard.
buffer-copy tqCreditorAllItems to tqCreditorMasterCard.
if first-of (tqCreditorAllItems.tiCreditor_ID)
then do:
<Q-18 run GetBankNumbers (all) (Read) (Cache)
(input tqCreditorAllItems.tiCreditor_ID, (Creditor_ID)
output dataset tqGetBankNumbers) in BCreditorReport >
for each tqGetBankNumbers:
create tqDetailBankInfo.
assign tqDetailBankInfo.tiCreditor_ID = tqCreditorAllItems.tiCreditor_ID
tqDetailBankInfo.tcBankInfoBankNumber = tqGetBankNumbers.tcBankNumber
tqDetailBankInfo.tcBankInfoBankNumberExtension = tqGetBankNumbers.tcBankNumberExtension
tqDetailBankInfo.tcBankInfoBankNumberOwn = tqGetBankNumbers.tcBankNumber2
tqDetailBankInfo.tcBankInfoBankNumberSwiftCode = tqGetBankNumbers.tcBankNumberSwiftCode
tqDetailBankInfo.tcBankInfoBusinessRelationCode = tqGetBankNumbers.tcBusinessRelationCode
tqDetailBankInfo.tcBankInfoCurrencyCode = tqGetBankNumbers.tcCurrencyCode
tqDetailBankInfo.tcBankInfoPaymentFormatCode = tqGetBankNumbers.tcPayFormatTypeCode
tqDetailBankInfo.tcBankInfoPaymentFormatInstru = tqGetBankNumbers.tcPayFormatTypePayInstrument
tqDetailBankInfo.tlBankInfoBankNumberIsActive = tqGetBankNumbers.tlBankNumberIsActive
tqDetailBankInfo.tlBankInfoBankNumberIsDefault = tqGetBankNumbers.tlBankNumberIsDefault.
end. /* fe tqGetBankNumbers */
<Q-17 run GetSAFDefaultByCreditor (all) (Read) (NoCache)
(input viCompanyId, (CompanyId)
input tqCreditorAllItems.tiCreditor_ID, (Creditor_ID)
output dataset tqGetSAFDefaultByCreditor) in BCreditorReport >
for each tqGetSAFDefaultByCreditor:
create tqDetailSafInfo.
assign tqDetailSafInfo.tiCreditor_ID = tqCreditorAllItems.tiCreditor_ID
tqDetailSafInfo.tcSafInfoSafConceptCode = tqGetSAFDefaultByCreditor.tcSafConceptCode
tqDetailSafInfo.tcSafInfoSafCode = tqGetSAFDefaultByCreditor.tcSafCode.
end. /* fe tqGetSAFDefaultByCreditor */
end. /* first-of tqCreditorAllItems.tiCreditor_ID */
end. /* fe tqCreditorAllItems */
<Q-5 run GetBankNumbers (Stop) in BCreditorReport >
<Q-10 run GetSAFDefaultByCreditor (Stop) in BCreditorReport >