project QadFinancials > class BBillReport > method GetBillReportTitleInfo
Description
Return the title information of current bill such as Bank, Debtor contact info, bill year.
Parameters
iiBill_ID | input | integer | |
iiEmployee_ID | input | integer | |
ocBusinessRelationName | output | character | |
ocBusinessRelationID | output | character | |
ocBusinessRelationAddr1 | output | character | |
ocBusinessRelationAddr2 | output | character | |
ocPaymentConditionCode | output | character | |
otBillDate | output | date | |
oiBillYear | output | integer | |
oiCurHighWaterMark | output | integer | |
ocCurBillStatus | output | character | |
ocBankAccountCode | output | character | |
ocBankAccountType | output | character | |
ocBankNumber | output | character | |
ocBankNumberBranch | output | character | |
ocBankNumberSwiftCode | output | character | |
ocBankName | output | character | |
ocBillCollector | output | character | |
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
QadFinancials
program code (program1/bbillreport.p)
/* Get Debtor Address and other info */
<Q-29 run GetDebtorInfoForBill (all) (Read) (NoCache)
(input viCompanyId, (CompanyId)
input iiBill_ID, (Bill_ID)
output dataset tqGetDebtorInfoForBill) in BBillReport>
find first tqGetDebtorInfoForBill no-lock no-error.
if available tqGetDebtorInfoForBill then
do:
assign ocBusinessRelationName = tqGetDebtorInfoForBill.tcBusinessRelationName1
ocBusinessRelationID = tqGetDebtorInfoForBill.tcBusinessRelationCode
ocBusinessRelationAddr1 = tqGetDebtorInfoForBill.tcAddressStreet1
ocBusinessRelationAddr2 = tqGetDebtorInfoForBill.tcAddressStreet2
ocPaymentConditionCode = tqGetDebtorInfoForBill.tcPaymentConditionCode
otBillDate = tqGetDebtorInfoForBill.ttBillDate
oiBillYear = tqGetDebtorInfoForBill.tiBillYear
oiCurHighWaterMark = tqGetDebtorInfoForBill.tiDInvoiceMovement_ID
ocCurBillStatus = tqGetDebtorInfoForBill.tcBillStatus
viDebtorId = tqGetDebtorInfoForBill.tiDebtor_ID.
/* Address format: Street,City,State,County,Country */
if tqGetDebtorInfoForBill.tcAddressCity <> ? and tqGetDebtorInfoForBill.tcAddressCity <> "" then
ocBusinessRelationAddr1 = ocBusinessRelationAddr1 + ", " + tqGetDebtorInfoForBill.tcAddressCity.
if tqGetDebtorInfoForBill.tcStateDescription <> ? and tqGetDebtorInfoForBill.tcStateDescription <> "" then
ocBusinessRelationAddr1 = ocBusinessRelationAddr1 + ", " + tqGetDebtorInfoForBill.tcStateDescription .
if tqGetDebtorInfoForBill.tcCountyDescription <> ? and tqGetDebtorInfoForBill.tcCountyDescription <> "" then
ocBusinessRelationAddr1 = ocBusinessRelationAddr1 + ", " + tqGetDebtorInfoForBill.tcCountyDescription.
if tqGetDebtorInfoForBill.tcCountryDescription <> ? and tqGetDebtorInfoForBill.tcCountryDescription <> "" then
ocBusinessRelationAddr1 = ocBusinessRelationAddr1 + ", " + tqGetDebtorInfoForBill.tcCountryDescription.
end.
/* Get Bank info */
<Q-68 run BankNumberByParentID (all) (Read) (NoCache)
(input viDebtorId, (ParentObjectId)
input 'DEBTOR':U, (BankNumberParentType)
input ?, (BankNumberIsDefault)
input viCompanyId, (CompanyId)
output dataset tqBankNumberByParentID) in BBankNumber>
for each tqBankNumberByParentID:
<Q-58 run BankPayFormatByID (all) (Read) (NoCache)
(input tqBankNumberByParentID.tiBankPayFormat_ID, (BankPayFormatId)
input viCompanyId, (CompanyId)
output dataset tqBankPayFormatByID) in BBankPayFormat>
for each tqBankPayFormatByID:
<Q-20 run BankNumberByIDAllInfo (all) (Read) (NoCache)
(input tqBankPayFormatByID.tiBankNumber_ID, (BankNumber_ID)
input ?, (BankNumberIsDefault)
output dataset tqBankNumberByIDAllInfo) in BBankNumber>
find first tqBankNumberByIDALLInfo no-lock no-error.
if available tqBankNumberByIDAllInfo
then do:
assign ocBankAccountCode = tqBankNumberByIDAllInfo.tcBankNumberFormatted
ocBankAccountType = tqBankNumberByIDAllInfo.tcBankNumberParentType
ocbanknumber = tqBankNumberByIDAllInfo.tcBankNumber
ocbanknumberbranch = tqBankNumberByParentID.tcBankNumberBranch
ocbanknumberswiftcode = tqBankNumberByParentID.tcBankNumberSwiftCode
ocbankname = tqBankNumberByParentID.tcBankBusinessRelationCode.
end.
end.
end.
/* Get Employee info */
if iiEmployee_ID <> 0 then
do:
<Q-92 run GetEmployeeInfoForBill (all) (Read) (NoCache)
(input viCompanyId, (CompanyId)
input iiEmployee_ID, (Employee_ID)
output dataset tqGetEmployeeInfoForBill) in BBillReport>
find first tqGetEmployeeInfoForBill no-lock no-error.
if available tqGetEmployeeInfoForBill then
assign ocBillCollector = tqGetEmployeeInfoForBill.tcBusinessRelationName1.
end.