Create a project called: {{NOME_DO_PROJETO}}
Goal: simple ERP with catalog, purchasing, sales, inventory and basic finance.
UI language: {{IDIOMA_UI}}.
Profiles (RBAC):
- Admin: full access
- Purchasing: purchase orders and suppliers
- Sales: sales orders and customers
- Inventory: movements and inventory
- Finance: accounts payable/receivable
Modules:
- Records
- Purchasing
- Sales
- Inventory
- Finance
Entities:
- Product:
- sku (unique, required)
- name (required)
- unit (UN | BX | KG | LT)
- salePrice (currency)
- standardCost (currency)
- active (boolean)
- Customer:
- name (required)
- document (cpf/cnpj)
- email
- phone
- Supplier:
- name (required)
- document (cpf/cnpj)
- email
- phone
- SalesOrder:
- customer (1 Customer)
- status (Draft | Approved | Invoiced | Cancelled)
- orderDate (date)
- total (currency)
- SalesOrderItem:
- salesOrder (1 SalesOrder)
- product (1 Product)
- quantity (number)
- unitPrice (currency)
- PurchaseOrder:
- supplier (1 Supplier)
- status (Draft | Approved | Received | Cancelled)
- orderDate (date)
- total (currency)
- PurchaseOrderItem:
- purchaseOrder (1 PurchaseOrder)
- product (1 Product)
- quantity (number)
- unitCost (currency)
- InventoryMovement:
- product (1 Product)
- type (In | Out | Adjustment)
- quantity (number)
- dateTime (date/time)
- reference (PurchaseOrder or SalesOrder, optional)
- FinancialEntry:
- type (Payable | Receivable)
- status (Open | Paid | Cancelled)
- amount (currency)
- dueDate (date)
- paymentDate (date, optional)
- origin (PurchaseOrder or SalesOrder, optional)
Business rules:
- When receiving a PurchaseOrder: generate Stock In.
- When invoicing a SalesOrder: generate Stock Out and an Accounts Receivable entry.
- Prevent negative stock.
Minimum screens:
- Product/customer/supplier registration
- Purchase order (with items) + receiving
- Sales order (with items) + invoicing
- Inventory: position by product + movement list
- Finance: open entries (payable/receivable)
Acceptance criteria:
- Purchasing can approve and receive an order.
- Sales can invoice and deduct stock.
- Finance can list open entries and mark as paid.