projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
new tax rating engine
[freeside.git]
/
FS
/
FS
/
cust_bill.pm
diff --git
a/FS/FS/cust_bill.pm
b/FS/FS/cust_bill.pm
index
eafe930
..
f536c97
100644
(file)
--- a/
FS/FS/cust_bill.pm
+++ b/
FS/FS/cust_bill.pm
@@
-2486,9
+2486,18
@@
sub _items_pkg {
$self->_items_cust_bill_pkg(\@cust_bill_pkg, %options);
}
$self->_items_cust_bill_pkg(\@cust_bill_pkg, %options);
}
+sub _taxsort {
+ return 0 unless $a cmp $b;
+ return -1 if $b eq 'Tax';
+ return 1 if $a eq 'Tax';
+ return -1 if $b eq 'Other surcharges';
+ return 1 if $a eq 'Other surcharges';
+ $a cmp $b;
+}
+
sub _items_tax {
my $self = shift;
sub _items_tax {
my $self = shift;
- my @cust_bill_pkg = grep { ! $_->pkgnum } $self->cust_bill_pkg;
+ my @cust_bill_pkg =
sort _taxsort
grep { ! $_->pkgnum } $self->cust_bill_pkg;
$self->_items_cust_bill_pkg(\@cust_bill_pkg, @_);
}
$self->_items_cust_bill_pkg(\@cust_bill_pkg, @_);
}