diff --git a/App/Report/report_model.py b/App/Report/report_model.py index 0dfb903..18ce3a2 100644 --- a/App/Report/report_model.py +++ b/App/Report/report_model.py @@ -46,8 +46,4 @@ def make_report(input_data: dict, proc_name: str) -> InfoRespronse: return InfoRespronse((), error_message = 'Ошибка в подключении к базе данных. Свяжитесь с администратором', status=False) - # elif result['message'] != 'OK': - # return InfoRespronse((), - # error_message = 'Невозможно создать отчет (нет продаж за выбранный период)', - # status=False) return InfoRespronse((), error_message='', status=True) \ No newline at end of file diff --git a/App/Report/templates/report_basic.html b/App/Report/templates/report_basic.html index e9da829..42bcdeb 100644 --- a/App/Report/templates/report_basic.html +++ b/App/Report/templates/report_basic.html @@ -13,7 +13,7 @@

{{ title }}

-
+ - +
{% if is_write %} diff --git a/App/static/js/check.js b/App/static/js/check.js index e4546b0..230c5ac 100644 --- a/App/static/js/check.js +++ b/App/static/js/check.js @@ -1,6 +1,7 @@ -function check_month(now_month) { +function check_month(now_month, now_year) { let selected_month = document.getElementById('month').value; - if (selected_month > now_month) { + let selected_year = document.getElementById('year').value; + if (selected_month > now_month && selected_year == now_year) { alert('Невозможно сформировать отчет за будущий период!'); return false; }