[freeside-users] fs-migrate-cust_tax_exempt not migrating the majority of entries

Ivan Kohler ivan at sisd.com
Tue May 1 13:54:42 PDT 2007


On Wed, Apr 25, 2007 at 01:04:25PM -0700, Cal wrote:
> I am running 1.7.2 migrated from 1.5.7.
> 
> When using fs-migrate-cust_tax_exempt only about 10%
> of entries are actually migrated.  
> 
> The error for the majority of failures is: 
> 
> total h_ amount 0.00 != cust_tax_exempt.amount 25.00;
>  not migrating exemption 2649 for 5/2004 (custnum
> 2632)
> 
> h_cust_tax_exempt reads:
> 	historynum 	history_date 	history_user 
> history_action 	exemptnum 	custnum 	taxnum 	year 
> month 	amount
> 	2799 	1083427245 	admin 	insert 	2649 	2632 	51 	2004
> 	5 	25.00
> 
> 
> cust_tax_exempt reads:
> exemptnum 	custnum 	taxnum 	year 	month 	amount
> 	2649 	2632 	51 	2004 	5 	25.00
> 
> h_cust_tax_exempt.amount is = cust_tax_exempt.amount
> from what I see.  

Looking at the code, the error message may be misleading.  It is not 
complaining about a mismatch on history records.

The code errors out trying to migrate this (old) cust_tax_exempt record 
to one or more (new) cust_tax_exempt_pkg record(s).  The error message 
indicates that the total of the new records inserted was 0, whereas it 
should have been equal to the amount of the old record.

> Any help as to what is causing this to fail?  We
> typically run our billing today and with this error I
> am left hanging.

Texas tax handling is significantly different in 1.7.  I would not 
anticipate any sort of quick fix.  You'll probably need to adapt the 
import script to your own data's quirks.

I recall having 50-100 site-specific rewrites in the %rewrite hash for 
the sites I migrated, and having to make some changes to the import 
script for each.

> What purpose does the cust_tax_exempt table serve? 
> Will clearing it and going forward cause problems with
> anything besides tax reports?

cust_tax_exempt was the old place tax exemption records were stored (in 
1.5).  They're now stored in cust_tax_exempt_pkg.  As far as I know, the 
only current use for this kind of tax exemption is the "texas tax" $25 
exemption.

Clearing out the old stuff in cust_tax_exempt wouldn't cause any 
problems with things besides tax reports; however, if you don't migrate 
*current* data (the exemptions applicable to this and future 
months), the system will re-exempt people for the $25 exemption and you 
will probably under-charge tax.

-- 
_ivan


More information about the freeside-users mailing list