summaryrefslogtreecommitdiff
path: root/httemplate/elements/select-table.html
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2014-10-31 15:45:50 -0700
committerMark Wells <mark@freeside.biz>2014-10-31 15:45:50 -0700
commit7516e3da0f17eeecba27219ef96a8b5f46af2083 (patch)
tree772fe13627910a7d0774871633697f2a4d1c6faf /httemplate/elements/select-table.html
parentf31a9212ab3835b815aa87a86cca3b19babcaaff (diff)
tax engine refactoring for Avalara and Billsoft tax vendors, #25718
Diffstat (limited to 'httemplate/elements/select-table.html')
-rw-r--r--httemplate/elements/select-table.html13
1 files changed, 8 insertions, 5 deletions
diff --git a/httemplate/elements/select-table.html b/httemplate/elements/select-table.html
index e73638801..0b04fee6e 100644
--- a/httemplate/elements/select-table.html
+++ b/httemplate/elements/select-table.html
@@ -89,10 +89,12 @@ Example:
<OPTION VALUE=""><% $opt{'empty_label'} || 'all' %>
% }
-% foreach my $record ( sort { $a->$name_col() cmp $b->$name_col()
-% || $a->$key() <=> $b->$key()
-% }
-% @records
+% foreach my $record (
+% # we have the order_by parameter for this
+% #sort { $a->$name_col() cmp $b->$name_col()
+% # || $a->$key() <=> $b->$key()
+% # }
+% @records
% )
% {
% my $recvalue = $record->$key();
@@ -174,7 +176,8 @@ if ( $opt{'agent_virt'} ) {
my @records = ();
if ( $opt{'records'} ) {
- @records = @{ $opt{'records'} };
+ @records = sort { $a->get($name_col) cmp $b->get($name_col) }
+ @{ $opt{'records'} };
} else {
@records = qsearch( {
'table' => $opt{'table'},