This repository has been archived on 2025-10-24. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
RIS/App/Report/sql/workpiece_report.sql
T

8 lines
325 B
SQL

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 w.material, w.name;