From 58f7b60bf3d718a9d76e87632086adbc734a1117 Mon Sep 17 00:00:00 2001 From: Fridolyn SOMERS Date: Wed, 3 Jul 2013 14:24:23 +0200 Subject: [PATCH] Bug 10535: by default sort funds by name In parcels.pl, and other acquisition pages, the funds are not sorted by name in combo-box. With a great number of funds, it is difficult to find one. This patch adds a default value to $orderby arg of C4::Budgets::GetBudgets. Test plan : - Create a new fund with a name beginning with 'z' and set you as owner. - Create a new fund with a name beginning with 'a' and set you as owner. - Go to a vendor and click "Receive shipments" - Look at fund combobox => Funds are sorted by name Signed-off-by: Silvia Simonetti Signed-off-by: Katrin Fischer Passes all tests and QA script. When testing make sure your funds would sort the other way around when sorting by code instead of description. Signed-off-by: Galen Charlton (cherry picked from commit aa6cdb60a9ab2581ffef08796a349242d3d2ff66) Signed-off-by: Tomas Cohen Arazi (cherry picked from commit f56768adba9fb1d39861e04796fac2be8cfdf914) Signed-off-by: Bernardo Gonzalez Kriegel (cherry picked from commit f56768adba9fb1d39861e04796fac2be8cfdf914) --- C4/Budgets.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/C4/Budgets.pm b/C4/Budgets.pm index d07dc75df2..948d752060 100644 --- a/C4/Budgets.pm +++ b/C4/Budgets.pm @@ -673,7 +673,8 @@ gets all budgets # ------------------------------------------------------------------- sub GetBudgets { - my ($filters,$orderby) = @_; + my $filters = shift; + my $orderby = shift || 'budget_name'; return SearchInTable("aqbudgets",$filters, $orderby, undef,undef, undef, "wide"); } -- 2.39.5