diff options
| author | ivan <ivan> | 2011-09-29 05:22:15 +0000 |
|---|---|---|
| committer | ivan <ivan> | 2011-09-29 05:22:15 +0000 |
| commit | a580ec4316fff403ad71e6bf8caaea064f9c464a (patch) | |
| tree | ea890c92aad466c068756c2bd9b88b4f211b3e94 /FS | |
| parent | cbc0261db8ac2e1105e5a32d7b5dd90c4adaa720 (diff) | |
add additional debugging for failing CCH update, RT#14243
Diffstat (limited to 'FS')
| -rw-r--r-- | FS/FS/part_pkg_taxrate.pm | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/FS/FS/part_pkg_taxrate.pm b/FS/FS/part_pkg_taxrate.pm index fb1afce18..e29c3d0b4 100644 --- a/FS/FS/part_pkg_taxrate.pm +++ b/FS/FS/part_pkg_taxrate.pm @@ -292,7 +292,9 @@ sub batch_import { time_zone => 'floating', ); my $dt = $parser->parse_datetime( $hash->{'effdate'} ); - $hash->{'effdate'} = $dt ? $dt->epoch : ''; + return "Can't parse effdate ". $hash->{'effdate'}. ': '. $parser->errstr + unless $dt; + $hash->{'effdate'} = $dt->epoch; $hash->{'country'} = 'US'; # CA is available @@ -301,6 +303,13 @@ sub batch_import { if (exists($hash->{actionflag}) && $hash->{actionflag} eq 'D') { delete($hash->{actionflag}); + foreach my $intfield (qw( taxproductnum taxclassnum effdate )) { + if ( $hash->{$intfield} eq '' ) { + return "$intfield is empty in search! -- ". + join(" ", map { "$_ => *". $hash->{$_}. '*' } keys(%$hash) ); + } + } + my $part_pkg_taxrate = qsearchs('part_pkg_taxrate', $hash); unless ( $part_pkg_taxrate ) { if ( $hash->{taxproductnum} ) { |
