project QadFinancials > class BDebtorReport > business logic query GetCompanyAddress


Parameters


iiCompanyIdintegerCompany id
icAddressTypeCodecharacterAddress Type
ilContactIsPrimarylogicalcontact is primary ?
icCompanyCodecharacter


query condition


  each Company where
Company.Company_Id = iiCompanyId AND
Company.CompanyCode = icCompanyCode

      each CompanyProperty (inner-join) where
CompanyProperty.Company_Id = iiCompanyId AND
CompanyProperty.Company_ID = Company.Company_ID AND

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

              each Address (inner-join) where
Address.BusinessRelation_ID = BusinessRelation.BusinessRelation_ID AND

                  first AddressType (inner-join) where
AddressType.AddressType_ID = Address.AddressType_ID AND
AddressType.AddressTypeCode = icAddressTypeCode

                  each Contact (conditional-join) where
Contact.Address_ID = Address.Address_ID AND
Contact.ContactIsPrimary = ilContactIsPrimary

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


query resultset tqGetCompanyAddress


field namedata typedb fielddescription
tcAddressCitycharacterAddress.AddressCityCity. The city for this address. This field can be used to decide the tax zone of the address.
tiAddressFormatintegerAddress.AddressFormatFormat. This field determines where postal codes display on printed addresses.
api annotation:PartialUpdate = yes - defaults to the value for the same field defined for the country.
tcAddressStreet1characterAddress.AddressStreet1Address: Line one of address details.
This field can be blank.
tcAddressTaxIDStatecharacterAddress.AddressTaxIDStateState Tax. This field is for reference and documentation purposes, the value of the field is either a state or provincial tax identification number or a VAT registration number.
tcAddressTelephonecharacterAddress.AddressTelephoneTelephone. The telephone number for calling this business relation address.
This field can be blank.
tcAddressTypeCodecharacterAddressType.AddressTypeCodeAddress Type
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.
tiCompany_IDintegerCompany.Company_IDRecord ID
tcCompanyCodecharacterCompany.CompanyCodeEntity Code
tcContactEmailcharacterContact.ContactEmailE-mail. The E-Mail address of the contact.
This field can be blank.
tcContactFunctioncharacterContact.ContactFunctionFunction. The function of the contact to the address.
This field can be blank.
tlContactIsPrimarylogicalContact.ContactIsPrimaryPrimary Contact. This field indicates if the contact is the primary contact of the address.
Only one primary contact per address type is allowed.
api annotation:PartialUpdate = yes - defaults to false
tcContactMobilePhonecharacterContact.ContactMobilePhoneMobile. The mobile phone number of the contact.
This field can be blank.
tcContactNamecharacterContact.ContactNameName. The full name of the contact.
This field is mandatory.
tcContactTelephonecharacterContact.ContactTelephoneTelephone. The telephone number of the contact.
This field can be blank.
tiState_IDintegerAddress.State_IDDescription
tcStateCodecharacterState.StateCodeState


Internal usage


QadFinancials
method BDebtorReport.DebtorAccountState
method BDebtorReport.DebtorInvoicePrint
method BDebtorReport.DebtorReminders