From f83a05b6c802909db5c1d1f7e5513168d406a487 Mon Sep 17 00:00:00 2001 From: Anton Kamalov Date: Wed, 20 Nov 2024 19:36:21 +0300 Subject: [PATCH] =?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 %} +