📖 System Operating Manual & Guide

One Piece India (Aristo Pharma) — Full Plain English Reference Guide

🏠 Home

📌 Table of Contents

1. System Overview & Access Control

  1. System Purpose

    This software is a comprehensive management platform designed for One Piece India / Aristo Pharma. It unifies financial tracking, operational task management, staff attendance & payroll, price list catalogs, and mobile transaction entries into one central web system.

  2. User Roles & Permissions

    The application supports two distinct user access levels:

    • ADMIN Full Access: Complete authority over Finance, User Accounts, Mobile Approvals, System Notifications, Tasks, Attendance, and Price Lists.
    • STAFF Restricted Access: Limited to viewing the Price List, updating assigned Tasks, and punching daily Attendance.
  3. Security & Protection Measures

    The system enforces multi-layered security protections:

    • Encrypted Passwords: Passwords are hashed before storage.
    • Rate-Limiting Lockout: Devices attempting more than 5 incorrect login passwords are automatically locked out for 15 minutes.
    • IP Banning: Repeated brute-force attacks result in an automatic IP ban.
    • OTP Email Verification: User email addresses can be verified using 6-digit OTP security codes.

2. Navigation & Header Controls

  1. Collapsible Sidebar Menu

    The left-hand sidebar allows rapid switching between all primary web tabs:

    • Home (index.html): Main portal gateway.
    • Price List (pricelist.html): Product catalog and price database.
    • Users (users.php): Account controls, login logs, security lockouts, and mobile approvals (Admin).
    • Notification (notifications.php): Central alert hub for approvals, financial alerts, and email logs (Admin).
    • Finance (finance_dashboard.php): Complete accounting and financial dashboard (Admin).
    • Task (tasks.php): Operational task manager for staff and admins.
    • Attendance (attendance.php): Daily staff check-in/out and payroll tracker.
    • System Guide (readme.html): This full user manual.
  2. Notification Bell System (🔔)

    Located in the top header for Admins. Displays a live badge counter updated automatically every 30 seconds. Clicking the bell opens a dark dropdown with instant actions for pending mobile approvals, low cash warnings, low bank balances, and overdue tasks.

  3. Task Quick Button (✅)

    Located next to the Notification Bell in the header, allowing Admins to quickly view active staff task assignments from any page.

3. User Management Module (users.php)

  1. Tab 1: Users List

    Manage all employee and administrator accounts:

    • Add User: Specify Full Name, Username, Email, Password, Role (Staff/Admin), Monthly Salary (₹), and Monthly Paid Leaves (default: 4 days).
    • Automatic Daily Rate: The system automatically calculates Daily Rate = Monthly Salary / 30.
    • Show Password Toggle (👁): Click the eye icon next to password input fields to view or hide typed text.
    • Email OTP Verification: Click "VERIFY" to send a 6-digit OTP to the user's email address.
  2. Tab 2: Login Logs

    Real-time security log recording every single login attempt. Captures Date & Time, IP Address, Attempted Username, Status (SUCCESS / FAILED), and Browser Device User-Agent.

  3. Tab 3: Locked IPs

    Lists devices temporarily locked due to failed passwords. Displays IP Address, Expiration Time, Remaining Countdown, and Last Username Tried. Click "🔓 UNLOCK" to restore access immediately.

  4. Tab 4: Banned IPs

    Lists IP addresses placed under extended security bans. Click "🔓 REVOKE BAN" to remove an IP from the blacklist.

  5. Tab 5: APP (Mobile Device Management)

    Displays all mobile phones attempting to connect via the Android Quick Entry App. Admins click "APPROVE" to allow a phone to post entries, "REJECT" to block access, or "đŸ—‘ī¸" to delete the record.

4. Centralized Notification Center (notifications.php)

  1. Tab 1: Approvals

    Dedicated interface for reviewing and approving pending Mobile App device registration requests.

  2. Tab 2: Notifications

    Displays dynamic warning cards for critical business events:

    • Low Cash Warning: Alert triggers when Cash-in-Hand falls below ₹5,000.
    • Low Bank Balance Warning: Alert triggers when any bank account balance falls below ₹10,000.
    • Overdue Tasks Warning: Lists staff tasks past their deadline.
    • Attendance Warning: Flags unsubmitted or late staff attendance records.
  3. Tab 3: Email Outbox

    Complete historical log of all automated emails sent by the system, including recipient email, subject line, timestamp, and delivery status.

5. Finance Management System (finance_dashboard.php)

  1. Executive Financial Overview

    Provides real-time financial health cards: Total Cash in Hand, Total Bank Account Balance, Total Credit Card Limit & Debt, Total Loan Debt, and Net Cash Position (Cash + Bank - Credit Debt).

  2. Cash & Bank Account Manager

    Add and manage business bank accounts (Kotak Bank, HDFC, SBI, Punjab and Sindh Bank, etc.). Supports SB (Savings), CA (Current), and OD (Limit Account) types. OD accounts allow negative balances up to the sanctioned limit (e.g. ₹10,00,000) with zero notifications until the negative limit is exceeded. Balances automatically adjust as income, expenses, and ledger entries are logged.

  3. Credit Cards & EMI Management

    Track credit limits, current outstanding balances, billing statement dates, and payment due dates. Allows paying card bills directly and managing monthly EMI deductions.

  4. Loans & Debt Snowball Engine

    Track active business loans and personal debts. Uses a Debt Snowball algorithm to project optimal payoff schedules, estimated payoff dates, and total interest saved. Options to foreclose or reopen loans.

  5. Log Outflow / Expense Manager

    Log daily business expenses. Record Date, Amount (₹), Category (Rent, Salaries, Utilities, Supplies, Marketing, Raw Material, Freight, etc.), Payment Mode (Cash, Bank, Credit Card), Payee, and upload receipt images.

  6. Log Inflow / Income Manager

    Record daily sales and revenue. Inputs include Date, Amount (₹), Customer/Source, Payment Mode (Bank, Cash, UPI), and Reference Number.

  7. Receivables & Payables

    Track wholesale customer credit sales (Receivables) and vendor/supplier debts (Payables) with due dates and payment tracking.

  8. CFO Analytics & Forecasts

    Visual 30-day cashflow forecasts, category expense breakdowns, and monthly profit/loss summaries.

  9. Saffron Theme (#ea580c) & High-Density Space Management

    The entire Finance Dashboard has been overhauled to match the modern Saffron theme and high-density space management of TASK OPI (tasks_opi.php):

    • Saffron Design System: Google Font Outfit, Saffron primary accents (#ea580c / #f97316), glowing active tab badges with amber text (#fdba74), and dark slate backgrounds.
    • High-Density 2-Column Grids: Form entry cards across all tabs are laid out in compact 2-column grids (display: grid; grid-template-columns: 1fr 1fr; gap: 8px;), completely eliminating empty vertical space.
    • Compact Excel Controls: Inputs and action buttons use .excel-input and .btn-save / .btn-action / .btn-edit / .btn-delete.
    • 2-Color Zebra Striping: Alternating row backgrounds (#141720 and #1d212d) with interactive saffron hover glow (rgba(234, 88, 12, 0.22)).

6. TASK NMS Retail Module (tasks.php)

  1. Daily Operations & "Only Add" Policy

    Staff and users can submit daily entries (NMS Cash, Store Purchases, Old Purchase Payments, Cash Out) at any time without lockout deadlines. Staff users can add new records but cannot edit or delete submitted entries. Full modification and deletion permissions are reserved for Administrators.

  2. Dynamic Party Autocomplete & Quick Creation

    All Party / Vendor name fields feature smart typing autocomplete. As users type, matching parties from the database appear in a clean dropdown list. Users can also click + Add New Party to register new vendors instantly without navigating away.

  3. Task Creation & Assignment

    Admins create tasks with Title, Instructions, Assigned Staff Member, Priority Level (Low, Medium, High, Urgent), Category, and Due Date/Time.

  4. Task Lifecycle

    Tasks transition through four states: Pending ➔ In Progress ➔ Completed ➔ Closed. Staff members can attach progress notes and completion proof.

  5. Overdue Task Automation

    The system periodically monitors due dates. Tasks exceeding their deadline automatically trigger overdue alerts in the Notification Bell and send warning emails.

7. Attendance & Payroll Module (attendance.php)

  1. Default Present ('P') Rule

    Staff attendance for all elapsed working days automatically defaults to Present (P) on their assigned shift until and unless explicitly modified by an Administrator. Administrators can update any day's shift to Half Day (H), Leave (L), Absent (A), or OFF.

  2. No Grace Periods or Cutoff Penalties

    The grace period system has been completely removed. Missing daily cash sheets or tasks do not force staff attendance to a dash (-) or trigger automated absence deductions.

  3. Monthly Payroll & Salary Deduction Calculation

    Calculates salary based on: Payable Salary = (Present Days + Allowed Paid Leaves) × Daily Rate, where Daily Rate = Base Monthly Salary / 30. Absences beyond allowed paid leaves incur automatic daily rate deductions.

8. Mobile Quick Entry App (/app/index.html)

  1. App Overview

    A lightweight Android web mobile application optimized for smartphones to log sales and expenses on the go in under 5 seconds.

  2. First-Time Setup

    Open https://onepieceindia.com/app/ on your mobile phone browser. The phone automatically generates a unique Device UUID.

  3. Admin Device Approval Procedure

    Follow these steps to authorize a new phone:

    • Step 1: Upon opening the app, the phone displays âŗ Device Pending Admin Approval and locks entry buttons.
    • Step 2: Admin logs into main website ➔ opens Users tab ➔ APP section (or clicks Notification Bell 🔔).
    • Step 3: Admin locates the device and clicks "APPROVE".
    • Step 4: On the phone, tap "🔄 Check Status" — the badge turns Green (APPROVED), unlocking full access to log expenses and sales.

9. Background Automated Cron Jobs

  1. Attendance Cron (cron_attendance.php)

    Monitors night-shift active duty check-in alerts and sleeping detection.

  2. Finance Reminder Cron (cron_finance_reminders.php)

    Checks Cash-in-Hand and Bank Account balances nightly against threshold limits and emails warnings to admins when funds are low.

  3. Task Overdue Cron (cron_task_overdue.php)

    Scans operational task deadlines and automatically flags overdue assignments.

10. TASK OPI Wholesale System (tasks_opi.php)

  1. Module Purpose, UI Layout & Finance Management Integration

    Dedicated task and accounts management system built exclusively for the OPI Wholesale business. All database tables utilize the opi_ prefix to ensure complete data isolation from retail (NMS) records while being deeply integrated with the website's Finance Management System (finance_bank_accounts, finance_income, finance_expenses, finance_receivables, finance_payables). Adopts the preferred Task UI layout with dark theme aesthetics (#111318 background, #1c1f28 card containers), 'Outfit' font, and inline Excel-style table entry forms (.excel-form-table) across all tabs.

  2. Party Autocomplete Standard Across All Sheets

    All Party / Vendor input fields across Sale Bills, Challans, Purchases, and Cheques feature dynamic typing autocomplete with live server search and inline + Add New Party modal creation, eliminating static dropdowns.

  3. Dynamic Finance Bank Dropdowns (Nickname First)

    All bank selectors across Sales, Old Bill Payments, Purchases, Advance Payments, and Cheques dynamically load accounts from finance_bank_accounts, displaying the concise account nickname first with live balance (e.g. PSB 00001 (₹-1,26,656.88), OPI INDUS 0505 (₹4,768.62)) without bulky bank name prefixes, ensuring clean dropdown rendering in compact tables.

  4. Internal Tab 1: Sale (Bill & Challan)

    Supports two distinct document types with automated serial logic, dynamic status restrictions & full old bill payment adjustment:

    • Bill & Fixed FY Prefix Badge: The 2-digit financial year starting prefix (e.g. 26 for FY 2026–27, automatically switching to 27 on 1 April 2027 for FY 2027–28) is displayed as a fixed badge outside the entry box. Users only type the sequence suffix (e.g. A001), with auto-generated sequence incrementing (26A001 to 26A999, 26B000 onwards).
    • Challan: Auto-numbered format CA000001 onwards.
    • Status & Restrict Sign Cursor: When Status is selected as UNPAID, Payment Method and Bank Account fields are locked and display a restricted (not-allowed) cursor on hover.
    • Automatic Finance Inflows & Receivables: When a Sale Bill is saved as PAID, the funds instantly credit the selected Finance Bank Account (or Cash in Hand) and record an inflow in finance_income under source 'OPI Income'. When UNPAID or PARTIALLY_PAID, an active receivable in finance_receivables is maintained.
    • Converted Challan Bill Tracking: When a Challan is converted into a Sale Bill, the system prominently displays the linked bill number (e.g. ➜ Bill #26A001 and ✅ Converted (Bill #26A001)) in the Wholesale Sales Register and Vendor Ledger.
    • Wholesale Sales Register (10-Entry View & Searchable 'View ALL' Modal): The main sales register table displays the latest 10 sales entries for high-speed POS interaction, sorted chronologically with Bill / Challan numbers running in sequential ascending order with respect to date. A prominent 🔍 View ALL button adjacent to the register header opens a full register modal equipped with live multi-field search (by Bill/Challan No, Party Name, or Amount), Type/Status dropdown filters, aggregate summary metrics (Total Billed, Total Paid, Total Pending), and printable view.
    • Clean Action Controls on Paid Bills: The "💰 Receive Payment" button is displayed only on unpaid or partially paid credit bills (pending balance > 0). Fully paid bills do not display the button.
    • Rapid POS Enter Key Navigation & 1st Entry Cursor Cycle: Pressing Enter on the last input of any inline form automatically submits the record and instantly resets the cursor/focus to the 1st entry input box (e.g. Party Name or Bill No) for uninterrupted keyboard-only data entry.
    • Receive Old Sale Bill Payment System: Dedicated inline sheet (💰 RECEIVE OLD SALE BILL PAYMENT) providing fast adjustment for credit/unpaid bills by searching/typing the Bill Number with autocomplete. The system automatically fetches Party Name, Bill Total, and Pending Balance. Submitting records an income in finance_income, credits the selected Finance Bank account, and reduces the pending balance in finance_receivables.
    • Old Sale Payments Received Log: Comprehensive table displaying all partial and full bill payments with live balance recalculation, bank balance reversal, and cancellation safety.
  5. Internal Tab 2: Purchase & Advance Payment System

    Record wholesale purchases and manage advance supplier payments seamlessly via inline sheets:

    • Wholesale Purchases: Top inline Quick Entry sheet capturing Purchase Date, Party Name (with Autocomplete), Supplier Bill Number, Total Amount (₹), and Paid Amounts. Paid amounts automatically deduct from the selected Finance Bank Account and record an expense in finance_expenses ('OPI Purchase'), while pending amounts record in finance_payables.
    • Advance Payment to Vendor: Dedicated inline Quick Entry sheet (💸 RECORD ADVANCE PAYMENT TO VENDOR) capturing Payment Date (≤ Today), Party Name (Autocomplete), Amount (₹), Mode (CASH, PHONEPE/UPI, BANK, CHEQUE), Bank Account, and Remarks. Payments automatically deduct from the Finance Bank account and log an expense in finance_expenses ('OPI Advance Payment').
    • Advance Payments Log: Comprehensive table listing all vendor advances and payments with instant administrative deletion and balance reversal safety.
  6. Internal Tab 3: Vendors, Bulk Excel Import & Detailed Party Ledger System

    Adopts the standard NMS format featuring a top 2-column search and bulk import grid, comprehensive ledger balance directory, and detailed party ledger statement modal:

    • 2-Column Search & Bulk Import Grid:
      • Left Card (🔍 Search Vendor / Party): Instant text search with dynamic "Party not found in database" prompt and 1-click "➕ Add as New Vendor" popup.
      • Right Card (đŸ“Ĩ Bulk Import Vendors): Download ready-to-use Excel template (opi_vendors_template.xlsx) and upload .xlsx/.xls spreadsheets using SheetJS to bulk import hundreds of wholesale parties and opening balances in seconds.
    • Vendor Directory & Ledger Balances: Real-time table displaying Party Name, Total Sales, Receivable Due (green badge), Total Purchases, Payable Due (red badge), and Net Ledger Balance.
    • Detailed Party Ledger Statement (📄 View Ledger): Clicking the blue "View Ledger" button opens a comprehensive statement modal for any vendor showing initial balance, sales bills, delivery challans, old bill payments, cleared cheques, purchases, supplier advances, and running ledger balance with a đŸ–¨ī¸ Print Ledger option.
    • Global 3-Bar Sidebar Toggle: The top-left 3-bar hamburger navigation toggle button is seamlessly available across TASK OPI for quick navigation between Home, Finance, Price List, TASK NMS, and Attendance.
  7. Internal Tab 4: Cheque Book, Bill Adjustment & Deferred Bill Status Progression

    Comprehensive cheque tracking with automatic bill adjustments and clearance lifecycle:

    • Initial Entry & Due Bills Adjustment Popup: When recording a new cheque (Given Date ≤ today, Cheque Date, Party Name, Cheque Number, Amount, Remark), clicking "💾 Save Cheque" automatically opens the Cheque Bill Adjustment popup modal.
    • Due Bills Popup & Partial Adjustment: Fetches all due bills for the party with live allocation tracking, ⚡ Auto FIFO Allocate button, individual checkboxes, and partial payment allocation inputs (supporting partial adjustments if cheque amount is less than bill amount). If the party has no pending bills, the cheque is saved as an unallocated in-hand cheque.
    • Deferred Bill Status: While the cheque is in PENDING or SUBMITTED status, the bill adjustments are linked in opi_cheque_allocations, but the bills remain UNPAID because funds have not yet cleared.
    • Submission to Bank (SUBMITTED): Clicking "📤 Submit to Bank" opens a modal to assign the deposit OPI Bank Account. The [📋 Adjust Bills] button remains available on the table to review or adjust bill allocations at any time.
    • Clearance & Automatic Bill Payment (CLEARED): When marked as CLEARED, funds are deposited into the Finance Bank Account (finance_income), and all adjusted bills automatically update to PAID (or PARTIALLY_PAID), syncing finance_receivables.
    • Admin Reversal Safety: If an Administrator reverts a cleared cheque, bank deposits and finance income entries are reversed, and the linked bills automatically revert back to UNPAID.
    • Automated Cheque Reminders (cron_opi_cheques.php): Background cron scans pending and submitted cheques daily and emails automated notifications for cheques due today or tomorrow.
  8. Internal Tab 1 Subsystem: PhonePe / UPI Next-Day Consolidated Batch Settlement (T+1 System)

    Automated batch processing for wholesale PhonePe and UPI digital receipts:

    • Real-Time Customer Clearance: When a wholesale customer pays via PhonePe QR / UPI (e.g. 3 transactions on 19th Aug of ₹100, ₹150, ₹257 = ₹507 total), their Sale Bill or Old Bill payment is marked as PAID immediately. Customer dues and party ledgers update in real-time.
    • Deferred Next-Day Consolidated Deposit: Individual PhonePe payments are held in daily settlement batches (opi_phonepe_settlements) instead of creating cluttered individual bank deposits.
    • Automated T+1 Settlement: On Date T+1 (next morning at 5:00 AM or on the first system access on/after Date T+1), the entire accumulated collection (e.g. ₹507.00) is automatically deposited as ONE single consolidated transaction into the designated bank account (Punjab and Sindh Bank) and recorded as a single finance_income record ("OPI PhonePe Batch Settlement for 19/08/2026 (3 transactions)").
    • Live Tracker Widget: Tab 1 includes a live status card tracking today's accumulated PhonePe total, transaction count, scheduled settlement date, and a manual "⚡ Settle Pending" button.
  9. Universal 10-Item Display Rule & "View ALL" Searchable Modals (TASK OPI)

    Optimized dashboard interface ensuring fast rendering and clutter-free POS experience:

    • 10-Item Limit on Main Page: Every data table across TASK OPI is restricted to displaying 10 records on the main dashboard (Sales Register sorted in descending order by date/id, Old Bill Payments Log, Purchases Register, Advance Payments Log, and Cheque Book).
    • Active Ledgers Top-10 Sorting: For the Vendor List & Ledger Balances table, the main dashboard automatically displays the top 10 most active ledgers (ranked by transaction volume and balance dues).
    • "🔍 View ALL ()" Header Buttons: Each table card header contains a direct count badge button opening a full modal dialog displaying the complete dataset.
    • Instant Multi-Field Search & Print: All modals feature instant client-side filtering (by Party Name, Bill No, Amount, Date, Payment Method), aggregate totals summary cards, and clean print formatting.
  10. Converted Challan Status Color & Display Protocol

    Visual status workflow for Wholesale Sales Register entries:

    • Active Challan: Displayed with UNPAID status badge.
    • Converted Challan (Unpaid Bill): Displays the converted Bill Number in red: [BILL NO#].
    • Converted Challan (Paid Bill): Displays the converted Bill Number in green: [BILL NO#].
    • The Bill/Challan column displays the clean Challan identifier without duplicate sub-labels.
  11. Interactive Multi-Bill Credit Payment Adjustment System

    Streamlined old bill collection system allowing fast multi-bill settlement:

    • Party-Driven Form: Select or type Party Name -> View Total Pending Dues -> Enter Amount Received -> Method (BANK, PHONEPE/UPI, CASH - CHEQUE disallowed as cheques are managed in Tab 4 Cheque Book) -> Bank Details -> Click "đŸ’ĩ Adjust Bills".
    • Due Bills Popup: Dynamically opens modal listing all pending/unpaid bills of the selected party with instant "⚡ Auto FIFO Allocate" button.
    • Partial & Multi-Bill Allocations: Checkboxes and amount allocation inputs allow splitting payments across multiple bills or making partial payments when amount is less than the bill total.
    • Atomic Sync: Automatically increments bank/cash balances, creates ledger payment entries, updates bill payment statuses, and synchronizes receivables.
  12. Sale Return Management (Tab 1)

    Integrated merchandise return workflow for wholesale customers:

    • Mode Toggle: Fast toggle in Tab 1 header between [📄 SALE BILL], [📑 CHALLAN], and [â†Šī¸ SALE RETURN].
    • Auto Sequential Numbering (CN Series): Generates sequential Credit Note Return numbers with prefix CN (e.g. CN000001, CN000002).
    • Accounting & Ledger Integration:
      • UNPAID Return (Credit Note): Credited to customer ledger as a credit note, reducing customer outstanding dues.
      • PAID Return (Immediate Refund): Customer refund deducted from chosen Bank/Cash account and recorded under finance_expenses ('Refund' / 'OPI Sale Return Refund') with zero net ledger distortion.
    • Visual Highlighting: Displayed with distinct pink badges [â†Šī¸ SALE RETURN] and pink-highlighted CN return numbers in both the Wholesale Sales Register and View ALL modal.
  13. Purchase Return Management (Tab 2)

    Merchandise return workflow for wholesale suppliers and vendors:

    • Mode Toggle: Fast toggle in Tab 2 header between [🛒 PURCHASE] and [â†Šī¸ PURCHASE RETURN].
    • Auto Sequential Numbering (DN Series): Generates sequential Debit Note Return references with prefix DN (e.g. DN000001, DN000002).
    • Accounting & Ledger Integration:
      • UNPAID Return (Debit Note): Debited to vendor ledger as a debit note, reducing outstanding payable dues to the supplier.
      • PAID Return (Refund Received): Refund credited to chosen Bank/Cash account and recorded under finance_income ('Refund' / 'OPI Purchase Return Refund') with zero net ledger distortion.
    • Visual Highlighting: Displayed with distinct amber badges [â†Šī¸ PURCHASE RETURN] and amber-highlighted DN reference numbers in both the Wholesale Purchases Register and View ALL modal.
  14. High-Contrast Button Icons & Mode Toggles

    Elevated UI styling for optimal readability and contrast:

    • Elevated Contrast: Tab buttons and mode toggles feature dark high-contrast backgrounds (#1e2433), light readable text (#cbd5e1), and defined borders (#333d52).
    • Distinct Active Mode Themes: Blue (#2563eb) for Sale Bills, Purple (#7c3aed) for Challans, Rose (#db2777) for Sale Returns, Emerald (#059669) for Purchases, and Amber (#d97706) for Purchase Returns.
    • Drop-Shadow Icon Badges: Icons and emojis are styled in .btn-icon-badge containers with drop shadows to ensure they never blend into dark backgrounds.
  15. Compact Admin Approvals Queue & Multi-Select Bulk Approval Engine

    Streamlined modification request queue with batch action support:

    • Concise List View: Redesigned list layout displaying each pending request in a compact table row (~45px height) allowing administrators to review dozens of pending edits/cancellations simultaneously without extensive scrolling.
    • Inline Diff Highlights: Highlights value changes in real time (e.g. old amounts struck through, new amounts highlighted in green with âœī¸ edit icon). Includes an expandable accordion toggle ([đŸ‘ī¸ Diff]) to reveal detailed side-by-side Old vs New comparison cards on demand.
    • Multi-Select Checkboxes & Master Toggle: Individual row checkboxes and a master "Select All Visible" header toggle with a real-time selection counter.
    • 1-Click Bulk Approvals & Rejections: Dedicated batch action controls ([✅ Approve Selected] and [❌ Reject Selected]) allow approving or rejecting multiple modification requests atomically with full database transactions and automated finance syncing.
  16. TAB 5: OPI Cash Register & Isolated Cash Management (tasks_opi.php & finance_dashboard.php)

    Dedicated cash account management for wholesale operations, fully isolated from retail store cash:

    • Isolated OPI Cash Account: All cash transactions originating from OPI Wholesale operations (Cash Sales, Cash Bill Payments, Cash Purchases, Cash Advances, PR Refunds, and Sale Return Refunds) are strictly isolated in a dedicated table opi_cash_in_hand, completely segregated from retail NMS cash (finance_cash_in_hand).
    • Quick Entry Form (Tab 5): High-efficiency table entry form matching universal Excel style with fields: Date, Type (1 - EXPENSE, 2 - TO BANK, 3 - TO OWNER), dynamic Remark / Bank, Amount (₹), and + Add Entry.
    • Dynamic Field Switching:
      • 1 - EXPENSE: Text input for entering expense description/reason. Auto-syncs to finance_expenses under 'Business Expense' / 'OPI Cash Expense' (payment method = 'CASH').
      • 2 - TO BANK: Dropdown select populated with OPI Wholesale bank accounts. Auto-credits the selected bank account in finance_bank_accounts and logs an 'OPI Cash Deposit' transfer.
      • 3 - TO OWNER: Read-only text indicator "To Abhijeet - Owner Cash Withdrawal". Auto-credits owner drawings in finance_owner_cash under Abhijeet's ledger.
    • Universal 10-Item Rule & Detailed Statement Modal: Main Tab 5 displays the latest 10 cash-out records with real-time liquid balance and category breakdowns. Header buttons (🔍 View ALL () and đŸ’ĩ Cash Statement) launch a comprehensive modal statement (#allOpiCashModal) featuring chronological running balances, date filters, transaction type filters, real-time search, and 1-click printable statements.
    • Finance System Integration: Finance Dashboard (finance_dashboard.php) displays dual registered cash balances (NMS Cash and đŸ’ĩ OPI Cash) with individual ledger audit buttons and live update controls. CFO Analytics aggregates both cash pools into total organization liquidity.
  17. RECEIVING Tracking & Physical 2nd-Copy Delivery Verification (Tab 1)

    Physical delivery proof and signed 2nd-copy bill tracking for wholesale orders:

    • Physical Goods Delivery Verification: Represents the physical 2nd copy of a Sale Bill or Delivery Challan stamped and signed by the receiver confirming goods delivery.
    • UNPAID Entries Exclusivity: The RECEIVING column and tick box apply strictly to UNPAID and PARTIALLY PAID Bills & Challans. For PAID entries, CANCELLED bills, or Sale Returns, the column displays a clean neutral dash (-).
    • Interactive 1-Click Status Badge:
      • âŗ PENDING: Clickable button/box indicating signed copy is awaited.
      • ✅ RECEIVED: Green badge with checkmark indicating physical signed copy is verified and in hand, with hover tooltip showing verification author and timestamp.
    • Role Permission Security Rule:
      • Staff Permission: Staff can mark a pending copy as received (has_receiving = 1) via instant AJAX update.
      • Admin Protection: Staff cannot uncheck or revoke a verified receiving copy. Only Administrators can uncheck/clear receiving status (has_receiving = 0). Attempted staff unchecks trigger a security permission warning.
    • Quick Filter Toggles & KPI Counter: Filter toggle (All Receiving, âŗ Pending Receiving, ✅ Received Only) in the main header and View ALL modal allows isolating unpaid dispatches missing signed copies. Modal KPI includes a live Pending Receiving (Unpaid) counter.
    • Excel & Print Exports: Included in the printable register and Excel exports (📊 Export Excel) with RECEIVED, PENDING, or - status.

11. Daily Checklist System & TASK NMS Operations (tasks.php & finance_dashboard.php)

  1. Daily Store Checklist & Task Management

    Integrated checklist workflow tracking daily NMS Cash sheet submissions, store purchase entries, vendor balance checks, and staff attendance. Visual task cards display completion status to ensure daily operational workflow compliance.

  2. Universal 10-Item Display Rule & "View ALL" Modals (TASK NMS)

    All tables across TASK NMS follow the 10-item display standard on the main dashboard with dedicated "🔍 View ALL ()" header buttons and full searchable & printable modals:

    • Previous Cash Sheet Entries: Latest 10 cash sheet entries on Tab 1 -> Full Searchable Modal with sales and net cash stats.
    • Purchase Entries List (Selected Date): Latest 10 purchases on the active date -> Full Modal dialog.
    • Old Purchase Payments List (Selected Date): Latest 10 old payments on the active date -> Full Modal dialog.
    • Previous Purchase Entries (All Dates): Latest 10 purchases across all dates -> Full Modal with purchase totals.
    • Previous Old Purchase Payments (All Dates): Latest 10 payments across all dates -> Full Modal with paid totals.
    • Vendor List & Ledger Balances: Top 10 active ledgers on Tab 3 -> Full Modal with complete searchable directory and balances.
    • Recent Entries (Cash Out): Latest 10 expense, bank deposit, and owner cash records on Tab 4 -> Full Modal with type filter and totals.
  3. Date Restriction Protocol (No Future Dates)

    To eliminate erroneous future-dated entries, all date fields across TASK NMS, TASK OPI, Finance Dashboard, and Mobile App enforce a strict maximum date of the current working date (Today). The constraint is enforced in HTML5 date pickers, frontend form validation, and backend PHP APIs. Exception: Cheque maturity dates (cheque_date) remain exempt to accommodate post-dated cheques.

11. Centralized Admin System Settings (settings.php)

  1. Purpose & Security Access Control

    Dedicated administration module accessible strictly to Administrator accounts (ADMIN ONLY). Eliminates hardcoded business values and provides a streamlined dashboard to customize portal accounts, alert thresholds, shift schedules, and operational parameters dynamically.

  2. Wholesale Bank Routing & Priority (TASK OPI)

    Admins can configure the Default OPI Bank Account to prioritize specific accounts (e.g. PSB or IndusInd) in all wholesale forms, and define the PhonePe / UPI Settlement Bank Account where daily consolidated collections deposit on T+1 next morning.

  3. Finance & CFO Liquidity Alert Thresholds

    Dynamic configuration of minimum balances triggering alarm banners and email warnings for Low Cash in Hand (default: ₹5,000) and Low Bank Balance for CA/SB accounts (default: ₹10,000).

  4. Attendance & Shift Timing Parameters

    Configures night shift duty start/end hours, interactive math captcha frequency intervals (e.g. every 20 mins), response grace periods, allowed monthly paid leaves, and daily salary wage divisor.

  5. Portal Security & Lockout Rules

    Customization of maximum consecutive failed login attempts before IP lockout (default: 5), lockout waiting duration (mins), session inactivity timeout (hours), and mobile device approval policies.

12. ERP Table Presentation & Universal Date Formatting Standards

  1. 2-Color Zebra Striping System (Dark Mode)

    All data tables across TASK OPI, TASK NMS, Finance Dashboard, and Modals utilize an alternating 2-color row layout (Odd: #141720 / Even: #1d212d). This provides clear visual separation and effortless eye tracking across wide multi-column financial registers without disrupting the dark mode theme.

  2. Interactive Row Hover Highlighting

    Hovering over any table row dynamically illuminates the entire row with a warm amber/theme highlight (rgba(234, 88, 12, 0.22)) and crisp white text (#ffffff) with a smooth transition, giving operators immediate visual focus on the active line item.

  3. Universal DD-MM-YYYY / DD-MM-YY Date Format

    All dates displayed to users on the frontend across tables, ledgers, modal views, diff accordions, printable statements, and Excel spreadsheets strictly adhere to the DD-MM-YYYY format (or DD-MM-YY where space is constrained). Backend MySQL tables retain standard YYYY-MM-DD storage, with automatic translation handled via formatDateDMY().

13. Mandatory System Documentation Update Rule

  1. Automatic Documentation Maintenance Protocol

    Whenever any feature, user interface tab, menu option, security control, API endpoint, or database structure is added, edited, or removed from the website, both readme.html and README.txt MUST be updated immediately to keep this operating manual 100% accurate and up to date.