[freeside-commits] branch master updated. 0a0c17589441e09243a5d1b8a27fad149118271c

Jonathan Prykop jonathan at 420.am
Mon Apr 25 14:41:47 PDT 2016


The branch, master has been updated
       via  0a0c17589441e09243a5d1b8a27fad149118271c (commit)
      from  7bdfc3beaa2c62b4df7e17effb791d75d6bcb9e4 (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 0a0c17589441e09243a5d1b8a27fad149118271c
Author: Jonathan Prykop <jonathan at freeside.biz>
Date:   Mon Apr 25 16:41:38 2016 -0500

    RT#41866: Punctuation prevented package from billing [disallow negative]

diff --git a/FS/FS/part_pkg/global_Mixin.pm b/FS/FS/part_pkg/global_Mixin.pm
index 31d178d..0281a51 100644
--- a/FS/FS/part_pkg/global_Mixin.pm
+++ b/FS/FS/part_pkg/global_Mixin.pm
@@ -19,10 +19,10 @@ sub validate_moneyn {
   my ($option, $valref) = @_;
   if ( $$valref eq '' ) {
     return '';
-  } elsif ( $$valref =~ /^\s*(\-)?\s*(\d*)(\.\d{1})\s*$/ ) {
+  } elsif ( $$valref =~ /^\s*(\d*)(\.\d{1})\s*$/ ) {
     #handle one decimal place without barfing out
     $$valref = ( ($1||''). ($2||''). ($3.'0') ) || 0;
-  } elsif ( $$valref =~ /^\s*(\-)?\s*(\d*)(\.\d{2})?\s*$/ ) {
+  } elsif ( $$valref =~ /^\s*(\d*)(\.\d{2})?\s*$/ ) {
     $$valref = ( ($1||''). ($2||''). ($3||'') ) || 0;
   } else {
     return "Illegal (money) $option: ". $$valref;

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

Summary of changes:
 FS/FS/part_pkg/global_Mixin.pm |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)




More information about the freeside-commits mailing list