diff options
author | Mark Wells <mark@freeside.biz> | 2015-07-07 14:48:14 -0700 |
---|---|---|
committer | Mark Wells <mark@freeside.biz> | 2015-07-07 14:48:14 -0700 |
commit | ba95860daaf6c4de2f90ef28057516bc7d44c8a0 (patch) | |
tree | bb3bbe7dd8986eb55e5769c8ad61589df4e8e8c0 /httemplate/search/elements/cust_pay_or_refund.html | |
parent | 4a03b0b62cef514f9217e7be61cf7a16218ea387 (diff) |
add a tab to grouped search containing all rows, #25944
Diffstat (limited to 'httemplate/search/elements/cust_pay_or_refund.html')
-rwxr-xr-x | httemplate/search/elements/cust_pay_or_refund.html | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/httemplate/search/elements/cust_pay_or_refund.html b/httemplate/search/elements/cust_pay_or_refund.html index ce513ab15..5808e5f3e 100755 --- 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', - 'subtotal' => { 'paid' => 'sum(paid)' }, + 'subtotal' => { $opt{name_verb} => "sum($amount_field)" }, 'subtotal_row' => [ 'Subtotal', - sub { sprintf($money, $_[0]->paid) }, + sub { sprintf($money, $_[0]->$amount_field) }, ], 'total_row' => [ '<B>Total</B>', - sub { sprintf("<B>$money</B>", $_[0]->paid) }, + sub { sprintf("<B>$money</B>", $_[0]->$amount_field) }, ], + 'show_combined' => 1, &> <%init> @@ -181,7 +182,7 @@ push @fields, 'payby_payinfo_pretty', 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'); @@ -243,6 +244,7 @@ if ( $cgi->param('magic') ) { 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', ); |