add send_email event
[freeside.git] / httemplate / edit / part_bill_event.cgi
index dda0bef..0921a95 100755 (executable)
@@ -162,34 +162,34 @@ Invoice Event #<% $hashref->{eventpart} ? $hashref->{eventpart} : "(NEW)" %>
 %  },
 %  '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',
 %  },
@@ -206,6 +206,13 @@ Invoice Event #<% $hashref->{eventpart} ? $hashref->{eventpart} : "(NEW)" %>
 %    'weight' => 30,
 %  },
 %
+%  'credit' => {
+%    'name'   => "Create and apply a credit for the customer's balance (i.e. write off as bad debt)",
+%    'code'   => '$cust_main->credit( $cust_main->balance, \'%%%reason%%%\' );',
+%    'html'   => '<INPUT TYPE="text" NAME="reason" VALUE="%%%reason%%%">',
+%    'weight' => 30,
+%  },
+%
 %  'realtime-card' => {
 %    'name' => 'Run card with a <a href="http://search.cpan.org/search?mode=module&query=Business%3A%3AOnlinePayment">Business::OnlinePayment</a> realtime gateway',
 %    'code' => '$cust_bill->realtime_card();',
@@ -243,6 +250,12 @@ Invoice Event #<% $hashref->{eventpart} ? $hashref->{eventpart} : "(NEW)" %>
 %    'weight' => 50,
 %  },
 %
+%  'send_email' => {
+%    'name' => 'Send invoice (email only)',
+%    'code' => '$cust_bill->email();',
+%    'weight' => 50,
+%  },
+%
 %  'send_alternate' => {
 %    'name' => 'Send invoice (email/print/fax) with alternate template',
 %    'code' => '$cust_bill->send(\'%%%templatename%%%\');',
@@ -395,7 +408,7 @@ Invoice Event #<% $hashref->{eventpart} ? $hashref->{eventpart} : "(NEW)" %>
 %
 %  'apply' => {
 %    'name' => 'Apply unapplied payments and credits',
-%    'code' => '$cust_main->apply_payments; $cust_main->apply_credits; "";',
+%    'code' => '$cust_main->apply_payments_and_credits; "";',
 %    'weight'  => 70,
 %  },
 %