RT#41866: Punctuation prevented package from billing [bug fix to previous]
authorJonathan Prykop <jonathan@freeside.biz>
Mon, 25 Apr 2016 21:57:30 +0000 (16:57 -0500)
committerJonathan Prykop <jonathan@freeside.biz>
Mon, 25 Apr 2016 22:01:27 +0000 (17:01 -0500)
FS/FS/part_pkg/global_Mixin.pm

index 0281a51..e82602e 100644 (file)
@@ -21,9 +21,9 @@ sub validate_moneyn {
     return '';
   } elsif ( $$valref =~ /^\s*(\d*)(\.\d{1})\s*$/ ) {
     #handle one decimal place without barfing out
-    $$valref = ( ($1||''). ($2||''). ($3.'0') ) || 0;
+    $$valref = ( ($1||''). ($2.'0') ) || 0;
   } elsif ( $$valref =~ /^\s*(\d*)(\.\d{2})?\s*$/ ) {
-    $$valref = ( ($1||''). ($2||''). ($3||'') ) || 0;
+    $$valref = ( ($1||''). ($2||'') ) || 0;
   } else {
     return "Illegal (money) $option: ". $$valref;
   }