project QadFinancials > class BCInvoice > API query CInvoiceBankByAllocationInfo

Description

query that returns all creditor-invoices bank information that match the input parameters (= Allocation information)


query filter (table tFilter)


tcBusinessFieldNametcDataTypetcOperator
iiCompanyIDi
icBusinessRelationCodec=
icCreditorCodecmatches
icCInvoiceReferencecmatches
icCurrencyCodec=
iiCInvoiceIDi=
ilCInvoiceIsOpenl=
idMinimumAmountd>=
iiPeriodYearMinimumi>=
iiPeriodYeari=
icJournalCodec=
iiCInvoiceVoucheri=
icCInvoiceMovementTypec=
ilCInvoiceIsSelectedl=
icCInvoiceTSMNumbercmatches
iiBankNumberIDi=
idMaximumAmountd<=
icCorporateGroupCodec=
icBusinessRelationNamec=
iiCreditorIDi=
ilReasonIsLockPaymentl=
tBankNumber.BankNumberc=,>=,>,<>,<=,<,begins,can-do,matches
tBankNumber.BankNumberBranchc=,>=,>,<>,<=,<,begins,can-do,matches
tBankNumber.BankNumberExtensionc=,>=,>,<>,<=,<,begins,can-do,matches
tBankNumber.BankNumberIsActivel=,<>
tBankNumber.BankNumberValidationc=,>=,>,<>,<=,<,begins,can-do,matches
tBusinessRelation.BusinessRelationCodec=,>=,>,<>,<=,<,begins,can-do,matches
tBusinessRelation.BusinessRelationName1c=,>=,>,<>,<=,<,begins,can-do,matches
tCInvoice.CInvoiceAllocationStatusc=,>=,>,<>,<=,<,begins,can-do,matches
tCInvoice.CInvoiceBalanceCCd=,>=,>,<>,<=,<
tCInvoice.CInvoiceBalanceCreditCCd=,>=,>,<>,<=,<
tCInvoice.CInvoiceBalanceCreditLCd=,>=,>,<>,<=,<
tCInvoice.CInvoiceBalanceCreditTCd=,>=,>,<>,<=,<
tCInvoice.CInvoiceBalanceDebitCCd=,>=,>,<>,<=,<
tCInvoice.CInvoiceBalanceDebitLCd=,>=,>,<>,<=,<
tCInvoice.CInvoiceBalanceDebitTCd=,>=,>,<>,<=,<
tCInvoice.CInvoiceBalanceLCd=,>=,>,<>,<=,<
tCInvoice.CInvoiceBalanceTCd=,>=,>,<>,<=,<
tCInvoiceBank.CInvoiceBankToPayTCd=,>=,>,<>,<=,<
tCInvoice.CInvoiceCCRated=,>=,>,<>,<=,<
tCInvoice.CInvoiceCCScaled=,>=,>,<>,<=,<
tCInvoice.CInvoiceDatet=,>=,>,<>,<=,<
tCInvoice.CInvoiceDiscountDueDatet=,>=,>,<>,<=,<
tCInvoice.CInvoiceDueDatet=,>=,>,<>,<=,<
tCInvoice.CInvoiceExchangeRated=,>=,>,<>,<=,<
tCInvoice.CInvoiceHoldAmountTCd=,>=,>,<>,<=,<
tCInvoice.CInvoiceIsDiscTaxAtPayml=,<>
tCInvoice.CInvoiceIsInvoiceApprovedl=,<>
tCInvoice.CInvoiceIsLockPaymentl=,<>
tCInvoice.CInvoiceIsOpenl=,<>
tCInvoice.CInvoiceIsSelectedl=,<>
tCInvoice.CInvoiceIsWHTl=,<>
tCInvoiceMovement.CInvoiceMovementTypec=,>=,>,<>,<=,<,begins,can-do,matches
tCInvoice.CInvoiceNonDiscAmtTCd=,>=,>,<>,<=,<
tCInvoice.CInvoiceOriginalCreditCCd=,>=,>,<>,<=,<
tCInvoice.CInvoiceOriginalCreditLCd=,>=,>,<>,<=,<
tCInvoice.CInvoiceOriginalCreditTCd=,>=,>,<>,<=,<
tCInvoice.CInvoiceOriginalDebitCCd=,>=,>,<>,<=,<
tCInvoice.CInvoiceOriginalDebitLCd=,>=,>,<>,<=,<
tCInvoice.CInvoiceOriginalDebitTCd=,>=,>,<>,<=,<
tCInvoice.CInvoicePostingDatet=,>=,>,<>,<=,<
tCInvoice.CInvoiceRateScaled=,>=,>,<>,<=,<
tCInvoice.CInvoiceReferencec=,>=,>,<>,<=,<,begins,can-do,matches
tCInvoice.CInvoiceTSMNumberc=,>=,>,<>,<=,<,begins,can-do,matches
tCInvoice.CInvoiceTypec=,>=,>,<>,<=,<,begins,can-do,matches
tCInvoice.CInvoiceVatBaseCreditTCd=,>=,>,<>,<=,<
tCInvoice.CInvoiceVatBaseDebitTCd=,>=,>,<>,<=,<
tCInvoice.CInvoiceVatCreditTCd=,>=,>,<>,<=,<
tCInvoice.CInvoiceVatDebitTCd=,>=,>,<>,<=,<
tCInvoice.CInvoiceVoucheri=,>=,>,<>,<=,<
tCInvoice.CInvoiceWHTBaseAmtCreditTCd=,>=,>,<>,<=,<
tCInvoice.CInvoiceWHTBaseAmtDebitTCd=,>=,>,<>,<=,<
tCInvoice.CInvoiceWHTTotAmtCreditCCd=,>=,>,<>,<=,<
tCInvoice.CInvoiceWHTTotAmtCreditLCd=,>=,>,<>,<=,<
tCInvoice.CInvoiceWHTTotAmtCreditTCd=,>=,>,<>,<=,<
tCInvoice.CInvoiceWHTTotAmtDebitCCd=,>=,>,<>,<=,<
tCInvoice.CInvoiceWHTTotAmtDebitLCd=,>=,>,<>,<=,<
tCInvoice.CInvoiceWHTTotAmtDebitTCd=,>=,>,<>,<=,<
tCompany.CompanyCodec=,>=,>,<>,<=,<,begins,can-do,matches
tCompanyProperty.CompanyPropertyIsWHTl=,<>
tCorporateGroup.CorporateGroupCodec=,>=,>,<>,<=,<,begins,can-do,matches
tCreditor.CreditorCodec=,>=,>,<>,<=,<,begins,can-do,matches
tCreditor.CreditorIsWHTl=,<>
tCurrency.CurrencyCodec=,>=,>,<>,<=,<,begins,can-do,matches
tDivision.DivisionCodec=,>=,>,<>,<=,<,begins,can-do,matches
tJournal.JournalCodec=,>=,>,<>,<=,<,begins,can-do,matches
tPaymentCondition.PaymentConditionPaymentTypc=,>=,>,<>,<=,<,begins,can-do,matches
tPaymentCondition.PaymentConditionPercentaged=,>=,>,<>,<=,<
tPeriod.PeriodPeriodi=,>=,>,<>,<=,<
tPeriod.PeriodYeari=,>=,>,<>,<=,<
tReason.ReasonIsLockPaymentl=,<>


Parameters (internal)


iiCompanyIDintegerCompany ID
icBusinessRelationCodecharacterBusiness Relation Code
icCreditorCodecharacterCreditor Code
icCInvoiceReferencecharacterReference of creditor invoice
icCurrencyCodecharacterCurrency Code
iiCInvoiceIDintegerCreditor Invoice ID
ilCInvoiceIsOpenlogicalIs Open flag
idMinimumAmountdecimalMinimum Amount
iiPeriodYearMinimumintegerPeriod Year Minimum
iiPeriodYearintegerPeriod Year
icJournalCodecharacterJournal
iiCInvoiceVoucherintegerVoucher
icCInvoiceMovementTypecharacterMovement Type of creditor invoice
ilCInvoiceIsSelectedlogicalIs Selected flag
icCInvoiceTSMNumbercharactertsm number of creditor invoice
iiBankNumberIDintegerBank Number ID
idMaximumAmountdecimalMaximum Amount
icCorporateGroupCodecharacterGroup Name
icBusinessRelationNamecharacterBusiness Relation Name
iiCreditorIDinteger
ilReasonIsLockPaymentlogical


query condition


  each CInvoice where
CInvoice.Company_Id = iiCompanyId AND
(((CInvoice.CInvoiceBalanceCreditTC >= idMinimumAmount AND
CInvoice.CInvoiceBalanceCreditTC <= idMaximumAmount ) OR
(CInvoice.CInvoiceBalanceDebitTC >= idMinimumAmount AND
CInvoice.CInvoiceBalanceDebitTC <= idMaximumAmount )) OR
CInvoice.CInvoiceIsWht = true ) AND
CInvoice.CInvoiceIsOpen = ilCInvoiceIsOpen AND
CInvoice.CInvoiceVoucher = iiCInvoiceVoucher AND
CInvoice.CInvoiceIsSelected = ilCInvoiceIsSelected AND
CInvoice.CInvoiceTSMNumber matches icCInvoiceTSMNumber AND
CInvoice.CInvoiceReference matches icCInvoiceReference AND
CInvoice.CInvoice_ID = iiCInvoiceID AND
CInvoice.Creditor_ID = iiCreditorID

      each CInvoiceBank (inner-join) where
CInvoiceBank.CInvoice_ID = CInvoice.CInvoice_ID AND
CInvoiceBank.BankNumber_ID = iiBankNumberID

          first BankNumber (inner-join) where
BankNumber.BankNumber_ID = CInvoiceBank.BankNumber_ID AND

      each CInvoiceMovement (inner-join) where
CInvoiceMovement.Company_Id = iiCompanyId AND
CInvoiceMovement.CInvoice_ID = CInvoice.CInvoice_ID AND
CInvoiceMovement.CInvoiceMovementType = icCInvoiceMovementType

          first PostingLine (inner-join) where
PostingLine.Company_Id = iiCompanyId AND
PostingLine.PostingLine_ID = CInvoiceMovement.PostingLine_ID AND

      first Company (inner-join) where
Company.Company_Id = iiCompanyId AND
Company.Company_ID = CInvoice.Company_ID AND
Company.CompanyIsActive = true

          each CompanyProperty (inner-join) where
CompanyProperty.Company_Id = iiCompanyId AND
CompanyProperty.Company_ID = Company.Company_ID AND

      first Creditor (inner-join) where
Creditor.SharedSet_Id = vi_CREDITOR_sharedset(iiCompanyId) AND
Creditor.Creditor_ID = CInvoice.Creditor_ID AND
Creditor.CreditorCode matches icCreditorCode

          first BusinessRelation (inner-join) where
BusinessRelation.BusinessRelation_ID = Creditor.BusinessRelation_ID AND
BusinessRelation.BusinessRelationCode = icBusinessRelationCode AND
BusinessRelation.BusinessRelationName1 = icBusinessRelationName

              first CorporateGroup (conditional-join) where
CorporateGroup.CorporateGroup_ID = BusinessRelation.CorporateGroup_ID AND
CorporateGroup.CorporateGroupCode = icCorporateGroupCode

      first Currency (inner-join) where
Currency.Currency_ID = CInvoice.CInvoiceCurrency_ID AND
Currency.CurrencyCode = icCurrencyCode

      first Division (outer-join) where
Division.SharedSet_Id = vi_DIVISION_sharedset(iiCompanyId) AND
Division.Division_ID = CInvoice.Division_ID AND

      first Journal (inner-join) where
Journal.SharedSet_Id = vi_JOURNAL_sharedset(iiCompanyId) AND
Journal.Journal_ID = CInvoice.Journal_ID AND
Journal.JournalCode = icJournalCode

      first PaymentCondition (inner-join) where
PaymentCondition.PaymentCondition_ID = CInvoice.NormalPaymentCondition_ID AND

      first Period (inner-join) where
Period.Company_Id = iiCompanyId AND
Period.Period_ID = CInvoice.Period_ID AND
Period.PeriodYear >= iiPeriodYearMinimum AND
Period.PeriodYear = iiPeriodYear

      first Reason (inner-join) where
Reason.Reason_ID = CInvoice.Reason_ID AND
Reason.ReasonIsLockPayment = ilReasonIsLockPayment


query resultset tqCInvoiceBankByAllocationInfo


field namedata typedb fielddescription
tcBankNumbercharacterBankNumber.BankNumberBank Number
tiBankNumber_IDintegerCInvoiceBank.BankNumber_IDBank Number
tcBankNumberBranchcharacterBankNumber.BankNumberBranchBranch
tcBankNumberExtensioncharacterBankNumber.BankNumberExtensionBank Extension
tlBankNumberIsActivelogicalBankNumber.BankNumberIsActiveActive
tcBankNumberValidationcharacterBankNumber.BankNumberValidationValidation
tcBusinessRelationCodecharacterBusinessRelation.BusinessRelationCodeBusiness Relation. A code to identify the business relation.
If this field does not have a input from the user, the system automatically generates a number for the record based on the sequence defined in Business Relation Autonumber Create.
tcBusinessRelationName1characterBusinessRelation.BusinessRelationName1Name: The full name of the business relation.
This field sets the default name for linked addresses such as customers and suppliers.
api annotation:PartialUpdate = yes - defaults to the BusinessRelationCode.
tiCInvoice_IDintegerCInvoice.CInvoice_IDRecord ID
tcCInvoiceAllocationStatuscharacterCInvoice.CInvoiceAllocationStatusAllocation Status.This field indicates whether postings occur and if they affect transient or official layers.
User can not delete an invoice which has a non-initial invoice status code.
tdCInvoiceBalanceCCdecimalCInvoice.CInvoiceBalanceCCSC Balance. This field displays the sum of the debit and credit amounts of all posting lines in statutory currency.
This field is calculated by the system using the TC Balance and the SC rate.
tdCInvoiceBalanceCreditCCdecimalCInvoice.CInvoiceBalanceCreditCCBC Balance Amount CR. This field displays the sum of the credit amounts of all posting lines in transaction currency.
This field is calculated by the system using the TC Base Amount CR and the SC rate.
tdCInvoiceBalanceCreditLCdecimalCInvoice.CInvoiceBalanceCreditLCBC Balance Amount CR. This field displays the sum of the credit amounts of all posting lines in transaction currency.
This field is calculated by the system using the TC Base Amount CR and the Exchange rate.
tdCInvoiceBalanceCreditTCdecimalCInvoice.CInvoiceBalanceCreditTCTC Balance Amount CR. This field displays the sum of the credit amounts of all posting lines in transaction currency.
tdCInvoiceBalanceDebitCCdecimalCInvoice.CInvoiceBalanceDebitCCSC Balance Amount DR. This field displays the sum of the debit amounts of all posting lines in statutory currency.
This field is calculated by the system using the TC Base Amount DR and the SC rate.
tdCInvoiceBalanceDebitLCdecimalCInvoice.CInvoiceBalanceDebitLCBC Balance Amount DR. This field displays the sum of the debit amounts of all posting lines in transaction currency.
This field is calculated by the system using the TC Base Amount DR and the Exchange rate.
tdCInvoiceBalanceDebitTCdecimalCInvoice.CInvoiceBalanceDebitTCTC Balance Amount DR. This field displays the sum of the debit amounts of all posting lines in transaction currency.
tdCInvoiceBalanceLCdecimalCInvoice.CInvoiceBalanceLCBC Balance. This field displays the sum of the debit and credit amounts of all posting lines in base currency.
This field is calculated by the system using the TC Balance and the Exchange rate.
tdCInvoiceBalanceTCdecimalCInvoice.CInvoiceBalanceTCBalance. This field displays the sum of the debit and credit amounts of all posting lines in transaction currency.
tiCInvoiceBank_IDintegerCInvoiceBank.CInvoiceBank_IDRecord ID
tdCInvoiceBankToPayTCdecimalCInvoiceBank.CInvoiceBankToPayTCTC Payment Amount. This field displays the payment amount in the transaction currency.
tdCInvoiceCCRatedecimalCInvoice.CInvoiceCCRateSC Rate. The statutory exchange rate used by the invoice.
The SC Invoice Amount is calculated based on the SC rate.
tdCInvoiceCCScaledecimalCInvoice.CInvoiceCCScaleScale Factor. This field indicates the scale factor applying to the SC rate in use for foreign currency payments.
tiCInvoiceCurrency_IDintegerCInvoice.CInvoiceCurrency_IDCurrency Code
ttCInvoiceDatedateCInvoice.CInvoiceDateInvoice Date. This field indicates the invoice creation date.
The system uses this field with the credit terms to calculate due date and discount date.
api annotation:This field defaults from the system date.
ttCInvoiceDiscountDueDatedateCInvoice.CInvoiceDiscountDueDateDiscount Due Date.This field indicates the last date a discount applies, calculated by the system based on the credit terms and the invoice date.
User can modify this field without affecting the credit terms.
ttCInvoiceDueDatedateCInvoice.CInvoiceDueDateDue Date.This field indicates the date when payment become due.
This field can be modified without affecting the credit terms.
This field is calculated by the system based on the credit terms and the invoice date.
tdCInvoiceExchangeRatedecimalCInvoice.CInvoiceExchangeRateExchange Rate. The exchange rate used by the invoice.
The BC Invoice Amount is calculated based on the exchange rate.
If user modify the TC Invoice Amount, the BC invoice amount is automatically adjusted.
tdCInvoiceHoldAmountTCdecimalCInvoice.CInvoiceHoldAmountTCTC Hold Amount. This field displays the amount of the invoice total that is not to be paid.
If this field is not blank, the hold amount is taken into account during payment processing.
Hold amounts must be:
For invoices or correction invoices: Less than the invoice total and greater than zero.
For credit notes or correction credit notes: Greater than the document total and less than zero.
The hold amount for a negative payment must always be set to zero.
tlCInvoiceIsDiscTaxAtPaymlogicalCInvoice.CInvoiceIsDiscTaxAtPaymDiscount Tax at Payment. This field indicates if the invoice has a discount for tax at the time of payment.
The discount amount at the time of payment only applies to the tax base amount.
api annotation:PartialUpdate = yes - defaults to false
tlCInvoiceIsInvoiceApprovedlogicalCInvoice.CInvoiceIsInvoiceApprovedInvoice Approved. This field indicates if the invoice is already approved for payment.
api annotation:PartialUpdate = yes - defaults to false
tlCInvoiceIsLockPaymentlogicalCInvoice.CInvoiceIsLockPaymentLock Payment. This field indicates if the invoice is locked for payment. The invoice cannot be included in any automatic payment selections if this field is true.
api annotation:PartialUpdate = yes - defaults to false
tlCInvoiceIsOpenlogicalCInvoice.CInvoiceIsOpenOpen.This field indicates if the invoice has been completely paid.
This field is updated automatically when complete payment is confirmed.
This field is read-only.
api annotation:PartialUpdate = yes - defaults to true
tlCInvoiceIsSelectedlogicalCInvoice.CInvoiceIsSelectedSelected. This field indicates whether the invoice is included in a payment selection.
This field is read-only.
tlCInvoiceIsWHTlogicalCInvoice.CInvoiceIsWHTWithholding Tax
tcCInvoiceMovementTypecharacterCInvoiceMovement.CInvoiceMovementTypeCInvoiceMovementType. "Initial" indicates that the movement represents the initial creation of the invoice, "movement" stands for all subsequent modifications of the invoice balance (payments, adjustments etc).
tdCInvoiceNonDiscAmtTCdecimalCInvoice.CInvoiceNonDiscAmtTCTC Non-discount Amount. This field display the invoice amount without discount in base currency.
tdCInvoiceOriginalCreditCCdecimalCInvoice.CInvoiceOriginalCreditCCSC Invoice Amount (CR). This field displays the credit total invoice amount in the statutory currency.
This field is calculated by the system using the TC Invoice Amount(CR) and the SC Rate.
tdCInvoiceOriginalCreditLCdecimalCInvoice.CInvoiceOriginalCreditLCBC Invoice Amount(CR). This field displays the credit total invoice amount in the base currency.
This field is calculated by the system using the TC Invoice Amount(CR) and the Exchange rate.
tdCInvoiceOriginalCreditTCdecimalCInvoice.CInvoiceOriginalCreditTCTC Invoice Amount CR. This field displays the credit total invoice amount in the transaction currency.
If you modify this field, the system automatically recalculates the exchange rate to ensure that the BC Invoice Amount remains the same.
tdCInvoiceOriginalDebitCCdecimalCInvoice.CInvoiceOriginalDebitCCSC Invoice Amount (DR). This field displays the debit total invoice amount in the statutory currency.
This field is calculated by the system using the TC Invoice Amount(CR) and the SC Rate.
tdCInvoiceOriginalDebitLCdecimalCInvoice.CInvoiceOriginalDebitLCBC Invoice Amount(DR). This field displays the debit total invoice amount in the base currency.
This field is calculated by the system using the TC Invoice Amount(DR) and the Exchange rate.
tdCInvoiceOriginalDebitTCdecimalCInvoice.CInvoiceOriginalDebitTCTC AP Amount. This field displays the debit total invoice amount in the transaction currency.
If you modify this field, the system automatically recalculates the exchange rate to ensure that the TC Invoice Amount remains the same.
ttCInvoicePostingDatedateCInvoice.CInvoicePostingDatePosting Date. This filed indicates the date on which the invoice is to be posted.
api annotation:This field defaults from the invoice creation date.
tdCInvoiceRateScaledecimalCInvoice.CInvoiceRateScaleScale Factor. This field indicates the scale factor applying to the exchange rate in use for foreign currency payments.
tcCInvoiceReferencecharacterCInvoice.CInvoiceReferenceReference. An alphanumeric reference to help identify the invoice in the system.
This reference is typically the ID number of the invoice received from the supplier.
tcCInvoiceTSMNumbercharacterCInvoice.CInvoiceTSMNumberPayment Reference. This field displays a unique reference number to be included in the supplier payment file.
This reference can consist of a Transfer with Structured Message (TSM) number.
This field can be blank.
tcCInvoiceTypecharacterCInvoice.CInvoiceTypeInvoice Type. This field identifies the invoice type.
The value can be Invoice Correction and Credit Note Correction type only when the appropriate daybook types have already been defined.
tdCInvoiceVatBaseCreditTCdecimalCInvoice.CInvoiceVatBaseCreditTCTC Base Amount CR. This field displays the credit base amount in the transaction currency.
This field is calculated by the system using the total invoice amount (TC) and the applicable tax rate code.
tdCInvoiceVatBaseDebitTCdecimalCInvoice.CInvoiceVatBaseDebitTCTC Base Amount DR. This field displays the debit base amount in the transaction currency.
This field is calculated by the system using the total invoice amount (TC) and the applicable tax rate code.
tdCInvoiceVatCreditTCdecimalCInvoice.CInvoiceVatCreditTCTC Tax Amount CR. This field displays the credit tax amount (TC) calculated by the system using the total invoice amount (TC) and the applicable tax rate code.
tdCInvoiceVatDebitTCdecimalCInvoice.CInvoiceVatDebitTCTC Tax Amount DR. This field displays the debit tax amount (TC) calculated by the system using the total invoice amount (TC) and the applicable tax rate code.
tiCInvoiceVoucherintegerCInvoice.CInvoiceVoucherVoucher. This field displays the numeric identifier assigned to the posting.
When the daybook of the journal entry is changed (after transfer), the voucher is cleared.
Voucher must be unique in one GL period.
When the user input is zero, the system automatically assign a value not used yet for this field.
tdCInvoiceWHTBaseAmtCreditTCdecimalCInvoice.CInvoiceWHTBaseAmtCreditTCTC WHT Base Amount (CR)
tdCInvoiceWHTBaseAmtDebitTCdecimalCInvoice.CInvoiceWHTBaseAmtDebitTCTC WHT Base Amount (DR)
tdCInvoiceWHTTotAmtCreditCCdecimalCInvoice.CInvoiceWHTTotAmtCreditCCSC WHT Total Amount (CR)
tdCInvoiceWHTTotAmtCreditLCdecimalCInvoice.CInvoiceWHTTotAmtCreditLCBC WHT Total Amount (CR)
tdCInvoiceWHTTotAmtCreditTCdecimalCInvoice.CInvoiceWHTTotAmtCreditTCTC WHT Total Amount (CR)
tdCInvoiceWHTTotAmtDebitCCdecimalCInvoice.CInvoiceWHTTotAmtDebitCCSC WHT Total Amount (DR)
tdCInvoiceWHTTotAmtDebitLCdecimalCInvoice.CInvoiceWHTTotAmtDebitLCBC WHT Total Amount (DR)
tdCInvoiceWHTTotAmtDebitTCdecimalCInvoice.CInvoiceWHTTotAmtDebitTCTC WHT Total Amount (DR)
tiCompany_IDintegerCInvoice.Company_IDLink to Company
tcCompanyCodecharacterCompany.CompanyCodeEntity Code
tlCompanyPropertyIsWHTlogicalCompanyProperty.CompanyPropertyIsWHTUse Withholding Tax
tcCorporateGroupCodecharacterCorporateGroup.CorporateGroupCodeGroup Name
tiCreditor_IDintegerCInvoice.Creditor_IDLink to Creditor
tcCreditorCodecharacterCreditor.CreditorCodeSupplier Code
tlCreditorIsWHTlogicalCreditor.CreditorIsWHTWithholding Tax
tcCurrencyCodecharacterCurrency.CurrencyCodeCurrency Code
tcDivisionCodecharacterDivision.DivisionCodeSub-Account
tcJournalCodecharacterJournal.JournalCodeA daybook code (maximum eight characters).
tcPaymentConditionPaymentTypcharacterPaymentCondition.PaymentConditionPaymentTypPayment Type
tdPaymentConditionPercentagedecimalPaymentCondition.PaymentConditionPercentageDiscount Percentage
tiPeriodPeriodintegerPeriod.PeriodPeriodGL Period
tiPeriodYearintegerPeriod.PeriodYearGL Calendar Year
tiPosting_IDintegerPostingLine.Posting_IDLink to Posting
tlReasonIsLockPaymentlogicalReason.ReasonIsLockPaymentLock Payment
CInvoiceCustomcharactercalculatedcustom fields
CreditorCustomcharactercalculatedcustom fields
BusinessRelationCustomcharactercalculatedcustom fields
CurrencyCustomcharactercalculatedcustom fields
CInvoiceMovementCustomcharactercalculatedcustom fields
JournalCustomcharactercalculatedcustom fields
PeriodCustomcharactercalculatedcustom fields
CompanyCustomcharactercalculatedcustom fields
CompanyPropertyCustomcharactercalculatedcustom fields
ReasonCustomcharactercalculatedcustom fields
PaymentConditionCustomcharactercalculatedcustom fields
CInvoiceBankCustomcharactercalculatedcustom fields
BankNumberCustomcharactercalculatedcustom fields
CorporateGroupCustomcharactercalculatedcustom fields
PostingLineCustomcharactercalculatedcustom fields
DivisionCustomcharactercalculatedcustom fields
ti_sequenceintegercalculatedprimary index
tc_rowidcharactercalculated = rowid(CInvoice),rowid(CInvoiceBank),rowid(BankNumber),rowid(CInvoiceMovement),rowid(PostingLine),rowid(Company),rowid(CompanyProperty),rowid(Creditor),rowid(BusinessRelation),rowid(CorporateGroup),rowid(Currency),rowid(Division),rowid(Journal),rowid(PaymentCondition),rowid(Period),rowid(Reason)


Internal usage


QadFinancials
method BCDocument.GetPossibleAllocationsByBank


Sample code: how to call this query through RPCRequestService (QXtend Inbound)

define temp-table ttContext no-undo
    field propertyQualifier as character
    field propertyName as character
    field propertyValue as character
    index entityContext is primary unique
        propertyQualifier
        propertyName
    index propertyQualifier
        propertyQualifier.

define dataset dsContext for ttContext.

define variable vhContextDS as handle no-undo.
define variable vhExceptionDS as handle no-undo.
define variable vhServer as handle no-undo.
define variable vhInputDS as handle no-undo.
define variable vhInputOutputDS as handle no-undo.
define variable vhOutputDS as handle no-undo.
define variable vhParameter as handle no-undo.

/* Create context */
create ttContext.
assign ttContext.propertyName = "programName"
       ttContext.propertyValue = "BCInvoice".
create ttContext.
assign ttContext.propertyName = "methodName"
       ttContext.propertyValue = "CInvoiceBankByAllocationInfo".
create ttContext.
assign ttContext.propertyName = "applicationId"
       ttContext.propertyValue = "fin".
create ttContext.
assign ttContext.propertyName = "entity"
       ttContext.propertyValue = "1000".
create ttContext.
assign ttContext.propertyName = "userName"
       ttContext.propertyValue = "mfg".
create ttContext.
assign ttContext.propertyName = "password"
       ttContext.propertyValue = "".

/* Create input dataset */
create dataset vhInputDS.
vhInputDS:read-xmlschema("file", "xml/bcinvoice.cinvoicebankbyallocationinfo.i.xsd", ?).
vhParameter = vhInputDS:get-buffer-handle("tParameterI").
vhParameter:buffer-create().

assign vhParameter::icRange = "A"
       vhParameter::icRowid = ""
       vhParameter::iiRownum = 0
       vhParameter::iiNumber = 5 /* Number of records to read */
       vhParameter::icSortColumns = ""
       vhParameter::ilCountOnly = false
       vhParameter::ilForwardRead = true
       vhParameter::iiMaximumBrowseRecordsToCount = 0.

vhParameter = vhInputDS:get-buffer-handle("tFilter").
vhParameter:buffer-create().

assign vhParameter::<field-name-1> = <field-value-1>
       vhParameter::<field-name-2> = <field-value-2>
       ...

/* Connect the AppServer */
create server vhServer.
vhServer:connect("-URL <appserver-url>").

if not vhServer:connected()
then do:
    message "Could not connect AppServer" view-as alert-box error title "Error".
    return.
end.

/* Run */
assign vhContextDS = dataset dsContext:handle.

run program/rpcrequestservice.p on vhServer
    (input-output dataset-handle vhContextDS by-reference,
           output dataset-handle vhExceptionDS,
     input        dataset-handle vhInputDS by-reference,
     input-output dataset-handle vhInputOutputDS by-reference,
           output dataset-handle vhOutputDS).

/* Handle output however you want, in this example, we dump it to xml */
if valid-handle(vhExceptionDS)
then vhExceptionDS:write-xml("file", "Exceptions.xml", true).

if valid-handle(vhOutputDS)
then vhOutputDS:write-xml("file", "Output.xml", true).

/* Cleanup */
vhServer:disconnect().
assign vhServer = ?.

if valid-handle(vhInputDS)
then delete object vhInputDS.

if valid-handle(vhOutputDS)
then delete object vhOutputDS.

if valid-handle(vhExceptionDS)
then delete object vhExceptionDS.