project QadFinancials > class BCInvoice > API query SelectCInvoicePO (optimised)

Description

use this query in case you want to lookup a creditor invoice with multiple POs; this query should only be used by UI-components!!!!

The condition 'CInvoicePostingYear > 0' on the main-table was added for performance-reasons just to make sure the correct index is used.


query filter (table tFilter)


tcBusinessFieldNametcDataTypetcOperator
iiCompanyIdi
tAddress.AddressCityc=,>=,>,<>,<=,<,begins,can-do,matches
tAddress.AddressStreet1c=,>=,>,<>,<=,<,begins,can-do,matches
tAddress.AddressStreet2c=,>=,>,<>,<=,<,begins,can-do,matches
tAddress.AddressZipc=,>=,>,<>,<=,<,begins,can-do,matches
tBusinessRelation.BusinessRelationCodec=,>=,>,<>,<=,<,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=,>=,>,<>,<=,<
tCInvoice.CInvoiceCITextc=,>=,>,<>,<=,<,begins,can-do,matches
tCInvoice.CInvoiceContactc=,>=,>,<>,<=,<,begins,can-do,matches
tCInvoice.CInvoiceDatet=,>=,>,<>,<=,<
tCInvoice.CInvoiceDescriptionc=,>=,>,<>,<=,<,begins,can-do,matches
tCInvoice.CInvoiceDiscountDueDatet=,>=,>,<>,<=,<
tCInvoice.CInvoiceDueDatet=,>=,>,<>,<=,<
tCInvoice.CInvoiceExchangeRated=,>=,>,<>,<=,<
tCInvoice.CInvoiceHoldAmountTCd=,>=,>,<>,<=,<
tCInvoice.CInvoiceIsExternall=,<>
tCInvoice.CInvoiceIsInitialStatusl=,<>
tCInvoice.CInvoiceIsInvoiceApprovedl=,<>
tCInvoice.CInvoiceIsLockPaymentl=,<>
tCInvoice.CInvoiceIsLogisticMatchingl=,<>
tCInvoice.CInvoiceIsOpenl=,<>
tCInvoice.CInvoiceIsSelectedl=,<>
tCInvoice.CInvoiceIsTaxablel=,<>
tCInvoice.CInvoiceIsTaxConfirmedl=,<>
tCInvoice.CInvoiceMFTextc=,>=,>,<>,<=,<,begins,can-do,matches
tCInvoice.CInvoiceNonRecTaxAmtTCd=,>=,>,<>,<=,<
tCInvoice.CInvoiceOriginalCreditCCd=,>=,>,<>,<=,<
tCInvoice.CInvoiceOriginalCreditLCd=,>=,>,<>,<=,<
tCInvoice.CInvoiceOriginalCreditTCd=,>=,>,<>,<=,<
tCInvoice.CInvoiceOriginalDebitCCd=,>=,>,<>,<=,<
tCInvoice.CInvoiceOriginalDebitLCd=,>=,>,<>,<=,<
tCInvoice.CInvoiceOriginalDebitTCd=,>=,>,<>,<=,<
tCInvoice.CInvoicePoDomainc=,>=,>,<>,<=,<,begins,can-do,matches
tCInvoicePO.CInvoicePOPoNbrc=,>=,>,<>,<=,<,begins,can-do,matches
tCInvoice.CInvoicePostingDatet=,>=,>,<>,<=,<
tCInvoice.CInvoicePostingPeriodi=,>=,>,<>,<=,<
tCInvoice.CInvoicePostingYeari=,>=,>,<>,<=,<
tCInvoice.CInvoicePostingYearPeriodi=,>=,>,<>,<=,<
tCInvoice.CInvoiceRateScaled=,>=,>,<>,<=,<
tCInvoice.CInvoiceReferencec=,>=,>,<>,<=,<,begins,can-do,matches
tCInvoice.CInvoiceRegistrationNri=,>=,>,<>,<=,<
tCInvoice.CInvoiceTaxPointDatet=,>=,>,<>,<=,<
tCInvoice.CInvoiceTSMNumberc=,>=,>,<>,<=,<,begins,can-do,matches
tCInvoice.CInvoiceTypec=,>=,>,<>,<=,<,begins,can-do,matches
tCInvoice.CInvoiceVatBaseCreditCCd=,>=,>,<>,<=,<
tCInvoice.CInvoiceVatBaseCreditLCd=,>=,>,<>,<=,<
tCInvoice.CInvoiceVatBaseCreditTCd=,>=,>,<>,<=,<
tCInvoice.CInvoiceVatBaseDebitCCd=,>=,>,<>,<=,<
tCInvoice.CInvoiceVatBaseDebitLCd=,>=,>,<>,<=,<
tCInvoice.CInvoiceVatBaseDebitTCd=,>=,>,<>,<=,<
tCInvoice.CInvoiceVatCreditCCd=,>=,>,<>,<=,<
tCInvoice.CInvoiceVatCreditLCd=,>=,>,<>,<=,<
tCInvoice.CInvoiceVatCreditTCd=,>=,>,<>,<=,<
tCInvoice.CInvoiceVatDebitCCd=,>=,>,<>,<=,<
tCInvoice.CInvoiceVatDebitLCd=,>=,>,<>,<=,<
tCInvoice.CInvoiceVatDebitTCd=,>=,>,<>,<=,<
tCInvoice.CInvoiceVoucheri=,>=,>,<>,<=,<
tCostCentre.CostCentreCodec=,>=,>,<>,<=,<,begins,can-do,matches
tCreditor.CreditorCodec=,>=,>,<>,<=,<,begins,can-do,matches
tCurrency.CurrencyCodec=,>=,>,<>,<=,<,begins,can-do,matches
tDivision.DivisionCodec=,>=,>,<>,<=,<,begins,can-do,matches
tJournal.JournalCodec=,>=,>,<>,<=,<,begins,can-do,matches
tCInvoice.LastModifiedDatet=,>=,>,<>,<=,<
tCInvoice.LastModifiedTimei=,>=,>,<>,<=,<
tCInvoice.LastModifiedUserc=,>=,>,<>,<=,<,begins,can-do,matches
tProject.ProjectCodec=,>=,>,<>,<=,<,begins,can-do,matches
tPurchaseType.PurchaseTypeCodec=,>=,>,<>,<=,<,begins,can-do,matches
tReason.ReasonCodec=,>=,>,<>,<=,<,begins,can-do,matches
tRole.RoleNamec=,>=,>,<>,<=,<,begins,can-do,matches


Parameters (internal)


iiCompanyIdintegerCompany id


query condition


  each CInvoice where
CInvoice.Company_Id = iiCompanyId AND
CInvoice.CInvoicePostingYear > 0

      first Address (conditional-join) where
Address.Address_ID = CInvoice.ShipToAddress_ID AND

      each CInvoicePO (conditional-join) where
CInvoicePO.CInvoice_ID = CInvoice.CInvoice_ID AND

      first CostCentre (conditional-join) where
CostCentre.SharedSet_Id = vi_COSTCENTRE_sharedset(iiCompanyId) AND
CostCentre.CostCentre_ID = CInvoice.CostCentre_ID AND

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

          first BusinessRelation (inner-join) where
BusinessRelation.BusinessRelation_ID = Creditor.BusinessRelation_ID AND

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

      first Division (conditional-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

      first Project (conditional-join) where
Project.SharedSet_Id = vi_PROJECT_sharedset(iiCompanyId) AND
Project.Project_ID = CInvoice.Project_ID AND

      first PurchaseType (conditional-join) where
PurchaseType.PurchaseType_ID = CInvoice.PurchaseType_ID AND

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

      first Role (conditional-join) where
Role.Role_ID = CInvoice.Role_ID AND


query sort order


CInvoice.Company_ID (ascending)
CInvoice.CInvoicePostingYear (ascending)
CInvoice.CInvoicePostingPeriod (ascending)
CInvoice.Journal_ID (ascending)
CInvoice.CInvoiceVoucher (ascending)


query resultset tqSelectCInvoicePO


field namedata typedb fielddescription
tiCInvoicePostingYearintegerCInvoice.CInvoicePostingYearYear.This field indicates the accounting year for the invoice.
If you modify these fields, the posting and tax dates are changed correspondingly.
api annotation:This field defaults to the accounting year associated with the posting date.
tiCInvoicePostingPeriodintegerCInvoice.CInvoicePostingPeriodGL Period.This field indicates the period when the invoice to be posted.
If this field is modified, the posting and tax dates are changed correspondingly.
api annotation:This field defaults to the period associated with the posting date.
tcJournalCodecharacterJournal.JournalCodeA daybook code (maximum eight characters).
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.
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.
tiCInvoiceRegistrationNrintegerCInvoice.CInvoiceRegistrationNrRegistration number. This field displays the sequential number assigned to each invoice upon initial entry in the system.
tlCInvoiceIsInitialStatuslogicalCInvoice.CInvoiceIsInitialStatusInitial Status. This field indicates if the invoice is in initial status.
api annotation:This field defaults from the Initial Status field of the Invoice status code.
tcCInvoicePOPoNbrcharacterCInvoicePO.CInvoicePOPoNbrPO Number. This fields identifies the PO receipts which the invoice matches.
tcCreditorCodecharacterCreditor.CreditorCodeSupplier 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.
tlCInvoiceIsTaxConfirmedlogicalCInvoice.CInvoiceIsTaxConfirmedTax Confirmed. This field indicates if the taxes for the invoice have been confirmed and cannot be changed anymore.
api annotation:PartialUpdate = yes - defaults to false
tlCInvoiceIsExternallogicalCInvoice.CInvoiceIsExternalExternal. This field indicates if the daybook used is external.
This field is calculated by the system using the daybook code.
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
tdCInvoiceBalanceTCdecimalCInvoice.CInvoiceBalanceTCBalance. This field displays the sum of the debit and credit amounts of all posting lines in transaction currency.
tcCurrencyCodecharacterCurrency.CurrencyCodeCurrency Code
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.
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.
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.
tlCInvoiceIsLogisticMatchinglogicalCInvoice.CInvoiceIsLogisticMatchingReceiver Matching.This field indicates If the Receiver Matching function is enabled.
This field is calculated by the system using the invoice status code.
tcRoleNamecharacterRole.RoleNameRole Name
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.
tcReasonCodecharacterReason.ReasonCodeInvoice Status Code
tcDivisionCodecharacterDivision.DivisionCodeSub-Account
tlCInvoiceIsSelectedlogicalCInvoice.CInvoiceIsSelectedSelected. This field indicates whether the invoice is included in a payment selection.
This field is read-only.
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.
tcCInvoiceTypeCalccharactercalculatedCreditor Invoice Type nl Invoice or Credit Note
ttCInvoiceTaxPointDatedateCInvoice.CInvoiceTaxPointDateTax Point Date.This field indicates the date to be used in tax calculations.
api annotation:This field defaults from the posting date.
tcCInvoiceDescriptioncharacterCInvoice.CInvoiceDescriptionDescription. A brief description of the invoice. The system generates a default description based on the Reference and Supplier Code.
tiLinkedCInvoice_IDintegerCInvoice.LinkedCInvoice_IDReference
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.
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.
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.
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.
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.
tcCInvoiceAllocationStatusCalccharactercalculated
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
tcCInvoiceContactcharacterCInvoice.CInvoiceContactContact. This field indicates the name of the purchasing contact in the supplier company.
api annotation:This field defaults from the Contact field of the invoice's 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.
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.
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.
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.
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.
tdCInvoiceVatBaseDebitLCdecimalCInvoice.CInvoiceVatBaseDebitLCBC Base Amount DR. This field displays the debit base amount in the base currency.
This field is calculated by the system using the TC Base Amount DR and the Exchange rate.
tdCInvoiceVatBaseCreditLCdecimalCInvoice.CInvoiceVatBaseCreditLCBC Base Amount CR. This field displays the credit base amount in the base currency.
This field is calculated by the system using the TC Base Amount CR and the Exchange rate.
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.
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.
tdCInvoiceVatDebitLCdecimalCInvoice.CInvoiceVatDebitLCBC Tax Amount DR. This field displays the debit tax amount in the base currency.
This field is calculated by the system using the TC Tax Amount DR and the Exchange rate.
tdCInvoiceVatCreditLCdecimalCInvoice.CInvoiceVatCreditLCBC Tax Amount CR. This field displays the debit tax amount in the base currency.
This field is calculated by the system using the TC Tax Amount CR and the Exchange rate.
tcCInvoiceCITextcharacterCInvoice.CInvoiceCITextCIDescription. A brief description for the SI posting.
api annotation:This field defaults from the CInvoiceDescription.
tcCInvoiceMFTextcharacterCInvoice.CInvoiceMFTextMFDescription. A brief description for the Matching posting.
api annotation:This field defaults from the CInvoiceDescription.
tiReason_IDintegerCInvoice.Reason_IDInvoice Status Code
tiTransactionEndCountry_IDintegerCInvoice.TransactionEndCountry_IDCountry Code
tiTransactionStartCountry_IDintegerCInvoice.TransactionStartCountry_IDCountry Code
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.
tdCInvoiceVatBaseCreditCCdecimalCInvoice.CInvoiceVatBaseCreditCCSC Base Amount CR. This field displays the credit base amount in the statutory currency.
This field is calculated by the system using the TC Base Amount CR and the SC rate.
tdCInvoiceVatBaseDebitCCdecimalCInvoice.CInvoiceVatBaseDebitCCSC Base Amount DR. This field displays the debit base amount in the statutory currency.
This field is calculated by the system using the TC Base Amount DR and the SC rate.
tdCInvoiceVatCreditCCdecimalCInvoice.CInvoiceVatCreditCCSC Tax Amount CR. This field displays the credit tax amount in the statutory currency.
This field is calculated by the system using the TC Tax Amount CR and the SC rate.
tdCInvoiceVatDebitCCdecimalCInvoice.CInvoiceVatDebitCCBC Tax Amount DR. This field displays the debit tax amount in the statutory currency.
This field is calculated by the system using the TC Tax Amount DR and the SC rate.
tdCInvoiceBalanceDebitTCdecimalCInvoice.CInvoiceBalanceDebitTCTC Balance Amount DR. This field displays the sum of the debit amounts of all posting lines in transaction currency.
tdCInvoiceBalanceCreditTCdecimalCInvoice.CInvoiceBalanceCreditTCTC Balance Amount CR. This field displays the sum of the credit amounts of all posting lines in transaction currency.
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.
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.
tiCInvoice_IDintegerCInvoice.CInvoice_IDRecord ID
tiCompany_IDintegerCInvoice.Company_IDLink to Company
tiCreditor_IDintegerCInvoice.Creditor_IDLink to Creditor
tiCInvoiceCurrency_IDintegerCInvoice.CInvoiceCurrency_IDCurrency Code
tiDivision_IDintegerCInvoice.Division_IDSub-Account
tiJournal_IDintegerCInvoice.Journal_IDDaybook Code
tiNormalPaymentCondition_IDintegerCInvoice.NormalPaymentCondition_IDCredit Terms Code
tiPeriod_IDintegerCInvoice.Period_IDLink to Period
tiBLWIGroup_IDintegerCInvoice.BLWIGroup_IDBLWI Group Code
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.
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.
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.
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.
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.
tiPaymentGroup_IDintegerCreditor.PaymentGroup_IDPayment Group
tdCInvoiceNonRecTaxAmtTCdecimalCInvoice.CInvoiceNonRecTaxAmtTCNon-Rev Tax Amount. This field displays the percentage of tax that is not recoverable.
Taxes are recoverable whenever your company is eligible to offset a percentage of tax on purchases against tax collected on sales. Recoverable taxes are common in Europe.
tiLastModifiedTimeintegerCInvoice.LastModifiedTimeLast Modified Time
tcLastModifiedUsercharacterCInvoice.LastModifiedUserLast Modified User
ttLastModifiedDatedateCInvoice.LastModifiedDateLast Modified Date
tcAddressCitycharacterAddress.AddressCityCity. The city for this address. This field can be used to decide the tax zone of the address.
tcAddressStreet1characterAddress.AddressStreet1Address: Line one of address details.
This field can be blank.
tcAddressStreet2characterAddress.AddressStreet2Address.Line two of address details.
This field can be blank.
tcAddressZipcharacterAddress.AddressZipZip. The postal code or US zip code associated with this address.
This field is used to decide the tax zone for the address.
This field can be blank.
tlCInvoiceIsTaxablelogicalCInvoice.CInvoiceIsTaxableTaxable. This field indicates if the invoice is taxable.
This field defaults to true if the supplier is taxable.
tiShipToAddress_IDintegerCInvoice.ShipToAddress_IDCity
tiCInvoicePostingYearPeriodintegerCInvoice.CInvoicePostingYearPeriodYear/Period. This field indicates the accounting year and period for the invoice.
If you modify these fields, the posting and tax dates are changed correspondingly.
api annotation:This field defaults to the accounting year and period associated with the posting date.
tdCInvoiceRateScaledecimalCInvoice.CInvoiceRateScaleScale Factor. This field indicates the scale factor applying to the exchange rate in use for foreign currency payments.
tcCostCentreCodecharacterCostCentre.CostCentreCodeCost Center: A code that identifies the cost center.
tcProjectCodecharacterProject.ProjectCodeProject
tiRole_IDintegerCInvoice.Role_IDRole Name
tcCInvoicePoDomaincharacterCInvoice.CInvoicePoDomainPO Domain. This field indicates which domain the purchase order belongs to.
tcPurchaseTypeCodecharacterPurchaseType.PurchaseTypeCodePurchase Type
CInvoiceCustomcharactercalculatedcustom fields
AddressCustomcharactercalculatedcustom fields
CInvoicePOCustomcharactercalculatedcustom fields
CostCentreCustomcharactercalculatedcustom fields
CreditorCustomcharactercalculatedcustom fields
BusinessRelationCustomcharactercalculatedcustom fields
CurrencyCustomcharactercalculatedcustom fields
DivisionCustomcharactercalculatedcustom fields
JournalCustomcharactercalculatedcustom fields
ProjectCustomcharactercalculatedcustom fields
PurchaseTypeCustomcharactercalculatedcustom fields
ReasonCustomcharactercalculatedcustom fields
RoleCustomcharactercalculatedcustom fields
ti_sequenceintegercalculatedprimary index
tc_rowidcharactercalculated = rowid(CInvoice),rowid(Address),rowid(CInvoicePO),rowid(CostCentre),rowid(Creditor),rowid(BusinessRelation),rowid(Currency),rowid(Division),rowid(Journal),rowid(Project),rowid(PurchaseType),rowid(Reason),rowid(Role)


Internal usage


unused


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 = "SelectCInvoicePO".
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.selectcinvoicepo.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.