[freeside-commits] freeside/FS/FS/ClientAPI MyAccount.pm, 1.64, 1.65 Signup.pm, 1.41, 1.42

Jeff Finucane,420,, jeff at wavetail.420.am
Tue Dec 4 10:21:00 PST 2007


Update of /home/cvs/cvsroot/freeside/FS/FS/ClientAPI
In directory wavetail:/tmp/cvs-serv23022/FS/FS/ClientAPI

Modified Files:
	MyAccount.pm Signup.pm 
Log Message:
change credit reasons from freetext to new reason/reason type system (#2777)

Index: MyAccount.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/ClientAPI/MyAccount.pm,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -d -r1.64 -r1.65
--- MyAccount.pm	27 Nov 2007 02:52:33 -0000	1.64
+++ MyAccount.pm	4 Dec 2007 18:20:58 -0000	1.65
@@ -992,8 +992,11 @@
          && ( $cust_main->payby !~ /^(BILL|DCRD|DCHK)$/ ?
               1 : $status eq 'suspended' ) ) {
       #this makes sense.  credit is "un-doing" the invoice
+      my $conf = new FS::Conf;
       $cust_main->credit( sprintf("%.2f", $cust_main->balance - $old_balance ),
-                          'self-service decline' );
+                          'self-service decline',
+                          'reason_type' => $conf->config('signup_credit_type'),
+                        );
       $cust_main->apply_credits( 'order' => 'newest' );
 
       return { 'error' => '_decline', 'bill_error' => $bill_error };

Index: Signup.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/ClientAPI/Signup.pm,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -d -r1.41 -r1.42
--- Signup.pm	13 Jul 2007 23:52:21 -0000	1.41
+++ Signup.pm	4 Dec 2007 18:20:58 -0000	1.42
@@ -451,7 +451,9 @@
     if ( $cust_main->balance > 0 ) {
 
       #this makes sense.  credit is "un-doing" the invoice
-      $cust_main->credit( $cust_main->balance, 'signup server decline' );
+      $cust_main->credit( $cust_main->balance, 'signup server decline',
+                          'reason_type' => $conf->config('signup_credit_type'),
+                        );
       $cust_main->apply_credits;
 
       #should check list for errors...



More information about the freeside-commits mailing list