From fafdaeca1af0771cefd8f6707b0f75ee8a33f03a Mon Sep 17 00:00:00 2001 From: jeff Date: Fri, 18 Dec 2009 18:20:36 +0000 Subject: [PATCH] fix handling of tax location records and add a 'clear' button for tax credits --- FS/FS/cust_bill_pkg_tax_location.pm | 5 +++- FS/FS/cust_bill_pkg_tax_rate_location.pm | 6 ++++- httemplate/edit/elements/ApplicationCommon.html | 35 +++++++++++++++++++++++-- httemplate/misc/xmlhttp-calculate_taxes.html | 1 + 4 files changed, 43 insertions(+), 4 deletions(-) diff --git a/FS/FS/cust_bill_pkg_tax_location.pm b/FS/FS/cust_bill_pkg_tax_location.pm index 0d3bd3a32..120a2d036 100644 --- a/FS/FS/cust_bill_pkg_tax_location.pm +++ b/FS/FS/cust_bill_pkg_tax_location.pm @@ -161,7 +161,10 @@ sub desc { map { $cust_location->$_ } qw( state county city ) # country? ); - $self->cust_bill_pkg->desc. " ($location)"; + my $cust_bill_pkg_desc = $self->billpkgnum + ? $self->cust_bill_pkg->desc + : $self->cust_bill_pkg_desc; + "$cust_bill_pkg_desc ($location)"; } =item owed diff --git a/FS/FS/cust_bill_pkg_tax_rate_location.pm b/FS/FS/cust_bill_pkg_tax_rate_location.pm index 89c252978..39b2bb95a 100644 --- a/FS/FS/cust_bill_pkg_tax_rate_location.pm +++ b/FS/FS/cust_bill_pkg_tax_rate_location.pm @@ -165,7 +165,11 @@ sub desc { ); $location .= ( $location && $self->locationtaxid ) ? ', ' : ''; $location .= $self->locationtaxid; - $self->cust_bill_pkg->desc. " ($location)"; + my $cust_bill_pkg_desc = $self->billpkgnum + ? $self->cust_bill_pkg->desc + : $self->cust_bill_pkg_desc; + "$cust_bill_pkg_desc ($location)"; + } diff --git a/httemplate/edit/elements/ApplicationCommon.html b/httemplate/edit/elements/ApplicationCommon.html index 08e1d46e6..ba352fdfb 100644 --- a/httemplate/edit/elements/ApplicationCommon.html +++ b/httemplate/edit/elements/ApplicationCommon.html @@ -86,6 +86,20 @@ Examples: