project QadFinancials > class BDDocument > business logic query DDocumentByChangeStatus


Parameters


iiCompanyIdintegerCompany id
icDocumentStatuscharacter
iiYearinteger
iiDDocumentNumberinteger
icReferencecharacter
itDueDatedate
itCreationDatedate
icDebtorCodecharacter
icDocumentTypecharacter
icBusinessRelationcharacter
icIncSelCodecharacter
itFromDueDatedate
itToDueDatedate
icBusinessRelationNamecharacter
icBusinessRelationSearchcharacter


query condition


  each DDocument where
DDocument.Company_Id = iiCompanyId AND
DDocument.DDocumentType = icDocumentType AND
DDocument.DDocumentStatus = icDocumentStatus AND
DDocument.DDocumentYear = iiYear AND
DDocument.DDocumentNumber = iiDDocumentNumber AND
DDocument.DDocumentReference = icReference AND
DDocument.DDocumentDueDate = itDueDate AND
DDocument.DDocumentCreationDate = itCreationDate AND
DDocument.DDocumentIncassoSelectCode = icIncSelCode AND
DDocument.DDocumentDueDate <= itToDueDate AND
DDocument.DDocumentDueDate >= itFromDueDate

      first BankNumber1 (inner-join) where
BankNumber1.BankNumber_ID = DDocument.BankNumber_ID AND

          first BankPayFormat (inner-join) where
BankPayFormat.BankPayFormat_ID = BankNumber1.BankPayFormat_ID AND

              first BankNumber2 (inner-join) where
BankNumber2.BankNumber_ID = BankPayFormat.BankNumber_ID AND

              first PayFormatType (inner-join) where
PayFormatType.PayFormatTypeCode = BankPayFormat.PayFormatTypeCode AND

      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
Debtor.DebtorCode = icDebtorCode

          first BusinessRelation (inner-join) where
BusinessRelation.BusinessRelation_ID = Debtor.BusinessRelation_ID AND
(BusinessRelation.BusinessRelationCode = icBusinessRelation ) AND
(BusinessRelation.BusinessRelationName1 = icBusinessRelationName ) AND
(BusinessRelation.BusinessRelationSearchName = icBusinessRelationSearch )

      first GL (inner-join) where
GL.SharedSet_Id = vi_GL_sharedset(iiCompanyId) AND
GL.GL_ID = DDocument.GL_ID AND


query resultset tqDDocumentByChangeStatus


field namedata typedb fielddescription
tcBankNumbercharacterBankNumber2.BankNumberBank Number
tiBankNumber_IDintegerBankNumber2.BankNumber_IDRecord ID
tcBankNumber1characterBankNumber1.BankNumberBank Number
tiBankPayFormat_IDintegerBankPayFormat.BankPayFormat_IDRecord ID
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.
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.
tcBusinessRelationSearchNamecharacterBusinessRelation.BusinessRelationSearchNameSearch Name: An alternate name for finding the business relation. This field can be useful for sorting and filtering.
api annotation:PartialUpdate = yes - defaults to the BusinessRelationCode.
tiCompany_IDintegerDDocument.Company_IDLink to Company
tiCurrency_IDintegerDDocument.Currency_IDCurrency Code
tcCurrencyCodecharacterCurrency.CurrencyCodeCurrency Code
tiDDocument_IDintegerDDocument.DDocument_IDRecord ID
ttDDocumentCreationDatedateDDocument.DDocumentCreationDateCreation Date.This field indicate the payment creation date.
This field is read-only.
ttDDocumentDueDatedateDDocument.DDocumentDueDateDue Date. The date on which the payment is receivable.
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.
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.
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
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.
tiGL_IDintegerDDocument.GL_IDBank Account
tcGLCodecharacterGL.GLCodeA code identifying the GL account.
tcPayFormatTypeCodecharacterPayFormatType.PayFormatTypeCodeFormat Name
ti_sequenceintegercalculatedprimary index
tc_rowidcharactercalculated = rowid(DDocument),rowid(BankNumber1),rowid(BankPayFormat),rowid(BankNumber2),rowid(PayFormatType),rowid(Currency),rowid(Debtor),rowid(BusinessRelation),rowid(GL)


Internal usage


QadFinancials
method BDDocument.ApiGetDDocumentStatusChange
dataset BDDocument.tDDocumentStatusChange