projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3b53cfb
)
don't consider setup or recurring taxes when billing usage on cancel
author
jeff
<jeff>
Mon, 5 Oct 2009 01:07:45 +0000
(
01:07
+0000)
committer
jeff
<jeff>
Mon, 5 Oct 2009 01:07:45 +0000
(
01:07
+0000)
FS/FS/cust_main.pm
patch
|
blob
|
history
diff --git
a/FS/FS/cust_main.pm
b/FS/FS/cust_main.pm
index
501fca4
..
d61ebd2
100644
(file)
--- a/
FS/FS/cust_main.pm
+++ b/
FS/FS/cust_main.pm
@@
-3036,7
+3036,7
@@
sub _make_lines {
###
my $error =
###
my $error =
- $self->_handle_taxes($part_pkg, $taxlisthash, $cust_bill_pkg, $cust_pkg, $options{invoice_time}, $real_pkgpart);
+ $self->_handle_taxes($part_pkg, $taxlisthash, $cust_bill_pkg, $cust_pkg, $options{invoice_time}, $real_pkgpart
, \%options
);
return $error if $error;
push @$cust_bill_pkgs, $cust_bill_pkg;
return $error if $error;
push @$cust_bill_pkgs, $cust_bill_pkg;
@@
-3057,6
+3057,7
@@
sub _handle_taxes {
my $cust_pkg = shift;
my $invoice_time = shift;
my $real_pkgpart = shift;
my $cust_pkg = shift;
my $invoice_time = shift;
my $real_pkgpart = shift;
+ my $options = shift;
my %cust_bill_pkg = ();
my %taxes = ();
my %cust_bill_pkg = ();
my %taxes = ();
@@
-3064,8
+3065,8
@@
sub _handle_taxes {
my @classes;
#push @classes, $cust_bill_pkg->usage_classes if $cust_bill_pkg->type eq 'U';
push @classes, $cust_bill_pkg->usage_classes if $cust_bill_pkg->usage;
my @classes;
#push @classes, $cust_bill_pkg->usage_classes if $cust_bill_pkg->type eq 'U';
push @classes, $cust_bill_pkg->usage_classes if $cust_bill_pkg->usage;
- push @classes, 'setup' if
$cust_bill_pkg->setup
;
- push @classes, 'recur' if
$cust_bill_pkg->recur
;
+ push @classes, 'setup' if
($cust_bill_pkg->setup && !$options->{cancel})
;
+ push @classes, 'recur' if
($cust_bill_pkg->recur && !$options->{cancel})
;
if ( $self->tax !~ /Y/i && $self->payby ne 'COMP' ) {
if ( $self->tax !~ /Y/i && $self->payby ne 'COMP' ) {