3 use FS::UID qw(adminsuidsetup);
6 use Date::Parse qw(str2time);
9 my $username = shift @ARGV;
13 "Usage: tax_location.upgrade [ -s START ] [ -e END ] username
15 This script creates cust_bill_pkg_tax_location and cust_tax_exempt_pkg records
16 for existing sales tax records prior to the 3.0 cust_location changes. Changes
17 will be committed immediately; back up your data and run 'make
18 install-perl-modules' and 'freeside-upgrade' before running this script.
19 START and END specify an optional range of invoice dates to upgrade.
26 $opt{s} = str2time($opt_s) if $opt_s;
27 $opt{e} = str2time($opt_e) if $opt_e;
29 adminsuidsetup($username);
30 FS::cust_bill_pkg->upgrade_tax_location(%opt);