[freeside-commits] branch FREESIDE_4_BRANCH updated. dc15d03b6daa1f41d94f1e2064c3aed4d6971766

Jonathan Prykop jonathan at 420.am
Mon Apr 25 14:43:28 PDT 2016


The branch, FREESIDE_4_BRANCH has been updated
       via  dc15d03b6daa1f41d94f1e2064c3aed4d6971766 (commit)
      from  17082fbc034dac221ff1748f19a9114306a829cf (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 dc15d03b6daa1f41d94f1e2064c3aed4d6971766
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