[freeside-commits] freeside/httemplate/edit/process
quick-charge.cgi, 1.2, 1.3
Ivan,,,
ivan at wavetail.420.am
Thu Oct 6 19:25:43 PDT 2005
Update of /home/cvs/cvsroot/freeside/httemplate/edit/process
In directory wavetail:/tmp/cvs-serv18249/httemplate/edit/process
Modified Files:
quick-charge.cgi
Log Message:
add require_taxclasses config flag
Index: quick-charge.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/process/quick-charge.cgi,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- quick-charge.cgi 3 Jul 2002 03:47:40 -0000 1.2
+++ quick-charge.cgi 7 Oct 2005 02:25:41 -0000 1.3
@@ -9,15 +9,24 @@
or die 'illegal amount '. $cgi->param('amount');
my $amount = $1;
-my $cust_main = qsearchs('cust_main', { 'custnum' => $custnum } )
- or die "unknown custnum $custnum";
+my( $error, $cust_main);
+if ( $cgi->param('taxclass') eq '(select)' ) {
-my $error = $cust_main->charge(
- $amount,
- $cgi->param('pkg'),
- '$'. sprintf("%.2f",$amount),
- $cgi->param('taxclass')
-);
+
+ $error = "Must select a tax class";
+} else {
+
+ my $cust_main = qsearchs('cust_main', { 'custnum' => $custnum } )
+ or die "unknown custnum $custnum";
+
+ $error = $cust_main->charge(
+ $amount,
+ $cgi->param('pkg'),
+ '$'. sprintf("%.2f",$amount),
+ $cgi->param('taxclass')
+ );
+
+}
if ($error) {
%>
More information about the freeside-commits
mailing list