X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fpart_bill_event.cgi;h=c0ff3868901b38cc4c04508953936288ce5ff374;hb=3d2e1d9b5d1883f768f5a90e0dfaae7cc9a41367;hp=322ff688ea0db35289e382b530af83b5e27d793b;hpb=ff9bbd7beaa293463e0bc1a1c052a84da051e5f2;p=freeside.git diff --git a/httemplate/edit/part_bill_event.cgi b/httemplate/edit/part_bill_event.cgi index 322ff688e..c0ff38689 100755 --- a/httemplate/edit/part_bill_event.cgi +++ b/httemplate/edit/part_bill_event.cgi @@ -25,13 +25,8 @@ Invoice Event #<% $hashref->{eventpart} ? $hashref->{eventpart} : "(NEW)" %> {eventpart} ? '' : 'MULTIPLE SIZE=7'%>> % tie my %payby, 'Tie::IxHash', FS::payby->cust_payby2longname; % foreach my $payby ( keys %payby ) { -% - - payby eq $payby) ? ' SELECTED' : '' %>><% $payby{$payby} %> % } - - customers @@ -83,7 +78,7 @@ Invoice Event #<% $hashref->{eventpart} ? $hashref->{eventpart} : "(NEW)" %> % join("\n", map { % 'pkgpart} ? ' SELECTED' : '' ). -% '>'. $_->pkg. ' - '. $_->comment +% '>'. $_->pkg_comment % } qsearch('part_pkg', { 'disabled' => '' } ) ). % ''; %} @@ -101,6 +96,18 @@ Invoice Event #<% $hashref->{eventpart} ? $hashref->{eventpart} : "(NEW)" %> % ''; %} % +%sub honor_dundate { +% my $label = shift; +% my $plandata = shift; +% ''. +% 'Allow delay until dun date? '. +% qq({$label} eq "$label => 1," ? 'CHECKED' : '' ). +% '>'. +% ''. +% '' +%} +% %my $conf = new FS::Conf; %my $money_char = $conf->config('money_char') || '$'; % @@ -109,11 +116,13 @@ Invoice Event #<% $hashref->{eventpart} ? $hashref->{eventpart} : "(NEW)" %> %if ( $conf->exists('enable_taxclasses') ) { % $late_taxclass = % 'Taxclass '. -% include('/elements/select-taxclass.html', '%%%late_taxclass%%%', +% include('/elements/select-taxclass.html', +% 'curr_value' => '%%%late_taxclass%%%', % 'name' => 'late_taxclass' ); % $late_percent_taxclass = % 'Taxclass '. -% include('/elements/select-taxclass.html', '%%%late_percent_taxclass%%%', +% include('/elements/select-taxclass.html', +% 'curr_value' => '%%%late_percent_taxclass%%%', % 'name' => 'late_percent_taxclass' ); %} % @@ -140,35 +149,36 @@ Invoice Event #<% $hashref->{eventpart} ? $hashref->{eventpart} : "(NEW)" %> % }, % 'suspend' => { % 'name' => 'Suspend', -% 'code' => '$cust_main->suspend(reason => %%%sreason%%%);', +% 'code' => '$cust_main->suspend(reason => %%%sreason%%%, %%%honor_dundate%%% );', +% 'html' => sub { &honor_dundate('honor_dundate', @_) }, % '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%%%, reason => %%%sreason%%%, );', -% 'html' => " $money_char ". '', +% 'code' => '$cust_bill->cust_suspend_if_balance_over( %%%balanceover%%%, reason => %%%sreason%%%, %%%balance_honor_dundate%%% );', +% 'html' => sub { " $money_char ". ' '. &honor_dundate('balance_honor_dundate', @_) }, % 'weight' => 10, % 'reason' => 'S', % }, % 'suspend-if-pkgpart' => { % 'name' => 'Suspend packages', -% 'code' => '$cust_main->suspend_if_pkgpart({pkgparts => [%%%if_pkgpart%%%,], reason => %%%sreason%%%,});', -% 'html' => sub { &select_pkgpart('if_pkgpart', @_) }, +% 'code' => '$cust_main->suspend_if_pkgpart({pkgparts => [%%%if_pkgpart%%%,], reason => %%%sreason%%%, %%%if_pkgpart_honor_dundate%%% });', +% 'html' => sub { &select_pkgpart('if_pkgpart', @_). &honor_dundate('if_pkgpart_honor_dundate', @_) }, % 'weight' => 10, % 'reason' => 'S', % }, % 'suspend-unless-pkgpart' => { % 'name' => 'Suspend packages except', -% 'code' => '$cust_main->suspend_unless_pkgpart({unless_pkgpart => [%%%unless_pkgpart%%%], reason => %%%sreason%%%,});', -% 'html' => sub { &select_pkgpart('unless_pkgpart', @_) }, +% 'code' => '$cust_main->suspend_unless_pkgpart({unless_pkgpart => [%%%unless_pkgpart%%%], reason => %%%sreason%%%, %%%unless_pkgpart_honor_dundate%%% });', +% 'html' => sub { &select_pkgpart('unless_pkgpart', @_). &honor_dundate('unless_pkgpart_honor_dundate' => @_) }, % 'weight' => 10, % 'reason' => 'S', % }, % 'cancel' => { % 'name' => 'Cancel', % 'code' => '$cust_main->cancel(reason => %%%creason%%%);', -% 'weight' => 10, +% 'weight' => 80, #10, % 'reason' => 'C', % }, % @@ -181,7 +191,7 @@ Invoice Event #<% $hashref->{eventpart} ? $hashref->{eventpart} : "(NEW)" %> % 'comp' => { % 'name' => 'Pay invoice with a complimentary "payment"', % 'code' => '$cust_bill->comp();', -% 'weight' => 30, +% 'weight' => 90, #30, % }, % % 'credit' => { @@ -252,7 +262,11 @@ Invoice Event #<% $hashref->{eventpart} ? $hashref->{eventpart} : "(NEW)" %> % % 'send_agent' => { % 'name' => 'Send invoice (email/print/fax) ', -% 'code' => '$cust_bill->send(\'%%%agent_templatename%%%\', [ %%%agentnum%%% ], \'%%%agent_invoice_from%%%\');', +% 'code' => '$cust_bill->send( \'%%%agent_templatename%%%\', +% [ %%%agentnum%%% ], +% \'%%%agent_invoice_from%%%\', +% %%%agent_balanceover%%% +% );', % 'html' => sub { % ' % @@ -271,6 +285,13 @@ Invoice Event #<% $hashref->{eventpart} ? $hashref->{eventpart} : "(NEW)" %> % % % +% +% if balance (this invoice and previous) over +% +% +% '. $money_char. ' +% +% % '; % }, % 'weight' => 50, @@ -420,6 +441,7 @@ Invoice Event #<% $hashref->{eventpart} ? $hashref->{eventpart} : "(NEW)" %> % print ''. $html. '' if $html; % print qq!!; % print ''; +% print qq!!; %} % % if ($currentreasonclass eq 'C'){