Article ID: 115258, created on Dec 5, 2012, last review on Apr 27, 2014

  • Applies to:
  • Business Automation 5.4

Symptoms

1) TaxRegID is missing on the Account add/view/edit screen.
2) There are multiple INN (TaxPayerID) input fields in PBA online store or CP.

Cause

In the 5.4.9 version, two special account attributes were introduced for RUSSIANMARKET to handle Tax Registration ID (INN): one for individual accounts, and another for company accounts. These attributes provide value validation and unified template placeholder handling.

Follow the instructions below to migrate values from a legacy account attribute (e.g., INN) to the new standardized one.

Resolution

1.       Log in to the PBA application server via SSH.

2.       Using the following SQL to determine the number of attributes for migration, replacing legacyAttributeID with the actual ID:
-- select count(*) from "AccAttr" where  "ATID"='legacyAttributeID'
Note the number of account attributes.

3.       Download this script: http://download.pa.parallels.com/csd/5.4.9/migrate_atid.pl. Save it in the PBA installation folder.

4.       Execute the script in the PBA installation folder, provididing the legacy attribute ID as the script argument:
# ./tools/patcher.pl  migrate_to_tax_payer_id.pl <legacy attribute ID>  >migration_out.txt
Example:   #./tools/patcher.pl  migrate_to_tax_payer_id.pl INN > migration_out.txt

 
5.       After execution, make sure the attribute was successfully migrated to the new PersTaxPayerID for Personal accounts, and to CompTaxPayerID for Company accounts:
  a.       See the script output log, migration_out.txt. Make sure the number of migrated attributes is equal to the number gathered in step #2.
  b.       Open the control panel, then go to Control Panel -> Operation Director -> Customers. Select the customer and open the "Additional Information" tab, making sure the INN attribute with the correct value appears under the group “Атрибуты юридических лиц” or under “Атрибуты физических лиц.”

6.       After verification, drop the old attribute to avoid data duplication. Download this script: http://download.pa.parallels.com/csd/5.4.9/remove_legacy_taxregid.pl

7.       Execute the script in the PBA installation folder (confirm the removal when asked):
# ./tools/patcher.pl  remove_legacy_taxregid.pl <legacy attribute ID
Example:   # ./tools/patcher.pl  remove_legacy_taxregid.pl INN

8.       After migration, it is necessary to modify message templates that use the legacy attribute ID.
Find message templates that use the legacy attribute using the following SQL (use the real legacy attribute ID):

-- select "TmplName", "AccountID" from "Template" where "EmailHTML" like '%LegacyAttrID%';
 
9. Go through the list of affected Vendors (the second column of the output). Log in under the Vendor to PBA CP. Note: AccountID=0 indicates a Provider account (template not customized).

10.    For each affected template (the first column of the output), do the following (use the real attribute ID instead of LegacyAttrID):
Go to Communication Director-> Notification Manager-> Notification Templates. Edit the HTML template, replace Cust_LegacyAttrID with Cust_TaxPayerID and Vend_LegacyAttrID with Vend_TaxPayerID, and then make the same modification to the Plan Text template.

210d017ddc3a076d22f0f865b1cf0730 caea8340e2d186a540518d08602aa065 198398b282069eaf2d94a6af87dcb3ff 92711db0799e8aefe8e51f12dace0496 e12cea1d47a3125d335d68e6d4e15e07

Email subscription for changes to this article
Save as PDF