X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fmisc%2Fsend-invoice.cgi;h=dea081020ed46b1abfb5a7e01ee90559c7eaff7c;hp=dd9c3ade251d32b77f234778ee750b89febaacc1;hb=3f2a7b01b59902faed5767d81e2959e131bdbdfd;hpb=ac03ad840f625e48ed939ff93a28a12a9a78b1a5 diff --git a/httemplate/misc/send-invoice.cgi b/httemplate/misc/send-invoice.cgi index dd9c3ade2..dea081020 100644 --- a/httemplate/misc/send-invoice.cgi +++ b/httemplate/misc/send-invoice.cgi @@ -1,4 +1,12 @@ -% if ( $error ) { +% if ($cgi->param('popup')) { +% my $title = $error ? 'Error sending invoice email' : 'Invoice email sent'; +<% include('/elements/header-popup.html', $title ) %> +
+<% $error %>
+ +
+<% include('/elements/footer.html') %> +% } elsif ( $error ) { % errorpage($error); % } else { <% $cgi->redirect("${p}view/cust_main.cgi?$custnum") %> @@ -17,6 +25,7 @@ my $invnum = $cgi->param('invnum'); my $template = $cgi->param('template'); my $notice_name = $cgi->param('notice_name') if $cgi->param('notice_name'); my $method = $cgi->param('method'); +my $no_coupon = $cgi->param('no_coupon'); my $mode; if ( $cgi->param('mode') =~ /^(\d+)$/ ) { $mode = $1; @@ -34,6 +43,7 @@ $cust_bill->set('mode' => $mode) if $mode; #these methods die instead of return errors, so, handle that without a backtrace eval { $cust_bill->$method({ 'template' => $template, 'notice_name' => $notice_name, + 'no_coupon' => $no_coupon, }); }; my $error = $@;