X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Ftr-part_pkg-taxproducts.html;fp=httemplate%2Felements%2Ftr-part_pkg-taxproducts.html;h=ad464ca77b12ff62962729052157b518a1e83ac5;hb=4b1eb1861b9dce418af41b88e9b5d58342d4a3d6;hp=274dc3b48eb67b2de4f723e8332daf312095f47a;hpb=ba95860daaf6c4de2f90ef28057516bc7d44c8a0;p=freeside.git diff --git a/httemplate/elements/tr-part_pkg-taxproducts.html b/httemplate/elements/tr-part_pkg-taxproducts.html index 274dc3b48..ad464ca77 100644 --- a/httemplate/elements/tr-part_pkg-taxproducts.html +++ b/httemplate/elements/tr-part_pkg-taxproducts.html @@ -21,9 +21,12 @@ my %opt = @_; my $field = delete($opt{field}) || 'taxproductnum'; my $pkgpart = delete($opt{pkgpart}); -my $part_pkg = FS::part_pkg->by_key($pkgpart); -my %pkg_options = $part_pkg->options; -$pkg_options{'usage_taxproductnum_'} = $part_pkg->taxproductnum; +my %pkg_options; +if ($pkgpart) { + my $part_pkg = FS::part_pkg->by_key($pkgpart); + my %pkg_options = $part_pkg->options; + $pkg_options{'usage_taxproductnum_'} = $part_pkg->taxproductnum; +} my @classes = qsearch('usage_class', { 'disabled' => '' }); unshift @classes,