[freeside-commits] freeside/httemplate/view/cust_main/payment_history payment.html, 1.4, 1.5 credit.html, 1.3, 1.4 voided_payment.html, 1.1, 1.2

Ivan,,, ivan at wavetail.420.am
Wed Jul 29 23:42:35 PDT 2009


Update of /home/cvs/cvsroot/freeside/httemplate/view/cust_main/payment_history
In directory wavetail.420.am:/tmp/cvs-serv30734/httemplate/view/cust_main/payment_history

Modified Files:
	payment.html credit.html voided_payment.html 
Log Message:
experimental package balances, RT#4339

Index: voided_payment.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/cust_main/payment_history/voided_payment.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- voided_payment.html	1 Jun 2008 22:48:15 -0000	1.1
+++ voided_payment.html	30 Jul 2009 06:42:33 -0000	1.2
@@ -18,6 +18,11 @@
 $payby =~ s/^(CARD|COMP)$/$1 /;
 my $info = $payby ? " ($payby$payinfo)" : '';
 
+if ( $opt{'pkg-balances'} && $cust_pay_void->pkgnum ) {
+  my $cust_pkg = qsearchs('cust_pkg', { 'pkgnum' => $cust_pay_void->pkgnum } );
+  $info .= ' for '. $cust_pkg->pkg_label_long;
+}
+
 my $unvoid = '';
 if ( $cust_pay_void->closed !~ /^Y/i
      && $curuser->access_right('Unvoid')

Index: payment.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/cust_main/payment_history/payment.html,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- payment.html	7 Feb 2009 08:23:10 -0000	1.4
+++ payment.html	30 Jul 2009 06:42:32 -0000	1.5
@@ -32,7 +32,13 @@
 $payby =~ s/^BILL$//;
 my $info = $payby ? "($payby$payinfo)" : '';
 
-my( $pre, $post, $desc, $apply, $ext ) = ( '', '', '', '', '' );
+my $desc = '';
+if ( $opt{'pkg-balances'} && $cust_pay->pkgnum ) {
+  my $cust_pkg = qsearchs('cust_pkg', { 'pkgnum' => $cust_pay->pkgnum } );
+  $desc .= ' for '. $cust_pkg->pkg_label_long;
+}
+
+my( $pre, $post, $apply, $ext ) = ( '', '', '', '' );
 if (    scalar(@cust_bill_pay)   == 0
      && scalar(@cust_pay_refund) == 0 ) {
   #completely unapplied
@@ -68,15 +74,15 @@
           && scalar(@cust_pay_refund) == 0
           && $cust_pay->unapplied == 0     ) {
   #applied to one invoice, the usual situation
-  $desc = ' '. $cust_bill_pay[0]->applied_to_invoice;
+  $desc .= ' '. $cust_bill_pay[0]->applied_to_invoice;
 } elsif (    scalar(@cust_bill_pay)   == 0
           && scalar(@cust_pay_refund) == 1
           && $cust_pay->unapplied == 0     ) {
   #applied to one refund
-  $desc = ' refunded on '. time2str("%D", $cust_pay_refund[0]->_date);
+  $desc .= ' refunded on '. time2str("%D", $cust_pay_refund[0]->_date);
 } else {
   #complicated
-  $desc = '<BR>';
+  $desc .= '<BR>';
   foreach my $app ( sort { $a->_date <=> $b->_date }
                          ( @cust_bill_pay, @cust_pay_refund ) ) {
     if ( $app->isa('FS::cust_bill_pay') ) {

Index: credit.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/cust_main/payment_history/credit.html,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- credit.html	5 Oct 2008 06:07:36 -0000	1.3
+++ credit.html	30 Jul 2009 06:42:33 -0000	1.4
@@ -9,7 +9,13 @@
 my @cust_credit_bill = $cust_credit->cust_credit_bill;
 my @cust_credit_refund = $cust_credit->cust_credit_refund;
 
-my( $pre, $post, $desc, $apply, $ext ) = ( '', '', '', '', '' );
+my $desc = '';
+if ( $opt{'pkg-balances'} && $cust_credit->pkgnum ) {
+  my $cust_pkg = qsearchs('cust_pkg', { 'pkgnum' => $cust_credit->pkgnum } );
+  $desc .= ' for '. $cust_pkg->pkg_label_long;
+}
+
+my( $pre, $post, $apply, $ext ) = ( '', '', '', '' );
 if (    scalar(@cust_credit_bill)   == 0
      && scalar(@cust_credit_refund) == 0 ) {
   #completely unapplied
@@ -45,15 +51,15 @@
           && scalar(@cust_credit_refund) == 0
           && $cust_credit->credited == 0      ) {
   #applied to one invoice, the usual situation
-  $desc = ' '. $cust_credit_bill[0]->applied_to_invoice;
+  $desc .= ' '. $cust_credit_bill[0]->applied_to_invoice;
 } elsif (    scalar(@cust_credit_bill)   == 0
           && scalar(@cust_credit_refund) == 1
           && $cust_credit->credited == 0      ) {
   #applied to one refund
-  $desc = ' refunded on '.  time2str("%D", $cust_credit_refund[0]->_date);
+  $desc .= ' refunded on '.  time2str("%D", $cust_credit_refund[0]->_date);
 } else {
   #complicated
-  $desc = '<BR>';
+  $desc .= '<BR>';
   foreach my $app ( sort { $a->_date <=> $b->_date }
                          ( @cust_credit_bill, @cust_credit_refund ) ) {
     if ( $app->isa('FS::cust_credit_bill') ) {



More information about the freeside-commits mailing list