{
  "version": "1.0.0",
  "updatedAt": "2026-09-21T08:16:17.395Z",
  "generator": "OmniTrade ERP (Made by: www.liveasoft.com)",
  "companies": [
    {
      "id": "comp_apex",
      "code": "APD",
      "name": "Apex Pharma Distro",
      "legalName": "Apex Pharma Distribution & Healthcare Logistics (Pvt) Ltd",
      "logo": "https://images.unsplash.com/photo-1584308666744-24d5c474f2ae?w=160&auto=format&fit=crop&q=80",
      "address": "Plot 42-B, Commercial Avenue, Phase 2, Korangi Industrial Area",
      "city": "Karachi",
      "province": "Sindh",
      "country": "Pakistan",
      "phone": "+92 21 35061122",
      "whatsApp": "+92 300 1234567",
      "email": "info@apexpharmadistro.com",
      "website": "https://apexpharmadistro.com",
      "ntn": "4120938-7",
      "strn": "3277876123491",
      "licenseNo": "DSL-KHI-4492/2024",
      "defaultCurrency": "PKR",
      "financialYear": "2025-2026",
      "invoicePrefix": "INV-AP-",
      "challanPrefix": "DC-AP-",
      "paymentReceiptPrefix": "RCT-AP-",
      "brandColor": "#0284c7",
      "defaultWarehouseId": "wh_apex_1",
      "termsAndConditions": "1. Goods once sold will only be returned within 7 days if defective.\n2. Expiry claims must be submitted 60 days before product expiration date.\n3. Interest @ 1.5% per month will be charged on overdue accounts after 30 days credit limit.",
      "footerNotes": "Thank you for partnering with Apex Pharma Distro. Authorized Pharmaceutical Wholesale Distributor.",
      "invoiceSettings": {
        "logoPosition": "left",
        "logoSize": "medium",
        "showHeader": true,
        "showFooter": true,
        "showTaxDetails": true,
        "showTerms": true,
        "showWatermark": false,
        "watermarkText": "ORIGINAL TAX INVOICE",
        "documentTitle": "COMMERCIAL SALES INVOICE",
        "authorizedPersonTitle": "Head of Sales & Accounts",
        "authorizedPersonName": "Muhammad Salman Khan",
        "dateFormat": "DD/MM/YYYY"
      },
      "challanSettings": {
        "logoPosition": "left",
        "logoSize": "medium",
        "showHeader": true,
        "showFooter": true,
        "showTaxDetails": false,
        "showTerms": true,
        "showWatermark": false,
        "watermarkText": "DELIVERY CHALLAN",
        "documentTitle": "OFFICIAL DELIVERY CHALLAN",
        "authorizedPersonTitle": "Warehouse & Dispatch Supervisor",
        "authorizedPersonName": "Rashid Mehmood",
        "dateFormat": "DD/MM/YYYY"
      }
    },
    {
      "id": "comp_nova",
      "code": "NCB",
      "name": "Nova Consumer Brands",
      "legalName": "Nova Consumer Goods & Personal Care Distribution Ltd",
      "logo": "https://images.unsplash.com/photo-1556228720-195a672e8a03?w=160&auto=format&fit=crop&q=80",
      "address": "Suite 804, Business Executive Tower, Gulberg III",
      "city": "Lahore",
      "province": "Punjab",
      "country": "Pakistan",
      "phone": "+92 42 35789900",
      "whatsApp": "+92 321 9876543",
      "email": "contact@novaconsumer.com",
      "website": "https://novaconsumer.com",
      "ntn": "7729104-2",
      "strn": "1109438901234",
      "licenseNo": "FMCG-LHR-8812/2023",
      "defaultCurrency": "PKR",
      "financialYear": "2025-2026",
      "invoicePrefix": "INV-NV-",
      "challanPrefix": "DC-NV-",
      "paymentReceiptPrefix": "RCT-NV-",
      "brandColor": "#059669",
      "defaultWarehouseId": "wh_nova_1",
      "termsAndConditions": "1. Standard retail distribution terms apply.\n2. Payment strictly Net 15 days upon receipt of invoice.",
      "footerNotes": "Nova Consumer Brands — Distributing Quality Lifestyle & Hygiene Essentials.",
      "invoiceSettings": {
        "logoPosition": "left",
        "logoSize": "medium",
        "showHeader": true,
        "showFooter": true,
        "showTaxDetails": true,
        "showTerms": true,
        "showWatermark": false,
        "watermarkText": "OFFICIAL INVOICE",
        "documentTitle": "TAX INVOICE / CASH MEMO",
        "authorizedPersonTitle": "Finance Director",
        "authorizedPersonName": "Ayesha Siddiqui",
        "dateFormat": "YYYY-MM-DD"
      },
      "challanSettings": {
        "logoPosition": "left",
        "logoSize": "medium",
        "showHeader": true,
        "showFooter": true,
        "showTaxDetails": false,
        "showTerms": true,
        "showWatermark": false,
        "watermarkText": "DISPATCH NOTE",
        "documentTitle": "GOODS DELIVERY CHALLAN",
        "authorizedPersonTitle": "Dispatch Officer",
        "authorizedPersonName": "Kamran Akmal",
        "dateFormat": "YYYY-MM-DD"
      }
    }
  ],
  "users": [
    {
      "id": "usr_super",
      "companyId": "comp_apex",
      "name": "Dr. Tariq Jamil",
      "username": "superadmin",
      "email": "superadmin@omnitrade.com",
      "phone": "+92 300 8887766",
      "roleId": "role_super_admin",
      "status": "active",
      "branch": "Head Office",
      "warehouse": "Korangi Central Pharma Depot",
      "salesTerritory": "National",
      "lastLogin": "2026-09-17 14:22"
    },
    {
      "id": "usr_admin_apex",
      "companyId": "comp_apex",
      "name": "Farhan Zaidi",
      "username": "farhan.admin",
      "email": "farhan@apexpharmadistro.com",
      "phone": "+92 301 2345678",
      "roleId": "role_admin",
      "status": "active",
      "branch": "Karachi South",
      "warehouse": "Korangi Central Pharma Depot",
      "salesTerritory": "Sindh Division",
      "lastLogin": "2026-09-17 11:05"
    },
    {
      "id": "usr_sales_apex",
      "companyId": "comp_apex",
      "name": "Bilal Ahmed",
      "username": "bilal.sales",
      "email": "bilal.a@apexpharmadistro.com",
      "phone": "+92 333 4455667",
      "roleId": "role_sales_officer",
      "status": "active",
      "branch": "Karachi Central",
      "warehouse": "Korangi Central Pharma Depot",
      "salesTerritory": "Karachi Institutions & Retail",
      "lastLogin": "2026-09-17 09:40"
    },
    {
      "id": "usr_accountant_apex",
      "companyId": "comp_apex",
      "name": "Zubair Qureshi",
      "username": "zubair.acc",
      "email": "zubair@apexpharmadistro.com",
      "phone": "+92 345 9988776",
      "roleId": "role_accountant",
      "status": "active",
      "branch": "Head Office",
      "warehouse": "Korangi Central Pharma Depot",
      "salesTerritory": "All Stations",
      "lastLogin": "2026-09-17 13:12"
    },
    {
      "id": "usr_admin_nova",
      "companyId": "comp_nova",
      "name": "Sara Haroon",
      "username": "sara.nova",
      "email": "sara@novaconsumer.com",
      "phone": "+92 322 5544332",
      "roleId": "role_admin",
      "status": "active",
      "branch": "Lahore Hub",
      "warehouse": "Gulberg FMCG Fulfillment Facility",
      "salesTerritory": "Punjab Division",
      "lastLogin": "2026-09-16 16:45"
    }
  ],
  "roles": [
    {
      "id": "role_super_admin",
      "companyId": "ALL",
      "name": "Super Admin",
      "description": "Universal platform super-administrator with unrestricted multi-tenant control and tenant provisioning.",
      "isSystem": true,
      "permissions": {
        "dashboard": {
          "view": true
        },
        "products": {
          "view": true,
          "create": true,
          "edit": true,
          "delete": true,
          "viewCost": true
        },
        "inventory": {
          "view": true,
          "edit": true,
          "adjust": true
        },
        "customers": {
          "view": true,
          "create": true,
          "edit": true,
          "delete": true
        },
        "vendors": {
          "view": true,
          "create": true,
          "edit": true,
          "delete": true
        },
        "invoices": {
          "view": true,
          "create": true,
          "edit": true,
          "delete": true,
          "approve": true,
          "print": true
        },
        "challans": {
          "view": true,
          "create": true,
          "edit": true,
          "print": true
        },
        "ledgers": {
          "view": true,
          "createEntry": true,
          "export": true,
          "print": true
        },
        "accounts": {
          "view": true,
          "manage": true
        },
        "users": {
          "view": true,
          "manage": true
        },
        "settings": {
          "view": true,
          "edit": true
        },
        "auditLogs": {
          "view": true
        }
      }
    },
    {
      "id": "role_admin",
      "companyId": "ALL",
      "name": "Company Admin",
      "description": "Full organizational authority over company operations, products, sales, purchases, and staff.",
      "isSystem": true,
      "permissions": {
        "dashboard": {
          "view": true
        },
        "products": {
          "view": true,
          "create": true,
          "edit": true,
          "delete": false,
          "viewCost": true
        },
        "inventory": {
          "view": true,
          "edit": true,
          "adjust": true
        },
        "customers": {
          "view": true,
          "create": true,
          "edit": true,
          "delete": false
        },
        "vendors": {
          "view": true,
          "create": true,
          "edit": true,
          "delete": false
        },
        "invoices": {
          "view": true,
          "create": true,
          "edit": true,
          "delete": false,
          "approve": true,
          "print": true
        },
        "challans": {
          "view": true,
          "create": true,
          "edit": true,
          "print": true
        },
        "ledgers": {
          "view": true,
          "createEntry": true,
          "export": true,
          "print": true
        },
        "accounts": {
          "view": true,
          "manage": true
        },
        "users": {
          "view": true,
          "manage": true
        },
        "settings": {
          "view": true,
          "edit": true
        },
        "auditLogs": {
          "view": true
        }
      }
    },
    {
      "id": "role_sales_officer",
      "companyId": "ALL",
      "name": "Sales Officer",
      "description": "Field & desk sales representative: creates invoices, views customers, views products, no financial deletion or cost view.",
      "isSystem": false,
      "permissions": {
        "dashboard": {
          "view": true
        },
        "products": {
          "view": true,
          "create": false,
          "edit": false,
          "delete": false,
          "viewCost": false
        },
        "inventory": {
          "view": true,
          "edit": false,
          "adjust": false
        },
        "customers": {
          "view": true,
          "create": true,
          "edit": false,
          "delete": false
        },
        "vendors": {
          "view": false,
          "create": false,
          "edit": false,
          "delete": false
        },
        "invoices": {
          "view": true,
          "create": true,
          "edit": false,
          "delete": false,
          "approve": false,
          "print": true
        },
        "challans": {
          "view": true,
          "create": true,
          "edit": false,
          "print": true
        },
        "ledgers": {
          "view": true,
          "createEntry": false,
          "export": false,
          "print": true
        },
        "accounts": {
          "view": false,
          "manage": false
        },
        "users": {
          "view": false,
          "manage": false
        },
        "settings": {
          "view": false,
          "edit": false
        },
        "auditLogs": {
          "view": false
        }
      }
    },
    {
      "id": "role_warehouse_staff",
      "companyId": "ALL",
      "name": "Warehouse & Dispatch Staff",
      "description": "Manages physical stock verification, delivery challan dispatch, and receiving items.",
      "isSystem": false,
      "permissions": {
        "dashboard": {
          "view": true
        },
        "products": {
          "view": true,
          "create": false,
          "edit": false,
          "delete": false,
          "viewCost": false
        },
        "inventory": {
          "view": true,
          "edit": true,
          "adjust": true
        },
        "customers": {
          "view": true,
          "create": false,
          "edit": false,
          "delete": false
        },
        "vendors": {
          "view": true,
          "create": false,
          "edit": false,
          "delete": false
        },
        "invoices": {
          "view": true,
          "create": false,
          "edit": false,
          "delete": false,
          "approve": false,
          "print": true
        },
        "challans": {
          "view": true,
          "create": true,
          "edit": true,
          "print": true
        },
        "ledgers": {
          "view": false,
          "createEntry": false,
          "export": false,
          "print": false
        },
        "accounts": {
          "view": false,
          "manage": false
        },
        "users": {
          "view": false,
          "manage": false
        },
        "settings": {
          "view": false,
          "edit": false
        },
        "auditLogs": {
          "view": false
        }
      }
    },
    {
      "id": "role_accountant",
      "companyId": "ALL",
      "name": "Senior Accountant",
      "description": "Full financial authority: records payments, reconciles ledgers, generates aging reports and audits.",
      "isSystem": false,
      "permissions": {
        "dashboard": {
          "view": true
        },
        "products": {
          "view": true,
          "create": false,
          "edit": false,
          "delete": false,
          "viewCost": true
        },
        "inventory": {
          "view": true,
          "edit": false,
          "adjust": false
        },
        "customers": {
          "view": true,
          "create": true,
          "edit": true,
          "delete": false
        },
        "vendors": {
          "view": true,
          "create": true,
          "edit": true,
          "delete": false
        },
        "invoices": {
          "view": true,
          "create": true,
          "edit": true,
          "delete": false,
          "approve": true,
          "print": true
        },
        "challans": {
          "view": true,
          "create": false,
          "edit": false,
          "print": true
        },
        "ledgers": {
          "view": true,
          "createEntry": true,
          "export": true,
          "print": true
        },
        "accounts": {
          "view": true,
          "manage": true
        },
        "users": {
          "view": false,
          "manage": false
        },
        "settings": {
          "view": false,
          "edit": false
        },
        "auditLogs": {
          "view": true
        }
      }
    }
  ],
  "warehouses": [
    {
      "id": "wh_apex_1",
      "companyId": "comp_apex",
      "code": "WH-KHI-MAIN",
      "name": "Korangi Central Pharma Depot",
      "city": "Karachi",
      "address": "Plot 42-B, Korangi Industrial Area, Karachi",
      "isDefault": true
    },
    {
      "id": "wh_apex_2",
      "companyId": "comp_apex",
      "code": "WH-LHR-HUB",
      "name": "Lahore North Cold-Chain Warehouse",
      "city": "Lahore",
      "address": "Circular Road, Badami Bagh Logistics Park, Lahore",
      "isDefault": false
    },
    {
      "id": "wh_nova_1",
      "companyId": "comp_nova",
      "code": "WH-NV-CENTRAL",
      "name": "Gulberg FMCG Fulfillment Facility",
      "city": "Lahore",
      "address": "Industrial Plot 12, Gulberg III, Lahore",
      "isDefault": true
    }
  ],
  "productForms": [
    {
      "id": "form_tablet",
      "name": "Tablet",
      "category": "Solid Dosage"
    },
    {
      "id": "form_capsule",
      "name": "Capsule",
      "category": "Solid Dosage"
    },
    {
      "id": "form_syrup",
      "name": "Syrup",
      "category": "Liquid Oral"
    },
    {
      "id": "form_suspension",
      "name": "Suspension",
      "category": "Liquid Oral"
    },
    {
      "id": "form_drops",
      "name": "Drops",
      "category": "Liquid Oral / Ophthalmic"
    },
    {
      "id": "form_injection",
      "name": "Injection",
      "category": "Parenteral"
    },
    {
      "id": "form_sachet",
      "name": "Sachet",
      "category": "Powder / Granules"
    },
    {
      "id": "form_powder",
      "name": "Powder",
      "category": "Topical / Oral"
    },
    {
      "id": "form_cream",
      "name": "Cream",
      "category": "Topical Semi-Solid"
    },
    {
      "id": "form_ointment",
      "name": "Ointment",
      "category": "Topical Semi-Solid"
    },
    {
      "id": "form_gel",
      "name": "Gel",
      "category": "Topical Semi-Solid"
    },
    {
      "id": "form_lotion",
      "name": "Lotion",
      "category": "Topical Liquid"
    },
    {
      "id": "form_oil",
      "name": "Oil",
      "category": "Topical / Oral"
    },
    {
      "id": "form_soap",
      "name": "Soap",
      "category": "Cleanser"
    },
    {
      "id": "form_shampoo",
      "name": "Shampoo",
      "category": "Hair & Scalp"
    },
    {
      "id": "form_solution",
      "name": "Solution",
      "category": "Liquid"
    },
    {
      "id": "form_spray",
      "name": "Spray",
      "category": "Inhalation / Topical"
    },
    {
      "id": "form_inhaler",
      "name": "Inhaler",
      "category": "Respiratory"
    },
    {
      "id": "form_device",
      "name": "Device",
      "category": "Medical Equipment"
    },
    {
      "id": "form_kit",
      "name": "Kit",
      "category": "Diagnostic & First Aid"
    },
    {
      "id": "form_facewash",
      "name": "Face Wash",
      "category": "Dermatological Cleanser",
      "isCustom": true
    },
    {
      "id": "form_herbaltea",
      "name": "Herbal Infusion",
      "category": "Nutraceutical",
      "isCustom": true
    }
  ],
  "ingredients": [
    {
      "id": "ing_paracetamol",
      "name": "Paracetamol",
      "genericName": "Acetaminophen",
      "synonyms": [
        "Acetaminophen",
        "APAP",
        "N-acetyl-p-aminophenol",
        "Paracetamolum"
      ],
      "description": "Widely used analgesic and antipyretic agent for mild to moderate pain relief and fever reduction.",
      "status": "active"
    },
    {
      "id": "ing_caffeine",
      "name": "Caffeine Anhydrous",
      "genericName": "1,3,7-Trimethylxanthine",
      "synonyms": [
        "Guaranine",
        "Methyltheobromine",
        "Caffeine"
      ],
      "description": "Central nervous system stimulant used as an analgesic adjuvant to enhance pain relief efficacy.",
      "status": "active"
    },
    {
      "id": "ing_ibuprofen",
      "name": "Ibuprofen",
      "genericName": "Ibuprofen",
      "synonyms": [
        "Isobutylphenylpropionic acid",
        "Advil generic",
        "Brufen active"
      ],
      "description": "Nonsteroidal anti-inflammatory drug (NSAID) used for treating pain, fever, and inflammation.",
      "status": "active"
    },
    {
      "id": "ing_amoxicillin",
      "name": "Amoxicillin Trihydrate",
      "genericName": "Amoxicillin",
      "synonyms": [
        "Amoxycillin",
        "Amoxil active",
        "p-hydroxyampicillin"
      ],
      "description": "Broad-spectrum beta-lactam antibiotic used to treat bacterial infections of ear, nose, throat, chest and urinary tract.",
      "status": "active"
    },
    {
      "id": "ing_clavulanate",
      "name": "Potassium Clavulanate",
      "genericName": "Clavulanic Acid",
      "synonyms": [
        "Clavulanate potassium",
        "Beta-lactamase inhibitor"
      ],
      "description": "Beta-lactamase inhibitor combined with amoxicillin to overcome resistance caused by beta-lactamase-producing bacteria.",
      "status": "active"
    },
    {
      "id": "ing_cetirizine",
      "name": "Cetirizine Dihydrochloride",
      "genericName": "Cetirizine",
      "synonyms": [
        "Cetirizine HCl",
        "Zyrtec active",
        "2nd gen antihistamine"
      ],
      "description": "Second-generation antihistamine used to relieve allergy symptoms such as watery eyes, runny nose, and itching.",
      "status": "active"
    },
    {
      "id": "ing_omeprazole",
      "name": "Omeprazole",
      "genericName": "Omeprazole Base",
      "synonyms": [
        "Prilosec active",
        "Proton pump inhibitor",
        "PPI"
      ],
      "description": "Proton-pump inhibitor that decreases the amount of acid produced in the stomach for GERD, peptic ulcers.",
      "status": "active"
    },
    {
      "id": "ing_vitaminc",
      "name": "Ascorbic Acid (Vitamin C)",
      "genericName": "Vitamin C",
      "synonyms": [
        "L-ascorbic acid",
        "Sodium ascorbate"
      ],
      "description": "Essential water-soluble antioxidant vitamin supporting collagen synthesis, immune function, and iron absorption.",
      "status": "active"
    },
    {
      "id": "ing_zinc",
      "name": "Zinc Sulfate Monohydrate",
      "genericName": "Zinc Sulfate",
      "synonyms": [
        "Zinc salt",
        "Dietary zinc"
      ],
      "description": "Mineral supplement providing elemental zinc for immunity, cellular repair, and wound healing.",
      "status": "active"
    }
  ],
  "productIngredients": [
    {
      "id": "pi_1",
      "productId": "prd_panadol_extra",
      "ingredientId": "ing_paracetamol",
      "ingredientName": "Paracetamol",
      "strength": "500",
      "strengthUnit": "mg",
      "quantity": 500,
      "percentage": 88.5,
      "form": "Micronized Granules",
      "notes": "Active analgesic active substance"
    },
    {
      "id": "pi_2",
      "productId": "prd_panadol_extra",
      "ingredientId": "ing_caffeine",
      "ingredientName": "Caffeine Anhydrous",
      "strength": "65",
      "strengthUnit": "mg",
      "quantity": 65,
      "percentage": 11.5,
      "form": "Crystal Powder",
      "notes": "Synergistic adjuvant pain booster"
    },
    {
      "id": "pi_3",
      "productId": "prd_amoxil_cap",
      "ingredientId": "ing_amoxicillin",
      "ingredientName": "Amoxicillin Trihydrate",
      "strength": "500",
      "strengthUnit": "mg",
      "quantity": 500,
      "percentage": 100,
      "form": "Compacted Powder",
      "notes": "USP standard active pharmaceutical ingredient"
    },
    {
      "id": "pi_4",
      "productId": "prd_aug_susp",
      "ingredientId": "ing_amoxicillin",
      "ingredientName": "Amoxicillin Trihydrate",
      "strength": "250",
      "strengthUnit": "mg/5ml",
      "quantity": 250,
      "percentage": 80,
      "form": "Dry Powder for Reconstitution",
      "notes": "Beta-lactam base"
    },
    {
      "id": "pi_5",
      "productId": "prd_aug_susp",
      "ingredientId": "ing_clavulanate",
      "ingredientName": "Potassium Clavulanate",
      "strength": "62.5",
      "strengthUnit": "mg/5ml",
      "quantity": 62.5,
      "percentage": 20,
      "form": "Salt complex",
      "notes": "Inhibitor component"
    },
    {
      "id": "pi_6",
      "productId": "prd_brufen_syr",
      "ingredientId": "ing_ibuprofen",
      "ingredientName": "Ibuprofen",
      "strength": "100",
      "strengthUnit": "mg/5ml",
      "quantity": 100,
      "percentage": 100,
      "form": "Solubilized Suspension",
      "notes": "Anti-pyretic active"
    },
    {
      "id": "pi_7",
      "productId": "prd_cetriz_tab",
      "ingredientId": "ing_cetirizine",
      "ingredientName": "Cetirizine Dihydrochloride",
      "strength": "10",
      "strengthUnit": "mg",
      "quantity": 10,
      "percentage": 100,
      "form": "Film-coated core",
      "notes": "Second generation anti-allergy"
    },
    {
      "id": "pi_8",
      "productId": "prd_risek_cap",
      "ingredientId": "ing_omeprazole",
      "ingredientName": "Omeprazole Base",
      "strength": "20",
      "strengthUnit": "mg",
      "quantity": 20,
      "percentage": 100,
      "form": "Enteric Coated Pellets",
      "notes": "Targeted release granules"
    },
    {
      "id": "pi_9",
      "productId": "prd_glow_facewash",
      "ingredientId": "ing_vitaminc",
      "ingredientName": "Ascorbic Acid (Vitamin C)",
      "strength": "2.5",
      "strengthUnit": "%",
      "percentage": 2.5,
      "form": "Aqueous Micro-encapsulation",
      "notes": "Topical antioxidant"
    }
  ],
  "products": [
    {
      "id": "prd_panadol_extra",
      "companyId": "comp_apex",
      "code": "PRD-AP-001",
      "sku": "PAN-EXT-500-100T",
      "barcode": "8964000101123",
      "brandName": "Panadol Extra",
      "productName": "Panadol Extra Tablet 500mg/65mg",
      "genericName": "Paracetamol + Caffeine",
      "productForm": "Tablet",
      "category": "Analgesics & Antipyretics",
      "subcategory": "Over-the-Counter (OTC)",
      "manufacturer": "GlaxoSmithKline Healthcare",
      "packSize": "10 x 10 Tablets (100 Tablets Box)",
      "unit": "Box",
      "description": "Fast dual-action pain relief for headaches, migraine, body ache, and toothache with caffeine booster.",
      "status": "active",
      "taxRate": 0,
      "purchasePrice": 280,
      "salePrice": 350,
      "wholesalePrice": 325,
      "distributorPrice": 310,
      "retailPrice": 360,
      "reorderLevel": 80,
      "minStock": 50,
      "maxStock": 500,
      "batchTracking": true,
      "expiryTracking": true,
      "image": "https://images.unsplash.com/photo-1584308666744-24d5c474f2ae?w=400&auto=format&fit=crop&q=80",
      "totalStock": 340
    },
    {
      "id": "prd_amoxil_cap",
      "companyId": "comp_apex",
      "code": "PRD-AP-002",
      "sku": "AMX-CAP-500-20C",
      "barcode": "8964000102234",
      "brandName": "Amoxil Forte",
      "productName": "Amoxil Capsules 500mg",
      "genericName": "Amoxicillin Trihydrate",
      "productForm": "Capsule",
      "category": "Antibiotics",
      "subcategory": "Penicillins",
      "manufacturer": "GSK Pharma Labs",
      "packSize": "2 x 10 Capsules (20 Capsules)",
      "unit": "Box",
      "description": "Broad spectrum bactericidal antibiotic indicated for treatment of bacterial respiratory and ENT infections.",
      "status": "active",
      "taxRate": 0,
      "purchasePrice": 195,
      "salePrice": 260,
      "wholesalePrice": 240,
      "distributorPrice": 225,
      "retailPrice": 275,
      "reorderLevel": 100,
      "minStock": 60,
      "maxStock": 600,
      "batchTracking": true,
      "expiryTracking": true,
      "image": "https://images.unsplash.com/photo-1471864190281-a93a3070b6de?w=400&auto=format&fit=crop&q=80",
      "totalStock": 190
    },
    {
      "id": "prd_aug_susp",
      "companyId": "comp_apex",
      "code": "PRD-AP-003",
      "sku": "AUG-SUS-312-60M",
      "barcode": "8964000103345",
      "brandName": "Augmentin Suspension",
      "productName": "Augmentin Dry Powder Suspension 312.5mg/5ml",
      "genericName": "Amoxicillin + Potassium Clavulanate",
      "productForm": "Suspension",
      "category": "Antibiotics",
      "subcategory": "Co-Amoxiclav",
      "manufacturer": "GSK Consumer Pharma",
      "packSize": "60ml Amber Glass Bottle",
      "unit": "Bottle",
      "description": "Co-amoxiclav pediatric suspension for resistant bacterial ear, throat, respiratory and soft tissue infections.",
      "status": "active",
      "taxRate": 0,
      "purchasePrice": 285,
      "salePrice": 380,
      "wholesalePrice": 350,
      "distributorPrice": 330,
      "retailPrice": 400,
      "reorderLevel": 50,
      "minStock": 30,
      "maxStock": 300,
      "batchTracking": true,
      "expiryTracking": true,
      "image": "https://images.unsplash.com/photo-1550572017-ed200f5e5a43?w=400&auto=format&fit=crop&q=80",
      "totalStock": 45
    },
    {
      "id": "prd_brufen_syr",
      "companyId": "comp_apex",
      "code": "PRD-AP-004",
      "sku": "BRU-SYR-100-120M",
      "barcode": "8964000104456",
      "brandName": "Brufen Syrup",
      "productName": "Brufen Pediatric Syrup 100mg/5ml",
      "genericName": "Ibuprofen",
      "productForm": "Syrup",
      "category": "Analgesics & Anti-inflammatory",
      "subcategory": "Pediatric NSAID",
      "manufacturer": "Abbott Laboratories Ltd",
      "packSize": "120ml Bottle with Dose Cup",
      "unit": "Bottle",
      "description": "Orange flavored ibuprofen suspension for rapid fever reduction, teething, earache, and post-vaccination fever.",
      "status": "active",
      "taxRate": 0,
      "purchasePrice": 95,
      "salePrice": 135,
      "wholesalePrice": 122,
      "distributorPrice": 115,
      "retailPrice": 140,
      "reorderLevel": 90,
      "minStock": 50,
      "maxStock": 500,
      "batchTracking": true,
      "expiryTracking": true,
      "image": "https://images.unsplash.com/photo-1587854692152-cbe660dbde88?w=400&auto=format&fit=crop&q=80",
      "totalStock": 410
    },
    {
      "id": "prd_cetriz_tab",
      "companyId": "comp_apex",
      "code": "PRD-AP-005",
      "sku": "CET-TAB-10-30T",
      "barcode": "8964000105567",
      "brandName": "Cetriz Daily",
      "productName": "Cetriz 10mg Film-Coated Tablets",
      "genericName": "Cetirizine Dihydrochloride",
      "productForm": "Tablet",
      "category": "Antihistamines",
      "subcategory": "Allergy Care",
      "manufacturer": "Getz Pharma (Pvt) Ltd",
      "packSize": "3 x 10 Tablets (30 Tablets Box)",
      "unit": "Box",
      "description": "Non-sedating 24-hour relief from seasonal allergic rhinitis, ocular itching, and chronic idiopathic urticaria.",
      "status": "active",
      "taxRate": 0,
      "purchasePrice": 140,
      "salePrice": 195,
      "wholesalePrice": 180,
      "distributorPrice": 165,
      "retailPrice": 210,
      "reorderLevel": 60,
      "minStock": 40,
      "maxStock": 400,
      "batchTracking": true,
      "expiryTracking": true,
      "image": "https://images.unsplash.com/photo-1584308666744-24d5c474f2ae?w=400&auto=format&fit=crop&q=80",
      "totalStock": 160
    },
    {
      "id": "prd_risek_cap",
      "companyId": "comp_apex",
      "code": "PRD-AP-006",
      "sku": "RSK-CAP-20-14C",
      "barcode": "8964000106678",
      "brandName": "Risek Insta",
      "productName": "Risek 20mg Delayed-Release Capsules",
      "genericName": "Omeprazole",
      "productForm": "Capsule",
      "category": "Gastroenterology",
      "subcategory": "Proton Pump Inhibitor",
      "manufacturer": "Getz Pharma (Pvt) Ltd",
      "packSize": "14 Capsules Strip in Outer Carton",
      "unit": "Box",
      "description": "Acid suppressant for gastroesophageal reflux disease (GERD), duodenal ulcer and gastritis.",
      "status": "active",
      "taxRate": 0,
      "purchasePrice": 320,
      "salePrice": 420,
      "wholesalePrice": 390,
      "distributorPrice": 370,
      "retailPrice": 440,
      "reorderLevel": 70,
      "minStock": 40,
      "maxStock": 350,
      "batchTracking": true,
      "expiryTracking": true,
      "image": "https://images.unsplash.com/photo-1471864190281-a93a3070b6de?w=400&auto=format&fit=crop&q=80",
      "totalStock": 85
    },
    {
      "id": "prd_glow_facewash",
      "companyId": "comp_nova",
      "code": "PRD-NV-001",
      "sku": "GLW-FW-150-TUB",
      "barcode": "8965000201111",
      "brandName": "GlowPure Botanical",
      "productName": "GlowPure Vitamin C Cleansing Gel 150ml",
      "genericName": "Ascorbic Acid + Aloe Extract",
      "productForm": "Face Wash",
      "category": "Personal Care",
      "subcategory": "Facial Skincare",
      "manufacturer": "Nova Formulations Lab",
      "packSize": "150ml Squeeze Tube",
      "unit": "Piece",
      "description": "Brightening daily facial cleanser with active Vitamin C micro-beads and skin hydrating elements.",
      "status": "active",
      "taxRate": 18,
      "purchasePrice": 420,
      "salePrice": 650,
      "wholesalePrice": 580,
      "distributorPrice": 520,
      "retailPrice": 699,
      "reorderLevel": 50,
      "minStock": 25,
      "maxStock": 300,
      "batchTracking": true,
      "expiryTracking": true,
      "image": "https://images.unsplash.com/photo-1556228720-195a672e8a03?w=400&auto=format&fit=crop&q=80",
      "totalStock": 175
    }
  ],
  "batches": [
    {
      "id": "bth_ap_01",
      "companyId": "comp_apex",
      "productId": "prd_panadol_extra",
      "batchNumber": "PNE-2501",
      "mfgDate": "2025-01-10",
      "expDate": "2027-01-09",
      "quantity": 200,
      "purchaseCost": 280,
      "salePrice": 350,
      "warehouseId": "wh_apex_1",
      "warehouseName": "Korangi Central Pharma Depot",
      "status": "active"
    },
    {
      "id": "bth_ap_02",
      "companyId": "comp_apex",
      "productId": "prd_panadol_extra",
      "batchNumber": "PNE-2411",
      "mfgDate": "2024-11-15",
      "expDate": "2026-10-31",
      "quantity": 140,
      "purchaseCost": 275,
      "salePrice": 350,
      "warehouseId": "wh_apex_1",
      "warehouseName": "Korangi Central Pharma Depot",
      "status": "active"
    },
    {
      "id": "bth_ap_03",
      "companyId": "comp_apex",
      "productId": "prd_amoxil_cap",
      "batchNumber": "AMX-2502",
      "mfgDate": "2025-02-01",
      "expDate": "2027-02-01",
      "quantity": 190,
      "purchaseCost": 195,
      "salePrice": 260,
      "warehouseId": "wh_apex_1",
      "warehouseName": "Korangi Central Pharma Depot",
      "status": "active"
    },
    {
      "id": "bth_ap_04",
      "companyId": "comp_apex",
      "productId": "prd_aug_susp",
      "batchNumber": "AUG-2409",
      "mfgDate": "2024-09-01",
      "expDate": "2026-10-15",
      "quantity": 45,
      "purchaseCost": 285,
      "salePrice": 380,
      "warehouseId": "wh_apex_1",
      "warehouseName": "Korangi Central Pharma Depot",
      "status": "active"
    },
    {
      "id": "bth_ap_05",
      "companyId": "comp_apex",
      "productId": "prd_brufen_syr",
      "batchNumber": "BRF-2503",
      "mfgDate": "2025-03-01",
      "expDate": "2027-03-01",
      "quantity": 410,
      "purchaseCost": 95,
      "salePrice": 135,
      "warehouseId": "wh_apex_2",
      "warehouseName": "Lahore North Cold-Chain Warehouse",
      "status": "active"
    },
    {
      "id": "bth_ap_06",
      "companyId": "comp_apex",
      "productId": "prd_cetriz_tab",
      "batchNumber": "CTZ-2501",
      "mfgDate": "2025-01-20",
      "expDate": "2027-01-20",
      "quantity": 160,
      "purchaseCost": 140,
      "salePrice": 195,
      "warehouseId": "wh_apex_1",
      "warehouseName": "Korangi Central Pharma Depot",
      "status": "active"
    },
    {
      "id": "bth_ap_07",
      "companyId": "comp_apex",
      "productId": "prd_risek_cap",
      "batchNumber": "RSK-2502",
      "mfgDate": "2025-02-15",
      "expDate": "2027-02-15",
      "quantity": 85,
      "purchaseCost": 320,
      "salePrice": 420,
      "warehouseId": "wh_apex_1",
      "warehouseName": "Korangi Central Pharma Depot",
      "status": "active"
    },
    {
      "id": "bth_nv_01",
      "companyId": "comp_nova",
      "productId": "prd_glow_facewash",
      "batchNumber": "GLW-25A",
      "mfgDate": "2025-01-01",
      "expDate": "2027-01-01",
      "quantity": 175,
      "purchaseCost": 420,
      "salePrice": 650,
      "warehouseId": "wh_nova_1",
      "warehouseName": "Gulberg FMCG Fulfillment Facility",
      "status": "active"
    }
  ],
  "customers": [
    {
      "id": "cust_ap_1",
      "companyId": "comp_apex",
      "code": "CUS-KHI-001",
      "name": "Al-Khidmat Pharmacy & Medical Store",
      "businessName": "Al-Khidmat Foundation Healthcare Services",
      "contactPerson": "Dr. Abdul Qadeer",
      "phone": "+92 21 34912233",
      "whatsApp": "+92 300 9211223",
      "email": "alkhidmat.pharmacy@gmail.com",
      "address": "Shop 14-16, Medical Complex, Nazimabad No. 3",
      "city": "Karachi",
      "territory": "Karachi Central",
      "station": "Karachi Central",
      "customerType": "Pharmacy",
      "creditLimit": 350000,
      "paymentTerms": "Net 30 Days",
      "openingBalance": 45000,
      "currentBalance": 124500,
      "taxNumber": "1455209-1",
      "strn": "3200145520911",
      "status": "active",
      "notes": "Major institutional client with regular weekly orders. Prompt payer."
    },
    {
      "id": "cust_ap_2",
      "companyId": "comp_apex",
      "code": "CUS-KHI-002",
      "name": "Fazal Din & Sons Medicare",
      "businessName": "Fazal Din Pharma Distribution Pvt Ltd",
      "contactPerson": "Mian Tariq Fazal",
      "phone": "+92 21 35678899",
      "whatsApp": "+92 321 4455661",
      "email": "tariq@fazaldinsons.com.pk",
      "address": "Plot 77, Shahrah-e-Faisal, PECHS Block 6",
      "city": "Karachi",
      "territory": "Karachi South",
      "station": "Karachi South",
      "customerType": "Distributor",
      "creditLimit": 1200000,
      "paymentTerms": "Net 45 Days",
      "openingBalance": 120000,
      "currentBalance": 382000,
      "taxNumber": "0812940-5",
      "strn": "1100081294055",
      "status": "active",
      "notes": "Top tier distributor for southern Sindh retail chains."
    },
    {
      "id": "cust_ap_3",
      "companyId": "comp_apex",
      "code": "CUS-LHR-003",
      "name": "Shaukat Khanum Memorial Hospital Pharmacy",
      "businessName": "SKMCH&RC Clinical Pharmacy Services",
      "contactPerson": "Dr. Noreen Farooq (Procurement Head)",
      "phone": "+92 42 35905000",
      "whatsApp": "+92 333 7788990",
      "email": "procurement.pharma@skm.org.pk",
      "address": "7A, Block R-3, M.A. Johar Town",
      "city": "Lahore",
      "territory": "Lahore North",
      "station": "Lahore North",
      "customerType": "Hospital",
      "creditLimit": 1500000,
      "paymentTerms": "Net 60 Days",
      "openingBalance": 0,
      "currentBalance": 98000,
      "taxNumber": "0711928-3",
      "strn": "2400071192834",
      "status": "active",
      "notes": "Priority tertiary hospital. Requires batch COA (Certificate of Analysis) with every delivery."
    },
    {
      "id": "cust_ap_4",
      "companyId": "comp_apex",
      "code": "CUS-RWP-004",
      "name": "Armed Forces Institute of Cardiology (AFIC)",
      "businessName": "AFIC & NIHD Central Medical Store",
      "contactPerson": "Maj. (R) Dr. Nadeem Akhtar",
      "phone": "+92 51 9271002",
      "whatsApp": "+92 301 6655443",
      "email": "nihd.procurement@afic.gov.pk",
      "address": "The Mall, Rawalpindi Cantonment",
      "city": "Rawalpindi",
      "territory": "Rawalpindi Station",
      "station": "Rawalpindi Station",
      "customerType": "Institution",
      "creditLimit": 800000,
      "paymentTerms": "Net 45 Days",
      "openingBalance": 0,
      "currentBalance": 42000,
      "taxNumber": "0622910-4",
      "status": "active",
      "notes": "Government institutional tender supplier contract."
    },
    {
      "id": "cust_ap_5",
      "companyId": "comp_apex",
      "code": "CUS-FSD-005",
      "name": "Madina Medical Complex & Chemist",
      "businessName": "Madina Healthcare Pharmacy Retailers",
      "contactPerson": "Haji Aslam Madina",
      "phone": "+92 41 8541200",
      "whatsApp": "+92 345 1122334",
      "email": "madinamedical.fsd@hotmail.com",
      "address": "D-Ground, People’s Colony No. 1",
      "city": "Faisalabad",
      "territory": "Faisalabad Station",
      "station": "Faisalabad Station",
      "customerType": "Retailer",
      "creditLimit": 250000,
      "paymentTerms": "Net 15 Days",
      "openingBalance": 15000,
      "currentBalance": 87500,
      "taxNumber": "1904321-8",
      "status": "active",
      "notes": "Wholesale retail hub in Faisalabad."
    },
    {
      "id": "cust_nv_1",
      "companyId": "comp_nova",
      "code": "CUS-NV-001",
      "name": "Imtiaz Super Market Head Office",
      "businessName": "Imtiaz Mega Store FMCG Procurement",
      "contactPerson": "Kashif Memon",
      "phone": "+92 21 111 468 429",
      "whatsApp": "+92 300 1122998",
      "email": "procurement@imtiaz.com.pk",
      "address": "Gulshan-e-Iqbal, University Road",
      "city": "Karachi",
      "territory": "Karachi Central",
      "station": "Karachi Central",
      "customerType": "Retailer",
      "creditLimit": 2000000,
      "paymentTerms": "Net 30 Days",
      "openingBalance": 0,
      "currentBalance": 195000,
      "taxNumber": "2819034-2",
      "strn": "1700281903422",
      "status": "active",
      "notes": "Largest chain of supermarkets."
    }
  ],
  "vendors": [
    {
      "id": "vnd_ap_1",
      "companyId": "comp_apex",
      "code": "VND-001",
      "name": "GlaxoSmithKline Healthcare Pakistan",
      "businessName": "GSK Consumer Healthcare Pakistan Ltd",
      "contactPerson": "Sohail Anwar (Key Accounts)",
      "phone": "+92 21 35689000",
      "whatsApp": "+92 300 2233445",
      "email": "orders.pk@gsk.com",
      "address": "35-Dockyard Road, West Wharf",
      "city": "Karachi",
      "taxNumber": "0710293-1",
      "strn": "1200071029311",
      "paymentTerms": "Net 30 Days",
      "openingBalance": 250000,
      "currentPayable": 420000,
      "creditLimit": 2000000,
      "status": "active",
      "notes": "Primary multinational pharmaceutical manufacturer."
    },
    {
      "id": "vnd_ap_2",
      "companyId": "comp_apex",
      "code": "VND-002",
      "name": "Getz Pharma (Pvt) Ltd",
      "businessName": "Getz Pharma Manufacturing & Research",
      "contactPerson": "Dr. Mansoor Ali (Supply Chain)",
      "phone": "+92 21 38621111",
      "whatsApp": "+92 321 7766554",
      "email": "institutional.sales@getzpharma.com",
      "address": "29-30/27, Korangi Industrial Area",
      "city": "Karachi",
      "taxNumber": "0688921-5",
      "strn": "1100068892155",
      "paymentTerms": "Net 45 Days",
      "openingBalance": 180000,
      "currentPayable": 290000,
      "creditLimit": 1500000,
      "status": "active",
      "notes": "WHO-prequalified formulations supplier."
    },
    {
      "id": "vnd_ap_3",
      "companyId": "comp_apex",
      "code": "VND-003",
      "name": "Abbott Laboratories (Pakistan) Ltd",
      "businessName": "Abbott Healthcare Supply Chain Division",
      "contactPerson": "Nasir Iqbal",
      "phone": "+92 21 111 222 688",
      "whatsApp": "+92 333 9900112",
      "email": "orders.supply@abbott.com.pk",
      "address": "Opposite Radio Pakistan, Landhi Industrial Area",
      "city": "Karachi",
      "taxNumber": "0691234-9",
      "strn": "1200069123499",
      "paymentTerms": "Net 30 Days",
      "openingBalance": 0,
      "currentPayable": 115000,
      "creditLimit": 1000000,
      "status": "active",
      "notes": "Authorized manufacturer for pediatric liquids and tablets."
    }
  ],
  "otherParties": [
    {
      "id": "pty_ap_1",
      "companyId": "comp_apex",
      "code": "PTY-001",
      "name": "Crescent Toll Formulation Lab",
      "partyType": "Toller",
      "businessName": "Crescent Sterile Packaging & Formulation Works",
      "contactPerson": "Engr. Junaid Babar",
      "phone": "+92 21 35058822",
      "email": "operations@crescenttoll.com",
      "address": "Sector 7-A, Korangi Industrial Area",
      "city": "Karachi",
      "openingBalance": 25000,
      "currentBalance": 72000,
      "notes": "Contract packaging, secondary blister strip packing, and batch lab analysis facility."
    },
    {
      "id": "pty_ap_2",
      "companyId": "comp_apex",
      "code": "PTY-002",
      "name": "Prime Express Clearing & Logistics Agent",
      "partyType": "Agent",
      "businessName": "Prime Logistics & Customs Clearing House",
      "contactPerson": "Malik Shafiq",
      "phone": "+92 300 4567890",
      "email": "shafiq@primeclearing.com",
      "address": "Customs House Building, Keamari Port",
      "city": "Karachi",
      "openingBalance": 0,
      "currentBalance": 34500,
      "notes": "Handles cold-chain import customs clearance and inter-city bilty transport coordination."
    },
    {
      "id": "pty_ap_3",
      "companyId": "comp_apex",
      "code": "PTY-003",
      "name": "Tariq Commodity Brokerage",
      "partyType": "Broker",
      "businessName": "Tariq & Co. Institutional Trade Brokers",
      "contactPerson": "Tariq Masood",
      "phone": "+92 321 8899001",
      "email": "tariq.broker@gmail.com",
      "address": "Room 402, Trade Avenue, I.I. Chundrigar Road",
      "city": "Karachi",
      "openingBalance": 12000,
      "currentBalance": 18500,
      "notes": "Institutional sales commission broker for major hospital tender wins."
    }
  ],
  "salesInvoices": [
    {
      "id": "inv_ap_101",
      "companyId": "comp_apex",
      "invoiceNumber": "INV-AP-1001",
      "date": "2026-09-10",
      "dueDate": "2026-10-10",
      "customerId": "cust_ap_1",
      "customerName": "Al-Khidmat Pharmacy & Medical Store",
      "customerStation": "Karachi Central",
      "customerAddress": "Shop 14-16, Medical Complex, Nazimabad No. 3, Karachi",
      "deliveryChallanId": "dc_ap_201",
      "deliveryChallanNumber": "DC-AP-1001",
      "items": [
        {
          "id": "item_101_1",
          "productId": "prd_panadol_extra",
          "productName": "Panadol Extra Tablet 500mg/65mg",
          "productCode": "PRD-AP-001",
          "batchId": "bth_ap_01",
          "batchNumber": "PNE-2501",
          "expiryDate": "2027-01-09",
          "packSize": "10 x 10 Tablets (100 Tablets Box)",
          "unit": "Box",
          "quantity": 100,
          "unitPrice": 350,
          "discountPercent": 5,
          "taxPercent": 0,
          "totalAmount": 33250
        },
        {
          "id": "item_101_2",
          "productId": "prd_brufen_syr",
          "productName": "Brufen Pediatric Syrup 100mg/5ml",
          "productCode": "PRD-AP-004",
          "batchId": "bth_ap_05",
          "batchNumber": "BRF-2503",
          "expiryDate": "2027-03-01",
          "packSize": "120ml Bottle with Dose Cup",
          "unit": "Bottle",
          "quantity": 150,
          "unitPrice": 135,
          "discountPercent": 3,
          "taxPercent": 0,
          "totalAmount": 19642.5
        },
        {
          "id": "item_101_3",
          "productId": "prd_cetriz_tab",
          "productName": "Cetriz 10mg Film-Coated Tablets",
          "productCode": "PRD-AP-005",
          "batchId": "bth_ap_06",
          "batchNumber": "CTZ-2501",
          "expiryDate": "2027-01-20",
          "packSize": "3 x 10 Tablets (30 Tablets Box)",
          "unit": "Box",
          "quantity": 80,
          "unitPrice": 195,
          "discountPercent": 4,
          "taxPercent": 0,
          "totalAmount": 14976
        }
      ],
      "subtotal": 70850,
      "discountTotal": 2981.5,
      "taxTotal": 0,
      "grandTotal": 67868.5,
      "paidAmount": 20000,
      "balanceDue": 47868.5,
      "paymentStatus": "partial",
      "status": "posted",
      "notes": "Urgent weekly clinical stock refill.",
      "terms": "Payment due within 30 days. Report damages within 48 hours.",
      "createdBy": "Bilal Ahmed"
    },
    {
      "id": "inv_ap_102",
      "companyId": "comp_apex",
      "invoiceNumber": "INV-AP-1002",
      "date": "2026-09-12",
      "dueDate": "2026-10-27",
      "customerId": "cust_ap_2",
      "customerName": "Fazal Din & Sons Medicare",
      "customerStation": "Karachi South",
      "customerAddress": "Plot 77, Shahrah-e-Faisal, PECHS Block 6, Karachi",
      "deliveryChallanId": "dc_ap_202",
      "deliveryChallanNumber": "DC-AP-1002",
      "items": [
        {
          "id": "item_102_1",
          "productId": "prd_amoxil_cap",
          "productName": "Amoxil Capsules 500mg",
          "productCode": "PRD-AP-002",
          "batchId": "bth_ap_03",
          "batchNumber": "AMX-2502",
          "expiryDate": "2027-02-01",
          "packSize": "2 x 10 Capsules (20 Capsules)",
          "unit": "Box",
          "quantity": 300,
          "unitPrice": 240,
          "discountPercent": 2,
          "taxPercent": 0,
          "totalAmount": 70560
        },
        {
          "id": "item_102_2",
          "productId": "prd_risek_cap",
          "productName": "Risek 20mg Delayed-Release Capsules",
          "productCode": "PRD-AP-006",
          "batchId": "bth_ap_07",
          "batchNumber": "RSK-2502",
          "expiryDate": "2027-02-15",
          "packSize": "14 Capsules Strip in Outer Carton",
          "unit": "Box",
          "quantity": 120,
          "unitPrice": 390,
          "discountPercent": 5,
          "taxPercent": 0,
          "totalAmount": 44460
        }
      ],
      "subtotal": 118800,
      "discountTotal": 3780,
      "taxTotal": 0,
      "grandTotal": 115020,
      "paidAmount": 0,
      "balanceDue": 115020,
      "paymentStatus": "unpaid",
      "status": "posted",
      "notes": "Bulk distributor dispatch for Sindh retail trade.",
      "terms": "Net 45 Days as per distributor agreement.",
      "createdBy": "Bilal Ahmed"
    },
    {
      "id": "inv_ap_103",
      "companyId": "comp_apex",
      "invoiceNumber": "INV-AP-1003",
      "date": "2026-09-15",
      "dueDate": "2026-11-14",
      "customerId": "cust_ap_3",
      "customerName": "Shaukat Khanum Memorial Hospital Pharmacy",
      "customerStation": "Lahore North",
      "customerAddress": "7A, Block R-3, M.A. Johar Town, Lahore",
      "items": [
        {
          "id": "item_103_1",
          "productId": "prd_panadol_extra",
          "productName": "Panadol Extra Tablet 500mg/65mg",
          "productCode": "PRD-AP-001",
          "batchId": "bth_ap_01",
          "batchNumber": "PNE-2501",
          "expiryDate": "2027-01-09",
          "packSize": "10 x 10 Tablets (100 Tablets Box)",
          "unit": "Box",
          "quantity": 200,
          "unitPrice": 325,
          "discountPercent": 0,
          "taxPercent": 0,
          "totalAmount": 65000
        },
        {
          "id": "item_103_2",
          "productId": "prd_aug_susp",
          "productName": "Augmentin Dry Powder Suspension 312.5mg/5ml",
          "productCode": "PRD-AP-003",
          "batchId": "bth_ap_04",
          "batchNumber": "AUG-2409",
          "expiryDate": "2026-10-15",
          "packSize": "60ml Amber Glass Bottle",
          "unit": "Bottle",
          "quantity": 75,
          "unitPrice": 350,
          "discountPercent": 2,
          "taxPercent": 0,
          "totalAmount": 25725
        }
      ],
      "subtotal": 91250,
      "discountTotal": 525,
      "taxTotal": 0,
      "grandTotal": 90725,
      "paidAmount": 90725,
      "balanceDue": 0,
      "paymentStatus": "paid",
      "status": "posted",
      "notes": "Institutional hospital supply with verified laboratory release slips.",
      "terms": "Paid via direct bank wire.",
      "createdBy": "Farhan Zaidi"
    }
  ],
  "deliveryChallans": [
    {
      "id": "dc_ap_201",
      "companyId": "comp_apex",
      "challanNumber": "DC-AP-1001",
      "invoiceId": "inv_ap_101",
      "invoiceNumber": "INV-AP-1001",
      "customerId": "cust_ap_1",
      "customerName": "Al-Khidmat Pharmacy & Medical Store",
      "date": "2026-09-10",
      "vehicleNo": "KHI-TEA-8942",
      "driverName": "Ghulam Rasool",
      "driverPhone": "+92 301 9988112",
      "biltyNo": "BLT-KHI-4421",
      "transporterName": "Apex Dedicated Pharma Delivery Fleet",
      "items": [
        {
          "id": "dci_1",
          "productId": "prd_panadol_extra",
          "productName": "Panadol Extra Tablet 500mg/65mg",
          "batchNumber": "PNE-2501",
          "packSize": "10 x 10 Tablets (100 Tablets Box)",
          "quantityDispatched": 100
        },
        {
          "id": "dci_2",
          "productId": "prd_brufen_syr",
          "productName": "Brufen Pediatric Syrup 100mg/5ml",
          "batchNumber": "BRF-2503",
          "packSize": "120ml Bottle with Dose Cup",
          "quantityDispatched": 150
        },
        {
          "id": "dci_3",
          "productId": "prd_cetriz_tab",
          "productName": "Cetriz 10mg Film-Coated Tablets",
          "batchNumber": "CTZ-2501",
          "packSize": "3 x 10 Tablets (30 Tablets Box)",
          "quantityDispatched": 80
        }
      ],
      "status": "delivered",
      "remarks": "Delivered in full. Receiver signed & stamped acknowledgment slip.",
      "authorizedSignatory": "Rashid Mehmood (Warehouse Supv.)"
    },
    {
      "id": "dc_ap_202",
      "companyId": "comp_apex",
      "challanNumber": "DC-AP-1002",
      "invoiceId": "inv_ap_102",
      "invoiceNumber": "INV-AP-1002",
      "customerId": "cust_ap_2",
      "customerName": "Fazal Din & Sons Medicare",
      "date": "2026-09-12",
      "vehicleNo": "KHI-LZR-3310",
      "driverName": "Shahid Mehmood",
      "driverPhone": "+92 312 8844221",
      "biltyNo": "BLT-KHI-4458",
      "transporterName": "Al-Madina Cargo & Goods Transport",
      "items": [
        {
          "id": "dci_4",
          "productId": "prd_amoxil_cap",
          "productName": "Amoxil Capsules 500mg",
          "batchNumber": "AMX-2502",
          "packSize": "2 x 10 Capsules (20 Capsules)",
          "quantityDispatched": 300
        },
        {
          "id": "dci_5",
          "productId": "prd_risek_cap",
          "productName": "Risek 20mg Delayed-Release Capsules",
          "batchNumber": "RSK-2502",
          "packSize": "14 Capsules Strip in Outer Carton",
          "quantityDispatched": 120
        }
      ],
      "status": "dispatched",
      "remarks": "In-transit under temperature-monitored insulation.",
      "authorizedSignatory": "Rashid Mehmood (Warehouse Supv.)"
    }
  ],
  "purchaseInvoices": [
    {
      "id": "pur_ap_301",
      "companyId": "comp_apex",
      "purchaseNumber": "PO-AP-2025-09",
      "vendorInvoiceRef": "GSK-INV-99201",
      "vendorId": "vnd_ap_1",
      "vendorName": "GlaxoSmithKline Healthcare Pakistan",
      "date": "2026-09-02",
      "items": [
        {
          "id": "pi_item_1",
          "productId": "prd_panadol_extra",
          "productName": "Panadol Extra Tablet 500mg/65mg",
          "batchNumber": "PNE-2501",
          "mfgDate": "2025-01-10",
          "expDate": "2027-01-09",
          "quantity": 500,
          "unitPrice": 280,
          "taxPercent": 0,
          "totalAmount": 140000,
          "warehouseId": "wh_apex_1"
        },
        {
          "id": "pi_item_2",
          "productId": "prd_aug_susp",
          "productName": "Augmentin Dry Powder Suspension 312.5mg/5ml",
          "batchNumber": "AUG-2409",
          "mfgDate": "2024-09-01",
          "expDate": "2026-10-15",
          "quantity": 150,
          "unitPrice": 285,
          "taxPercent": 0,
          "totalAmount": 42750,
          "warehouseId": "wh_apex_1"
        }
      ],
      "subtotal": 182750,
      "taxTotal": 0,
      "grandTotal": 182750,
      "paidAmount": 100000,
      "balanceDue": 82750,
      "status": "received",
      "notes": "Direct factory delivery. Inspected and approved by QA."
    }
  ],
  "ledgerEntries": [
    {
      "id": "led_1",
      "companyId": "comp_apex",
      "partyCategory": "customer",
      "partyId": "cust_ap_1",
      "partyName": "Al-Khidmat Pharmacy & Medical Store",
      "date": "2026-08-01",
      "reference": "OB-2026/08",
      "docType": "Opening Balance",
      "description": "Fiscal Year Verified Opening Balance",
      "debit": 45000,
      "credit": 0,
      "runningBalance": 45000
    },
    {
      "id": "led_2",
      "companyId": "comp_apex",
      "partyCategory": "customer",
      "partyId": "cust_ap_1",
      "partyName": "Al-Khidmat Pharmacy & Medical Store",
      "date": "2026-08-18",
      "reference": "RCT-AP-891",
      "docType": "Payment",
      "description": "Bank Transfer (Meezan Bank Ref # MB-881204)",
      "debit": 0,
      "credit": 35000,
      "runningBalance": 10000
    },
    {
      "id": "led_3",
      "companyId": "comp_apex",
      "partyCategory": "customer",
      "partyId": "cust_ap_1",
      "partyName": "Al-Khidmat Pharmacy & Medical Store",
      "date": "2026-09-10",
      "reference": "INV-AP-1001",
      "docType": "Invoice",
      "description": "Sales Invoice INV-AP-1001 (Panadol, Brufen, Cetriz)",
      "debit": 67868.5,
      "credit": 0,
      "runningBalance": 77868.5
    },
    {
      "id": "led_4",
      "companyId": "comp_apex",
      "partyCategory": "customer",
      "partyId": "cust_ap_1",
      "partyName": "Al-Khidmat Pharmacy & Medical Store",
      "date": "2026-09-11",
      "reference": "RCT-AP-904",
      "docType": "Payment",
      "description": "Part payment via Cross Cheque # HBL-991244",
      "debit": 0,
      "credit": 20000,
      "runningBalance": 57868.5
    },
    {
      "id": "led_5",
      "companyId": "comp_apex",
      "partyCategory": "customer",
      "partyId": "cust_ap_2",
      "partyName": "Fazal Din & Sons Medicare",
      "date": "2026-08-01",
      "reference": "OB-2026/08",
      "docType": "Opening Balance",
      "description": "Verified Ledger Opening Balance",
      "debit": 120000,
      "credit": 0,
      "runningBalance": 120000
    },
    {
      "id": "led_6",
      "companyId": "comp_apex",
      "partyCategory": "customer",
      "partyId": "cust_ap_2",
      "partyName": "Fazal Din & Sons Medicare",
      "date": "2026-09-12",
      "reference": "INV-AP-1002",
      "docType": "Invoice",
      "description": "Sales Invoice INV-AP-1002 (Amoxil, Risek)",
      "debit": 115020,
      "credit": 0,
      "runningBalance": 235020
    },
    {
      "id": "led_7",
      "companyId": "comp_apex",
      "partyCategory": "vendor",
      "partyId": "vnd_ap_1",
      "partyName": "GlaxoSmithKline Healthcare Pakistan",
      "date": "2026-08-01",
      "reference": "OB-2026/08",
      "docType": "Opening Balance",
      "description": "Fiscal Year Verified Supplier Payable Opening",
      "debit": 0,
      "credit": 250000,
      "runningBalance": 250000
    },
    {
      "id": "led_8",
      "companyId": "comp_apex",
      "partyCategory": "vendor",
      "partyId": "vnd_ap_1",
      "partyName": "GlaxoSmithKline Healthcare Pakistan",
      "date": "2026-09-02",
      "reference": "PO-AP-2025-09",
      "docType": "Purchase Invoice",
      "description": "Purchase Bill GSK-INV-99201 (Panadol, Augmentin stock)",
      "debit": 0,
      "credit": 182750,
      "runningBalance": 432750
    },
    {
      "id": "led_9",
      "companyId": "comp_apex",
      "partyCategory": "vendor",
      "partyId": "vnd_ap_1",
      "partyName": "GlaxoSmithKline Healthcare Pakistan",
      "date": "2026-09-05",
      "reference": "PAY-AP-401",
      "docType": "Payment",
      "description": "Direct RTGS settlement through Standard Chartered Bank",
      "debit": 100000,
      "credit": 0,
      "runningBalance": 332750
    },
    {
      "id": "led_10",
      "companyId": "comp_apex",
      "partyCategory": "other",
      "partyId": "pty_ap_1",
      "partyName": "Crescent Toll Formulation Lab",
      "date": "2026-08-01",
      "reference": "OB-2026/08",
      "docType": "Opening Balance",
      "description": "Toller Services Opening Balance",
      "debit": 0,
      "credit": 25000,
      "runningBalance": 25000
    },
    {
      "id": "led_11",
      "companyId": "comp_apex",
      "partyCategory": "other",
      "partyId": "pty_ap_1",
      "partyName": "Crescent Toll Formulation Lab",
      "date": "2026-08-25",
      "reference": "TL-BILL-104",
      "docType": "Debit Note",
      "description": "Secondary shrink-wrap packaging charges (Batch PNE-2501)",
      "debit": 0,
      "credit": 47000,
      "runningBalance": 72000
    }
  ],
  "auditLogs": [
    {
      "id": "aud_1",
      "companyId": "comp_apex",
      "timestamp": "2026-09-15 14:10:22",
      "userId": "usr_sales_apex",
      "userName": "Bilal Ahmed",
      "userRole": "Sales Officer",
      "action": "CREATE",
      "module": "Invoices",
      "recordId": "inv_ap_103",
      "recordTitle": "INV-AP-1003",
      "newValue": "Grand Total: PKR 90,725.00",
      "details": "Created sales invoice for Shaukat Khanum Memorial Hospital Pharmacy.",
      "ipAddress": "192.168.1.45"
    },
    {
      "id": "aud_2",
      "companyId": "comp_apex",
      "timestamp": "2026-09-12 11:34:09",
      "userId": "usr_admin_apex",
      "userName": "Farhan Zaidi",
      "userRole": "Company Admin",
      "action": "UPDATE",
      "module": "Products",
      "recordId": "prd_panadol_extra",
      "recordTitle": "Panadol Extra Tablet 500mg/65mg",
      "oldValue": "Sale Price: PKR 330.00",
      "newValue": "Sale Price: PKR 350.00",
      "details": "Updated official maximum retail price and wholesale slab.",
      "ipAddress": "192.168.1.12"
    },
    {
      "id": "aud_3",
      "companyId": "comp_apex",
      "timestamp": "2026-09-11 16:22:50",
      "userId": "usr_accountant_apex",
      "userName": "Zubair Qureshi",
      "userRole": "Senior Accountant",
      "action": "PAYMENT",
      "module": "Ledgers",
      "recordId": "cust_ap_1",
      "recordTitle": "Al-Khidmat Pharmacy & Medical Store",
      "newValue": "Received PKR 20,000 via Cheque # HBL-991244",
      "details": "Part payment booked against Invoice INV-AP-1001. Customer receivable reduced.",
      "ipAddress": "192.168.1.28"
    },
    {
      "id": "aud_4",
      "companyId": "comp_apex",
      "timestamp": "2026-09-10 10:15:30",
      "userId": "usr_super",
      "userName": "Dr. Tariq Jamil",
      "userRole": "Super Admin",
      "action": "UPDATE",
      "module": "Settings",
      "recordId": "comp_apex",
      "recordTitle": "Apex Pharma Distro",
      "newValue": "Updated Drug Sale License Number to DSL-KHI-4492/2024",
      "details": "Company statutory profile compliance renewal recorded.",
      "ipAddress": "192.168.1.2"
    }
  ]
}