project QadFinancials > class BPaymentSelectionReport > business logic query AddressByCompanyID


Parameters


iiCompanyIdintegerCompany id
iiAddressType_IDinteger


query condition


  each CompanyProperty where
CompanyProperty.Company_Id = iiCompanyId AND

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

          each Address (outer-join) where
Address.BusinessRelation_ID = BusinessRelation.BusinessRelation_ID AND
Address.AddressType_ID = iiAddressType_ID

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

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


query resultset tqAddressByCompanyID


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.
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.
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
tiState_IDintegerState.State_IDRecord ID
tcStateCodecharacterState.StateCodeState
tcStateDescriptioncharacterState.StateDescriptionDescription
ti_sequenceintegercalculatedprimary index
tc_rowidcharactercalculated = rowid(CompanyProperty),rowid(BusinessRelation),rowid(Address),rowid(Country),rowid(State)


Internal usage


QadFinancials
method BPaymentSelectionReport.Paylist
method BPaymentSelectionReport.Remittance