project QadFinancials > class BDebtor > business logic query DebtorForDivision

Description

inner join to profile , so i get only those creditors where division profile is filled


Parameters


iiCompanyIdintegerCompany id
icDebtorCodecharacterCustomer Code


query condition


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

      first Profile (inner-join) where
Profile.Profile_ID = Debtor.DivisionProfile_ID AND

          each ProfileLink (inner-join) where
ProfileLink.Profile_ID = Profile.Profile_ID AND

              first Division (inner-join) where
Division.SharedSet_Id = vi_DIVISION_sharedset(iiCompanyId) AND
Division.Division_ID = ProfileLink.ProfileLinkObject_ID AND


query resultset tqDebtorForDivision


field namedata typedb fielddescription
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.
tcDivisionCodecharacterDivision.DivisionCodeSub-Account
ti_sequenceintegercalculatedprimary index
tc_rowidcharactercalculated = rowid(Debtor),rowid(Profile),rowid(ProfileLink),rowid(Division)


Internal usage


QadFinancials
method BDDocument.AdditionalUpdatesGetDebtorInfo
method BDDocument.AdditionalUpdatesPosting
method BDebtor.ApiDefaultDivCodeBasedOnProfileCode
method BDebtorFinanceCharge.ApplyFilter