Skip to content

Commit b010048

Browse files
committed
Order spending by size
1 parent c148f61 commit b010048

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

projects/budgetkey/src/app/item/items/base-org-item/questions.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,9 @@ export default [
274274
"end_date AS \"תאריך סיום\",",
275275
"case when manof_excerpts is not null and jsonb_array_length(manof_excerpts) > 0 then ((manof_excerpts->0)::jsonb)->>'soproc_name' else null end as \"שירות חברתי\",",
276276
"case when manof_excerpts is not null and jsonb_array_length(manof_excerpts) > 0 then 'activities/gov_social_service/' || (((manof_excerpts->0)::jsonb)->>'soproc_id')::text else null end as soproc_id",
277-
"FROM contract_spending WHERE entity_id=':id' AND ((:period BETWEEN min_year AND max_year) or (min_year is null and :period <= max_year) or (max_year is null and :period >= min_year) or (:period is null))"],
277+
"FROM contract_spending WHERE entity_id=':id' AND ((:period BETWEEN min_year AND max_year) or (min_year is null and :period <= max_year) or (max_year is null and :period >= min_year) or (:period is null))",
278+
"ORDER BY \"היקף\" DESC NULLS LAST"
279+
],
278280
parameters: {
279281
period: {
280282
"כל השנים": "null",

projects/budgetkey/src/app/item/items/item-budget/questions_spending.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,8 @@ export default [
259259
"FROM contract_spending ",
260260
"WHERE budget_code like ':code%%' AND ((:period BETWEEN min_year AND max_year) or (min_year is null and :period <= max_year) or ",
261261
"(max_year is null and :period >= min_year) or (:period is null))",
262-
"ORDER BY order_date desc nulls last"
262+
"ORDER BY \"היקף\" DESC NULLS LAST"
263+
// "ORDER BY order_date desc nulls last"
263264
],
264265
parameters: {
265266
period: {

projects/budgetkey/src/app/item/items/item-budget/questions_spending8.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,8 @@ export default [
259259
"FROM contract_spending ",
260260
"WHERE budget_code = ':code' AND ((:period BETWEEN min_year AND max_year) or (min_year is null and :period <= max_year) or ",
261261
"(max_year is null and :period >= min_year) or (:period is null))",
262-
"ORDER BY order_date desc nulls last"
262+
// "ORDER BY order_date desc nulls last"
263+
"ORDER BY \"היקף\" DESC NULLS LAST"
263264
],
264265
parameters: {
265266
period: {

0 commit comments

Comments
 (0)