diff --git a/app/Http/Controllers/Popup/ReportController.php b/app/Http/Controllers/Popup/ReportController.php index c9fd9afe8c..e10a016495 100644 --- a/app/Http/Controllers/Popup/ReportController.php +++ b/app/Http/Controllers/Popup/ReportController.php @@ -46,7 +46,7 @@ class ReportController extends Controller * @return \Illuminate\Http\JsonResponse * @throws FireflyException */ - public function info(Request $request) + public function general(Request $request) { $attributes = $request->get('attributes') ?? []; $attributes = $this->parseAttributes($attributes); diff --git a/public/js/ff/reports/default/all.js b/public/js/ff/reports/default/all.js index f5c968f05f..b19187497b 100644 --- a/public/js/ff/reports/default/all.js +++ b/public/js/ff/reports/default/all.js @@ -1,4 +1,4 @@ -/* globals startDate, showOnlyTop, showFullList, endDate, reportType, expenseReportUri, accountIds, incExpReportUri,accountReportUri, incomeReportUri */ +/* globals startDate, showOnlyTop, showFullList, endDate, expenseReportUri, accountIds, incExpReportUri,accountReportUri, incomeReportUri */ /* * all.js * Copyright (C) 2016 thegrumpydictator@gmail.com @@ -39,10 +39,9 @@ function clickInfoButton(e) { // add some more elements: attributes.startDate = startDate; attributes.endDate = endDate; - attributes.reportType = reportType; attributes.accounts = accountIds; - $.getJSON('popup/report', {attributes: attributes}).done(respondInfoButton).fail(errorInfoButton); + $.getJSON('popup/general', {attributes: attributes}).done(respondInfoButton).fail(errorInfoButton); } function errorInfoButton(data) { diff --git a/public/js/ff/reports/default/multi-year.js b/public/js/ff/reports/default/multi-year.js index 3988ee298b..b1f755a8f1 100644 --- a/public/js/ff/reports/default/multi-year.js +++ b/public/js/ff/reports/default/multi-year.js @@ -1,19 +1,17 @@ -/* globals budgetMultiUri, accountIds */ - - $(function () { "use strict"; drawChart(); loadAjaxPartial('budgetPeriodReport', budgetPeriodReportUri); - loadAjaxPartial('categoryPeriodReport', categoryPeriodReportUri); + loadAjaxPartial('categoryExpense', categoryExpenseUri); + loadAjaxPartial('categoryIncome', categoryIncomeUri); }); function drawChart() { "use strict"; // income and expense over multi year: - lineChart('chart/report/net-worth/' + startDate + '/' + endDate + '/' + accountIds, 'net-worth'); - columnChart('chart/report/in-out/' + startDate + '/' + endDate + '/' + accountIds, 'income-expenses-chart'); - columnChart('chart/report/in-out-sum/' + startDate + '/' + endDate + '/' + accountIds, 'income-expenses-sum-chart'); + lineChart(netWorthUri, 'net-worth'); + columnChart(opChartUri, 'income-expenses-chart'); + columnChart(sumChartUri, 'income-expenses-sum-chart'); } diff --git a/resources/views/budgets/index.twig b/resources/views/budgets/index.twig index 827cd7d79d..691a92638a 100644 --- a/resources/views/budgets/index.twig +++ b/resources/views/budgets/index.twig @@ -156,7 +156,7 @@ {% for other in budget.otherRepetitions %} {% if other.id != budget.currentRep.id %}
  • Budgeted - {{ other.amount|formatAmountPlain }} + {{ other.amount|formatAmountPlain }} between {{ other.startdate.formatLocalized(monthAndDayFormat) }} and {{ other.enddate.formatLocalized(monthAndDayFormat) }}. diff --git a/resources/views/list/piggy-banks.twig b/resources/views/list/piggy-banks.twig index 3a049b0e1f..269c675dfc 100644 --- a/resources/views/list/piggy-banks.twig +++ b/resources/views/list/piggy-banks.twig @@ -26,7 +26,7 @@ {% if piggyBank.savedSoFar > 0 %} - + {% endif %} @@ -51,7 +51,7 @@ {% if piggyBank.leftToSave > 0 %} - + {% endif %} diff --git a/resources/views/profile/change-password.twig b/resources/views/profile/change-password.twig index d313e31e36..248c51b604 100644 --- a/resources/views/profile/change-password.twig +++ b/resources/views/profile/change-password.twig @@ -5,7 +5,7 @@ {% endblock %} {% block content %} -
    +
    diff --git a/resources/views/reports/default/month.twig b/resources/views/reports/default/month.twig index f7edc09dac..352f5a2d1c 100644 --- a/resources/views/reports/default/month.twig +++ b/resources/views/reports/default/month.twig @@ -133,13 +133,13 @@ var accountIds = '{{ accountIds }}'; // uri's for data - var categoryReportUri = '{{ route('report-data.category.operations', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}'; - var budgetReportUri = '{{ route('report-data.budget.general', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}'; - var balanceReportUri = '{{ route('report-data.balance.general', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}'; - var accountReportUri = '{{ route('report-data.account.general', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}'; - var incomeReportUri = '{{ route('report-data.operations.income', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}'; - var expenseReportUri = '{{ route('report-data.operations.expenses', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}'; - var incExpReportUri = '{{ route('report-data.operations.operations', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}'; + var accountReportUri = '{{ route('report-data.account.general', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var categoryReportUri = '{{ route('report-data.category.operations', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var budgetReportUri = '{{ route('report-data.budget.general', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var balanceReportUri = '{{ route('report-data.balance.general', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var incomeReportUri = '{{ route('report-data.operations.income', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var expenseReportUri = '{{ route('report-data.operations.expenses', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var incExpReportUri = '{{ route('report-data.operations.operations', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; // uri's for charts: var accountChartUri = '{{ route('chart.account.report', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; diff --git a/resources/views/reports/default/multi-year.twig b/resources/views/reports/default/multi-year.twig index c92c8f3e91..527eb84740 100644 --- a/resources/views/reports/default/multi-year.twig +++ b/resources/views/reports/default/multi-year.twig @@ -114,14 +114,27 @@
    - {# same thing but for categories #} + {# same thing but for categories (expenses) #}
    -

    {{ 'categories'|_ }}

    +

    {{ 'categories'|_ }} ({{ 'expenses'|_ }})

    -
    +
    +
    +
    +
    +
    + + {# same thing but for categories (income) #} +
    +
    +
    +
    +

    {{ 'categories'|_ }} ({{ 'income'|_ }})

    +
    +
    @@ -159,17 +172,22 @@ // to report another URL: var startDate = '{{ start.format('Ymd') }}'; var endDate = '{{ end.format('Ymd') }}'; - var reportType = '{{ reportType }}'; var accountIds = '{{ accountIds }}'; - - var accountReportUri = '{{ route('reports.data.accountReport', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}'; - var incomeReportUri = '{{ route('reports.data.incomeReport', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}'; - var expenseReportUri = '{{ route('reports.data.expenseReport', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}'; - var incExpReportUri = '{{ route('reports.data.incExpReport', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}'; + // report uri's + var opChartUri ='{{ route('chart.report.operations', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var sumChartUri='{{ route('chart.report.sum', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var netWorthUri ='{{ route('chart.report.net-worth', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; - var budgetPeriodReportUri = '{{ route('reports.data.budgetPeriodReport', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}'; - var categoryPeriodReportUri = '{{ route('reports.data.categoryPeriodReport', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}'; + // data uri's + var accountReportUri = '{{ route('report-data.account.general', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var incomeReportUri = '{{ route('report-data.operations.income', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var expenseReportUri = '{{ route('report-data.operations.expenses', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var incExpReportUri = '{{ route('report-data.operations.operations', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; + + var budgetPeriodReportUri = '{{ route('report-data.budget.period', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var categoryExpenseUri = '{{ route('report-data.category.expenses', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var categoryIncomeUri = '{{ route('report-data.category.income', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; diff --git a/resources/views/reports/default/year.twig b/resources/views/reports/default/year.twig index e6438a7531..aad882010d 100644 --- a/resources/views/reports/default/year.twig +++ b/resources/views/reports/default/year.twig @@ -167,7 +167,6 @@ // to report another URL: var startDate = '{{ start.format('Ymd') }}'; var endDate = '{{ end.format('Ymd') }}'; - var reportType = '{{ reportType }}'; var accountIds = '{{ accountIds }}'; // report uri's diff --git a/resources/views/reports/index.twig b/resources/views/reports/index.twig index eec3c8c134..c889d0eee2 100644 --- a/resources/views/reports/index.twig +++ b/resources/views/reports/index.twig @@ -114,17 +114,36 @@
    +

    {{ ('quick_link_default_report')|_ }}

    + + +

    {{ ('quick_link_audit_report')|_ }}

    + + {#

    {{ ('quick_link_category_report')|_ }}

    #} + + + {# + {% for type in ['default','audit'] %} -

    {{ ('quick_link_'~type~'_report')|_ }}

    +
    @@ -190,7 +190,7 @@ diff --git a/resources/views/rules/rule/create.twig b/resources/views/rules/rule/create.twig index 15b80d88af..481473712c 100644 --- a/resources/views/rules/rule/create.twig +++ b/resources/views/rules/rule/create.twig @@ -6,7 +6,7 @@ {% block content %} - + diff --git a/resources/views/rules/rule/delete.twig b/resources/views/rules/rule/delete.twig index 0d01f303b8..befd03a63b 100644 --- a/resources/views/rules/rule/delete.twig +++ b/resources/views/rules/rule/delete.twig @@ -6,7 +6,7 @@ {% block content %} - +