[freeside-commits] freeside/FS/FS part_pkg_taxrate.pm,1.7,1.8
Jeff Finucane,420,,
jeff at wavetail.420.am
Wed Mar 18 08:11:06 PDT 2009
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv1688
Modified Files:
part_pkg_taxrate.pm
Log Message:
more error information
Index: part_pkg_taxrate.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_pkg_taxrate.pm,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- part_pkg_taxrate.pm 16 Feb 2009 06:02:09 -0000 1.7
+++ part_pkg_taxrate.pm 18 Mar 2009 15:11:03 -0000 1.8
@@ -295,10 +295,18 @@
delete($hash->{actionflag});
my $part_pkg_taxrate = qsearchs('part_pkg_taxrate', $hash);
- return "Can't find part_pkg_taxrate to delete: ".
- #join(" ", map { "$_ => ". $hash->{$_} } @fields)
- join(" ", map { "$_ => *". $hash->{$_}. '*' } keys(%$hash) )
- unless $part_pkg_taxrate;
+ unless ( $part_pkg_taxrate ) {
+ if ( $hash->{taxproductnum} ) {
+ my $taxproduct =
+ qsearchs( 'part_pkg_taxproduct',
+ { 'taxproductnum' => $hash->{taxproductnum} }
+ );
+ $hash->{taxproductnum} .= ' ( '. $taxproduct->taxproduct. ' )'
+ if $taxproduct;
+ }
+ return "Can't find part_pkg_taxrate to delete: ".
+ join(" ", map { "$_ => *". $hash->{$_}. '*' } keys(%$hash) );
+ }
my $error = $part_pkg_taxrate->delete;
return $error if $error;
More information about the freeside-commits
mailing list