{
  "meta": {
    "version": 1,
    "baseCurrency": "LKR",
    "languages": [
      "en",
      "ta",
      "si"
    ],
    "createdAt": "2026-05-07T03:02:23.091Z"
  },
  "companies": [
    {
      "id": "company-main",
      "name": "Obmast Holdings",
      "currency": "LKR",
      "taxNo": "VAT-ERP-001"
    }
  ],
  "branches": [
    {
      "id": "branch-main",
      "companyId": "company-main",
      "name": "Colombo Main",
      "code": "COL"
    },
    {
      "id": "branch-kandy",
      "companyId": "company-main",
      "name": "Kandy Branch",
      "code": "KAN"
    }
  ],
  "warehouses": [
    {
      "id": "wh-main",
      "branchId": "branch-main",
      "name": "Main Retail Warehouse"
    },
    {
      "id": "wh-cold",
      "branchId": "branch-main",
      "name": "Cold Room"
    },
    {
      "id": "wh-kandy",
      "branchId": "branch-kandy",
      "name": "Kandy Warehouse"
    }
  ],
  "roles": [
    {
      "id": "super-admin",
      "name": "Super Admin",
      "modules": [
        "*"
      ]
    },
    {
      "id": "company-admin",
      "name": "Company Admin",
      "modules": [
        "dashboard",
        "finance",
        "sales",
        "inventory",
        "hr",
        "pos"
      ]
    },
    {
      "id": "cashier",
      "name": "Cashier",
      "modules": [
        "dashboard",
        "pos",
        "sales",
        "inventory"
      ]
    },
    {
      "id": "third-party-shop",
      "name": "Third-party Shop",
      "modules": [
        "thirdParty"
      ]
    }
  ],
  "users": [
    {
      "id": "user-admin",
      "name": "ERP Super Admin",
      "email": "admin@erp.local",
      "passwordHash": "$2b$10$ykywdAF4jgdbo52W0ewcr.44R72SVDqkNb5So8IDi7FINmTeR7E42",
      "roleId": "super-admin",
      "companyId": "company-main",
      "branchId": "branch-main"
    },
    {
      "id": "user-cashier",
      "name": "Main Counter",
      "email": "cashier@erp.local",
      "passwordHash": "$2b$10$ykywdAF4jgdbo52W0ewcr.44R72SVDqkNb5So8IDi7FINmTeR7E42",
      "roleId": "cashier",
      "companyId": "company-main",
      "branchId": "branch-main"
    },
    {
      "id": "user-shop",
      "name": "Partner Shop",
      "email": "shop@erp.local",
      "passwordHash": "$2b$10$ykywdAF4jgdbo52W0ewcr.44R72SVDqkNb5So8IDi7FINmTeR7E42",
      "roleId": "third-party-shop",
      "companyId": "company-main",
      "branchId": "branch-main"
    }
  ],
  "modules": [
    {
      "key": "dashboard",
      "name": "Dashboard / BI"
    },
    {
      "key": "finance",
      "name": "Finance & Accounting"
    },
    {
      "key": "inventory",
      "name": "Inventory & Warehouse"
    },
    {
      "key": "hr",
      "name": "HR & Payroll"
    },
    {
      "key": "pos",
      "name": "Supermarket / Hypermarket POS"
    },
    {
      "key": "sales",
      "name": "Sales / Invoices"
    },
    {
      "key": "thirdParty",
      "name": "Third-party Shop Portal"
    },
    {
      "key": "services",
      "name": "Multi-Service Business"
    },
    {
      "key": "booking",
      "name": "Booking / Reservation"
    },
    {
      "key": "facility",
      "name": "Facility Management"
    },
    {
      "key": "construction",
      "name": "Construction / Contracting"
    },
    {
      "key": "manufacturing",
      "name": "Factory / Manufacturing"
    },
    {
      "key": "ecommerce",
      "name": "E-commerce"
    },
    {
      "key": "crm",
      "name": "Marketing / CRM"
    },
    {
      "key": "settings",
      "name": "Users, Roles & Settings"
    }
  ],
  "products": [
    {
      "id": "prod-rice-5kg",
      "sku": "SKU-RICE-5KG",
      "barcode": "4791001000011",
      "name": "Premium Samba Rice 5kg",
      "category": "Grocery",
      "unit": "Bag",
      "cost": 1850,
      "price": 2350,
      "taxRate": 0.15,
      "reorderLevel": 35
    },
    {
      "id": "prod-milk-1l",
      "sku": "SKU-MILK-1L",
      "barcode": "4791001000028",
      "name": "Fresh Milk 1L",
      "category": "Dairy",
      "unit": "Bottle",
      "cost": 410,
      "price": 520,
      "taxRate": 0,
      "reorderLevel": 50
    },
    {
      "id": "prod-detergent",
      "sku": "SKU-DETER-1KG",
      "barcode": "4791001000035",
      "name": "Laundry Detergent 1kg",
      "category": "Household",
      "unit": "Pack",
      "cost": 680,
      "price": 895,
      "taxRate": 0.15,
      "reorderLevel": 25
    },
    {
      "id": "prod-chicken",
      "sku": "SKU-CHK-1KG",
      "barcode": "4791001000042",
      "name": "Chicken 1kg",
      "category": "Meat",
      "unit": "Kg",
      "cost": 1120,
      "price": 1380,
      "taxRate": 0,
      "reorderLevel": 20
    }
  ],
  "stock": [
    {
      "id": "stock-1",
      "warehouseId": "wh-main",
      "productId": "prod-rice-5kg",
      "qty": 81,
      "batch": "RICE-MAY26",
      "expiryDate": "2026-12-30"
    },
    {
      "id": "stock-2",
      "warehouseId": "wh-main",
      "productId": "prod-milk-1l",
      "qty": 38,
      "batch": "MILK-0507",
      "expiryDate": "2026-05-14"
    },
    {
      "id": "stock-3",
      "warehouseId": "wh-main",
      "productId": "prod-detergent",
      "qty": 58,
      "batch": "DET-2026-A",
      "expiryDate": "2028-01-31"
    },
    {
      "id": "stock-4",
      "warehouseId": "wh-cold",
      "productId": "prod-chicken",
      "qty": 18,
      "batch": "CHK-0507",
      "expiryDate": "2026-05-10"
    },
    {
      "id": "stock-5",
      "warehouseId": "wh-kandy",
      "productId": "prod-rice-5kg",
      "qty": 34,
      "batch": "RICE-MAY26",
      "expiryDate": "2026-12-30"
    }
  ],
  "stockMovements": [
    {
      "id": "mov-1",
      "at": "2026-05-07T07:30:00.000Z",
      "type": "receive",
      "productId": "prod-rice-5kg",
      "fromWarehouseId": null,
      "toWarehouseId": "wh-main",
      "qty": 84,
      "batch": "RICE-MAY26",
      "expiryDate": "2026-12-30",
      "note": "Opening stock"
    },
    {
      "id": "mov-2",
      "at": "2026-05-07T07:35:00.000Z",
      "type": "receive",
      "productId": "prod-milk-1l",
      "fromWarehouseId": null,
      "toWarehouseId": "wh-main",
      "qty": 44,
      "batch": "MILK-0507",
      "expiryDate": "2026-05-14",
      "note": "Opening stock"
    },
    {
      "id": "mov-3",
      "at": "2026-05-07T07:40:00.000Z",
      "type": "receive",
      "productId": "prod-chicken",
      "fromWarehouseId": null,
      "toWarehouseId": "wh-cold",
      "qty": 18,
      "batch": "CHK-0507",
      "expiryDate": "2026-05-10",
      "note": "Opening stock"
    },
    {
      "id": "3JG0G6zgdiSIsh_DlUWwk",
      "at": "2026-05-07T07:48:06.610Z",
      "type": "sale",
      "productId": "prod-milk-1l",
      "fromWarehouseId": "wh-main",
      "toWarehouseId": null,
      "qty": 2,
      "batch": "MILK-0507",
      "expiryDate": "2026-05-14",
      "note": "POS sale"
    },
    {
      "id": "e2hYX8r74usRUpcXZAqu-",
      "at": "2026-05-07T07:48:06.610Z",
      "type": "sale",
      "productId": "prod-detergent",
      "fromWarehouseId": "wh-main",
      "toWarehouseId": null,
      "qty": 1,
      "batch": "DET-2026-A",
      "expiryDate": "2028-01-31",
      "note": "POS sale"
    },
    {
      "id": "yXOEFi8JOjZQRyf9uOAQe",
      "at": "2026-05-07T07:48:06.610Z",
      "type": "sale",
      "productId": "prod-rice-5kg",
      "fromWarehouseId": "wh-main",
      "toWarehouseId": null,
      "qty": 1,
      "batch": "RICE-MAY26",
      "expiryDate": "2026-12-30",
      "note": "POS sale"
    },
    {
      "id": "jMFWY8vZnbKklJNBwMcTF",
      "at": "2026-05-07T08:09:52.090Z",
      "type": "sale",
      "productId": "prod-rice-5kg",
      "fromWarehouseId": "wh-main",
      "toWarehouseId": null,
      "qty": 1,
      "batch": "RICE-MAY26",
      "expiryDate": "2026-12-30",
      "note": "Sales invoice"
    },
    {
      "id": "rbicCwlTXMcjOpDGRNPEf",
      "at": "2026-05-07T08:10:28.223Z",
      "type": "sale",
      "productId": "prod-detergent",
      "fromWarehouseId": "wh-main",
      "toWarehouseId": null,
      "qty": 1,
      "batch": "DET-2026-A",
      "expiryDate": "2028-01-31",
      "note": "POS sale"
    },
    {
      "id": "gUOdEvONfrz4jRqho9zRz",
      "at": "2026-05-07T08:10:28.223Z",
      "type": "sale",
      "productId": "prod-milk-1l",
      "fromWarehouseId": "wh-main",
      "toWarehouseId": null,
      "qty": 1,
      "batch": "MILK-0507",
      "expiryDate": "2026-05-14",
      "note": "POS sale"
    },
    {
      "id": "odlWFNh0iUUoHMEZVMuqd",
      "at": "2026-05-22T05:17:10.027Z",
      "type": "sale",
      "productId": "prod-rice-5kg",
      "fromWarehouseId": "wh-main",
      "toWarehouseId": null,
      "qty": 1,
      "batch": "RICE-MAY26",
      "expiryDate": "2026-12-30",
      "note": "Sales invoice"
    },
    {
      "id": "tWpAIALdHqxtrvIP7yIF8",
      "at": "2026-05-22T05:17:10.027Z",
      "type": "sale",
      "productId": "prod-milk-1l",
      "fromWarehouseId": "wh-main",
      "toWarehouseId": null,
      "qty": 1,
      "batch": "MILK-0507",
      "expiryDate": "2026-05-14",
      "note": "Sales invoice"
    },
    {
      "id": "71LFdUmgxt5g2qMVhp6fz",
      "at": "2026-05-22T05:17:10.027Z",
      "type": "sale",
      "productId": "prod-detergent",
      "fromWarehouseId": "wh-main",
      "toWarehouseId": null,
      "qty": 1,
      "batch": "DET-2026-A",
      "expiryDate": "2028-01-31",
      "note": "Sales invoice"
    },
    {
      "id": "iSFGS4opny9tKt8i3WMzL",
      "at": "2026-05-23T18:27:54.400Z",
      "type": "sale",
      "productId": "prod-milk-1l",
      "fromWarehouseId": "wh-main",
      "toWarehouseId": null,
      "qty": 2,
      "batch": "MILK-0507",
      "expiryDate": "2026-05-14",
      "note": "POS sale"
    }
  ],
  "accounts": [
    {
      "id": "acc-cash",
      "code": "1000",
      "name": "Cash on Hand",
      "type": "Asset"
    },
    {
      "id": "acc-bank",
      "code": "1010",
      "name": "Bank Account",
      "type": "Asset"
    },
    {
      "id": "acc-ar",
      "code": "1100",
      "name": "Accounts Receivable",
      "type": "Asset"
    },
    {
      "id": "acc-inventory",
      "code": "1200",
      "name": "Inventory Asset",
      "type": "Asset"
    },
    {
      "id": "acc-ap",
      "code": "2000",
      "name": "Accounts Payable",
      "type": "Liability"
    },
    {
      "id": "acc-sales",
      "code": "4000",
      "name": "Sales Revenue",
      "type": "Income"
    },
    {
      "id": "acc-cogs",
      "code": "5000",
      "name": "Cost of Goods Sold",
      "type": "Expense"
    },
    {
      "id": "acc-payroll",
      "code": "5100",
      "name": "Payroll Expense",
      "type": "Expense"
    }
  ],
  "journalEntries": [
    {
      "id": "je-1",
      "date": "2026-05-07",
      "branchId": "branch-main",
      "accountId": "acc-sales",
      "debit": 0,
      "credit": 685000,
      "memo": "Opening retail sales"
    },
    {
      "id": "je-2",
      "date": "2026-05-07",
      "branchId": "branch-main",
      "accountId": "acc-cash",
      "debit": 685000,
      "credit": 0,
      "memo": "Opening retail cash"
    },
    {
      "id": "je-3",
      "date": "2026-05-07",
      "branchId": "branch-main",
      "accountId": "acc-payroll",
      "debit": 142000,
      "credit": 0,
      "memo": "Payroll accrual"
    },
    {
      "id": "je-4",
      "date": "2026-05-07",
      "branchId": "branch-main",
      "accountId": "acc-ap",
      "debit": 0,
      "credit": 142000,
      "memo": "Payroll payable"
    },
    {
      "id": "iy02cId4ufvnkUZo316RE",
      "date": "2026-05-07",
      "branchId": "branch-main",
      "accountId": "acc-cash",
      "debit": 4140.65,
      "credit": 0,
      "memo": "POS-20260507-002"
    },
    {
      "id": "V72qSWAXpyl5pRmZqM-Fa",
      "date": "2026-05-07",
      "branchId": "branch-main",
      "accountId": "acc-sales",
      "debit": 0,
      "credit": 4140.65,
      "memo": "POS-20260507-002"
    },
    {
      "id": "RD9uzF88szCvEutJERV1i",
      "date": "2026-05-07",
      "branchId": "branch-main",
      "accountId": "acc-ar",
      "debit": 2350,
      "credit": 0,
      "memo": "INV-20260507-001"
    },
    {
      "id": "MTA-AZLCM1JRFuaOvcbYi",
      "date": "2026-05-07",
      "branchId": "branch-main",
      "accountId": "acc-sales",
      "debit": 0,
      "credit": 2350,
      "memo": "INV-20260507-001"
    },
    {
      "id": "dDkTOMKqaDZ4tDaeD_dkj",
      "date": "2026-05-07",
      "branchId": "branch-main",
      "accountId": "acc-cash",
      "debit": 2350,
      "credit": 0,
      "memo": "INV-20260507-001 paid"
    },
    {
      "id": "CnQEzBPqnzXmKals9UEKx",
      "date": "2026-05-07",
      "branchId": "branch-main",
      "accountId": "acc-ar",
      "debit": 0,
      "credit": 2350,
      "memo": "INV-20260507-001 paid"
    },
    {
      "id": "x4xabj9gdI6MZyZ4z0ONI",
      "date": "2026-05-07",
      "branchId": "branch-main",
      "accountId": "acc-cash",
      "debit": 1378.15,
      "credit": 0,
      "memo": "POS-20260507-003"
    },
    {
      "id": "lEb54dKc95G6PaQ3Fd4Fg",
      "date": "2026-05-07",
      "branchId": "branch-main",
      "accountId": "acc-sales",
      "debit": 0,
      "credit": 1378.15,
      "memo": "POS-20260507-003"
    },
    {
      "id": "v-YJ3In4qIVnhz-_QUfEv",
      "date": "2026-05-22",
      "branchId": "branch-main",
      "accountId": "acc-ar",
      "debit": 3755,
      "credit": 0,
      "memo": "INV-20260522-002"
    },
    {
      "id": "BNVQEgNvFh6Hpn_UGli7X",
      "date": "2026-05-22",
      "branchId": "branch-main",
      "accountId": "acc-sales",
      "debit": 0,
      "credit": 3755,
      "memo": "INV-20260522-002"
    },
    {
      "id": "UMGXY6yuSYd4DlLS5nVd2",
      "date": "2026-05-23",
      "branchId": "branch-main",
      "accountId": "acc-cash",
      "debit": 1000,
      "credit": 0,
      "memo": "POS-20260523-004"
    },
    {
      "id": "geIGjAHQGgkCoOvmwPjq-",
      "date": "2026-05-23",
      "branchId": "branch-main",
      "accountId": "acc-sales",
      "debit": 0,
      "credit": 1000,
      "memo": "POS-20260523-004"
    }
  ],
  "receivables": [
    {
      "id": "ar-1",
      "customer": "ABC Facilities",
      "amount": 320000,
      "dueDate": "2026-05-22",
      "status": "Open"
    },
    {
      "id": "ar-2",
      "customer": "North Construction",
      "amount": 480000,
      "dueDate": "2026-06-01",
      "status": "Open"
    },
    {
      "id": "1-1NOyvmCaxb9TlcB1jtm",
      "customer": "test",
      "amount": 2350,
      "dueDate": "2026-05-07",
      "status": "Paid"
    },
    {
      "id": "EsInE0XpLymrJfFiCTL1_",
      "customer": "test",
      "amount": 3755,
      "dueDate": "2026-05-22",
      "status": "Open"
    }
  ],
  "payables": [
    {
      "id": "ap-1",
      "supplier": "Lanka Grocery Distributors",
      "amount": 255000,
      "dueDate": "2026-05-17",
      "status": "Open"
    },
    {
      "id": "ap-2",
      "supplier": "Cold Chain Logistics",
      "amount": 92000,
      "dueDate": "2026-05-20",
      "status": "Open"
    }
  ],
  "employees": [
    {
      "id": "emp-1",
      "employeeNo": "EMP-001",
      "name": "Nimal Perera",
      "department": "Retail",
      "role": "Branch Manager",
      "branch": "Colombo Main",
      "status": "Active",
      "monthlySalary": 180000,
      "visaExpiry": "2027-01-15",
      "idExpiry": "2026-07-12"
    },
    {
      "id": "emp-2",
      "employeeNo": "EMP-002",
      "name": "Fathima Rizna",
      "department": "Finance",
      "role": "Accountant",
      "branch": "Colombo Main",
      "status": "Active",
      "monthlySalary": 150000,
      "visaExpiry": "2026-09-28",
      "idExpiry": "2026-05-29"
    },
    {
      "id": "emp-3",
      "employeeNo": "EMP-003",
      "name": "Suresh Kumar",
      "department": "Warehouse",
      "role": "Warehouse Staff",
      "branch": "Colombo Main",
      "status": "Active",
      "monthlySalary": 98000,
      "visaExpiry": "2026-06-18",
      "idExpiry": "2028-02-02"
    },
    {
      "id": "emp-4",
      "employeeNo": "EMP-004",
      "name": "Kasun Silva",
      "department": "POS",
      "role": "Cashier",
      "branch": "Kandy Branch",
      "status": "On Leave",
      "monthlySalary": 88000,
      "visaExpiry": "2027-04-03",
      "idExpiry": "2026-11-30"
    }
  ],
  "attendance": [
    {
      "id": "att-1",
      "employeeId": "emp-1",
      "date": "2026-05-07",
      "status": "Present",
      "overtimeHours": 1
    },
    {
      "id": "att-2",
      "employeeId": "emp-2",
      "date": "2026-05-07",
      "status": "Present",
      "overtimeHours": 0
    },
    {
      "id": "att-3",
      "employeeId": "emp-3",
      "date": "2026-05-07",
      "status": "Present",
      "overtimeHours": 2
    },
    {
      "id": "att-4",
      "employeeId": "emp-4",
      "date": "2026-05-07",
      "status": "Leave",
      "overtimeHours": 0
    }
  ],
  "leaveRequests": [
    {
      "id": "leave-1",
      "employeeId": "emp-4",
      "fromDate": "2026-05-07",
      "toDate": "2026-05-09",
      "type": "Annual",
      "status": "Approved",
      "reason": "Family event"
    },
    {
      "id": "leave-2",
      "employeeId": "emp-3",
      "fromDate": "2026-05-16",
      "toDate": "2026-05-17",
      "type": "Medical",
      "status": "Pending",
      "reason": "Clinic visit"
    }
  ],
  "deductions": [
    {
      "id": "ded-1",
      "employeeId": "emp-3",
      "type": "Loan",
      "amount": 12000,
      "balance": 48000,
      "monthlyDeduction": 6000,
      "status": "Active"
    },
    {
      "id": "ded-2",
      "employeeId": "emp-2",
      "type": "Advance",
      "amount": 15000,
      "balance": 15000,
      "monthlyDeduction": 5000,
      "status": "Active"
    }
  ],
  "payrollRuns": [
    {
      "id": "pay-2026-04",
      "period": "2026-04",
      "status": "Approved",
      "createdAt": "2026-04-30T12:00:00.000Z",
      "totals": {
        "gross": 516000,
        "overtime": 11250,
        "deductions": 11000,
        "net": 516250
      },
      "lines": [
        {
          "employeeId": "emp-1",
          "employeeNo": "EMP-001",
          "employee": "Nimal Perera",
          "gross": 180000,
          "overtime": 4500,
          "deductions": 0,
          "net": 184500
        },
        {
          "employeeId": "emp-2",
          "employeeNo": "EMP-002",
          "employee": "Fathima Rizna",
          "gross": 150000,
          "overtime": 0,
          "deductions": 5000,
          "net": 145000
        },
        {
          "employeeId": "emp-3",
          "employeeNo": "EMP-003",
          "employee": "Suresh Kumar",
          "gross": 98000,
          "overtime": 6750,
          "deductions": 6000,
          "net": 98750
        },
        {
          "employeeId": "emp-4",
          "employeeNo": "EMP-004",
          "employee": "Kasun Silva",
          "gross": 88000,
          "overtime": 0,
          "deductions": 0,
          "net": 88000
        }
      ]
    }
  ],
  "sales": [
    {
      "id": "sale-1",
      "receiptNo": "POS-20260507-001",
      "date": "2026-05-07T08:30:00.000Z",
      "branchId": "branch-main",
      "warehouseId": "wh-main",
      "cashierId": "user-cashier",
      "customerName": "Walk-in customer",
      "customerPhone": "",
      "loyaltyNumber": "",
      "paymentMethod": "cash",
      "subtotal": 9870,
      "discount": 0,
      "tax": 0,
      "total": 9870,
      "status": "Completed",
      "items": [
        {
          "productId": "prod-rice-5kg",
          "qty": 3,
          "price": 2350
        },
        {
          "productId": "prod-milk-1l",
          "qty": 2,
          "price": 520
        },
        {
          "productId": "prod-detergent",
          "qty": 2,
          "price": 895
        }
      ]
    },
    {
      "id": "d8hxTCp4ts9S4K0qApS4Y",
      "receiptNo": "POS-20260507-002",
      "date": "2026-05-07T07:48:06.610Z",
      "branchId": "branch-main",
      "warehouseId": "wh-main",
      "cashierId": "user-cashier",
      "customerName": "Walk-in customer",
      "customerPhone": "",
      "loyaltyNumber": "",
      "paymentMethod": "cash",
      "subtotal": 4285,
      "discount": 144.35,
      "tax": 0,
      "total": 4140.65,
      "status": "Completed",
      "items": [
        {
          "productId": "prod-milk-1l",
          "qty": 2,
          "price": 520
        },
        {
          "productId": "prod-detergent",
          "qty": 1,
          "price": 895
        },
        {
          "productId": "prod-rice-5kg",
          "qty": 1,
          "price": 2350
        }
      ]
    },
    {
      "id": "EerB8h5eFduEOS4_7s85k",
      "receiptNo": "POS-20260507-003",
      "date": "2026-05-07T08:10:28.223Z",
      "branchId": "branch-main",
      "warehouseId": "wh-main",
      "cashierId": "user-cashier",
      "customerName": "M. Rizwan",
      "customerPhone": "0771234567",
      "loyaltyNumber": "LOY-1001",
      "paymentMethod": "cash",
      "subtotal": 1415,
      "discount": 36.85,
      "tax": 0,
      "total": 1378.15,
      "status": "Completed",
      "items": [
        {
          "productId": "prod-detergent",
          "qty": 1,
          "price": 895
        },
        {
          "productId": "prod-milk-1l",
          "qty": 1,
          "price": 520
        }
      ]
    },
    {
      "id": "PnT3oN0-5CrovmKuEdQAX",
      "receiptNo": "POS-20260523-004",
      "date": "2026-05-23T18:27:54.400Z",
      "branchId": "branch-main",
      "warehouseId": "wh-main",
      "cashierId": "user-cashier",
      "customerName": "Walk-in customer",
      "customerPhone": "",
      "loyaltyNumber": "",
      "paymentMethod": "cash",
      "subtotal": 1040,
      "discount": 40,
      "tax": 0,
      "total": 1000,
      "status": "Completed",
      "items": [
        {
          "productId": "prod-milk-1l",
          "qty": 2,
          "price": 520
        }
      ]
    }
  ],
  "salesInvoices": [
    {
      "id": "1-1NOyvmCaxb9TlcB1jtm",
      "invoiceNo": "INV-20260507-001",
      "date": "2026-05-07T08:09:52.090Z",
      "branchId": "branch-main",
      "warehouseId": "wh-main",
      "customerName": "test",
      "customerPhone": "88888",
      "dueDate": "2026-05-07",
      "paymentMethod": "cash",
      "subtotal": 2350,
      "discount": 0,
      "tax": 0,
      "total": 2350,
      "status": "Paid",
      "items": [
        {
          "productId": "prod-rice-5kg",
          "qty": 1,
          "price": 2350
        }
      ],
      "updatedAt": "2026-05-07T08:09:58.005Z"
    },
    {
      "id": "EsInE0XpLymrJfFiCTL1_",
      "invoiceNo": "INV-20260522-002",
      "date": "2026-05-22T05:17:10.027Z",
      "branchId": "branch-main",
      "warehouseId": "wh-main",
      "customerName": "test",
      "customerPhone": "1234",
      "dueDate": "2026-05-22",
      "paymentMethod": "cash",
      "subtotal": 3765,
      "discount": 10,
      "lineDiscount": 0,
      "totalDiscount": 10,
      "tax": 0,
      "total": 3755,
      "status": "Issued",
      "items": [
        {
          "productId": "prod-rice-5kg",
          "qty": 1,
          "price": 2350,
          "discount": 0
        },
        {
          "productId": "prod-milk-1l",
          "qty": 1,
          "price": 520,
          "discount": 0
        },
        {
          "productId": "prod-detergent",
          "qty": 1,
          "price": 895,
          "discount": 0
        }
      ]
    }
  ],
  "invoiceSettings": {
    "companyName": "TOP TECH (PVT) LTD",
    "logoText": "TT",
    "letterheadTitle": "Invoice",
    "address": "Ampara Road, Sammanthurai",
    "phone": "0776017016 / 0751601701",
    "email": "toptech2022@gmail.com",
    "taxNo": "Reg. No: PV00251126",
    "accentColor": "#2f3192",
    "footerNote": "Thank you for your business.",
    "terms": "Please verify goods at the time of delivery. Payment is due according to the agreed terms.",
    "bankDetails": "Bank details can be added from Invoice Design.",
    "currencyCode": "LKR",
    "currencyLabel": "Sri Lankan rupees",
    "letterheadHeader": "/letterhead/toptech-header.png",
    "letterheadFooter": "/letterhead/toptech-footer.png",
    "updatedAt": "2026-05-07T11:37:16.836Z"
  },
  "customers": [
    {
      "id": "cust-1",
      "name": "Walk-in customer",
      "phone": "",
      "loyaltyNumber": "",
      "loyaltyPoints": 0
    },
    {
      "id": "cust-2",
      "name": "M. Rizwan",
      "phone": "0771234567",
      "loyaltyNumber": "LOY-1001",
      "loyaltyPoints": 253
    },
    {
      "id": "cust-3",
      "name": "Anjali Stores",
      "phone": "0777770000",
      "loyaltyNumber": "LOY-1002",
      "loyaltyPoints": 520
    }
  ],
  "promotions": [
    {
      "id": "promo-1",
      "name": "Grocery weekend 5%",
      "type": "category-percent",
      "category": "Grocery",
      "value": 5,
      "status": "Active"
    },
    {
      "id": "promo-2",
      "name": "Household saver 3%",
      "type": "category-percent",
      "category": "Household",
      "value": 3,
      "status": "Active"
    }
  ],
  "posReturns": [],
  "posShifts": [
    {
      "id": "shift-1",
      "cashierId": "user-cashier",
      "branchId": "branch-main",
      "counterNo": "Counter 1",
      "openedAt": "2026-05-07T08:00:00.000Z",
      "closedAt": null,
      "openingCash": 25000,
      "countedCash": null,
      "expectedCash": null,
      "variance": null,
      "status": "Open"
    }
  ],
  "serviceCatalog": [
    {
      "id": "svc-cleaning",
      "code": "SVC-CLN",
      "name": "Deep Cleaning",
      "category": "Cleaning",
      "basePrice": 18000,
      "defaultDurationHours": 5,
      "repeatable": true,
      "status": "Active"
    },
    {
      "id": "svc-it",
      "code": "SVC-IT",
      "name": "IT Support Visit",
      "category": "IT Support",
      "basePrice": 9500,
      "defaultDurationHours": 2,
      "repeatable": true,
      "status": "Active"
    },
    {
      "id": "svc-install",
      "code": "SVC-INS",
      "name": "Equipment Installation",
      "category": "Installation",
      "basePrice": 22000,
      "defaultDurationHours": 4,
      "repeatable": false,
      "status": "Active"
    }
  ],
  "serviceQuotations": [
    {
      "id": "sq-1",
      "quotationNo": "SQ-20260507-001",
      "customerName": "ABC Facilities",
      "serviceId": "svc-cleaning",
      "qty": 2,
      "price": 18000,
      "discount": 1000,
      "total": 35000,
      "status": "Accepted",
      "validUntil": "2026-05-20",
      "note": "Two-floor cleaning package"
    },
    {
      "id": "sq-2",
      "quotationNo": "SQ-20260507-002",
      "customerName": "Lanka Office",
      "serviceId": "svc-it",
      "qty": 1,
      "price": 9500,
      "discount": 0,
      "total": 9500,
      "status": "Sent",
      "validUntil": "2026-05-18",
      "note": "Network diagnosis"
    }
  ],
  "serviceWorkOrders": [
    {
      "id": "wo-1",
      "workOrderNo": "WO-20260507-001",
      "quotationId": "sq-1",
      "customerName": "ABC Facilities",
      "serviceId": "svc-cleaning",
      "assignedEmployeeId": "emp-3",
      "scheduledDate": "2026-05-08",
      "status": "Scheduled",
      "hoursWorked": 0,
      "materials": [],
      "repeatSchedule": "Monthly",
      "invoiceId": null
    }
  ],
  "serviceInvoices": [],
  "bookingResources": [
    {
      "id": "res-room-1",
      "code": "ROOM-01",
      "name": "Meeting Room A",
      "type": "Room",
      "branchId": "branch-main",
      "capacity": 12,
      "hourlyRate": 3500,
      "status": "Active"
    },
    {
      "id": "res-van-1",
      "code": "VEH-01",
      "name": "Delivery Van",
      "type": "Vehicle",
      "branchId": "branch-main",
      "capacity": 2,
      "hourlyRate": 4500,
      "status": "Active"
    },
    {
      "id": "res-tech-1",
      "code": "STAFF-TECH",
      "name": "Technician Slot",
      "type": "Staff",
      "branchId": "branch-main",
      "capacity": 1,
      "hourlyRate": 2500,
      "status": "Active"
    }
  ],
  "bookings": [
    {
      "id": "book-1",
      "bookingNo": "BK-20260507-001",
      "customerName": "ABC Facilities",
      "customerPhone": "0775551111",
      "resourceId": "res-room-1",
      "date": "2026-05-09",
      "startTime": "10:00",
      "endTime": "12:00",
      "amount": 7000,
      "advancePaid": 3500,
      "status": "Confirmed",
      "qrCode": "QR-BK-20260507-001",
      "remindersSent": 1,
      "checkedInAt": null,
      "cancellationReason": ""
    },
    {
      "id": "book-2",
      "bookingNo": "BK-20260507-002",
      "customerName": "N. Fernando",
      "customerPhone": "0775552222",
      "resourceId": "res-tech-1",
      "date": "2026-05-10",
      "startTime": "14:00",
      "endTime": "16:00",
      "amount": 5000,
      "advancePaid": 1000,
      "status": "Pending",
      "qrCode": "QR-BK-20260507-002",
      "remindersSent": 0,
      "checkedInAt": null,
      "cancellationReason": ""
    }
  ],
  "facilityBuildings": [
    {
      "id": "fb-1",
      "code": "BLD-001",
      "name": "Orion Tower",
      "branchId": "branch-main",
      "address": "Colombo 03",
      "manager": "Nimal Perera",
      "status": "Active"
    },
    {
      "id": "fb-2",
      "code": "BLD-002",
      "name": "Kandy Arcade",
      "branchId": "branch-kandy",
      "address": "Kandy City",
      "manager": "Kasun Silva",
      "status": "Active"
    }
  ],
  "facilityAssets": [
    {
      "id": "fa-1",
      "buildingId": "fb-1",
      "code": "AC-01",
      "name": "Lobby AC Unit",
      "type": "HVAC",
      "location": "Lobby",
      "status": "Operational",
      "warrantyExpiry": "2026-11-30"
    },
    {
      "id": "fa-2",
      "buildingId": "fb-1",
      "code": "LIFT-01",
      "name": "Passenger Lift 1",
      "type": "Lift",
      "location": "Core A",
      "status": "Operational",
      "warrantyExpiry": "2027-02-15"
    },
    {
      "id": "fa-3",
      "buildingId": "fb-2",
      "code": "GEN-01",
      "name": "Backup Generator",
      "type": "Electrical",
      "location": "Basement",
      "status": "Needs Service",
      "warrantyExpiry": "2026-08-20"
    }
  ],
  "facilityTickets": [
    {
      "id": "ft-1",
      "ticketNo": "FM-20260507-001",
      "buildingId": "fb-1",
      "assetId": "fa-1",
      "requester": "Tenant A",
      "category": "HVAC",
      "priority": "High",
      "description": "AC not cooling",
      "status": "Open",
      "createdAt": "2026-05-07T08:45:00.000Z",
      "dueAt": "2026-05-07T12:45:00.000Z",
      "assignedEmployeeId": "emp-3"
    },
    {
      "id": "ft-2",
      "ticketNo": "FM-20260507-002",
      "buildingId": "fb-2",
      "assetId": "fa-3",
      "requester": "Security Desk",
      "category": "Electrical",
      "priority": "Medium",
      "description": "Generator service warning",
      "status": "In Progress",
      "createdAt": "2026-05-07T09:30:00.000Z",
      "dueAt": "2026-05-08T09:30:00.000Z",
      "assignedEmployeeId": "emp-1"
    }
  ],
  "facilityWorkOrders": [
    {
      "id": "fwo-1",
      "workOrderNo": "FWO-20260507-001",
      "ticketId": "ft-2",
      "scheduleId": null,
      "buildingId": "fb-2",
      "assetId": "fa-3",
      "assignedEmployeeId": "emp-1",
      "scheduledDate": "2026-05-08",
      "status": "In Progress",
      "laborHours": 1.5,
      "materialCost": 3500,
      "resolution": ""
    }
  ],
  "preventiveSchedules": [
    {
      "id": "pm-1",
      "buildingId": "fb-1",
      "assetId": "fa-2",
      "title": "Lift safety inspection",
      "frequency": "Monthly",
      "nextDueDate": "2026-05-15",
      "assignedEmployeeId": "emp-3",
      "status": "Scheduled"
    },
    {
      "id": "pm-2",
      "buildingId": "fb-2",
      "assetId": "fa-3",
      "title": "Generator load test",
      "frequency": "Quarterly",
      "nextDueDate": "2026-05-20",
      "assignedEmployeeId": "emp-1",
      "status": "Scheduled"
    }
  ],
  "amcContracts": [
    {
      "id": "amc-1",
      "vendor": "CoolAir Engineering",
      "buildingId": "fb-1",
      "scope": "HVAC maintenance",
      "startDate": "2026-01-01",
      "endDate": "2026-12-31",
      "amount": 420000,
      "status": "Active"
    },
    {
      "id": "amc-2",
      "vendor": "LiftCare Lanka",
      "buildingId": "fb-1",
      "scope": "Lift maintenance",
      "startDate": "2026-03-01",
      "endDate": "2027-02-28",
      "amount": 360000,
      "status": "Active"
    }
  ],
  "utilityReadings": [
    {
      "id": "ur-1",
      "buildingId": "fb-1",
      "utility": "Electricity",
      "readingDate": "2026-05-07",
      "meterReading": 128840,
      "amount": 185000
    },
    {
      "id": "ur-2",
      "buildingId": "fb-1",
      "utility": "Water",
      "readingDate": "2026-05-07",
      "meterReading": 4480,
      "amount": 42000
    }
  ],
  "facilitySchedules": [
    {
      "id": "fs-1",
      "buildingId": "fb-1",
      "type": "Cleaning",
      "assignedTeam": "Morning Cleaning Team",
      "scheduleDate": "2026-05-08",
      "status": "Scheduled"
    },
    {
      "id": "fs-2",
      "buildingId": "fb-1",
      "type": "Security",
      "assignedTeam": "Night Security Team",
      "scheduleDate": "2026-05-08",
      "status": "Scheduled"
    }
  ],
  "constructionProjects": [
    {
      "id": "cp-1",
      "projectNo": "PRJ-001",
      "name": "Orion Tower Fit-out",
      "client": "ABC Facilities",
      "contractValue": 3500000,
      "budget": 2850000,
      "progress": 42,
      "retentionPercent": 5,
      "status": "Active"
    },
    {
      "id": "cp-2",
      "projectNo": "PRJ-002",
      "name": "Kandy Arcade Renovation",
      "client": "Kandy Arcade",
      "contractValue": 1800000,
      "budget": 1450000,
      "progress": 28,
      "retentionPercent": 5,
      "status": "Active"
    }
  ],
  "constructionMaterialRequests": [
    {
      "id": "cmr-1",
      "requestNo": "MR-20260507-001",
      "projectId": "cp-1",
      "productId": "prod-detergent",
      "warehouseId": "wh-main",
      "qty": 4,
      "status": "Pending",
      "requestedBy": "Suresh Kumar",
      "note": "Site cleaning supplies"
    }
  ],
  "constructionBillings": [
    {
      "id": "cb-1",
      "billingNo": "PB-20260507-001",
      "projectId": "cp-1",
      "amount": 450000,
      "retention": 22500,
      "netAmount": 427500,
      "status": "Issued"
    }
  ],
  "manufacturingBoms": [
    {
      "id": "bom-1",
      "code": "BOM-RICEPACK",
      "finishedProductId": "prod-rice-5kg",
      "outputQty": 1,
      "components": [
        {
          "productId": "prod-rice-5kg",
          "qty": 1
        }
      ],
      "status": "Active"
    }
  ],
  "productionOrders": [
    {
      "id": "po-1",
      "orderNo": "MO-20260507-001",
      "bomId": "bom-1",
      "plannedQty": 10,
      "completedQty": 0,
      "machine": "Packing Line 1",
      "status": "Planned",
      "qcStatus": "Pending",
      "scrapQty": 0
    }
  ],
  "ecommerceOrders": [
    {
      "id": "eo-1",
      "orderNo": "WEB-20260507-001",
      "customerName": "Online Customer",
      "phone": "0771112222",
      "status": "Processing",
      "paymentMethod": "COD",
      "deliveryStatus": "Pending",
      "total": 2870,
      "items": [
        {
          "productId": "prod-rice-5kg",
          "qty": 1,
          "price": 2350
        },
        {
          "productId": "prod-milk-1l",
          "qty": 1,
          "price": 520
        }
      ]
    }
  ],
  "ecommerceCoupons": [
    {
      "id": "ec-1",
      "code": "WELCOME5",
      "type": "percent",
      "value": 5,
      "status": "Active"
    }
  ],
  "crmLeads": [
    {
      "id": "lead-1",
      "name": "Green Towers",
      "phone": "0774443333",
      "source": "Website",
      "stage": "Qualified",
      "value": 650000,
      "nextFollowUp": "2026-05-12",
      "owner": "Nimal Perera"
    },
    {
      "id": "lead-2",
      "name": "Metro Retail",
      "phone": "0772221111",
      "source": "WhatsApp",
      "stage": "New",
      "value": 180000,
      "nextFollowUp": "2026-05-09",
      "owner": "Fathima Rizna"
    }
  ],
  "crmCampaigns": [
    {
      "id": "camp-1",
      "name": "May Facility Promo",
      "channel": "WhatsApp",
      "budget": 75000,
      "leads": 120,
      "conversions": 14,
      "revenue": 420000,
      "status": "Active"
    }
  ],
  "auditLogs": [
    {
      "id": "audit-1",
      "at": "2026-05-07T08:00:00.000Z",
      "actorId": "user-admin",
      "action": "seed.created",
      "entity": "system",
      "entityId": "company-main"
    },
    {
      "id": "QOMD8vjPz6GRF8VhuUDfm",
      "at": "2026-05-07T07:48:06.610Z",
      "actorId": "user-admin",
      "action": "pos.sale.created",
      "entity": "sale",
      "entityId": "d8hxTCp4ts9S4K0qApS4Y"
    },
    {
      "id": "q5GSn7Ne5qx1vsr9-tTdA",
      "at": "2026-05-07T08:09:52.090Z",
      "actorId": "user-admin",
      "action": "sales.invoice.created",
      "entity": "salesInvoice",
      "entityId": "1-1NOyvmCaxb9TlcB1jtm"
    },
    {
      "id": "hvEZfTOOU3o11M7eChhlj",
      "at": "2026-05-07T08:09:58.005Z",
      "actorId": "user-admin",
      "action": "sales.invoice.paid",
      "entity": "salesInvoice",
      "entityId": "1-1NOyvmCaxb9TlcB1jtm"
    },
    {
      "id": "h9aKwMxwnGtT2YW2wpk5P",
      "at": "2026-05-07T08:10:28.223Z",
      "actorId": "user-admin",
      "action": "pos.sale.created",
      "entity": "sale",
      "entityId": "EerB8h5eFduEOS4_7s85k"
    },
    {
      "id": "PeR2K30scXFTuBLGNkJpe",
      "at": "2026-05-07T11:23:14.975Z",
      "actorId": "user-admin",
      "action": "sales.invoiceSettings.updated",
      "entity": "invoiceSettings",
      "entityId": "default"
    },
    {
      "id": "l5TdZP35EhPDTVPaXCCTB",
      "at": "2026-05-07T11:37:16.156Z",
      "actorId": "user-admin",
      "action": "sales.invoiceSettings.updated",
      "entity": "invoiceSettings",
      "entityId": "default"
    },
    {
      "id": "XRS6fS-0teMR6pVSVMb0n",
      "at": "2026-05-07T11:37:16.836Z",
      "actorId": "user-admin",
      "action": "sales.invoiceSettings.updated",
      "entity": "invoiceSettings",
      "entityId": "default"
    },
    {
      "id": "bPOFuIVTccwFOWsssJWyt",
      "at": "2026-05-22T05:17:10.027Z",
      "actorId": "user-admin",
      "action": "sales.invoice.created",
      "entity": "salesInvoice",
      "entityId": "EsInE0XpLymrJfFiCTL1_"
    },
    {
      "id": "94knpumhlpwyH-grcYCpx",
      "at": "2026-05-23T18:27:54.400Z",
      "actorId": "user-admin",
      "action": "pos.sale.created",
      "entity": "sale",
      "entityId": "PnT3oN0-5CrovmKuEdQAX"
    }
  ],
  "moduleData": {
    "services": [
      {
        "title": "Service Catalog",
        "description": "Cleaning, IT support, repair, delivery, and installation services with quotations and work orders."
      },
      {
        "title": "Staff Assignment",
        "description": "Assign employees, track time, consume materials, and invoice completed work."
      },
      {
        "title": "Repeat Scheduling",
        "description": "Recurring service visits and contract based maintenance cycles."
      }
    ],
    "booking": [
      {
        "title": "Booking Calendar",
        "description": "Time slots for staff, rooms, vehicles, meeting spaces, and rental assets."
      },
      {
        "title": "Payments & Rules",
        "description": "Advance payments, reschedule rules, cancellations, and automated reminders."
      },
      {
        "title": "QR Check-in",
        "description": "Fast customer arrival verification for reservations and appointments."
      }
    ],
    "facility": [
      {
        "title": "Building Registry",
        "description": "Buildings, units, rooms, assets, AMC contracts, and utility tracking."
      },
      {
        "title": "Tickets & Work Orders",
        "description": "Complaint ticketing, SLA timers, technician dispatch, cleaning and security schedules."
      },
      {
        "title": "Maintenance Reporting",
        "description": "Open complaints, SLA breaches, technician performance, and cost reports."
      }
    ],
    "construction": [
      {
        "title": "Projects & Contracts",
        "description": "Client contracts, BOQ, budget estimation, variation orders, and retention tracking."
      },
      {
        "title": "Site Operations",
        "description": "Material requests with online approval, site inventory, labor, subcontractors, and equipment."
      },
      {
        "title": "Project Profitability",
        "description": "Cost vs budget, material consumption, labor cost, and project margin analysis."
      }
    ],
    "manufacturing": [
      {
        "title": "BOM & Routing",
        "description": "Raw material inventory, bill of materials, routing, planning, and work orders."
      },
      {
        "title": "Shop Floor Control",
        "description": "Machine allocation, QC checkpoints, finished goods stock, and scrap management."
      },
      {
        "title": "Production Reports",
        "description": "Daily production, downtime, variance, costing, and efficiency metrics."
      }
    ],
    "ecommerce": [
      {
        "title": "Storefront",
        "description": "Customer login, catalog sync, cart, checkout, COD, coupons, and order tracking."
      },
      {
        "title": "Delivery & Returns",
        "description": "Delivery assignment, returns, refunds, payment gateway, SMS, and email notifications."
      },
      {
        "title": "ERP Sync",
        "description": "Shared product master, inventory, customers, orders, and finance postings."
      }
    ],
    "crm": [
      {
        "title": "Lead Pipeline",
        "description": "Lead capture, customer database, sales pipeline, follow-up reminders, and conversion reports."
      },
      {
        "title": "Campaigns",
        "description": "Email, SMS, WhatsApp, coupons, loyalty campaigns, and promotion tracking."
      },
      {
        "title": "ROI Reports",
        "description": "Campaign ROI, repeat customer rate, and conversion performance."
      }
    ],
    "settings": [
      {
        "title": "Role Based Permissions",
        "description": "Super admin, company admin, managers, accountant, cashier, technicians, employees, and customer roles."
      },
      {
        "title": "Security Controls",
        "description": "Audit logs, optional 2FA, SSL-ready deployment, daily backup workflow, and scoped user access."
      },
      {
        "title": "Tenant Setup",
        "description": "Multi-company, multi-branch, multi-warehouse, multi-language, and multi-currency configuration."
      }
    ]
  }
}
