[freeside-commits] freeside/httemplate/edit part_bill_event.cgi, 1.34, 1.35 reason.html, 1.1, 1.2

Jeff Finucane,420,, jeff at wavetail.420.am
Sun Oct 22 21:21:05 PDT 2006


Update of /home/cvs/cvsroot/freeside/httemplate/edit
In directory wavetail:/tmp/cvs-serv31107/httemplate/edit

Modified Files:
	part_bill_event.cgi reason.html 
Log Message:
events should attach reasons

Index: reason.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/reason.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- reason.html	19 Oct 2006 14:25:43 -0000	1.1
+++ reason.html	23 Oct 2006 04:21:03 -0000	1.2
@@ -9,6 +9,9 @@
 %
 % my (@types) = qsearch( 'reason_type', { 'class' => $class } );
 %
+% unless (scalar(@types)) {
+%   print $cgi->redirect( "reason_type.html?class=$class" );
+% }
 <% include( 'elements/edit.html',
                  'name'   => ucfirst($classname) . ' Reason',
                  'table'  => 'reason',

Index: part_bill_event.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/part_bill_event.cgi,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- part_bill_event.cgi	18 Oct 2006 23:07:08 -0000	1.34
+++ part_bill_event.cgi	23 Oct 2006 04:21:03 -0000	1.35
@@ -162,34 +162,34 @@
 %  },
 %  'suspend' => {
 %    'name'   => 'Suspend',
-%    'code'   => '$cust_main->suspend();',
+%    'code'   => '$cust_main->suspend(reason => %%%sreason%%%);',
 %    'weight' => 10,
 %    'reason' => 'S',
 %  },
 %  'suspend-if-balance' => {
 %    'name'   => 'Suspend if balance (this invoice and previous) over',
-%    'code'   => '$cust_bill->cust_suspend_if_balance_over( %%%balanceover%%% );',
+%    'code'   => '$cust_bill->cust_suspend_if_balance_over( %%%balanceover%%%, reason => %%%sreason%%%, );',
 %    'html'   => " $money_char ". '<INPUT TYPE="text" SIZE="7" NAME="balanceover" VALUE="%%%balanceover%%%">',
 %    'weight' => 10,
 %    'reason' => 'S',
 %  },
 %  'suspend-if-pkgpart' => {
 %    'name'   => 'Suspend packages',
-%    'code'   => '$cust_main->suspend_if_pkgpart(%%%if_pkgpart%%%);',
+%    'code'   => '$cust_main->suspend_if_pkgpart({pkgparts => [%%%if_pkgpart%%%,], reason => %%%sreason%%%,});',
 %    'html'   => sub { &select_pkgpart('if_pkgpart', @_) },
 %    'weight' => 10,
 %    'reason' => 'S',
 %  },
 %  'suspend-unless-pkgpart' => {
 %    'name'   => 'Suspend packages except',
-%    'code'   => '$cust_main->suspend_unless_pkgpart(%%%unless_pkgpart%%%);',
+%    'code'   => '$cust_main->suspend_unless_pkgpart({unless_pkgpart => [%%%unless_pkgpart%%%], reason => %%%sreason%%%,});',
 %    'html'   => sub { &select_pkgpart('unless_pkgpart', @_) },
 %    'weight' => 10,
 %    'reason' => 'S',
 %  },
 %  'cancel' => {
 %    'name'   => 'Cancel',
-%    'code'   => '$cust_main->cancel();',
+%    'code'   => '$cust_main->cancel(reason => %%%creason%%%);',
 %    'weight' => 10,
 %    'reason' => 'C',
 %  },



More information about the freeside-commits mailing list