+# much false laziness with FS::Record::ut_money
+sub validate_moneyn {
+ my ($option, $valref) = @_;
+ if ( $$valref eq '' ) {
+ return '';
+ } elsif ( $$valref =~ /^\s*(\d*)(\.\d{1})\s*$/ ) {
+ #handle one decimal place without barfing out
+ $$valref = ( ($1||''). ($2.'0') ) || 0;
+ } elsif ( $$valref =~ /^\s*(\d*)(\.\d{2})?\s*$/ ) {
+ $$valref = ( ($1||''). ($2||'') ) || 0;
+ } else {
+ return "Illegal (money) $option: ". $$valref;
+ }
+ return '';
+}
+
+tie my %count_available_phones, 'Tie::IxHash', (
+ 0 => 'Provisioned phone services',
+ 1 => 'All available phone services',
+);
+