[freeside-commits] freeside/FS/FS part_pkg_taxrate.pm, 1.12, 1.12.4.1
Ivan,,,
ivan at wavetail.420.am
Wed Sep 28 22:22:21 PDT 2011
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv24569
Modified Files:
Tag: FREESIDE_2_1_BRANCH
part_pkg_taxrate.pm
Log Message:
add additional debugging for failing CCH update, RT#14243
Index: part_pkg_taxrate.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_pkg_taxrate.pm,v
retrieving revision 1.12
retrieving revision 1.12.4.1
diff -u -w -d -r1.12 -r1.12.4.1
--- part_pkg_taxrate.pm 5 Jun 2010 05:51:37 -0000 1.12
+++ part_pkg_taxrate.pm 29 Sep 2011 05:22:19 -0000 1.12.4.1
@@ -292,7 +292,9 @@
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 @@
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} ) {
More information about the freeside-commits
mailing list