add invoice event to suspend only when greater than N amount
[freeside.git] / httemplate / edit / part_bill_event.cgi
index 64a8249..cc6bb47 100755 (executable)
@@ -94,6 +94,9 @@ sub select_agentnum {
   '</SELECT>';
 }
 
+my $conf = new FS::Conf;
+my $money_char = $conf->config('money_char');
+
 #this is pretty kludgy right here.
 tie my %events, 'Tie::IxHash',
 
@@ -110,6 +113,12 @@ tie my %events, 'Tie::IxHash',
     'code'   => '$cust_main->suspend();',
     'weight' => 10,
   },
+  'suspend' => {
+    'name'   => 'Suspend if balance (this invoice and previous) over',
+    'code'   => '$cust_bill->cust_suspend_if_balance_over( %%%balanceover%%% );',
+    'html'   => " $money_char ". '<INPUT TYPE="text" SIZE="7" NAME="balanceover" VALUE="%%%balanceover%%%">',
+    'weight' => 10,
+  },
   'suspend-if-pkgpart' => {
     'name'   => 'Suspend packages',
     'code'   => '$cust_main->suspend_if_pkgpart(%%%if_pkgpart%%%);',