Skip to content

Commit

Permalink
Fix budget spending query
Browse files Browse the repository at this point in the history
  • Loading branch information
akariv committed Mar 4, 2025
1 parent 0717919 commit 3b64b34
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ export default [
text: "פירוט כל ההוצאות מסעיף זה ששולמו ב <period>",
query: ["with a as (",
"select year_paid as \"שנה\", coalesce(entity_name, recipient) as \"מקבל הכספים\", amount_paid as \"סך כולל\", support_title as \"תיאור\", 'תמיכה' as \"סוג ההוצאה\"",
"from supports_by_payment_year where budget_code = ':code' and amount_paid>0 and year_paid :period union",
"from supports_by_payment_year where budget_code like ':code%%' and amount_paid>0 and year_paid :period union",
"select min_year as \"שנה\", coalesce(entity_name, supplier_name->>0) as \"מקבל הכספים\", executed as \"סך כולל\", purpose as \"תיאור\", 'רכש' as \"סוג ההוצאה\"",
"from contract_spending where budget_code = ':code' and executed > 0 and min_year :period)",
"from contract_spending where budget_code like ':code%%' and executed > 0 and min_year :period)",
"select * from a order by \"שנה\" desc, \"סך כולל\" desc"
],
parameters: {
Expand Down

0 comments on commit 3b64b34

Please sign in to comment.