projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5422bc1
)
RT#41866: Punctuation prevented package from billing [disallow negative]
author
Jonathan Prykop
<jonathan@freeside.biz>
Mon, 25 Apr 2016 21:41:38 +0000
(16:41 -0500)
committer
Jonathan Prykop
<jonathan@freeside.biz>
Mon, 25 Apr 2016 21:45:49 +0000
(16:45 -0500)
FS/FS/part_pkg/global_Mixin.pm
patch
|
blob
|
history
diff --git
a/FS/FS/part_pkg/global_Mixin.pm
b/FS/FS/part_pkg/global_Mixin.pm
index
31d178d
..
0281a51
100644
(file)
--- 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 '';
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;
#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;
$$valref = ( ($1||''). ($2||''). ($3||'') ) || 0;
} else {
return "Illegal (money) $option: ". $$valref;