diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/generate-table-module | 4 | ||||
-rwxr-xr-x | bin/standardize-locations | 25 | ||||
-rwxr-xr-x[-rw-r--r--] | bin/test-event | 5 |
3 files changed, 31 insertions, 3 deletions
diff --git a/bin/generate-table-module b/bin/generate-table-module index b536360c5..37a581200 100755 --- a/bin/generate-table-module +++ b/bin/generate-table-module @@ -95,10 +95,10 @@ close TEST; # add them to MANIFEST ### -#system('cvs edit FS/MANIFEST'); - open(MANIFEST,">>FS/MANIFEST") or die $!; print MANIFEST "FS/$table.pm\n", "t/$table.t\n"; close MANIFEST; +system("git add FS/FS/$table.pm FS/t/$table.t"); + diff --git a/bin/standardize-locations b/bin/standardize-locations new file mode 100755 index 000000000..6e5fd3c16 --- /dev/null +++ b/bin/standardize-locations @@ -0,0 +1,25 @@ +#!/usr/bin/perl -w + +use strict; +use FS::UID 'adminsuidsetup'; +use FS::Conf; +use FS::queue; + +my $user = shift or die "usage:\n standardize-locations user"; +adminsuidsetup($user); +my $conf = FS::Conf->new; +my $method = $conf->config('address_standardize_method') + or die "No address standardization method configured.\n"; +if ($method eq 'usps') { + # we're not supposed to do this + # (allow it anyway with a warning?) + die "USPS standardization does not allow batch processing.\n"; +} +my $job = FS::queue->new({ + job => 'FS::cust_location::process_standardize' +}); +my $error = $job->insert('_JOB'); +die $error if $error; +print "Address standardization job scheduled.\n"; + +1; diff --git a/bin/test-event b/bin/test-event index d3a9f110d..73c9d31ec 100644..100755 --- a/bin/test-event +++ b/bin/test-event @@ -34,7 +34,10 @@ print "\n"; my @conditions = $part_event->part_event_condition; foreach my $condition ( @conditions ) { - my $sat = $condition->condition( $object, 'cust_event' => $cust_event ); + my $sat = $condition->condition( $object, + 'cust_event' => $cust_event, + 'time' => time, + ); my $sql = $condition->condition_sql(); |