From 4ee6165c74fc65e4dd03b1ba080aebd345aafa37 Mon Sep 17 00:00:00 2001 From: Anton Kamalov Date: Wed, 20 Nov 2024 19:34:47 +0300 Subject: [PATCH 1/7] =?UTF-8?q?=D0=9F=D0=B5=D1=80=D0=B5=D0=B8=D0=BC=D0=B5?= =?UTF-8?q?=D0=BD=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8=D0=B5=20=D0=BE=D1=82=D1=87?= =?UTF-8?q?=D1=91=D1=82=D0=B0=20=D0=BF=D0=BE=20=D0=B7=D0=B0=D0=B3=D0=BE?= =?UTF-8?q?=D1=82=D0=BE=D0=B2=D0=BA=D0=B0=D0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App/Report/sql/{view_report.sql => workpiece_report.sql} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename App/Report/sql/{view_report.sql => workpiece_report.sql} (100%) diff --git a/App/Report/sql/view_report.sql b/App/Report/sql/workpiece_report.sql similarity index 100% rename from App/Report/sql/view_report.sql rename to App/Report/sql/workpiece_report.sql From 59c60d115bf97cdb6be681edac22c116dee4db93 Mon Sep 17 00:00:00 2001 From: Anton Kamalov Date: Wed, 20 Nov 2024 19:35:34 +0300 Subject: [PATCH 2/7] =?UTF-8?q?=D0=9D=D0=BE=D0=B2=D1=8B=D0=B9=20=D0=B2?= =?UTF-8?q?=D0=B8=D0=B4=20=D0=B7=D0=B0=D0=BF=D1=80=D0=BE=D1=81=D0=B0=20+?= =?UTF-8?q?=20=D0=B8=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5=20=D0=BD=D0=B0=D0=B7=D0=B2=D0=B0=D0=BD=D0=B8=D1=8F=20?= =?UTF-8?q?=D0=BF=D0=B5=D1=80=D0=B2=D0=BE=D0=B3=D0=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App/Report/access/1.json | 4 ++-- App/Report/access/2.json | 7 +++++++ App/Report/reports.json | 3 ++- 3 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 App/Report/access/2.json diff --git a/App/Report/access/1.json b/App/Report/access/1.json index 9d565c4..5c07c25 100644 --- a/App/Report/access/1.json +++ b/App/Report/access/1.json @@ -1,7 +1,7 @@ { - "title" : "Отчет о продажах", + "title" : "Отчет о поставках заготовок", "write" : ["Менеджер"], "read" : ["Управляющий"], - "view" : "view_report", + "view" : "workpiece_report", "procedure" : "report_workpiece" } \ No newline at end of file diff --git a/App/Report/access/2.json b/App/Report/access/2.json new file mode 100644 index 0000000..d7a7537 --- /dev/null +++ b/App/Report/access/2.json @@ -0,0 +1,7 @@ +{ + "title" : "Отчет о поставках поставщиками", + "write" : ["Бухгалтер"], + "read" : ["Управляющий"], + "view" : "sellers_report", + "procedure" : "report_sellers" +} \ No newline at end of file diff --git a/App/Report/reports.json b/App/Report/reports.json index 0843d80..ccab6f2 100644 --- a/App/Report/reports.json +++ b/App/Report/reports.json @@ -1,3 +1,4 @@ [ - {"id": 1, "name": "Покупки за месяц"} + {"id": 1, "name": "Заготовки"}, + {"id": 2, "name": "Поставщики"} ] \ No newline at end of file From f83a05b6c802909db5c1d1f7e5513168d406a487 Mon Sep 17 00:00:00 2001 From: Anton Kamalov Date: Wed, 20 Nov 2024 19:36:21 +0300 Subject: [PATCH 3/7] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=B7=D0=B0=D0=BF=D1=80=D0=BE=D1=81?= =?UTF-8?q?=D0=B0=20=D0=B4=D0=BB=D1=8F=20=D0=BF=D1=80=D0=BE=D1=81=D0=BC?= =?UTF-8?q?=D0=BE=D1=82=D1=80=D0=B0=20=D0=BE=D1=82=D1=87=D1=91=D1=82=D0=B0?= =?UTF-8?q?=20=D0=BF=D0=BE=20=D0=B7=D0=B0=D0=B3=D0=BE=D1=82=D0=BE=D0=B2?= =?UTF-8?q?=D0=BA=D0=B0=D0=BC=20+=20fix=20=D1=88=D0=B0=D0=B1=D0=BB=D0=BE?= =?UTF-8?q?=D0=BD=D0=B0=20=D0=B4=D0=BB=D1=8F=20=D0=B2=D0=B2=D0=BE=D0=B4?= =?UTF-8?q?=D0=B0/=D0=BF=D1=80=D0=BE=D1=81=D0=BC=D0=BE=D1=82=D1=80=D0=B0?= =?UTF-8?q?=20=D0=BE=D1=82=D1=87=D1=91=D1=82=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App/Report/sql/workpiece_report.sql | 5 +++-- App/Report/templates/report_basic.html | 8 ++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/App/Report/sql/workpiece_report.sql b/App/Report/sql/workpiece_report.sql index ee3a641..e35c331 100644 --- a/App/Report/sql/workpiece_report.sql +++ b/App/Report/sql/workpiece_report.sql @@ -1,7 +1,8 @@ -SELECT w.material AS Наименование, +SELECT w.name AS Наименование, + w.material AS Материал, sum(sum) AS Сумма, sum(reports.count) AS Количество from reports JOIN workpiece w ON reports.item_id = w.work_id WHERE report_category_id = '$id' AND (month = '$month' AND year = '$year') -GROUP BY material; \ No newline at end of file +GROUP BY w.material, w.name; \ No newline at end of file diff --git a/App/Report/templates/report_basic.html b/App/Report/templates/report_basic.html index 9faef9f..c2200e0 100644 --- a/App/Report/templates/report_basic.html +++ b/App/Report/templates/report_basic.html @@ -12,11 +12,11 @@

{{ title }}

- {% for item in items %} - + {% for item in items %} - - {% endfor %} + {% endfor %} + + {% for item in items %} + + {% endfor %} + + + +
+ + +
- - - - - {% if write %} - - {% else %} - - {% endif %} -
-
- + {% if write %} + + {% else %} + + {% endif %} + +
- \ No newline at end of file + diff --git a/App/Report/templates/report_menu.html b/App/Report/templates/report_menu.html index 53906e3..7af3b21 100644 --- a/App/Report/templates/report_menu.html +++ b/App/Report/templates/report_menu.html @@ -10,7 +10,7 @@

Выберите вариант отчетов

-
+ diff --git a/App/static/css/main.css b/App/static/css/main.css index d641103..5cd5ee1 100644 --- a/App/static/css/main.css +++ b/App/static/css/main.css @@ -1,4 +1,4 @@ -h1,h2 { +h1, h2 { text-align: center; } @@ -26,6 +26,11 @@ div.logout, div.login { text-align: center; } +div.buttons_menu{ + text-align: center; + margin: 20px 0; +} + div.logout button { margin-top: -5px; background-color: #ff0000; @@ -37,11 +42,12 @@ div.login button { } div.return { - display: flex; - justify-content: center; + display: flex; + justify-content: center; + margin-top: 15px; } -div.return button{ +div.return button { background-color: chocolate; } @@ -50,4 +56,35 @@ div.form { left: 50%; top: 50%; transform: translate(-50%, -50%); -} \ No newline at end of file + text-align: center; + background-color: white; + padding: 20px; + border-radius: 10px; + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); +} + +div.form label { + display: block; + margin-bottom: 5px; + font-size: 16px; + font-weight: bold; + color: #333; +} + +div.form select, div.form input[type=number] { + margin-bottom: 15px; + padding: 5px; + font-size: 14px; + width: 100%; + box-sizing: border-box; +} + +div.form .period { + display: flex; + gap: 10px; + justify-content: center; +} + +div.form button { + margin-top: 15px; +}