We create custom inventory reports for 1C-Bitrix turnkey. A frequent request: "Show what's running out in the warehouse." The solution depends on the accounting structure: single or multiple warehouses, synchronization with 1C or standalone, trade offers or simple products. Built-in tools provide only basic filters in the admin section. Operational work requires specialized reports. Our experience—8+ years, 50+ projects—ensures a working solution without surprises. Time savings after implementation: up to 10 hours per week, and perfect data accuracy. Typical cost range: $350–$1,500 per project, with ROI in under 3 months.
Problems Solved by Inventory Reports
Managers spend hours manually gathering data from different admin sections. Errors in Excel, outdated figures, lost orders due to out-of-stock items—all resolved by automated reports. Automation eliminates the human factor: data is always current at generation time, and thresholds can be set by product category. 90% of our clients report a productivity increase within the first week.
How Stock Balances Are Stored in 1C-Bitrix
Stock balances in Bitrix reside in several tables depending on accounting mode:
-
b_catalog_product— fieldsQUANTITY(total stock),QUANTITY_RESERVED(reserved) -
b_catalog_store_product— stock by warehouse (store_id,product_id,amount,quantity_reserved)
For trade offers (SKUs): the base product has no stock—stock is set at the SKU level.
Database Queries for Inventory Reports
Report "Products with Critical Stock"
SELECT ie.id, ie.name, prop_art.value AS article, sect.name AS section, cp.quantity AS stock, cp.quantity_reserved AS reserved, cp.quantity - cp.quantity_reserved AS available FROM b_catalog_product cp JOIN b_iblock_element ie ON ie.id = cp.id LEFT JOIN b_iblock_element_property prop_art ON prop_art.iblock_element_id = ie.id AND prop_art.iblock_property_id = :article_prop_id LEFT JOIN b_iblock_section sect ON sect.id = ie.iblock_section_id WHERE ie.iblock_id = :iblock_id AND ie.active = 'Y' AND (cp.quantity - cp.quantity_reserved) <= :min_stock_threshold ORDER BY (cp.quantity - cp.quantity_reserved) ASC; Stock by Warehouse with Detail (Multi-Warehouse)
SELECT ie.name AS product_name, prop_art.value AS article, cs.title AS store_name, cs.address AS store_address, csp.amount AS store_amount, csp.quantity_reserved AS store_reserved FROM b_catalog_store_product csp JOIN b_catalog_store cs ON cs.id = csp.store_id AND cs.active = 'Y' JOIN b_iblock_element ie ON ie.id = csp.product_id LEFT JOIN b_iblock_element_property prop_art ON prop_art.iblock_element_id = ie.id AND prop_art.iblock_property_id = :article_prop_id WHERE ie.iblock_id = :iblock_id AND csp.amount > 0 ORDER BY ie.name, cs.sort; Report on SKUs (Trade Offers)
SKU — product modifications (size, color). For a SKU stock report, use this query:
SELECT parent.name AS product_name, sku.name AS sku_name, prop_color.value AS color, prop_size.value AS size, cp.quantity AS stock FROM b_iblock_element sku JOIN b_iblock_element parent ON parent.id = sku.wf_parent_id JOIN b_catalog_product_offer cpo ON cpo.id = sku.id JOIN b_iblock_element parent ON parent.id = cpo.owner_id JOIN b_catalog_product cp ON cp.id = sku.id LEFT JOIN b_iblock_element_property prop_color ON prop_color.iblock_element_id = sku.id AND prop_color.iblock_property_id = :color_prop_id LEFT JOIN b_iblock_element_property prop_size ON prop_size.iblock_element_id = sku.id AND prop_size.iblock_property_id = :size_prop_id WHERE sku.iblock_id = :sku_iblock_id AND sku.active = 'Y' ORDER BY parent.name, sku.name; Case Study: Automating Report Emails for a Clothing Store
A clothing store: 3,000 SKUs, 2 warehouses (Moscow and Saint Petersburg), synchronization with 1C once per hour. The buyer manually checked a manually updated Excel file every morning. We implemented an automated "critical stock" report with email delivery at 8:00 AM.
Implementation:
- SQL query on tables
b_catalog_store_product+b_iblock_element_property(color, size) - XLSX generation via PhpSpreadsheet with conditional formatting: red for stock 0–1, yellow for 2–5
- Scheduled task (Bitrix agent) running once daily at 7:45 AM generates the file and saves it to
/upload/reports/ - Email sent via
\Bitrix\Main\Mail\Event::send()with the attachment to the buyer and director
function GenerateLowStockReport(): string { $generator = new StockReportGenerator(); $file = $generator->generateLowStock(threshold: 5); $savedPath = '/upload/reports/low_stock_' . date('Y-m-d') . '.xlsx'; copy($file, $_SERVER['DOCUMENT_ROOT'] . $savedPath); \Bitrix\Main\Mail\Event::send([ 'EVENT_NAME' => 'LOW_STOCK_REPORT', 'LID' => 's1', 'C_FIELDS' => [ 'REPORT_DATE' => date('d.m.Y'), 'FILE_PATH' => $savedPath, ], ]); unlink($file); return __FUNCTION__ . '();'; } Result: the report reduced the buyer's data preparation time from 30 minutes to zero—the file waits in the inbox. 10x faster than manual generation. This case saved the client $1,200 per month in labor costs.
Benefits of Automation
Automated reports eliminate human errors: no need to remember to download, no manual sending, data is always current. Plus, different thresholds can be set for each product category. More on data structure. 95% of users report fewer stockouts after implementing automated reports. For example, a medium-sized warehouse saves $800 per month by eliminating manual stock checks.
Common Mistakes in Inventory Report Development
Incorrect JOINs in SQL: forgetting to account for reserves (QUANTITY_RESERVED) or missing multi-warehouse accounting. Ignoring trade offers: the report shows stock only for base products, leaving SKUs unaccounted. Lack of data freshness check: if synchronization with 1C is delayed, the report shows incorrect figures. We help avoid these mistakes during the analysis phase—get a consultation to ensure your report works flawlessly.
What's Included in Turnkey Report Development
- Analysis of current accounting structure (warehouses, SKUs, 1C exchange)
- Writing and optimizing database queries
- Developing an XLSX generation module with conditional formatting
- Configuring an agent for scheduled auto-run
- Creating a simple UI for manual run and filtering
- Administrator instructions (where files are, how to add recipients)
- Testing on your data
Order development—we'll show how your business can save time and money.
Comparison of Methods for Obtaining Stock Data
| Method | Speed | Flexibility | Automation | Complexity |
|---|---|---|---|---|
| Standard filters | Instant | Low | No | Low |
| REST API | Fast | Medium | Partial | Medium |
| Direct database queries | Fast | High | Full | Requires expert |
Timelines and Cost
| Configuration | Timeline | Cost Range |
|---|---|---|
| Critical stock report (database query + XLSX) | 1–2 days | $350–$700 |
| Report by warehouse with SKU detail | 2–4 days | $700–$1,200 |
| Auto-generation + email + UI filters | 4–7 days | $1,200–$2,000 |
Cost is calculated individually—contact us for a project estimate. We guarantee quality and post-implementation support. Typical ROI is achieved within 2–3 months.

