4 use FS::UID qw(adminsuidsetup);
5 use FS::Record qw(qsearch);
9 my $user = shift or die &usage;
10 my $dbh = adminsuidsetup $user;
12 #local $FS::UID::AutoCommit = 0; #quelle hack, in this case
13 # $FS::UID::AutoCommit = 0; #quelle hack, in this case
15 # apply payments to invoices
17 foreach my $cust_pay ( qsearch('cust_pay', {} ) ) {
18 my $error = $cust_pay->upgrade_replace;
19 warn $error if $error;
22 # apply refunds to credits
24 foreach my $cust_refund ( qsearch('cust_refund') ) {
25 my $error = $cust_refund->upgrade_replace;
26 warn $error if $error;
29 # ? apply credits to invoices