diff options
author | ivan <ivan> | 2012-01-11 09:31:33 +0000 |
---|---|---|
committer | ivan <ivan> | 2012-01-11 09:31:33 +0000 |
commit | ca3590aaa171f5d084367a587ab006ba9078003c (patch) | |
tree | ce22fbbd31adb214b8d665e031076f4e7b40a5de /bin/cust_main-bill_now-profile | |
parent | 2456c934a21b70f9b3b396d45d3a2681a9e500bc (diff) |
quick script to profile billing a customer
Diffstat (limited to 'bin/cust_main-bill_now-profile')
-rwxr-xr-x | bin/cust_main-bill_now-profile | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/bin/cust_main-bill_now-profile b/bin/cust_main-bill_now-profile new file mode 100755 index 0000000..b6d7597 --- /dev/null +++ b/bin/cust_main-bill_now-profile @@ -0,0 +1,30 @@ +#!/usr/bin/perl -w + +use strict; + +use DBIx::Profile; + +use FS::UID qw( adminsuidsetup ); +#use FS::Schema qw( dbdef ); +use FS::Record qw(qsearchs); +use FS::cust_main; + +my $user = shift or die &usage; +my $dbh = adminsuidsetup($user); + +my $custnum = shift or die &usage; +my $cust_main = qsearchs('cust_main', { 'custnum' => $custnum } ) + or die "unknown custnum $custnum\n"; + +$FS::cust_main::DEBUG = 3; +$cust_main->bill_and_collect( debug=>3, check_freq=>'1d' ); + +print "\n"; +print $dbh->sprintProfile; +#$dbh->printProfile; + +sub usage { + die "Usage:\n cust_main-bill_now user custnum\n"; +} + +1; |