project QadFinancials > class BBusinessRelation > business logic query AddressForDebtor

Description

This query returns address info and business relation name by sevral address paramenters for debtor.


Parameters


icAddressTypeCodecharacter
iiCompanyIdintegerCompany id
icAddressNamecharacter
icAddressSearchNamecharacter
icAddressLinecharacter
icAddressCitycharacter
icAddressZipcharacter
icAddressCountrycharacter
icBusinessRelationName1character


query condition


  each Address where
Address.AddressName = icAddressName AND
Address.AddressSearchName = icAddressSearchName AND
Address.AddressCity = icAddressCity AND
Address.AddressZip = icAddressZip AND
Address.AddressStreet1 = icAddressLine

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

      first BusinessRelation (inner-join) where
BusinessRelation.BusinessRelation_ID = Address.BusinessRelation_ID AND
BusinessRelation.BusinessRelationName1 = icBusinessRelationName1

          each Debtor (inner-join) where
Debtor.SharedSet_Id = vi_DEBTOR_sharedset(iiCompanyId) AND
Debtor.BusinessRelation_ID = BusinessRelation.BusinessRelation_ID AND

      first Country (inner-join) where
Country.Country_ID = Address.Country_ID AND
Country.CountryCode = icAddressCountry


query resultset tqAddressForDebtor


field namedata typedb fielddescription
tcAddressNamecharacterAddress.AddressNameName. The full name of this particular address.
The name of a headoffice address is the same as the name of the business relationship and can not be modified.
api annotation:PartialUpdate = yes - defaults to the name of the businessRelation.
tcAddressSearchNamecharacterAddress.AddressSearchNameSearch Name. An alternate name for finding this address.
The searchname of a headoffice address is the same as the business relationship and can not be modified.
api annotation:PartialUpdate = yes - defaults to the searchname of the businessRelation.
tiAddressType_IDintegerAddress.AddressType_IDAddress Type
tiBusinessRelation_IDintegerBusinessRelation.BusinessRelation_IDRecord ID
tiDebtor_IDintegerDebtor.Debtor_IDRecord ID
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.


Internal usage


QadFinancials
method BBankImportLine.GetDebtorByBankImpLine
dataset BBankImportLine.tAddressForDebtor