[freeside-commits] freeside/httemplate/edit/process prepay_credit.cgi, 1.7, 1.8
Ivan,,,
ivan at wavetail.420.am
Tue Feb 19 18:07:04 PST 2008
Update of /home/cvs/cvsroot/freeside/httemplate/edit/process
In directory wavetail.420.am:/tmp/cvs-serv21322/httemplate/edit/process
Modified Files:
prepay_credit.cgi
Log Message:
retry collisions a bit, acme is getting duplicate errors... guess they're using lots and lots of prepaid cards. closes: RT#3104
Index: prepay_credit.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/process/prepay_credit.cgi,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- prepay_credit.cgi 13 Jan 2008 21:35:53 -0000 1.7
+++ prepay_credit.cgi 20 Feb 2008 02:07:02 -0000 1.8
@@ -1,41 +1,9 @@
-%
-%my $hashref = {};
-%
-%my $agent = '';
-%if ( $cgi->param('agentnum') =~ /^(\d+)$/ ) {
-% $agent = qsearchs('agent', { 'agentnum' => $hashref->{agentnum}=$1 } );
-%}
-%
-%my $error = '';
-%
-%my $num = 0;
-%if ( $cgi->param('num') =~ /^\s*(\d+)\s*$/ ) {
-% $num = $1;
-%} else {
-% $error = 'Illegal number of prepaid cards: '. $cgi->param('num');
-%}
-%
-%$hashref->{amount} = $cgi->param('amount');
-%$hashref->{seconds} = $cgi->param('seconds') * $cgi->param('multiplier');
-%$hashref->{upbytes} = $cgi->param('upbytes') * $cgi->param('upmultiplier');
-%$hashref->{downbytes} = $cgi->param('downbytes') * $cgi->param('downmultiplier');
-%$hashref->{totalbytes} = $cgi->param('totalbytes') * $cgi->param('totalmultiplier');
-%
-%$error ||= FS::prepay_credit::generate( $num,
-% scalar($cgi->param('type')),
-% $hashref
-% );
-%
%unless ( ref($error) ) {
% $cgi->param('error', $error );
-%
-<%
- $cgi->redirect(popurl(3). "edit/prepay_credit.cgi?". $cgi->query_string )
-%>
+<% $cgi->redirect(popurl(3). "edit/prepay_credit.cgi?". $cgi->query_string ) %>
% } else {
-
-<% include("/elements/header.html", "$num prepaid cards generated".
+<% include('/elements/header.html', "$num prepaid cards generated".
( $agent ? ' for '.$agent->agent : '' )
)
%>
@@ -54,14 +22,41 @@
<br>
% }
-
</FONT>
-</BODY></HTML>
+<% include('/elements/footer.html') %>
+
% }
<%init>
die "access denied"
unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
+my $hashref = {};
+
+my $agent = '';
+if ( $cgi->param('agentnum') =~ /^(\d+)$/ ) {
+ $agent = qsearchs('agent', { 'agentnum' => $hashref->{agentnum}=$1 } );
+}
+
+my $error = '';
+
+my $num = 0;
+if ( $cgi->param('num') =~ /^\s*(\d+)\s*$/ ) {
+ $num = $1;
+} else {
+ $error = 'Illegal number of prepaid cards: '. $cgi->param('num');
+}
+
+$hashref->{amount} = $cgi->param('amount');
+$hashref->{seconds} = $cgi->param('seconds') * $cgi->param('multiplier');
+$hashref->{upbytes} = $cgi->param('upbytes') * $cgi->param('upmultiplier');
+$hashref->{downbytes} = $cgi->param('downbytes') * $cgi->param('downmultiplier');
+$hashref->{totalbytes} = $cgi->param('totalbytes') * $cgi->param('totalmultiplier');
+
+$error ||= FS::prepay_credit::generate( $num,
+ scalar($cgi->param('type')),
+ $hashref
+ );
+
</%init>
More information about the freeside-commits
mailing list