[freeside-commits] freeside/FS/FS/ClientAPI MyAccount.pm, 1.53.2.8, 1.53.2.9 Signup.pm, 1.36.2.5, 1.36.2.6

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


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

Modified Files:
      Tag: FREESIDE_1_7_BRANCH
	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.53.2.8
retrieving revision 1.53.2.9
diff -u -d -r1.53.2.8 -r1.53.2.9
--- MyAccount.pm	27 Nov 2007 02:51:55 -0000	1.53.2.8
+++ MyAccount.pm	4 Dec 2007 18:19:06 -0000	1.53.2.9
@@ -941,8 +941,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.36.2.5
retrieving revision 1.36.2.6
diff -u -d -r1.36.2.5 -r1.36.2.6
--- Signup.pm	13 Jul 2007 23:52:31 -0000	1.36.2.5
+++ Signup.pm	4 Dec 2007 18:19:06 -0000	1.36.2.6
@@ -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