projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add a tab to grouped search containing all rows, #25944
[freeside.git]
/
httemplate
/
search
/
elements
/
cust_pay_or_refund.html
diff --git
a/httemplate/search/elements/cust_pay_or_refund.html
b/httemplate/search/elements/cust_pay_or_refund.html
index
ce513ab
..
5808e5f
100755
(executable)
--- a/
httemplate/search/elements/cust_pay_or_refund.html
+++ b/
httemplate/search/elements/cust_pay_or_refund.html
@@
-57,13
+57,14
@@
Examples:
'group_column' => 'payby',
'group_label' => 'payby_name',
'group_column' => 'payby',
'group_label' => 'payby_name',
- 'subtotal' => {
'paid' => 'sum(paid)'
},
+ 'subtotal' => {
$opt{name_verb} => "sum($amount_field)"
},
'subtotal_row' => [ 'Subtotal',
'subtotal_row' => [ 'Subtotal',
- sub { sprintf($money, $_[0]->
pai
d) },
+ sub { sprintf($money, $_[0]->
$amount_fiel
d) },
],
'total_row' => [ '<B>Total</B>',
],
'total_row' => [ '<B>Total</B>',
- sub { sprintf("<B>$money</B>", $_[0]->
pai
d) },
+ sub { sprintf("<B>$money</B>", $_[0]->
$amount_fiel
d) },
],
],
+ 'show_combined' => 1,
&>
<%init>
&>
<%init>
@@
-181,7
+182,7
@@
push @fields, 'payby_payinfo_pretty',
sub { sprintf($money, shift->$amount_field() ) },
;
push @link_onclicks, $sub_receipt, '';
sub { sprintf($money, shift->$amount_field() ) },
;
push @link_onclicks, $sub_receipt, '';
-push @sort_fields, '', $amount_field;
+push @sort_fields, '
paysort
', $amount_field;
if ( $unapplied ) {
push @header, emt('Unapplied');
if ( $unapplied ) {
push @header, emt('Unapplied');
@@
-243,6
+244,7
@@
if ( $cgi->param('magic') ) {
my @search = ();
my @select = (
"$table.*",
my @search = ();
my @select = (
"$table.*",
+ "( $table.payby || ' ' || coalesce($table.paymask, $table.payinfo) ) AS paysort",
FS::UI::Web::cust_sql_fields(),
'cust_main.custnum AS cust_main_custnum',
);
FS::UI::Web::cust_sql_fields(),
'cust_main.custnum AS cust_main_custnum',
);