Skip to content

Commit

Permalink
working on change requests
Browse files Browse the repository at this point in the history
  • Loading branch information
Emre YILDIRIM authored and Emre YILDIRIM committed Aug 18, 2023
1 parent f00d1d1 commit f6a295c
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,11 @@ <h3 class="Title Title--section">Budgeted and actual expenditure comparison</h3>
{% include 'components/ChartLabel/index.html' with index="3" label="Audited outcome" %}
</div>

<div class="ExpenditurePhaseSection-labelItem">
{% include 'components/ChartLabel/index.html' with index="4" label="Actual expenditure" %}
</div>
{% if sphere.slug == "national" %}
<div class="ExpenditurePhaseSection-labelItem">
{% include 'components/ChartLabel/index.html' with index="4" label="Actual expenditure" %}
</div>
{% endif %}
</div>

<div class="Card">
Expand Down
4 changes: 2 additions & 2 deletions budgetportal/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
AdjustedEstimatesOfExpenditure,
EstimatesOfExpenditure,
ExpenditureTimeSeries,
BudgetedAndActualExpenditure,
BudgetedAndActualExpenditureComparison,
)
from ckanapi import NotFound
from django.conf import settings
Expand Down Expand Up @@ -200,7 +200,7 @@ def get_openspending_api(self):
"budgeted-and-actual-national-expenditure": ExpenditureTimeSeries,
"budgeted-and-actual-provincial-expenditure": ExpenditureTimeSeries,
"consolidated-expenditure-budget": ExpenditureTimeSeries,
"in-year-spending": BudgetedAndActualExpenditure,
"in-year-spending": BudgetedAndActualExpenditureComparison,
}
api_class = api_class_mapping[self.category.slug]
self._openspending_api = api_class(api_resource["url"])
Expand Down
2 changes: 1 addition & 1 deletion budgetportal/openspending.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ def get_adjustment_kind_ref(self):
return self.get_ref(self.get_adjustment_kind_dimension(), "label")


class BudgetedAndActualExpenditure(BabbageFiscalDataset):
class BudgetedAndActualExpenditureComparison(BabbageFiscalDataset):
def get_financial_year_ref(self):
return self.get_ref(self.get_financial_year_dimension(), "label")

Expand Down
2 changes: 1 addition & 1 deletion budgetportal/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ def trigger_error(request):
# Budget comparison
url(
r"actual-expenditure/",
views.actual_expenditure_json,
views.iym_datasets_json,
name="actual-expenditure",
),
# Sitemap
Expand Down
2 changes: 1 addition & 1 deletion budgetportal/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1110,7 +1110,7 @@ def department_preview(
return render(request, "department_preview.html", context)


def actual_expenditure_json(request):
def iym_datasets_json(request):
query = {"fq": ('+groups: "in-year-spending"' '+vocab_spheres: "national"')}
search_response = ckan.action.package_search(**query)
department_name = request.GET.get("department_name", "")
Expand Down

0 comments on commit f6a295c

Please sign in to comment.