project QadFinancials > class BDDocument > business logic query DDocumentByDebtorTypeOpen

Description

shows all open documents for a certain debtor, where the document type equals the input parameter


Parameters


iiCompanyIdintegerCompany id
iiDebtorIdintegerDebtor ID
icDebtorCodecharacterDebtor Code
icDocumentTypecharacterDocument Type
ilIsOpenlogicaldo you want to see the open or the closed documents ?


query condition


  each DDocument where
DDocument.Company_Id = iiCompanyId AND
DDocument.Debtor_ID = iiDebtorId AND
DDocument.DDocumentType = icDocumentType AND
DDocument.DDocumentIsOpen = ilIsOpen

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

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


query resultset tqDDocumentByDebtorTypeOpen


field namedata typedb fielddescription
tiBankNumber_IDintegerDDocument.BankNumber_IDLink to BankNumber
tiCompany_IDintegerDDocument.Company_IDLink to Company
tiCreationUsr_IDintegerDDocument.CreationUsr_IDLogin
tiCurrency_IDintegerDDocument.Currency_IDCurrency Code
tcCurrencyCodecharacterCurrency.CurrencyCodeCurrency Code
tcCustomCombo0characterDDocument.CustomCombo0Custom Combo Field
tcCustomCombo1characterDDocument.CustomCombo1Custom Combo Field
tcCustomCombo2characterDDocument.CustomCombo2Custom Combo Field
tcCustomCombo3characterDDocument.CustomCombo3Custom Combo Field
tcCustomCombo4characterDDocument.CustomCombo4Custom Combo Field
tcCustomCombo5characterDDocument.CustomCombo5Custom Combo Field
tcCustomCombo6characterDDocument.CustomCombo6Custom Combo Field
tcCustomCombo7characterDDocument.CustomCombo7Custom Combo Field
tcCustomCombo8characterDDocument.CustomCombo8Custom Combo Field
tcCustomCombo9characterDDocument.CustomCombo9Custom Combo Field
ttCustomDate0dateDDocument.CustomDate0Custom Date Field
ttCustomDate1dateDDocument.CustomDate1Custom Date Field
ttCustomDate2dateDDocument.CustomDate2Custom Date Field
ttCustomDate3dateDDocument.CustomDate3Custom Date Field
ttCustomDate4dateDDocument.CustomDate4Custom Date Field
tdCustomDecimal0decimalDDocument.CustomDecimal0Custom Decimal Field
tdCustomDecimal1decimalDDocument.CustomDecimal1Custom Decimal Field
tdCustomDecimal2decimalDDocument.CustomDecimal2Custom Decimal Field
tdCustomDecimal3decimalDDocument.CustomDecimal3Custom Decimal Field
tdCustomDecimal4decimalDDocument.CustomDecimal4Custom Decimal Field
tiCustomInteger0integerDDocument.CustomInteger0Custom Integer Field
tiCustomInteger1integerDDocument.CustomInteger1Custom Integer Field
tiCustomInteger2integerDDocument.CustomInteger2Custom Integer Field
tiCustomInteger3integerDDocument.CustomInteger3Custom Integer Field
tiCustomInteger4integerDDocument.CustomInteger4Custom Integer Field
tcCustomLong0characterDDocument.CustomLong0Custom Long Field
tcCustomLong1characterDDocument.CustomLong1Custom Long Field
tcCustomNotecharacterDDocument.CustomNoteCustom Note Field
tcCustomShort0characterDDocument.CustomShort0Custom Short Field
tcCustomShort1characterDDocument.CustomShort1Custom Short Field
tcCustomShort2characterDDocument.CustomShort2Custom Short Field
tcCustomShort3characterDDocument.CustomShort3Custom Short Field
tcCustomShort4characterDDocument.CustomShort4Custom Short Field
tcCustomShort5characterDDocument.CustomShort5Custom Short Field
tcCustomShort6characterDDocument.CustomShort6Custom Short Field
tcCustomShort7characterDDocument.CustomShort7Custom Short Field
tcCustomShort8characterDDocument.CustomShort8Custom Short Field
tcCustomShort9characterDDocument.CustomShort9Custom Short Field
tiDCollection_IDintegerDDocument.DCollection_IDLink to DCollection
tiDDocument_IDintegerDDocument.DDocument_IDRecord ID
ttDDocumentClosingDatedateDDocument.DDocumentClosingDateClosing Date. The closing date of the payment.
ttDDocumentCreationDatedateDDocument.DDocumentCreationDateCreation Date.This field indicate the payment creation date.
This field is read-only.
tiDDocumentCreationTimeintegerDDocument.DDocumentCreationTimeCreation Time. The time payment is created.
ttDDocumentDueDatedateDDocument.DDocumentDueDateDue Date. The date on which the payment is receivable.
tdDDocumentExchangeRatedecimalDDocument.DDocumentExchangeRateExchange Rate. This field holds the exchange rate applying to the transaction currency.
tcDDocumentIncassoSelectCodecharacterDDocument.DDocumentIncassoSelectCodeCustomer Payment Selection Code. This field displays the customer payment selection code.
This field is read-only.
tlDDocumentIsOpenlogicalDDocument.DDocumentIsOpenOpen. This field indicates if the payment is completely paid already.
ttDDocumentLastPrintDatedateDDocument.DDocumentLastPrintDateLast Printed Date. This field indicates the most recent printing date.
tiDDocumentNumberintegerDDocument.DDocumentNumberDocument Number. This field hold a unified number for report use.
tdDDocumentOriginalCreditBCdecimalDDocument.DDocumentOriginalCreditBCBC Original Credit
tdDDocumentOriginalCreditCCdecimalDDocument.DDocumentOriginalCreditCCSC Original Credit. This field hold the amount of the payment in management currency.
tdDDocumentOriginalCreditLCdecimalDDocument.DDocumentOriginalCreditLCBC Original Credit.This field holds the amount of the Payment in baisc currency.
tdDDocumentOriginalCreditTCdecimalDDocument.DDocumentOriginalCreditTCTC Original Credit. This field holds the debit value of the payment in transaction currency.
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.
tiDDocumentTimesPrintedintegerDDocument.DDocumentTimesPrintedTimes Printed.This field indicates the number of times the payment has been printed.
This field is read-only.
tcDDocumentTypecharacterDDocument.DDocumentTypePayment Instrument. The system displays the payment instrument associated with the payment format linked to the customer bank.
tiDDocumentValueDaysintegerDDocument.DDocumentValueDaysValue Days. A value for the number of days required by the bank to process the transaction. The default is based on the payment status entered.
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
tiDPaySel_IDintegerDDocument.DPaySel_IDLink to DPaySel
tiGL_IDintegerDDocument.GL_IDBank Account
ttLastModifiedDatedateDDocument.LastModifiedDateLast Modified Date
tiLastModifiedTimeintegerDDocument.LastModifiedTimeLast Modified Time
tcLastModifiedUsercharacterDDocument.LastModifiedUserLast Modified User


Internal usage


QadFinancials
method BDebtor.CalculateBalanceDrafts
method BDebtor.CalculateBOIforCompanies