[freeside-commits] branch FREESIDE_3_BRANCH updated. 1bed0bfbc92a01a86069a947ee016750c334e4d0

Ivan ivan at 420.am
Wed Jan 7 14:47:55 PST 2015


The branch, FREESIDE_3_BRANCH has been updated
       via  1bed0bfbc92a01a86069a947ee016750c334e4d0 (commit)
      from  0f12bb525e362f0eb97085079c3046c4bf2f6e64 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 1bed0bfbc92a01a86069a947ee016750c334e4d0
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Wed Jan 7 14:47:53 2015 -0800

    fix one time charge costs, RT#31429, RT#32894

diff --git a/httemplate/edit/process/quick-charge.cgi b/httemplate/edit/process/quick-charge.cgi
index e87be62..6de746e 100644
--- a/httemplate/edit/process/quick-charge.cgi
+++ b/httemplate/edit/process/quick-charge.cgi
@@ -83,9 +83,11 @@ if ( $param->{'pkgnum'} =~ /^(\d+)$/ ) { #modifying an existing one-time charge
   my $amount = $1;
 
   my $setup_cost = '';
-  $param->{"setup_cost"} =~ /^\s*(\d*(?:\.?\d{1,2}))\s*$/
-    or $error .= "Illegal setup_cost " . $param->{"setup_cost"} . "  ";
-  my $setup_cost = $1;
+  if ( $param->{setup_cost} =~ /\S/ ) {
+    $param->{setup_cost} =~ /^\s*(\d*(?:\.?\d{1,2}))\s*$/
+      or $error .= "Illegal setup_cost " . $param->{setup_cost} . "  ";
+    $setup_cost = $1;
+  }
 
   my $quantity = 1;
   if ( $cgi->param('quantity') =~ /^\s*(\d+)\s*$/ ) {

-----------------------------------------------------------------------

Summary of changes:
 httemplate/edit/process/quick-charge.cgi |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)




More information about the freeside-commits mailing list