Appearance
Inventory Product And Prepaid — Business Rules
Tổng quan
Domain này gom các báo cáo thương mại và tồn kho:
- inventory / remain / stock change
- cosmetic sale / order discount / return / branch debt in sale / sale online
- product report / product group report
- prepaid card report
Đây là chỗ giao nhau giữa analytics vận hành kho và analytics thương mại.
Scope nghiệp vụ
| Nhóm | Vai trò | Ví dụ page |
|---|---|---|
| Inventory operations analytics | Tồn, biến động kho, hàng trả, nợ chi nhánh | InventoryReport.tsx |
| Product analytics | Hiệu suất sản phẩm và nhóm sản phẩm | ProductReport.tsx |
| Prepaid analytics | Doanh số, số thẻ, usage của prepaid card | PrepaidCardReport.tsx |
Luồng chính
text
Report cards
-> inventory / product / prepaid
-> lọc branch / warehouse / product group / supplier / date
-> query table/view/function từ source ecommerce
-> render tab, aggregate card, table, popup customer/orderQuy tắc nghiệp vụ
| Mã | Quy tắc |
|---|---|
| BR-RIP-001 | inventory report là multi-tab page lớn, còn product và prepaid là analytic pages riêng. |
| BR-RIP-002 | product và prepaid nghiêng về function-based analytics, không phải chỉ query table gốc. |
| BR-RIP-003 | inventory nghiêng về bảng/vận động kho thực tế như inventory_document, product_sku_stock, product_supplying. |
| BR-RIP-004 | prepaid là domain riêng, không nên bị trộn với product/inventory chỉ vì cùng nằm dưới report module. |
Boundary
| Boundary | Ghi chú |
|---|---|
ecommerce | Toàn bộ physical source hiện nằm dưới source ecommerce |
inventory operations | inventory_document, product_sku_stock, product_supplying |
prepaid | prepaid_card_view, order, invoice |
user | Một phần filter/detail drill-down dựa vào branch/user selectors |
Rủi ro / Findings
| Mức | Finding |
|---|---|
| P1 | Hasura select permissions của nhiều object khá mở; branch scoping phụ thuộc nhiều vào FE filters. |
| P1 | GOODS_END_OF_DAY_REPORT còn trong enum nhưng tab UI đã bị comment khỏi page. |
| P1 | Prepaid report có nhiều risk export/summary không phản ánh toàn dataset. |
| P2 | Product + prepaid filter wiring có dấu hiệu lệch v-model contract. |