project QadFinancials > class BDebtorReport > business logic query DebtorAllItems


Parameters


iiCompanyIdintegerCompany id
icBusinessRelationCodeFiltercharacter
icBusRelCodeFromFiltercharacter
icBusRelCodeToFiltercharacter
icDebtorCodeFiltercharacter
icDebtorCodeFromFiltercharacter
icDebtorCodeToFiltercharacter
icCurrencyCodeFiltercharacter
ilPrintReminderlogical
ilPrintStatementlogical
icBusinessRelationName1character
icAddressStreet1character
icAddressCitycharacter
ilIsActivelogical
icProfileCodeCncharacter
icProfileCodeDivcharacter
icProfileCodeInvcharacter
icPaymentCondCodeNmcharacter
icReasonCodecharacter
icBLWICodecharacter
icFederalTaxIdcharacter
icStateTaxIdcharacter


query condition


  each Debtor where
Debtor.SharedSet_Id = vi_DEBTOR_sharedset(iiCompanyId) AND
Debtor.DebtorCode can-do icDebtorCodeFilter AND
Debtor.DebtorCode >= icDebtorCodeFromFilter AND
Debtor.DebtorCode <= icDebtorCodeToFilter AND
Debtor.DebtorIsPrintReminder = ilPrintReminder AND
Debtor.DebtorIsPrintStatement = ilPrintStatement AND
Debtor.DebtorIsActive = ilIsActive AND
Debtor.DebtorTaxIDFederal can-do icFederalTaxId AND
Debtor.DebtorTaxIDState can-do icStateTaxId

      first Debtor2 (outer-join) where
Debtor2.SharedSet_Id = vi_DEBTOR_sharedset(iiCompanyId) AND
Debtor2.BillToDebtor_ID = Debtor.Debtor_ID AND

      first DebtorCreditRating (outer-join) where
DebtorCreditRating.DebtorCreditRating_ID = Debtor.DebtorCreditRating_ID AND

      first DebtorType (outer-join) where
DebtorType.DebtorType_ID = Debtor.DebtorType_ID AND

      first BLWIGroup (conditional-join) where
BLWIGroup.BLWIGroup_ID = Debtor.BLWIGroup_ID AND
BLWIGroup.BLWIGroupCode begins icBLWICode

      first BusinessRelation (inner-join) where
BusinessRelation.BusinessRelation_ID = Debtor.BusinessRelation_ID AND
BusinessRelation.BusinessRelationCode can-do icBusinessRelationCodeFilter AND
BusinessRelation.BusinessRelationCode >= icBusRelCodeFromFilter AND
BusinessRelation.BusinessRelationCode <= icBusRelCodeToFilter AND
BusinessRelation.BusinessRelationName1 can-do icBusinessRelationName1

          each Address (conditional-join) where
Address.BusinessRelation_ID = BusinessRelation.BusinessRelation_ID AND
Address.AddressCity can-do icAddressCity AND
Address.AddressStreet1 can-do icAddressStreet1 AND
Address.AddressIsTemporary = no

              first AddressType (outer-join) where
AddressType.AddressType_ID = Address.AddressType_ID AND

              first Country (conditional-join) where
Country.Country_ID = Address.Country_ID AND

              first County (outer-join) where
County.County_ID = Address.County_ID AND

              first State (outer-join) where
State.State_ID = Address.State_ID AND

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

      first PaymentCondition (inner-join) where
PaymentCondition.PaymentCondition_ID = Debtor.NormalPaymentCondition_ID AND
PaymentCondition.PaymentConditionCode can-do icPaymentCondCodeNm

      first Profile1 (conditional-join) where
Profile1.Profile_ID = Debtor.DivisionProfile_ID AND
Profile1.ProfileCode can-do icProfileCodeDiv

      first Profile2 (inner-join) where
Profile2.Profile_ID = Debtor.InvControlGLProfile_ID AND
Profile2.ProfileCode can-do icProfileCodeInv

      first Profile3 (inner-join) where
Profile3.Profile_ID = Debtor.SalesAccountGLProfile_ID AND

      first Profile4 (inner-join) where
Profile4.Profile_ID = Debtor.CnControlGLProfile_ID AND
Profile4.ProfileCode can-do icProfileCodeCn

      first Reason (inner-join) where
Reason.Reason_ID = Debtor.Reason_ID AND
Reason.ReasonCode can-do icReasonCode


query resultset tqDebtorAllItems


field namedata typedb fielddescription
tiAddress_IDintegerAddress.Address_IDRecord ID
tcAddressCitycharacterAddress.AddressCityCity. The city for this address. This field can be used to decide the tax zone of the address.
tcAddressCountycharacterAddress.AddressCountyObsolete field
tcAddressEMailcharacterAddress.AddressEMailE-Mail. This field indicates the e-mail address associated with this business relation.
This field can be blank.
tcAddressFaxcharacterAddress.AddressFaxFax. This field indicates the fax or telex number to use when sending documents to this address.
This field can be balnk.
tcAddressStreet1characterAddress.AddressStreet1Address: Line one of address details.
This field can be blank.
tcAddressStreet2characterAddress.AddressStreet2Address.Line two of address details.
This field can be blank.
tcAddressStreet3characterAddress.AddressStreet3Address.Line three of address details.
This field can be blank.
tcAddressTelephonecharacterAddress.AddressTelephoneTelephone. The telephone number for calling this business relation address.
This field can be blank.
tcAddressTypeCodecharacterAddressType.AddressTypeCodeAddress Type
tcAddressWebSitecharacterAddress.AddressWebSiteInternet. This field indicates the Web site of this business relation.
This field can be blank.
tcAddressZipcharacterAddress.AddressZipZip. The postal code or US zip code associated with this address.
This field is used to decide the tax zone for the address.
This field can be blank.
tcBLWIGroupCodecharacterBLWIGroup.BLWIGroupCodeBLWI Group Code
tiBusinessRelation_IDintegerBusinessRelation.BusinessRelation_IDRecord ID
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.
tiCountry_IDintegerCountry.Country_IDRecord ID
tcCountryCodecharacterCountry.CountryCodeCountry Code
tcCountryDescriptioncharacterCountry.CountryDescriptionDescription
tiCounty_IDintegerCounty.County_IDRecord ID
tcCountyCodecharacterCounty.CountyCodeCounty Code
tcCountyDescriptioncharacterCounty.CountyDescriptionDescription
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.
tcDebtorCode2characterDebtor2.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.
tcDebtorCreditRatingcharacterDebtorCreditRating.DebtorCreditRatingCodeA code (maximum eight characters) that identifies a customer credit 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.
tlDebtorIsFinanceChargelogicalDebtor.DebtorIsFinanceChargeIndicate whether to make this customer’s accounts liable for finance charges or not.
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.
tlDebtorIsInvoiceByAuthlogicalDebtor.DebtorIsInvoiceByAuthIndicate how invoice totals should be calculated and displayed for this customer.
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
tlDebtorIsTurnOverCredLimlogicalDebtor.DebtorIsTurnOverCredLimIndicate whether you can enter a percentage in the Percentage of Turnover field.
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.
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 .
tcDebtorStatementCyclecharacterDebtor.DebtorStatementCycleA value to indicate how often you normally print AR statements for this customer.
api annotation:Value for this field defaults to null.
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.
tiDebtorType_IDintegerDebtorType.DebtorType_IDRecord ID
tcDebtorTypeCodecharacterDebtorType.DebtorTypeCodeA code (maximum four characters) that identifies a customer type.
tcDebtorTypeDescriptioncharacterDebtorType.DebtorTypeDescriptionA brief description (maximum 40 characters) of the customer type.
tcPaymentConditionCodeNmcharacterPaymentCondition.PaymentConditionCodeCredit Terms Code
tcProfileCodeCncharacterProfile4.ProfileCodeA code (maximum 20 characters) that identifies a profile.
tcProfileCodeDivcharacterProfile1.ProfileCodeA code (maximum 20 characters) that identifies a profile.
tcProfileCodeInvcharacterProfile2.ProfileCodeA code (maximum 20 characters) that identifies a profile.
tcProfileCodeSalecharacterProfile3.ProfileCodeA code (maximum 20 characters) that identifies a profile.
tcReasonCodecharacterReason.ReasonCodeInvoice Status Code
tiState_IDintegerState.State_IDRecord ID
tcStateCodecharacterState.StateCodeState
tcStateDescriptioncharacterState.StateDescriptionDescription
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.


Internal usage


QadFinancials
method BDebtorReport.DebtorList
method BDebtorReport.DebtorMasterCard