diff options
author | ivan <ivan> | 2009-08-19 21:27:16 +0000 |
---|---|---|
committer | ivan <ivan> | 2009-08-19 21:27:16 +0000 |
commit | 5470df9cd0062a366aaf8ff7d1e66cf6fac60311 (patch) | |
tree | 30b4d0debf74185a93b36f223f93ff31d6d61206 | |
parent | 6884c9a9d164124a188c1653ba63b71a416c38b3 (diff) |
add option to disable late fee taxes
-rw-r--r-- | FS/FS/part_event/Action/cust_bill_fee_percent.pm | 12 | ||||
-rw-r--r-- | FS/FS/part_event/Action/fee.pm | 8 | ||||
-rw-r--r-- | FS/FS/part_event/Action/pkg_referral_credit_pkg.pm | 1 |
3 files changed, 15 insertions, 6 deletions
diff --git a/FS/FS/part_event/Action/cust_bill_fee_percent.pm b/FS/FS/part_event/Action/cust_bill_fee_percent.pm index 9206c6a33..c85339398 100644 --- a/FS/FS/part_event/Action/cust_bill_fee_percent.pm +++ b/FS/FS/part_event/Action/cust_bill_fee_percent.pm @@ -16,7 +16,10 @@ sub option_fields { 'percent' => { label=>'Percent', size=>2, }, 'reason' => 'Reason', 'taxclass' => { label=>'Tax class', type=>'select-taxclass', }, - 'nextbill' => { label=>'Hold late fee until next invoice', type=>'checkbox', value=>'Y' }, + 'nextbill' => { label=>'Hold late fee until next invoice', + type=>'checkbox', value=>'Y' }, + 'setuptax' => { label=>'Late fee is tax exempt', + type=>'checkbox', value=>'Y' }, ); } @@ -32,9 +35,10 @@ sub do_action { sprintf('%.2f', $cust_bill->owed * $self->option('percent') / 100 ); my %charge = ( - 'amount' => $amount, - 'pkg' => $self->option('reason'), - 'taxclass' => $self->option('taxclass'), + 'amount' => $amount, + 'pkg' => $self->option('reason'), + 'taxclass' => $self->option('taxclass'), + 'setuptax' => $self->option('setuptax'), ); $charge{'start_date'} = $cust_main->next_bill_date #unless its more than N months away? diff --git a/FS/FS/part_event/Action/fee.pm b/FS/FS/part_event/Action/fee.pm index 6450225a2..c700301e2 100644 --- a/FS/FS/part_event/Action/fee.pm +++ b/FS/FS/part_event/Action/fee.pm @@ -12,7 +12,10 @@ sub option_fields { 'charge' => { label=>'Amount', type=>'money', }, # size=>7, }, 'reason' => 'Reason', 'taxclass' => { label=>'Tax class', type=>'select-taxclass', }, - 'nextbill' => { label=>'Hold late fee until next invoice', type=>'checkbox', value=>'Y' }, + 'nextbill' => { label=>'Hold late fee until next invoice', + type=>'checkbox', value=>'Y' }, + 'setuptax' => { label=>'Late fee is tax exempt', + type=>'checkbox', value=>'Y' }, ); } @@ -26,7 +29,8 @@ sub do_action { my %charge = ( 'amount' => $self->option('charge'), 'pkg' => $self->option('reason'), - 'taxclass' => $self->option('taxclass') + 'taxclass' => $self->option('taxclass'), + 'setuptax' => $self->option('setuptax'), ); $charge{'start_date'} = $cust_main->next_bill_date #unless its more than N months away? diff --git a/FS/FS/part_event/Action/pkg_referral_credit_pkg.pm b/FS/FS/part_event/Action/pkg_referral_credit_pkg.pm index 08cf9a8fd..eb9b5107c 100644 --- a/FS/FS/part_event/Action/pkg_referral_credit_pkg.pm +++ b/FS/FS/part_event/Action/pkg_referral_credit_pkg.pm @@ -38,6 +38,7 @@ sub _calc_referral_credit { my $what = $self->option('what'); + #false laziness w/Condition/cust_payments_pkg.pm if ( $what eq 'base_recur_permonth' ) { #huh. yuck. if ( $part_pkg->freq !~ /^\d+$/ ) { die 'WARNING: Not crediting customer '. $cust_main->referral_custnum. |