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

8 lines
366 B
SQL
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

SELECT w.name AS Наименование,
reports.sum AS 'Сумма в рублях',
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
ORDER BY w.name;