summaryrefslogtreecommitdiff
path: root/FS/FS/cust_bill.pm
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2018-04-11 13:26:07 -0700
committerIvan Kohler <ivan@freeside.biz>2018-04-11 13:26:07 -0700
commit1d966768ea430d102aac2dfbedc7cc6b503b7e1a (patch)
tree2553754a185c5073c7b6cf0b96a2c2f2fc6086dd /FS/FS/cust_bill.pm
parentc0f84de8067f9cd98bdd3cfd593427c90123b494 (diff)
optimize invoice display with sections, RT#80177
Diffstat (limited to 'FS/FS/cust_bill.pm')
-rw-r--r--FS/FS/cust_bill.pm8
1 files changed, 7 insertions, 1 deletions
diff --git a/FS/FS/cust_bill.pm b/FS/FS/cust_bill.pm
index 942715b..38b1d5c 100644
--- a/FS/FS/cust_bill.pm
+++ b/FS/FS/cust_bill.pm
@@ -521,7 +521,13 @@ Returns the line items (see L<FS::cust_bill_pkg>) for this invoice.
sub cust_bill_pkg {
my $self = shift;
qsearch(
- { 'table' => 'cust_bill_pkg',
+ {
+ 'select' => 'cust_bill_pkg.*, pkg_category.categoryname',
+ 'table' => 'cust_bill_pkg',
+ 'addl_from' => ' LEFT JOIN cust_pkg USING ( pkgnum ) '.
+ ' LEFT JOIN part_pkg USING ( pkgpart ) '.
+ ' LEFT JOIN pkg_class USING ( classnum ) '.
+ ' LEFT JOIN pkg_category USING ( categorynum ) ',
'hashref' => { 'invnum' => $self->invnum },
'order_by' => 'ORDER BY billpkgnum', #important? otherwise we could use
# the AUTLOADED FK search. or should