summaryrefslogtreecommitdiff
path: root/FS/FS/cust_main_county.pm
diff options
context:
space:
mode:
authorivan <ivan>2009-01-18 23:43:40 +0000
committerivan <ivan>2009-01-18 23:43:40 +0000
commit6397a30ca9f53c90a503da8786925ec75535a699 (patch)
tree0056fe6e195f5a621d46616e75fd57ad55e8c579 /FS/FS/cust_main_county.pm
parenta5b4bfc7728cf3014106806b729d2390045c71a6 (diff)
finish package location tax reporing, RT#4499
Diffstat (limited to 'FS/FS/cust_main_county.pm')
-rw-r--r--FS/FS/cust_main_county.pm28
1 files changed, 11 insertions, 17 deletions
diff --git a/FS/FS/cust_main_county.pm b/FS/FS/cust_main_county.pm
index edf57ab..bb60abb 100644
--- a/FS/FS/cust_main_county.pm
+++ b/FS/FS/cust_main_county.pm
@@ -198,29 +198,18 @@ sub _list_sql {
map $_->[0], @{ $sth->fetchall_arrayref };
}
-=item taxline TAXABLES, [ OPTIONSHASH ]
+=item taxline TAXABLES_ARRAYREF, [ OPTION => VALUE ... ]
Returns a listref of a name and an amount of tax calculated for the list of
-packages or amounts referenced by TAXABLES. Returns a scalar error message
-on error.
+packages or amounts referenced by TAXABLES_ARRAYREF. Returns a scalar error
+message on error.
-OPTIONSHASH includes custnum and invoice_date and are hints to this method
+Options include custnum and invoice_date and are hints to this method
=cut
sub taxline {
- my $self = shift;
-
- my $taxables;
- my %opt = ();
-
- if (ref($_[0]) eq 'ARRAY') {
- $taxables = shift;
- %opt = @_;
- }else{
- $taxables = [ @_ ];
- # exemptions broken in this case
- }
+ my( $self, $taxables, %opt ) = @_;
my @exemptions = ();
push @exemptions, @{ $_->_cust_tax_exempt_pkg }
@@ -362,7 +351,12 @@ sub taxline {
}
$dbh->commit or die $dbh->errstr if $oldAutoCommit;
- return [ $name, $amount ]
+
+ return {
+ 'name' => $name,
+ 'amount' => $amount,
+ };
+
}
=back