Description |
We need conversion for customer location tax group.
Requirements:
* Create SP for Import Customer Tax Groups into customer location.
* Create a button In Imports and Conversions > Sales > After Import Tax Groups (AR-7869)
Query:
select ptcus_cus_no,
tblEMEntityLocation.strOriginLinkCustomer,
isnull(ptcus_state,'') + ' ' + isnull(ptcus_local1,'') + ' ' + ISNULL(ptcus_local2,'') as OriginTaxGroup
, tblSMTaxGroup.intTaxGroupId
, tblEMEntityLocation.intTaxGroupId
from ptcusmst
inner join tblEMEntityLocation on (ptcusmst.ptcus_cus_no) COLLATE Latin1_General_CI_AS
= (tblEMEntityLocation.strOriginLinkCustomer)
COLLATE Latin1_General_CI_AS
inner join tblARCustomer on tblARCustomer.intEntityId = tblEMEntityLocation.intEntityId
inner join tblSMTaxGroup on strTaxGroup = isnull(ptcus_state,'') + ' ' + isnull(ptcus_local1,'') + ' ' + ISNULL(ptcus_local2,'') collate Latin1_General_CI_AS
AG
select (aglcl_tax_state+ ' ' + aglcl_tax_auth_id1 + ' ' + aglcl_tax_auth_id2) as TaxGroup, aglcl_auth_id1_desc, aglcl_auth_id2_desc from aglclmst
order by TaxGroup
|