[freeside-commits] freeside/FS/FS tax_rate.pm,1.44,1.45
Ivan,,,
ivan at wavetail.420.am
Thu Dec 2 11:04:00 PST 2010
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv20214
Modified Files:
tax_rate.pm
Log Message:
count locations as accounts for cch taxation only when tax-pkg_address is on
Index: tax_rate.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/tax_rate.pm,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -w -d -r1.44 -r1.45
--- tax_rate.pm 27 Nov 2010 23:53:54 -0000 1.44
+++ tax_rate.pm 2 Dec 2010 19:03:58 -0000 1.45
@@ -18,6 +18,7 @@
use DBIx::DBSchema::Table;
use DBIx::DBSchema::Column;
use FS::Record qw( qsearch qsearchs dbh dbdef );
+use FS::Conf;
use FS::tax_class;
use FS::cust_bill_pkg;
use FS::cust_tax_location;
@@ -455,13 +456,18 @@
return $self->_fatal_or_null( 'fee with minute unit type' );
} elsif ($self->unittype == 2) { #account
- #$taxable_units = 1;
+
+ my $conf = new FS::Conf;
+ if ( $conf->exists('tax-pkg_address') ) {
#number of distinct locations
my %seen = ();
foreach (@cust_bill_pkg) {
$taxable_units++
unless $seen{$_->cust_pkg->locationnum}++;
}
+ } else {
+ $taxable_units = 1;
+ }
} else {
return $self->_fatal_or_null( 'unknown unit type in tax'. $self->taxnum );
More information about the freeside-commits
mailing list