project QadFinancials > class BDebtor > business logic query DebtorForDIDefault

Description

DO NOT ADD OUTER-JOINS TO THIS QUERY!!! Use a separate query call in DefaultValuesCustomer on BDInvoice. See examples for BLWIGroup_ID and PurchaseType_ID.


Parameters


iiCompanyIdintegerCompany id
icDebtorCodecharacter


query condition


  each Debtor where
Debtor.SharedSet_Id = vi_DEBTOR_sharedset(iiCompanyId) AND
Debtor.DebtorCode begins icDebtorCode AND
Debtor.DebtorIsActive = true

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

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

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

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


query resultset tqDebtorForDIDefault


field namedata typedb fielddescription
tiBLWIGroup_IDintegerDebtor.BLWIGroup_IDBLWI Group Code
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.
tcBusinessRelationICCodecharacterBusinessRelation.BusinessRelationICCodeIntercompany Code. When Intercompany is true, this field is mandatory.
The code entered here must match the intercompany code entered for GL accounts in order to generate intercompany reports.
The intercompany code must be unique for this business relation.
tlBusinessRelationIsIntercologicalBusinessRelation.BusinessRelationIsIntercoIntercompany. This field Indicates if the business relation identifies an entity that is a member of a group of entities that trade with each other.
If the business relation is identified as an internal entity,this field is true and cannot be changed.
api annotation:PartialUpdate = yes - defaults to false.
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.
tiCnControlGLProfile_IDintegerDebtor.CnControlGLProfile_IDControl GL Profile (Credit Note)
tiCurrency_IDintegerDebtor.Currency_IDCurrency Code
tcCurrencyCodecharacterCurrency.CurrencyCodeCurrency Code
tiDebtor_IDintegerDebtor.Debtor_IDRecord ID
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.
tlDebtorIsActivelogicalDebtor.DebtorIsActiveIndicate if this is an active record.
api annotation:Value for this field defaults to false.
tlDebtorIsTaxablelogicalDebtor.DebtorIsTaxableIndicate if business activities for this address are normally subject to tax.
api annotation:Value for the field defaults from the Taxable field in Global Tax Management Control.
tcDebtorTaxIDStatecharacterDebtor.DebtorTaxIDStateState Tax- For reference and documentation purposes, enter either a state or provincial tax identification number or a VAT registration number.
api annotation:Value for the field defaults to null.
tiDivisionProfile_IDintegerDebtor.DivisionProfile_IDSub-Account Profile
tiFinChgGLProfile_IDintegerDebtor.FinChgGLProfile_IDFinance Charge Profile
tiInvControlGLProfile_IDintegerDebtor.InvControlGLProfile_IDControl GL Profile (Invoice)
tiNormalPaymentCondition_IDintegerPaymentCondition.PaymentCondition_IDRecord ID
ttPaymentConditionBaseDatedatePaymentCondition.PaymentConditionBaseDateBase Date
tiPaymentConditionBaseDaysintegerPaymentCondition.PaymentConditionBaseDaysBase Days
tcPaymentConditionCodecharacterPaymentCondition.PaymentConditionCodeCredit Terms Code
tiPaymentConditionDayMthDiscintegerPaymentCondition.PaymentConditionDayMthDiscNo of Periods
tiPaymentConditionDaysMonthsintegerPaymentCondition.PaymentConditionDaysMonthsNo of Periods
tcPaymentConditionDescriptcharacterPaymentCondition.PaymentConditionDescriptDescription
tiPaymentConditionDueDaysintegerPaymentCondition.PaymentConditionDueDaysMin Due Days
tcPaymentConditionPaymentTypcharacterPaymentCondition.PaymentConditionPaymentTypPayment Type
tcPaymentConditionPdDiscTypecharacterPaymentCondition.PaymentConditionPdDiscTypePeriod Type
tdPaymentConditionPercentagedecimalPaymentCondition.PaymentConditionPercentageDiscount Percentage
tcPaymentConditionPeriodTypecharacterPaymentCondition.PaymentConditionPeriodTypePeriod Type
tiPaymentConditionSupDayDiscintegerPaymentCondition.PaymentConditionSupDayDiscSupplementary Days
tiPaymentConditionSupplDaysintegerPaymentCondition.PaymentConditionSupplDaysSupplementary Days
tiPrePayControlGLProfile_IDintegerDebtor.PrePayControlGLProfile_IDControl GL Profile (Pre-payment)
tcReasonAllocationStatuscharacterReason.ReasonAllocationStatusAllocation Status
tcReasonCodecharacterReason.ReasonCodeInvoice Status Code
tiSalesAccountGLProfile_IDintegerDebtor.SalesAccountGLProfile_IDSales Account GL Profile
tcTxclTaxClscharacterDebtor.TxclTaxClsA tax class previously defined in Tax Class Maintenance. Tax classes group addresses taxed at specific rates or that are tax-exempt and help determine the default tax environment (set of tax types) for related transactions.
api annotation:The value of tax class defaults from the header of transactions created for this address.
tcTxuTaxUsagecharacterDebtor.TxuTaxUsageA tax usage code previously defined in Tax Usage Maintenance. Tax usage codes identify the normal use of items sold to this address.Common tax usages are retail, manufacturing, and industrialization.
api annotation:The value of tax usage defaults from the header of transactions created for this address.
tcTxzTaxZonecharacterDebtor.TxzTaxZoneThe tax zone for this address, defined in Tax Zone Maintenance. A value is required.
api annotation:The system searches for a default based on the country, state or province, county, city, and postal code of the current address.


Internal usage


QadFinancials
method BDDocument.AdditionalUpdatesPostingPrePaymentPayCond
method BDInvoice.DefaultValuesDebtor