project QadFinancials > class BBusinessRelation > business logic query VatNumberByIdBusRelCntryVat

Description

Get all fields based on the business relation id


Parameters


iiBusinessRelationIdinteger
iiIdentityCountryIdinteger
icIdentityCountryCodecharacter
icVatNumberIdentitycharacter
iiVatNumberIdinteger
ilVatNumberIsActivelogicalIs the vat number active or not ?


query condition


  each VatNumber where
VatNumber.BusinessRelation_ID = iiBusinessRelationId AND
VatNumber.IdentityCountry_ID = iiIdentityCountryId AND
VatNumber.VatNumberIdentity matches icVatNumberIdentity AND
VatNumber.VatNumber_ID = iiVatNumberId AND
VatNumber.VatNumberIsActive = ilVatNumberIsActive

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

      first Country1 (inner-join) where
Country1.Country_ID = VatNumber.IdentityCountry_ID AND
Country1.CountryCode matches icIdentityCountryCode

      first Country2 (inner-join) where
Country2.Country_ID = VatNumber.DeclarationCountry_ID AND


query sort order


VatNumber.BusinessRelation_ID (ascending)


query resultset tqVatNumberByIdBusRelCntryVat


field namedata typedb fielddescription
tiBusinessRelation_IDintegerVatNumber.BusinessRelation_IDLink to BusinessRelation
tcBusinessRelationAVRCodecharacterBusinessRelation.BusinessRelationAVRCodeObsolete field
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.
tiDeclarationCountry_IDintegerVatNumber.DeclarationCountry_IDCountry Tax Declaration
tcDeclarationCountryCodecharacterCountry2.CountryCodeCountry Code
tlDeclarationIsEUCountrylogicalCountry2.CountryIsEUCountryEU Member
tiIdentityCountry_IDintegerVatNumber.IdentityCountry_IDCountry Tax Identification
tcIdentityCountryCodecharacterCountry1.CountryCodeCountry Code
tlIdentityisEUCountrylogicalCountry1.CountryIsEUCountryEU Member
tiVatNumber_IDintegerVatNumber.VatNumber_IDRecord ID
tcVatNumberDeclarationcharacterVatNumber.VatNumberDeclarationObsolete field
tcVatNumberIdentitycharacterVatNumber.VatNumberIdentityObsolete field
tlVatNumberIsActivelogicalVatNumber.VatNumberIsActiveObsolete field


Internal usage


QadFinancials
method BCInvoice.ApiStdMaintainTTWithIntPost
method BDInvoice.ApiCreateDInvoicesFinCharge
method BDInvoice.ApiStdMaintainTTWithIntPost
method BDInvoice.StdMaintainTTWithIntPost
method BEmployee.ApiBusinessRelationInfo