X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fprocess%2Fquick-charge.cgi;h=39628cae7dd8f4a070877b5a676bc2be4b696989;hb=9d5f61a78f7cddeb65f6943f3e58326f47cc0c0b;hp=00d17c8b1c5b633c3ac4e3c85e86f0eb93dfdf49;hpb=1aecd5bf33146bf3f374341a3814960ae1d419e8;p=freeside.git diff --git a/httemplate/edit/process/quick-charge.cgi b/httemplate/edit/process/quick-charge.cgi index 00d17c8b1..39628cae7 100644 --- a/httemplate/edit/process/quick-charge.cgi +++ b/httemplate/edit/process/quick-charge.cgi @@ -1,13 +1,4 @@ -% if ( $error ) { -% $cgi->param('error', $error ); -<% $cgi->redirect($redirect) %> -% } else { -<% header(emt($message)) %> - - -% } +<% $cgi->redirect(@redirect) %> <%init> my $curuser = $FS::CurrentUser::CurrentUser; @@ -157,14 +148,27 @@ if ( $param->{'pkgnum'} =~ /^(\d+)$/ ) { #modifying an existing one-time charge } -my $redirect; +my @redirect = (); if ( $error ) { $cgi->param('error', $error ); - $redirect = $p.'quick-charge.html?'. $cgi->query_string; + @redirect = ( $p.'quick-charge.html?'. $cgi->query_string ); } elsif ( $quotation ) { - $redirect = $fsurl.'view/quotation.html?' . $quotation->quotationnum; + @redirect = ( + -uri => $fsurl.'view/quotation.html?' . $quotation->quotationnum, + -cookie => CGI::Cookie->new( -name => 'freeside_status', + -value => mt('One-time charge added to quotation'), + -expires => '+5m', + ), + ); } else { - $redirect = $fsurl.'view/cust_main.cgi?custnum=' . $cust_main->custnum . ';show=last'; + @redirect = ( + -uri => $fsurl.'view/cust_main.cgi?custnum='. $cust_main->custnum. + ';show=last', + -cookie => CGI::Cookie->new( -name => 'freeside_status', + -value => mt('One-time charge ordered'), + -expires => '+5m', + ), + ); }