project QadFinancials > class BDDocument > business logic query DDocumentByCollectionID

Description

DDocumentByCollectionID; query that return all allocation info on the documents


Parameters


iiCompanyIdintegerCompany id
iiDCollectionIDintegerDCollectionID
iiDDocumentIDinteger
icDDocumentStatuscharacterCustomer Document Status


query condition


  each DDocument where
DDocument.Company_Id = iiCompanyId AND
DDocument.DCollection_ID = iiDCollectionID AND
DDocument.DDocument_ID = iiDDocumentID AND
DDocument.DDocumentStatus can-do icDDocumentStatus

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

      first Debtor (inner-join) where
Debtor.SharedSet_Id = vi_DEBTOR_sharedset(iiCompanyId) AND
Debtor.Debtor_ID = DDocument.Debtor_ID AND

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


query resultset tqDDocumentByCollectionID


field namedata typedb fielddescription
tiBusinessRelation_IDintegerDebtor.BusinessRelation_IDBusiness Relation
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.
tiCompany_IDintegerDDocument.Company_IDLink to Company
tiCurrency_IDintegerDDocument.Currency_IDCurrency Code
tcCurrencyCodecharacterCurrency.CurrencyCodeCurrency Code
tiCurrencyNumberOfDecimalsintegerCurrency.CurrencyNumberOfDecimalsNumber of Decimals
tiDCollection_IDintegerDDocument.DCollection_IDLink to DCollection
tiDDocument_IDintegerDDocument.DDocument_IDRecord ID
tdDDocumentCCRatedecimalDDocument.DDocumentCCRateSC Rate. The statutory scaling factor applying to the transaction currency.
tdDDocumentCCScaledecimalDDocument.DDocumentCCScaleSC Rate Scale. The statutory exchange rate used by the invoice.
tdDDocumentExchangeRatedecimalDDocument.DDocumentExchangeRateExchange Rate. This field holds the exchange rate applying to the transaction currency.
tiDDocumentNumberintegerDDocument.DDocumentNumberDocument Number. This field hold a unified number for report use.
tdDDocumentOriginalDebitBCdecimalDDocument.DDocumentOriginalDebitBCBC Original Debit
tdDDocumentOriginalDebitCCdecimalDDocument.DDocumentOriginalDebitCCTC Original Debit. This field holds the debit value of the payment in management currency.
tdDDocumentOriginalDebitLCdecimalDDocument.DDocumentOriginalDebitLCTC Original Debit. This field holds the debit value of the payment in base currency.
tdDDocumentOriginalDebitTCdecimalDDocument.DDocumentOriginalDebitTCAmount.This field hold the value of the payment in the transaction currency. This field must be positive and can be entered manually or automatically by linking the payment to an open item.
tdDDocumentRateScaledecimalDDocument.DDocumentRateScaleScale Factor. This field indicates the scaling factor applying to the transaction currency.
tcDDocumentReferencecharacterDDocument.DDocumentReferenceReference. Reference text for the payment.
tcDDocumentStatuscharacterDDocument.DDocumentStatusStatus. The payment status. The default value for a new record is Initial.
tcDDocumentSubTypecharacterDDocument.DDocumentSubTypeSubtype. This read-only field indicates that the payment is manual or automatic. You create manual customer payments through the Customer Payment activities, and automatic payments through the Customer Payment Selections.
tcDDocumentTypecharacterDDocument.DDocumentTypePayment Instrument. The system displays the payment instrument associated with the payment format linked to the customer bank.
tiDDocumentYearintegerDDocument.DDocumentYearYear/Number. This field displays the accounting year and payment sequence number, which is automatically generated by the accounting year.
tiDebtor_IDintegerDDocument.Debtor_IDCustomer
tcDebtorCodecharacterDebtor.DebtorCodeA code (maximum eight characters) that identifies a customer. If the code you specify matches an existing supplier code, a warning message displays. You can choose to ignore the warning, and create the record. However, when a supplier and customer share the same code, they must reference the same business relation.
api annotation:If you leave the Customer Code field blank, the system automatically generates a number for the record based on the sequence defined in Customer Autonumber Create.
ti_sequenceintegercalculatedprimary index
tc_rowidcharactercalculated = rowid(DDocument),rowid(Currency),rowid(Debtor),rowid(BusinessRelation)


Internal usage


QadFinancials
method BBankEntry.CalculateBankStateAllocColl
method BBankEntry.GetPossibleCollAllocationsDebtor
method BDCollection.ExportCLIEOP03
method BDCollection.ExportDOM80
method BDCollection.ExportLCRBOR
method BDCollection.ExportXml
method BDCollection.ValidateComponent
method BDDocument.AdditionalUpdatesDCollection
method BDDocument.AdditionalUpdatesDCollectionCopy