X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fpart_pkg_taxproduct.pm;h=56e63b668716a31ed3ad6e66930f0906a49b17da;hp=c66fb8c901ddaa2912b29eb811e3ad9fdc0a6660;hb=aed8ec35ccb9cdeb7ea0cb6ff2946f9d83d582f6;hpb=6a24254d490f3d023728044daba0765f20f6971e diff --git a/FS/FS/part_pkg_taxproduct.pm b/FS/FS/part_pkg_taxproduct.pm index c66fb8c90..56e63b668 100644 --- a/FS/FS/part_pkg_taxproduct.pm +++ b/FS/FS/part_pkg_taxproduct.pm @@ -1,10 +1,11 @@ package FS::part_pkg_taxproduct; use strict; -use vars qw( @ISA ); +use vars qw( @ISA $delete_kludge ); use FS::Record qw( qsearch ); @ISA = qw(FS::Record); +$delete_kludge = 0; =head1 NAME @@ -85,8 +86,10 @@ sub delete { return "Can't delete a tax product which has attached package tax rates!" if qsearch( 'part_pkg_taxrate', { 'taxproductnum' => $self->taxproductnum } ); - return "Can't delete a tax product which has attached packages!" - if qsearch( 'part_pkg', { 'taxproductnum' => $self->taxproductnum } ); + unless ( $delete_kludge ) { + return "Can't delete a tax product which has attached packages!" + if qsearch( 'part_pkg', { 'taxproductnum' => $self->taxproductnum } ); + } $self->SUPER::delete(@_); }