freeside/FS/FS/ClientAPI MyAccount.pm,1.24,1.25

ivan ivan at pouncequick.420.am
Thu Jul 1 06:49:39 PDT 2004


Update of /home/cvs/cvsroot/freeside/FS/FS/ClientAPI
In directory pouncequick:/tmp/cvs-serv27091/FS/FS/ClientAPI

Modified Files:
	MyAccount.pm 
Log Message:
credit out self-service 

Index: MyAccount.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/ClientAPI/MyAccount.pm,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- MyAccount.pm	21 Jun 2004 12:27:43 -0000	1.24
+++ MyAccount.pm	1 Jul 2004 13:49:28 -0000	1.25
@@ -541,6 +541,11 @@
 
     if ( $cust_main->balance > $old_balance
          && $cust_main->payby !~ /^(BILL|DCRD|DCHK)$/ ) {
+      #this makes sense.  credit is "un-doing" the invoice
+      $cust_main->credit( sprintf("%.2f", $cust_main->balance - $old_balance ),
+                          'self-service decline' );
+      $cust_main->apply_credits( 'order' => 'newest' );
+
       $cust_pkg->cancel('quiet'=>1);
       return { 'error' => '_decline' };
     } else {




More information about the freeside-commits mailing list