projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5cc1693
)
fix cch update adding a TAXCAT, RT#21687
author
Ivan Kohler
<ivan@freeside.biz>
Wed, 8 May 2013 12:09:37 +0000
(
05:09
-0700)
committer
Ivan Kohler
<ivan@freeside.biz>
Wed, 8 May 2013 12:09:37 +0000
(
05:09
-0700)
FS/FS/tax_class.pm
patch
|
blob
|
history
diff --git
a/FS/FS/tax_class.pm
b/FS/FS/tax_class.pm
index
79bb248
..
7fe1023
100644
(file)
--- a/
FS/FS/tax_class.pm
+++ b/
FS/FS/tax_class.pm
@@
-84,9
+84,6
@@
sub delete {
my $self = shift;
return "Can't delete a tax class which has package tax rates!"
my $self = shift;
return "Can't delete a tax class which has package tax rates!"
- if qsearch( 'part_pkg_taxrate', { 'taxclassnum' => $self->taxclassnum } );
-
- return "Can't delete a tax class which has package tax rates!"
if qsearch( 'part_pkg_taxrate', { 'taxclassnumtaxed' => $self->taxclassnum } );
return "Can't delete a tax class which has package tax overrides!"
if qsearch( 'part_pkg_taxrate', { 'taxclassnumtaxed' => $self->taxclassnum } );
return "Can't delete a tax class which has package tax overrides!"
@@
-113,6
+110,16
@@
sub delete {
}
}
}
}
+ foreach my $part_pkg_taxrate (
+ qsearch( 'part_pkg_taxrate', { taxclassnum=>$self->taxclassnum } )
+ ) {
+ my $error = $part_pkg_taxrate->delete;
+ if ( $error ) {
+ $dbh->rollback if $oldAutoCommit;
+ return $error;
+ }
+ }
+
my $error = $self->SUPER::delete(@_);
if ( $error ) {
$dbh->rollback if $oldAutoCommit;
my $error = $self->SUPER::delete(@_);
if ( $error ) {
$dbh->rollback if $oldAutoCommit;