Simple Local Lead CRM - Multi Company Advanced Version
=====================================================

This is a simple PHP + MySQL lead management CRM designed for local XAMPP/XAMPP Lite hosting.

NEW FEATURES IN THIS VERSION
----------------------------
- Multi-company isolation
  - Talentfort (Pvt) Ltd and ARS Overseas are created by default.
  - Admin can switch active company from the left sidebar.
  - Leads, employees, dashboards and reports are separated by company.
  - Employees can see only their assigned leads inside their own company.

- One-by-one lead entry + bulk upload
  - Add Lead page for manual entry.
  - Bulk Upload page for CSV or XLSX upload.
  - Assigned_EMP_Code can be included inside the CSV/XLSX file.
  - If Assigned_EMP_Code is blank in a row, a default employee can be selected during upload.
  - CSV and Excel template downloads are available from Add Lead and Bulk Upload pages.

- CSV export
  - Leads page has Export CSV button.
  - Export respects current filters: date, status, category, employee and search.
  - Export also respects company isolation and employee access.

- Advanced dashboards
  - Main dashboard
  - Category Deep Dive Dashboard with charts
  - Employee-wise Performance Dashboard
  - Campaign ROI Dashboard
  - Follow-up Control Center
  - Final Report PDF using browser print / Save as PDF
  - Employee Performance PDF Report using browser print / Save as PDF

- Notifications
  - Notification Settings page supports Disabled, Email, or WhatsApp Cloud API mode.
  - Single lead assignment sends one notification.
  - Bulk upload sends one summary notification per assigned employee, not one notification per lead.
  - Notification Log records sent/failed/skipped status.

INSTALL NEW SYSTEM
------------------
1. Extract the ZIP file.
2. Copy the leadcrm folder to:
   C:\xampp_lite_8_5\www\leadcrm
3. Start Apache and MySQL from XL-Control-Panel.
4. Open:
   http://localhost/leadcrm/install.php
5. Click: Create Database & Install
6. Open:
   http://localhost/leadcrm/login.php

DEFAULT LOGIN
-------------
Admin:
username: admin
password: admin123

EMP01:
username: emp01
password: emp01123

EMP02:
username: emp02
password: emp02123

UPDATE EXISTING SYSTEM
----------------------
If you already installed the earlier CRM version:
1. Backup your current leadcrm folder.
2. Replace old files with this new version.
3. Open:
   http://localhost/leadcrm/update_database.php
4. Click: Run Database Update
5. Login normally.

IMPORTANT AFTER UPDATE
----------------------
- Open Companies page and check Talentfort / ARS companies.
- Select active company from left sidebar.
- Add employees under each active company from Employees page.
- Add employee email / WhatsApp number if notifications are needed.
- Configure Notification Settings.

BULK UPLOAD TEMPLATE COLUMNS
----------------------------
Lead_ID, Lead_Date, Lead_Source, Campaign_Name, Ad_Spend, Customer_Name, Company_Name, Phone, WhatsApp, Email, Service_Category, Requirement, Priority, Assigned_EMP_Code, Current_Status, Next_Followup_Date

NOTIFICATION NOTE
-----------------
- Email mode uses PHP mail(). Local XAMPP may need mail server configuration.
- WhatsApp mode uses Meta WhatsApp Cloud API. You need Access Token, Phone Number ID, and valid employee WhatsApp numbers.
- If notification channel is disabled, the system logs notification events without sending.

DAILY USE
---------
Admin:
- Switch active company from sidebar.
- Add leads one-by-one or bulk upload.
- Assign leads to EMP codes.
- Export filtered leads as CSV.
- Monitor dashboards and reports.

Employee:
- Login with employee username/password.
- See only own assigned leads.
- Update follow-ups, status, remarks, converted status, and deal value.
- Download own performance report as PDF.


Update note: Tags module restored with sidebar tab, tag management, lead tag assignment, lead tag filters, export and bulk upload template support.

FINAL REVIEW NOTE
-----------------
This package includes the restored Settings Center, Tags module and all latest notification/access/UI features. After replacing files, always run update_database.php once. If a menu item is not visible, confirm the user's role in Users & Access and Portal Roles.
