RT#34237: installer scheduling [SetOwner not necessarily a Steal]
[freeside.git] / bin / profile-bill
1 #!/usr/bin/perl
2
3 use strict;
4 use DBIx::Profile;
5 use FS::UID qw( adminsuidsetup dbh );
6 use FS::Record qw(qsearchs);
7
8 my $user = shift;
9 adminsuidsetup( $user );
10
11 my $custnum = shift;
12
13 my $cust_main = qsearchs('cust_main', { 'custnum' => $custnum })
14   or die "unknown custnum $custnum";
15
16 #foreach my $cust_bill ( $cust_main->open_cust_bill ) {
17 #  print $cust_bill->invnum. "\n";
18 #}
19
20 $FS::cust_main::Billing::DEBUG = 1;
21
22 $cust_main->bill_and_collect();
23
24 print dbh->sprintProfile, "\n";
25