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
iiCompanyId | integer | Company id |
icDebtorCode | character | Customer 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 name | data type | db field | description |
tcDebtorCode | character | Debtor.DebtorCode | A 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. |
tcDivisionCode | character | Division.DivisionCode | Sub-Account |
ti_sequence | integer | calculated | primary index |
tc_rowid | character | calculated | = rowid(Debtor),rowid(Profile),rowid(ProfileLink),rowid(Division) |
Internal usage
QadFinancials