X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fedit%2Fpart_bill_event.cgi;h=c0ff3868901b38cc4c04508953936288ce5ff374;hp=ff0e0a334b3ede6e56a0687a7e1b2cb64e0fae0b;hb=9324c64e784a866c4d615773c8ce5970cc0d6ed8;hpb=eb4ff7f73c5d4bdf74a3472448b5a195598ff4cd diff --git a/httemplate/edit/part_bill_event.cgi b/httemplate/edit/part_bill_event.cgi index ff0e0a334..c0ff38689 100755 --- a/httemplate/edit/part_bill_event.cgi +++ b/httemplate/edit/part_bill_event.cgi @@ -1,49 +1,12 @@ - -% -% -%if ( $cgi->param('eventpart') && $cgi->param('eventpart') =~ /^(\d+)$/ ) { -% $cgi->param('eventpart', $1); -%} else { -% $cgi->param('eventpart', ''); -%} -% -%my ($creason, $newcreasonT, $newcreason); -%my ($sreason, $newsreasonT, $newsreason); -% -% -%my ($query) = $cgi->keywords; -%my $action = ''; -%my $part_bill_event = ''; -%my $currentreasonclass = ''; -%if ( $cgi->param('error') ) { -% $part_bill_event = new FS::part_bill_event ( { -% map { $_, scalar($cgi->param($_)) } fields('part_bill_event') -% } ); -%} -%if ( $query && $query =~ /^(\d+)$/ ) { -% $part_bill_event ||= qsearchs('part_bill_event',{'eventpart'=>$1}); -%} else { -% $part_bill_event ||= new FS::part_bill_event {}; -%} -%$action ||= $part_bill_event->eventpart ? 'Edit' : 'Add'; -%my $hashref = $part_bill_event->hashref; -% -% - - <% include('/elements/header.html', "$action Invoice Event Definition", menubar( - 'Main Menu' => popurl(2), 'View all invoice events' => popurl(2). 'browse/part_bill_event.cgi', ) ) %> -% if ( $cgi->param('error') ) { - - Error: <% $cgi->param('error') %> -% } +<% include('/elements/error.html') %>
@@ -59,16 +22,11 @@ Invoice Event #<% $hashref->{eventpart} ? $hashref->{eventpart} : "(NEW)" %> For - {eventpart} ? '' : 'MULTIPLE SIZE=7'%>> % tie my %payby, 'Tie::IxHash', FS::payby->cust_payby2longname; % foreach my $payby ( keys %payby ) { -% - - % } - - customers @@ -120,7 +78,7 @@ Invoice Event #<% $hashref->{eventpart} ? $hashref->{eventpart} : "(NEW)" %> % join("\n", map { % '
- - +<% include('/elements/footer.html') %> + +<%init> + +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('Configuration'); + +if ( $cgi->param('eventpart') && $cgi->param('eventpart') =~ /^(\d+)$/ ) { + $cgi->param('eventpart', $1); +} else { + $cgi->param('eventpart', ''); +} + +my ($creason, $newcreasonT, $newcreason); +my ($sreason, $newsreasonT, $newsreason); + +my ($query) = $cgi->keywords; +my $action = ''; +my $part_bill_event = ''; +my $currentreasonclass = ''; +if ( $cgi->param('error') ) { + $part_bill_event = new FS::part_bill_event ( { + map { $_, scalar($cgi->param($_)) } fields('part_bill_event') + } ); +} +if ( $query && $query =~ /^(\d+)$/ ) { + $part_bill_event ||= qsearchs('part_bill_event',{'eventpart'=>$1}); +} else { + $part_bill_event ||= new FS::part_bill_event {}; +} +$action ||= $part_bill_event->eventpart ? 'Edit' : 'Add'; +my $hashref = $part_bill_event->hashref; +