projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix invoice sorting by package category, RT#31272
[freeside.git]
/
FS
/
FS
/
Template_Mixin.pm
diff --git
a/FS/FS/Template_Mixin.pm
b/FS/FS/Template_Mixin.pm
index
0928ee5
..
05972c0
100644
(file)
--- a/
FS/FS/Template_Mixin.pm
+++ b/
FS/FS/Template_Mixin.pm
@@
-2153,9
+2153,9
@@
sub _items_sections {
} else {
$section->{'category'} = $sectionname;
$section->{'description'} = &{ $escape }($sectionname);
} else {
$section->{'category'} = $sectionname;
$section->{'description'} = &{ $escape }($sectionname);
- if ( _pkg_category($
_
) ) {
- $section->{'sort_weight'} = _pkg_category($
_
)->weight;
- if ( _pkg_category($
_
)->condense ) {
+ if ( _pkg_category($
sectionname
) ) {
+ $section->{'sort_weight'} = _pkg_category($
sectionname
)->weight;
+ if ( _pkg_category($
sectionname
)->condense ) {
$section = { %$section, $self->_condense_section($opt{format}) };
}
}
$section = { %$section, $self->_condense_section($opt{format}) };
}
}
@@
-2729,6
+2729,8
@@
sub _items_cust_bill_pkg {
'pkgnum' => $cust_bill_pkg->pkgpart, #so it displays in Ref
'description' => $description,
'amount' => sprintf("%.2f", $cust_bill_pkg->setup),
'pkgnum' => $cust_bill_pkg->pkgpart, #so it displays in Ref
'description' => $description,
'amount' => sprintf("%.2f", $cust_bill_pkg->setup),
+ 'unit_amount' => sprintf("%.2f", $cust_bill_pkg->unitsetup),
+ 'quantity' => $cust_bill_pkg->quantity,
'preref_html' => ( $opt{preref_callback}
? &{ $opt{preref_callback} }( $cust_bill_pkg )
: ''
'preref_html' => ( $opt{preref_callback}
? &{ $opt{preref_callback} }( $cust_bill_pkg )
: ''
@@
-2740,6
+2742,12
@@
sub _items_cust_bill_pkg {
'pkgnum' => $cust_bill_pkg->pkgpart, #so it displays in Ref
'description' => "$desc (". $cust_bill_pkg->part_pkg->freq_pretty.")",
'amount' => sprintf("%.2f", $cust_bill_pkg->recur),
'pkgnum' => $cust_bill_pkg->pkgpart, #so it displays in Ref
'description' => "$desc (". $cust_bill_pkg->part_pkg->freq_pretty.")",
'amount' => sprintf("%.2f", $cust_bill_pkg->recur),
+ 'unit_amount' => sprintf("%.2f", $cust_bill_pkg->unitrecur),
+ 'quantity' => $cust_bill_pkg->quantity,
+ 'preref_html' => ( $opt{preref_callback}
+ ? &{ $opt{preref_callback} }( $cust_bill_pkg )
+ : ''
+ ),
};
}
};
}