project QadFinancials > class BCashBoxReport > business logic query BusinessRelationByCompanyID


Parameters


iiCompanyIdintegerCompany id
icAddressTypecharacter


query condition


  each CompanyProperty where
CompanyProperty.Company_ID = iiCompanyId

      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 = icAddressType


query resultset tqBusinessRelationByCompanyID


field namedata typedb fielddescription
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_IDintegerAddress.Country_IDCountry Format
tcAddressCitycharacterAddress.AddressCityCity. The city for this address. This field can be used to decide the tax zone of the address.
tcAddressCountycharacterAddress.AddressCountyObsolete field
tcAddressStreet1characterAddress.AddressStreet1Address: Line one of address details.
This field can be blank.
tcAddressStreet2characterAddress.AddressStreet2Address.Line two of address details.
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.
ti_sequenceintegercalculatedprimary index
tc_rowidcharactercalculated = rowid(CompanyProperty),rowid(BusinessRelation),rowid(Address),rowid(AddressType)


Internal usage


QadFinancials
method BCashBoxReport.CashPaid
method BCashBoxReport.CashReceived