project QadFinancials > class BDebtor > business logic query DebtorByCompany

Description

This query is used by ApiLoadDebtor.
It should ALWAYS contain ALL fields to table Debtor.
It should NEVER contain any links to other tables.


Parameters


iiCompanyIdintegerCompany id
iiDebtorIDinteger


query condition


  each Debtor where
Debtor.SharedSet_Id = vi_DEBTOR_sharedset(iiCompanyId) AND
Debtor.Debtor_ID = iiDebtorID


query sort order


Debtor.DebtorCode (ascending)


query resultset tqDebtorByCompany


field namedata typedb fielddescription
tiBillToDebtor_IDintegerDebtor.BillToDebtor_IDBill-To Customer
tiBLWIGroup_IDintegerDebtor.BLWIGroup_IDBLWI Group Code
tiBusinessRelation_IDintegerDebtor.BusinessRelation_IDBusiness Relation
tiCnControlGLProfile_IDintegerDebtor.CnControlGLProfile_IDControl GL Profile (Credit Note)
tiCurrency_IDintegerDebtor.Currency_IDCurrency Code
tcCustomCombo0characterDebtor.CustomCombo0Custom Combo Field
tcCustomCombo1characterDebtor.CustomCombo1Custom Combo Field
tcCustomCombo2characterDebtor.CustomCombo2Custom Combo Field
tcCustomCombo3characterDebtor.CustomCombo3Custom Combo Field
tcCustomCombo4characterDebtor.CustomCombo4Custom Combo Field
tcCustomCombo5characterDebtor.CustomCombo5Custom Combo Field
tcCustomCombo6characterDebtor.CustomCombo6Custom Combo Field
tcCustomCombo7characterDebtor.CustomCombo7Custom Combo Field
tcCustomCombo8characterDebtor.CustomCombo8Custom Combo Field
tcCustomCombo9characterDebtor.CustomCombo9Custom Combo Field
ttCustomDate0dateDebtor.CustomDate0Custom Date Field
ttCustomDate1dateDebtor.CustomDate1Custom Date Field
ttCustomDate2dateDebtor.CustomDate2Custom Date Field
ttCustomDate3dateDebtor.CustomDate3Custom Date Field
ttCustomDate4dateDebtor.CustomDate4Custom Date Field
tdCustomDecimal0decimalDebtor.CustomDecimal0Custom Decimal Field
tdCustomDecimal1decimalDebtor.CustomDecimal1Custom Decimal Field
tdCustomDecimal2decimalDebtor.CustomDecimal2Custom Decimal Field
tdCustomDecimal3decimalDebtor.CustomDecimal3Custom Decimal Field
tdCustomDecimal4decimalDebtor.CustomDecimal4Custom Decimal Field
tiCustomInteger0integerDebtor.CustomInteger0Custom Integer Field
tiCustomInteger1integerDebtor.CustomInteger1Custom Integer Field
tiCustomInteger2integerDebtor.CustomInteger2Custom Integer Field
tiCustomInteger3integerDebtor.CustomInteger3Custom Integer Field
tiCustomInteger4integerDebtor.CustomInteger4Custom Integer Field
tcCustomLong0characterDebtor.CustomLong0Custom Long Field
tcCustomLong1characterDebtor.CustomLong1Custom Long Field
tcCustomNotecharacterDebtor.CustomNoteCustom Note Field
tcCustomShort0characterDebtor.CustomShort0Custom Short Field
tcCustomShort1characterDebtor.CustomShort1Custom Short Field
tcCustomShort2characterDebtor.CustomShort2Custom Short Field
tcCustomShort3characterDebtor.CustomShort3Custom Short Field
tcCustomShort4characterDebtor.CustomShort4Custom Short Field
tcCustomShort5characterDebtor.CustomShort5Custom Short Field
tcCustomShort6characterDebtor.CustomShort6Custom Short Field
tcCustomShort7characterDebtor.CustomShort7Custom Short Field
tcCustomShort8characterDebtor.CustomShort8Custom Short Field
tcCustomShort9characterDebtor.CustomShort9Custom Short Field
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.
tcDebtorCommentNotecharacterDebtor.DebtorCommentNoteFree-form text related to this customer that is saved with the customer record.
api annotation:Value for this field defaults to null.
tiDebtorCreditRating_IDintegerDebtor.DebtorCreditRating_IDCredit Rating
tcDebtorDBNumbercharacterDebtor.DebtorDBNumberThe credit agency reference number assigned to this customer.
api annotation:Value for this field defaults to null.
tdDebtorFixedCredLimTCdecimalDebtor.DebtorFixedCredLimTCWhen Apply Fixed Ceiling is selected, specify the currency amount that determines the maximum credit extended to this customer.
api annotation:Value for this field defaults to 0.0000 .
tdDebtorHighCreditdecimalDebtor.DebtorHighCreditThe highest amount of credit you have ever extended to this customer. This is the largest AR balance they have had open at one time.
ttDebtorHighCreditDatedateDebtor.DebtorHighCreditDateThe date the highest credit amount was extended to this customer.
tlDebtorIsActivelogicalDebtor.DebtorIsActiveIndicate if this is an active record.
api annotation:Value for this field defaults to false.
tlDebtorIsCheckAftDICredLimlogicalDebtor.DebtorIsCheckAftDICredLimIndicate whether to perform the credit check when saving a new or modified invoice and include the new invoice amount in the total.
api annotation:Value for this field defaults to false.
tlDebtorIsCheckAftSOCredLimlogicalDebtor.DebtorIsCheckAftSOCredLimIndicate whether to perform the credit check when saving a new or modified order and include the new order amount in the total.
api annotation:Value for this field defaults to false.
tlDebtorIsCheckBefDICredLimlogicalDebtor.DebtorIsCheckBefDICredLimIndicate whether to perform the credit check before a new customer invoice is entered.
api annotation:Value for this field defaults to false.
tlDebtorIsCheckBefSOCredLimlogicalDebtor.DebtorIsCheckBefSOCredLimIndicate whether to perform the credit check before a new order is entered or not.
api annotation:Value for this field defaults to false.
tlDebtorIsFinanceChargelogicalDebtor.DebtorIsFinanceChargeIndicate whether to make this customer’s accounts liable for finance charges or not.
api annotation:Value for this field defaults to false.
tlDebtorIsFixedCredLimlogicalDebtor.DebtorIsFixedCredLimIndicate if the credit limit of the customer is fixed.
api annotation:Value for this field defaults to false.
tlDebtorIsInclOpenItmCredLimlogicalDebtor.DebtorIsInclOpenItmCredLimIndicate whether to include the balance of unpaid invoices or not.
api annotation:Value for this field defaults to false.
tlDebtorIsInclSOCredLimlogicalDebtor.DebtorIsInclSOCredLimIndicate whether to include the balance of open sales orders in the system.
api annotation:Value for this field defaults to false.
tlDebtorIsInvoiceByAuthlogicalDebtor.DebtorIsInvoiceByAuthIndicate how invoice totals should be calculated and displayed for this customer.
api annotation:Value for this field defaults to false.
tlDebtorIsLockedCredLimlogicalDebtor.DebtorIsLockedCredLimIndicate whether to put this customer on hold.
api annotation:Value for this field defaults to false.
tlDebtorIsMaxDaysDueCredLimlogicalDebtor.DebtorIsMaxDaysDueCredLimIndicate whether you can enter a value in the Maximum Number of Days field or not.
api annotation:Value for this field defaults to false.
tlDebtorIsOverruleDICredLimlogicalDebtor.DebtorIsOverruleDICredLimIndicate whether to allow users to enter invoice transactions for a customer when the customer’s credit limit is exceeded.
api annotation:Value for this field defaults to false.
tlDebtorIsOverruleSOCredLimlogicalDebtor.DebtorIsOverruleSOCredLimIndicate whether to allow users to enter order transactions for a customer when the customer’s credit limit is exceeded.
api annotation:Value for this field defaults to false.
tlDebtorIsPrintReminderlogicalDebtor.DebtorIsPrintReminderIndicate if reminders are typically printed for this customer to report past due balances.
api annotation:Value for this field defaults to false.
tlDebtorIsPrintStatementlogicalDebtor.DebtorIsPrintStatementIndicate if statements should be printed for this customer. When this field is selected, a statement is printed for this customer using the frequency specified in Statement Cycle.
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.
tlDebtorIsTaxInCitylogicalDebtor.DebtorIsTaxInCityThis setting determines whether the address is in the city
limits for taxation purposes. It is used only with the Sales and Use Tax Interface for US and Canadian tax processing.
api annotation:Value for the field defaults from the business relation.
tlDebtorIsTaxIncludedlogicalDebtor.DebtorIsTaxIncludedTax Is Included
tlDebtorIsToBeLockedCredLimlogicalDebtor.DebtorIsToBeLockedCredLimIndicate if the system puts the customer on credit hold if any of the credit limits are violated when new orders for this customer are created or not.
api annotation:Value for this field defaults to false.
tlDebtorIsTurnOverCredLimlogicalDebtor.DebtorIsTurnOverCredLimIndicate whether you can enter a percentage in the Percentage of Turnover field.
api annotation:Value for this field defaults to false.
tlDebtorIsWithPreInvGrouplogicalDebtor.DebtorIsWithPreInvGroupIndicate if Customer is Member of Pre-Invoice Group or not.
api annotation:Value for this field defaults to false.
ttDebtorLastCreditReviewdateDebtor.DebtorLastCreditReviewThe date when the customer’s credit status was last reviewed.
ttDebtorLastCreditUpdatedateDebtor.DebtorLastCreditUpdateThe date when the customer’s credit status was last updated.
ttDebtorLastFinChargeDatedateDebtor.DebtorLastFinChargeDateThe date when finance charge is last calculated for this customer.
api annotation:Value for this field defaults to null.
ttDebtorLastPaymentdateDebtor.DebtorLastPaymentLast payment date.
api annotation:The system automatically updates this date when transactions are posted in Banking Entry, Petty Cash, and Customer Payments.
ttDebtorLastSaledateDebtor.DebtorLastSaleThe date an invoice was last posted for this customer.
api annotation:This date is updated by Invoice Post and Print.
tiDebtorMaxNumDaysCredLimintegerDebtor.DebtorMaxNumDaysCredLimSpecify the number of days that any invoice for this customer can be overdue before the system disallows any further credit.
api annotation:Value for this field defaults to 0.
tdDebtorPercTurnOverCredLimdecimalDebtor.DebtorPercTurnOverCredLimWhen Apply % of Turnover is selected,specify a percentage value. The system applies this percentage to the last year turnover and displays the result in the Credit on Turnover field. The amount is recalculated when you change the percentage.
api annotation:Value for this field defaults to 0.00 .
tdDebtorPercWarningCredLimdecimalDebtor.DebtorPercWarningCredLimSelect to generate a warning message when the specified percentage of the credit limit has been reached.
api annotation:Value for this field defaults to 0.00 .
tdDebtorSalesOrderBalancedecimalDebtor.DebtorSalesOrderBalanceCurrent balance of all sales order related to this customer.
api annotation:Value for this field defaults to 0.0000 .
tcDebtorStatementCyclecharacterDebtor.DebtorStatementCycleA value to indicate how often you normally print AR statements for this customer.
api annotation:Value for this field defaults to null.
tiDebtorTaxDeclarationintegerDebtor.DebtorTaxDeclarationTax Declaration
tcDebtorTaxIDFederalcharacterDebtor.DebtorTaxIDFederalFederal Tax- the tax ID assigned to this address by the federal or national government.
api annotation:Value for the field defaults to null.
tcDebtorTaxIDMisc1characterDebtor.DebtorTaxIDMisc1Miscellaneous tax 1, 2, 3. For reference and documentation purposes, enter any other tax identification numbers that are useful.
api annotation:Values for these fields default to null.
tcDebtorTaxIDMisc2characterDebtor.DebtorTaxIDMisc2Miscellaneous Tax 2
tcDebtorTaxIDMisc3characterDebtor.DebtorTaxIDMisc3Miscellaneous Tax 3
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.
tiDebtorTotalDaysLateintegerDebtor.DebtorTotalDaysLateTotal Days Late
tiDebtorTotalNbrOfInvoicesintegerDebtor.DebtorTotalNbrOfInvoicesNumber of paid invoices related to this customer.
tiDebtorType_IDintegerDebtor.DebtorType_IDCustomer Type
tiDeductionCtrlGLProfile_IDintegerDebtor.DeductionCtrlGLProfile_IDLink to Deduction Profile
tiDeliveryCond_IDintegerDebtor.DeliveryCond_IDLink to DeliveryCond
tiDivisionProfile_IDintegerDebtor.DivisionProfile_IDSub-Account Profile
tiDomiciliationNumberintegerDebtor.DomiciliationNumberDomiciliation Number
tiFinChgGLProfile_IDintegerDebtor.FinChgGLProfile_IDFinance Charge Profile
tiInvControlGLProfile_IDintegerDebtor.InvControlGLProfile_IDControl GL Profile (Invoice)
ttLastModifiedDatedateDebtor.LastModifiedDateLast Modified Date
tiLastModifiedTimeintegerDebtor.LastModifiedTimeLast Modified Time
tcLastModifiedUsercharacterDebtor.LastModifiedUserLast Modified User
tiNormalPaymentCondition_IDintegerDebtor.NormalPaymentCondition_IDCredit Terms Code
tiPaymentGroup_IDintegerDebtor.PaymentGroup_IDPayment Group
tiPreInvoiceGroup_IDintegerDebtor.ObsoletePreInvGroup_IDLink to PreInvGroup
tiPrePayControlGLProfile_IDintegerDebtor.PrePayControlGLProfile_IDControl GL Profile (Pre-payment)
tiReason_IDintegerDebtor.Reason_IDInvoice Status Code
tiSalesAccountGLProfile_IDintegerDebtor.SalesAccountGLProfile_IDSales Account GL Profile
tiSalesCode_IDintegerDebtor.SalesCode_IDLink to SalesCode
tiSharedSet_IDintegerDebtor.SharedSet_IDLink to SharedSet
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.
tcVatDeliveryTypecharacterDebtor.VatDeliveryTypeTax Nature. Legacy field from the Soft Cell version of the product. This field is now replaced by the GTM tax field.
tcVatPercentageLevelcharacterDebtor.VatPercentageLevelTax Level- Possible values: None, Zero, Low, Medium, High.legacy field from the Soft Cell version of the product. This field is now replaced by the GTM tax field.
ti_sequenceintegercalculatedprimary index
tc_rowidcharactercalculated = rowid(Debtor)


Internal usage


QadFinancials
method BDebtor.ApiGetCustomFields
method BDebtor.ApiLoadDebtor