From d7977d0a346e3e5975c44a75b915bb437be66f4f Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 5 Jun 2008 05:06:36 +0000 Subject: payment and credit applications have separate "apply to refund" choices now, and no auto-refund choice in the invoice dropdown. RT#3545 --- FS/FS/cust_pay.pm | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'FS') diff --git a/FS/FS/cust_pay.pm b/FS/FS/cust_pay.pm index 156887097..08699acd1 100644 --- a/FS/FS/cust_pay.pm +++ b/FS/FS/cust_pay.pm @@ -21,7 +21,7 @@ use FS::cust_pay_void; @ISA = qw( FS::payinfo_transaction_Mixin FS::cust_main_Mixin FS::Record ); -$DEBUG = 0; +$DEBUG = 1; $me = '[FS::cust_pay]'; @@ -550,6 +550,17 @@ sub unrefunded { sprintf("%.2f", $amount ); } +=item amount + +Returns the "paid" field. + +=cut + +sub amount { + my $self = shift; + $self->paid(); +} + =back =head1 CLASS METHODS @@ -602,7 +613,8 @@ sub _upgrade_data { #class method my $sth = dbh->prepare($count_sql) or die dbh->errstr; $sth->execute or die $sth->errstr; my $total = $sth->fetchrow_arrayref->[0]; - + #warn "$total cust_pay records to update\n" + # if $DEBUG; local($DEBUG) = 2 if $total > 1000; #could be a while, force progress info my $count = 0; @@ -629,7 +641,7 @@ sub _upgrade_data { #class method my $error = $cust_pay->replace; if ( $error ) { - warn " *** WARNING: Error updaating order taker for payment paynum". + warn " *** WARNING: Error updating order taker for payment paynum ". $cust_pay->paynun. ": $error\n"; next; } -- cgit v1.2.1