project QadFinancials > class BBox1099Report > business logic query CompanyWithTaxRep


Parameters


iiCompanyIdintegerCompany id


query condition


  each Company where
Company.Company_Id = iiCompanyId AND

      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
BusinessRelation.BusinessRelationIsTaxRep = YES

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

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


query resultset tqCompanyWithTaxRep


field namedata typedb fielddescription
tcAddressTaxIDFederalcharacterAddress.AddressTaxIDFederalFederal Tax. The value of this filed is the tax ID assigned to this address by the federal or national government.
If Tax Report is true, the Federal tax ID must be unique; otherwise, related business relations can share an ID.
tiCompany_IDintegerCompany.Company_IDRecord ID
tcCompanyCodecharacterCompany.CompanyCodeEntity Code
tcAddressTypeCodecharacterAddressType.AddressTypeCodeAddress Type


Internal usage


QadFinancials
method BBox1099Report.M1099MiscReport