summaryrefslogtreecommitdiff
path: root/bin/profile-bill
diff options
context:
space:
mode:
Diffstat (limited to 'bin/profile-bill')
-rwxr-xr-xbin/profile-bill25
1 files changed, 25 insertions, 0 deletions
diff --git a/bin/profile-bill b/bin/profile-bill
new file mode 100755
index 000000000..3a1bcb579
--- /dev/null
+++ b/bin/profile-bill
@@ -0,0 +1,25 @@
+#!/usr/bin/perl
+
+use strict;
+use DBIx::Profile;
+use FS::UID qw( adminsuidsetup dbh );
+use FS::Record qw(qsearchs);
+
+my $user = shift;
+adminsuidsetup( $user );
+
+my $custnum = shift;
+
+my $cust_main = qsearchs('cust_main', { 'custnum' => $custnum })
+ or die "unknown custnum $custnum";
+
+#foreach my $cust_bill ( $cust_main->open_cust_bill ) {
+# print $cust_bill->invnum. "\n";
+#}
+
+$FS::cust_main::Billing::DEBUG = 1;
+
+$cust_main->bill_and_collect();
+
+print dbh->sprintProfile, "\n";
+