From 5d089cbe4980f7c9c25b83e164099b22bc59eead Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Fri, 29 Jan 2016 18:26:43 -0800 Subject: Use any card on file when making a payment, RT#23741 --- httemplate/elements/select-table.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'httemplate/elements/select-table.html') diff --git a/httemplate/elements/select-table.html b/httemplate/elements/select-table.html index 0b04fee6e..4b6ddb40e 100644 --- a/httemplate/elements/select-table.html +++ b/httemplate/elements/select-table.html @@ -28,6 +28,7 @@ Example: 'agent_null_right' => '', #right to see un-agented entries #or 'records' => \@records, #instead of search params + 'presorted' => 0, #set true to disable sorting the records on name_col #instead of the primary key... only for special cases 'value_col' => 'columnname', @@ -176,8 +177,9 @@ if ( $opt{'agent_virt'} ) { my @records = (); if ( $opt{'records'} ) { - @records = sort { $a->get($name_col) cmp $b->get($name_col) } - @{ $opt{'records'} }; + @records = @{ $opt{'records'} }; + @records = sort { $a->get($name_col) cmp $b->get($name_col) } @records + unless $opt{'presorted'}; } else { @records = qsearch( { 'table' => $opt{'table'}, -- cgit v1.2.1