# Dotlaa ERP — Pilot Store Operational Checklist

This document details the step-by-step operational workflows and verification tasks for store managers and cashiers at the first pilot clothing store launch (Boutique Alpha).

---

## 1. Day-to-Day Store Workflow Checklist

Follow this sequence of operations for daily testing or real store management.

### Scenario: Cycle of Goods & Cash Management
```mermaid
graph TD
    A[Create Product in Catalog] --> B[Receive Inventory via Goods Receipt]
    B --> C[Generate and Print Barcodes]
    C --> D[Open Cashier Shift]
    D --> E[Process Sales in POS Screen]
    E --> F[Handle Returns/Refunds if any]
    F --> G[Close Shift & Reconciliation]
    G --> H[Verify Dashboard Analytics]
```

#### [ ] Step 1: Create Product (Catalog Management)
*   **Action**: Log in as administrator/manager. Go to Catalog/Products.
*   **Task**: Create a new clothing product (e.g., "Classic Denim Jacket", SKU: `CLO-DNM-JKT`).
*   **Verification**:
    *   Confirm product status is active.
    *   Verify barcode and pricing fields are set correctly.

#### [ ] Step 2: Receive Inventory (Procurement / Goods Receipt)
*   **Action**: Create a Purchase Order (PO) or direct Goods Receipt.
*   **Task**: Receive 50 units of the created clothing item into the main warehouse/branch storage.
*   **Verification**:
    *   Verify inventory stock count for the branch updates from `0` to `50` units.
    *   Verify supplier status and cost prices are updated correctly.

#### [ ] Step 3: Generate and Print Barcode
*   **Action**: Select the newly received product in Barcode Generator.
*   **Task**: Configure template settings (e.g., height, barcode type like Code-128 or EAN-13) and print labels.
*   **Verification**:
    *   Ensure the generated barcode matches the item SKU or unique identifier.
    *   Verify the printed label contains name, price, and barcode readable by a standard USB/Bluetooth scanner.

#### [ ] Step 4: Open Cashier Shift
*   **Action**: Log in as cashier. Open POS/Register view.
*   **Task**: Select the active register (e.g., "Olaya Main POS Register") and enter the Opening Cash amount (e.g., `500.00` SAR).
*   **Verification**:
    *   Confirm the register status shifts to "Open".
    *   Confirm a new Shift ID is generated in the system.

#### [ ] Step 5: Process Sales (Sales POS)
*   **Action**: Scan barcode or select products in POS screen, add to cart, and checkout.
*   **Task**: complete a cash/card sale of 2 units of the clothing item.
*   **Verification**:
    *   Confirm sale completes successfully.
    *   Verify the active `shift_id` and `cash_register_id` are automatically stamped on the `sales` record in the database.
    *   Verify item inventory level decreases accordingly (e.g., from `50` to `48` units).

#### [ ] Step 6: Handle Return / Refund (Returns Management)
*   **Action**: Go to Sales History / Order Refund view.
*   **Task**: Process a return for 1 unit of the purchased item.
*   **Verification**:
    *   Confirm refund references the original sales transaction.
    *   Verify refunded cash (e.g., `150.00` SAR) is deducted from the current shift's cash movement register.
    *   Verify product stock increases by 1 unit (e.g., from `48` to `49` units).

#### [ ] Step 7: Close Cashier Shift & Reconciliation
*   **Action**: Cashier completes end-of-day cash count. Select "Close Shift".
*   **Task**: Input actual cash count in register drawer (e.g., `350.00` SAR).
*   **Verification**:
    *   Verify Expected Cash matches opening cash + sales cash - refunds cash - cash outs.
    *   Verify system records difference: `Difference = Actual Cash - Expected Cash`.
    *   Confirm shift status transitions to "Closed" and cashier is logged out of POS mode.

#### [ ] Step 8: Verify Dashboard Analytics
*   **Action**: Log in as store manager/administrator. Open Dashboard.
*   **Task**: Check daily metrics and KPIs.
*   **Verification**:
    *   Verify sales revenue, profit margin, transaction count, and inventory valuation update in real-time.
    *   Confirm the shift closures and cash flow amounts are aggregated in daily financial reporting.

---

## 2. Daily & Operational Health Tasks

Ensure these infrastructure and system checks are performed periodically to keep the pilot running smoothly:

| Daily Check | Target / Description | Frequency | Verification Method |
| :--- | :--- | :--- | :--- |
| **Backup Monitor** | Ensure daily backups complete successfully | Daily (automated) | Check backup storage (S3 / Local) and verify email notifications. |
| **Sentry Logs** | Check for active errors on backend or Flutter app | Every shift change | Check Sentry dashboard for new issues or crash spikes. |
| **Queue Health** | Check for delayed or failing jobs in the queue | Daily | Run `php artisan queue:failed` or monitor Redis dashboard. |
| **Tenant Isolation** | Verify no data leak or visibility across tenants | Periodic / Audit | Ensure all API calls specify tenant header / domain context. |
