X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_event%2FAction%2Fcust_bill_fee_percent.pm;h=b0397d421146fced49f9d9498bad0ee31a11d23f;hb=947c1f964f1304242f8a6ffabacccf040f1d505e;hp=9206c6a33dec30cdbd78b9c11e319124fbdcf218;hpb=7aad2eb29c444625fd1130f4ed37d89a7da2c027;p=freeside.git 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..b0397d421 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' }, ); } @@ -28,13 +31,17 @@ sub do_action { #my $cust_main = $self->cust_main($cust_bill); my $cust_main = $cust_bill->cust_main; + my $conf = new FS::Conf; + my $amount = 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'), + 'classnum' => $conf->config('finance_pkgclass'), + 'setuptax' => $self->option('setuptax'), ); $charge{'start_date'} = $cust_main->next_bill_date #unless its more than N months away?