Version 2.27 - 15/04/2026
* Add configurable delimiter & decimal CSV export for SalesRekap RCS with progress bar
- NEW: salesRekap_RCS/export_salesRekap_rcs.php - CSV streaming export handler
- NEW: salesRekap_RCS/export_status_rcs.php - sentinel-based progress polling endpoint
- MOD: salesRekap_RCS/salesRekap_rcs.php - added export options modal
- MOD: salesRekap_RCS/salesRekap_rcs_ui.js - JS export flow with configurable options
* Fix customer module bug in customer creation flow
- MOD: customers/create_customer.php - customer creation bug fix
- MOD: customers/customers_ui.js - customer UI bug fix
* Update Copilot agent instructions and add explore subagent
- MOD: .github/agents/database-migration.agent.md - schema sync lessons added
- NEW: .github/agents/explore.agent.md - read-only codebase exploration subagent
- MOD: .github/copilot-instructions.md - update skill routing and agent instructions
* Sync Hostinger DB schema and data strictly to match local salvo_db
- Added missing columns in area, area_validation, so_detail, sq_detail, trans_manifest
- Inserted 27 missing changelog rows and 9 missing export_option rows on Hostinger
Version 2.26 - 12/04/2026
* Added new Sales Ops Dashboard module with KPI, trend charts, and operational exception monitoring.
- Added dashboard data endpoint and UI rendering with Indonesian number format and dd/mm/yyyy date display in DataTables.
* Enhanced Corporate SO and SQ navigation flows for faster drill-down and deep-link edit access.
- Added SQ deep-link filter, row highlight, and optional auto-open edit modal from dashboard actions.
* Added Transport Manifest handover PDF and supporting print-view updates, plus Area Fee integration in SO detail card flow.
Version 2.25 - 06/04/2026
* Transport Manifest: enforced atomic courier pair (Courier_Type + Courier_Name) consistency across all TM create, edit, and add-DO flows with client and server-side validation.
* Transport Manifest: fully rewrote add_do_to_tm.php with courier pair lock enforcement, SO status and POD status checks, and transaction-safe INSERT/move logic.
* Transport Manifest: extended read_available_do.php with Courier_Type / Courier_Name LIKE filter params, POD-confirmed DO exclusion, and widened SO closed-status exclusions.
* Transport Manifest (Create): added courier filter inputs and columns to DO selection modal, driver dropdown filtering by Courier_Type, and 3-branch courier auto-fill logic on confirm selection.
* Transport Manifest (Create): save_trans_manifest.php now validates all selected DO share a single courier pair and auto-fills TM courier header from DO when header is empty.
* Transport Manifest (Edit): view_trans_manifest.php now filters driver dropdown by Courier_Type, guards header courier changes when TM has existing DO rows, and shows Courier Type / Courier Name columns in Add-DO modal.
* Transport Manifest (Edit): update_trans_manifest.php now derives required courier pair from existing DO and rejects header courier edits that differ from the locked pair.
* Delivery Order: added generate_pdf_delivery_order.php for compact half-page PDF output with QR code, signature area, company header, and No Urut Cetak stamp.
* Delivery Order: added pod_mobile.php (mobile driver POD update page) and save_pod_delivery.php (AJAX save endpoint), accessible via QR code on the DO document.
* Delivery Order: added helpers.php for shared DO query logic, create_print_session.php for server-side print session management.
* Corporate SO: added deep-link navigation support ??? URL params No_SO, No_DO, and open_mode auto-open the SO edit modal on the appropriate tab from external links (e.g. Delivery Order).
* Delivery Order UI: added cross-module deep-link helpers (linkNoDo, linkNoSo) and courier display normalization in delivery_order_ui.js.
* Agent documentation updated: Corporate SO Expert agent.md and SKILL.md now document TM courier guardrails, atomic courier pair rules, and Delivery Order deep-link routing pattern.
Version 2.24 - 31/03/2026
* Renamed Corporate SO partial-lock POD status from POD Delivered to POD Confirmed with backward-compatible value mapping across UI, reads, and lock behavior.
* Matched Status_POD badge colors in Corporate SO and Delivery Order for Return, Open, POD, POD Confirmed, and POD Invoiced states.
* Refactored MDR handling in Sales Quotation and Corporate SO from percentage logic to amount/rupiah logic, including create/update, import recalculation, item autofill, and detail displays.
* Updated net sales formulas to subtract MDR as amount, with Corporate SO also subtracting Area_Fee during detail save and import apply flows.
* Local database now uses MDR DECIMAL(15,2) in so_detail and sq_detail, aligned with amount-based MDR calculations.
* Hardened desktop and mobile POD photo uploads with MIME/extension checks, JFIF support, clearer diagnostics, and auto-compression for large images.
* Extended mobile POD not-delivered handling to require reason input and save optional evidence photos plus location/time metadata into TM and so_detail records.
* Updated TM PDF QR generation and mobile POD entry URLs to use compact signed parameters and LAN-friendly local URLs for phone testing on localhost.
* Updated technical references, testing notes, README, and agent skill guidance to reflect POD Confirmed terminology and MDR amount pricing rules.
Version 2.23 - 25/03/2026
* Hardened Transport Manifest creation and DO assignment rules with server-side validations for SO status, POD state, and courier consistency.
* Added controlled DO reassignment flow from existing TM to new TM in create/add flows with replace confirmation and transactional handling.
* Introduced unified trace logging for TM operations and No TM generation using structured [UNIFIED] records for request-to-error correlation.
* Implemented signed QR access for mobile POD page (exp + sig) to allow courier submission without login while keeping endpoint authorization checks.
* Updated delivered POD handling to set Status_POD=POD, write mobile photo paths to so_detail, and store Tgl_Tiba/Waktu_Tiba from submit timestamp.
* Updated failed delivery handling to set Status_POD=Return, store reason into Penyebab_Utama, and save Tgl_Tiba/Waktu_Tiba.
* Refined TM view/PDF grouped No DO presentation and item columns, including signed QR payload generation and naming alignment to No Bulk Order.
* Enhanced Delivery Order module with group lock guidance, No TM visibility/filtering, and improved create TM selection UX.
* Extended expedisi master data and import flow with Initial field support for No TM prefix generation.
* Renamed Corporate SO Status_POD option from Retur to Return with compatibility mapping for legacy records.
- Note: view_trans_manifest.php button consistency (add/edit/create TM) and add/edit No_DO from TM scenarios are pending full QA.
Version 2.22 - 24/03/2026
* New Module: Delivery Order (delivery_order/) - Full CRUD UI for managing Delivery Orders with DataTables, detail view modal, and header-menu integration.
* New Feature: Mobile Driver POD Page (trans_manifest/pod_mobile.php) - Mobile-friendly page for drivers to update POD status and upload delivery photos with GPS coordinates by scanning a per-item QR code.
* Transport Manifest PDF QR code changed to per-No_DO QR codes, each linking directly to the mobile POD update page for that specific delivery item.
* Corporate SO: No_DO Field Synchronization - entering an existing No_DO auto-fills 25 shared logistics fields across all items in the same delivery.
- Mismatch detection: pink card warning and field-level highlight in edit modal when items sharing a No_DO have differing logistics values.
- Propagation: saving logistics fields pushes the 25 synced values to all sibling rows sharing the same No_DO.
- Independence: 9 POD/retur fields (Status_POD, No_SR, Jenis_Kesalahan_Retur, Jumlah_Barang_Retur, Penyebab_Utama, Tindakan_Korektif, PIC_Tindakan, Status_Penyelesaian, TTD_Foto_POD) remain per-item and are never synced across rows.
- Clear: emptying No_DO wipes all logistics and photo fields at UI level and enforces NULL on backend save (create and update).
* Corporate SO UI: soHeaderInfoLine label style changed to font-weight 600 / color #000; value style changed to font-weight 400 / color #4a4a4a.
* Corporate SO read_items.php: JOIN with sq_detail to return SQ-linked price, discount, and cashback when No_SQ is provided; added quotationOnly filter.
* Trans Manifest SQL refactored: all backend files updated to query normalized so/so_detail tables instead of the deprecated corporate_so flat view.
- Affected files: helpers.php, read_available_do.php, add_do_to_tm.php, remove_do_from_tm.php, save_trans_manifest.php, update_trans_manifest.php, save_pod_delivery.php, delete_trans_manifest.php.
* Note: Create Transport Manifest flow (create_trans_manifest.php, save_trans_manifest.php) is not fully functional yet - marked with TODO, planned for future refactor.
Version 2.21 - 16/03/2026
* Refactored Corporate SO import into a SalesRekap-style flow with:
- standalone preview/mapping page
- validation review page (per-record approve/ignore)
- bulk review page (Add Records Only and Add & Update All)
* Fixed repeated AJAX JSON parse failures (Unexpected token <) by cleaning output in JSON endpoints so HTML/layout output no longer pollutes API responses.
* Solved preview/map timeout/performance issues by optimizing spreadsheet reads and avoiding expensive formula-evaluation behavior during import staging.
* Improved import reliability for real-world Excel files:
- skip unresolved formula-text values
- convert Excel date serials to YYYY-MM-DD
- normalize booleans and null handling
- keep chunked staging stable for large files
* Fixed mapping persistence issues by making save/load deterministic for default mappings in export_option, including handling duplicate-key scenarios and refreshing mapping state after save.
* Added server-side financial recomputation in apply logic (Qty/Price/DPP/Discount/PPN/Invoice), with robust number/percent parsing, PPN fallback, guardrails for out-of-range values, and derived Rate_Discount when only Total_Discount is provided.
* Fixed status semantics in apply/bulk results:
- repeated No_SO with unchanged header now treated as added (detail insert)
- updated is only returned when header fields actually changed
* Added UI/UX improvements:
- selected filename label updates properly
- better loading/spinner behavior
- back/close navigation improvements in review pages
* Validation done along the way with syntax checks and DB spot checks (including confirming one SO header with multiple detail lines for duplicate No_SO imports).
Version 2.20 - 11/03/2026
* feat(import): Harden customer import flow and standardize null-safe import handling
- Fixed htmlspecialchars(null) deprecation risks in option preview modules and item/customer review pages
- Added robust import row normalization and null-safe escaping for preview rendering and hidden payloads
- Optimized customer preview spreadsheet reading for larger files using read-data-only path
- Enforced mandatory session user_id checks across customer import preview/process/review/chunk endpoints
- Added required mapping validation for IdCustomer and NmLegal on client and server
- Adjusted customer import flow to items chronology: preview -> process -> per-record review -> bulk review
- Enhanced per-record customer review with in-place status updates and color-coded state transitions
- Enhanced bulk customer review with chunk progress and row-level status updates from chunk response contract (status|id)
- Added customer default mapping persistence: helper_import_options_customer.php, get_mapping_customer.php, save_mapping_customer.php
- Patched item review pages for null-safe rendering consistency in per-record and bulk screens
- Added reusable implementation guidance: .github/skills/import-feature-spec.md and updated .github/README.md
Version 2.19 - 11/03/2026
* SALVO Version 2.19
* *** Commits on Mar 11, 2026 ***
* feat(corporate_so): Enhance Status_POD with "Open" option and refine locking behavior
- Added "Open" option to Status_POD dropdown selection
- Modified locking: "POD Delivered" now triggers partial lock (Pod_Blocked) instead of full lock
- Fixed CSS compatibility: added standard line-clamp: 2 alongside -webkit-line-clamp: 2
- Updated TECHNICAL_FLOW.md with comprehensive two-tier locking documentation
* Full Lock (Is_Locked): Edit button disabled
- Triggers: Status="Complete", Confirmed=1, Status_POD="Delivered"
* Partial Lock (Pod_Blocked): Edit button enabled with limited editable fields
- Trigger: Status_POD contains "POD" (POD, POD Delivered, POD Invoiced)
- Editable fields: Status_POD, Confirmed, TTD_Foto_POD, Photo1, Photo2, Order_Id_Pengiriman, No_Invoice_Xpdc
* No Lock: All fields editable
- Applies when Status_POD is empty, "Open", or "Retur"
* Modified files
- corporate_so/modal_so_combined.php (Status_POD options, CSS fix)
- corporate_so/read_so_full.php (locking logic)
- corporate_so/TECHNICAL_FLOW.md (documentation update)
* Compatibility notes
- Existing Status_POD values remain functional
- "Open" option extends workflow flexibility for early-stage orders
- "POD Delivered" items are now editable for status updates and documentation
* *** Commits on Mar 4, 2026 ***
* Fix: Linux case sensitivity - lowercase option table names
- Changed option table names to lowercase: Opt_TipeCust->opt_tipecust, Opt_Kota->opt_kota, Opt_TipeIndustri->opt_tipeindustri, Opt_KatIndustri->opt_katindustri
- Updated modals_customer.php (4 queries) and master_opt.php (table mapping array)
- Fixes customer module loading on Linux case-sensitive production; verified on localhost and Hostinger
- Backups created: bak_modals_customer.php_2026-03-04 13.24.bak, bak_master_opt.php_2026-03-04 13.24.bak
* Fix: Customer module JavaScript not loading on production
- Changed DataTables JS path from relative ../css/ to url_app() helper (matching working modules)
- Fixes Add/Filter/Column buttons not responding and table header misalignment on production
* Fix: Auto-detect production environment for database connection
- Added environment detection logic in includes/db_connect.php
- Auto-switches production/development credentials using document root and HTTP host; no manual changes needed during deployment
Version 2.18 - 03/03/2026
* Export SI RCS Enhancement: Project Data Integration
* Integrated rcs_project table data into SI export (Columns M & N)
* Column M (Project No): Fetches Project_No from rcs_project where RCS_Branch matches and Active=1
* Column N (Project Name): Fetches Project_Name from rcs_project where RCS_Branch matches and Active=1
* Implemented project data caching by RCS_Branch for performance optimization
* Handles missing project data gracefully by leaving columns empty if not found
* Applied to both regular ITEM rows and SvcCharge ITEM rows
Version 2.17 - 25/02/2026
* NEW MODULE : Runchise Project Mapping
Version 2.16 - 23/02/2026
* Corporate SO: Fix Blank Logistics & Delivery Fields in Detail Cards
- ISSUE: Logistics fields (Courier Type, Courier Name, No Polisi, Tgl Berangkat, etc.) displaying as blank dashes in SO detail cards despite being saved in database
- ROOT CAUSE: read_so_full.php detail query SELECT only included 18 columns; omitted entire logistics block (Courier_Type, Courier_Name, No_Polisi, Order_Id_Pengiriman, No_Invoice_Xpdc, Batch, Nm_Helper_Kenek, KM_Awal, KM_Akhir, Jarak_Tempuh, Tgl_Berangkat,
- SOLUTION: Expanded read_so_full.php detail SELECT from 18 columns to 45+ columns, matching complete so_detail table schema
- API Response: Now returns full detail records including all logistics fields, enabling cards to render correct values
- Modified File: read_so_full.php - detail query SELECT clause expanded with all logistics and audit columns
- Modified File: so_modal_handler.js - removed temporary debug console.log statements used during investigation
- TESTING: Verified SO detail cards display all logistics fields with correct values for populated items
- BACKUPS: bak_read_so_full.php_2026-02-23 09.43.bak, bak_so_modal_handler.js_2026-02-23 09.51.bak created in corporate_so/backups/
- TESTING: Verified SO detail cards display all logistics fields with correct values for populated items
- BACKUPS: bak_read_so_full.php_2026-02-23 09.43.bak, bak_so_modal_handler.js_2026-02-23 09.51.bak created in corporate_so/backups/
Version 2.15 - 20/02/2026
* Technical: Comprehensive backups created for all modified files in corporate_so/backups/
- Auto-populated from customer PICSales field on customer selection
* Corporate SO: Customer Lookup Modal with DataTable Search
- Replaced Id_Customer dropdown with readonly text input + search button
- Customer lookup modal displays 6 searchable columns (ID, Legal Name, Submit Order, PIC Client, PIC Sales, Address)
- Column-specific filter inputs for precise customer searching
- Created read_customers_for_lookup.php endpoint for customer data
* Corporate SO: Auto-Fill Customer Fields on Selection
- Selecting customer auto-populates 5 related fields: Legal Name, Submit Order, PIC Client, Contact Order, PIC Sales
- All auto-filled fields styled as readonly with #f0f0f0 background
- Consistent styling matching No_SQ field appearance
* Corporate SO: Visual Record Highlighting
- Light-yellow background flash for edited/added records
- Highlight appears after saving SO header or detail items
- Flash animation: bright yellow fades to light yellow over 3 seconds
- Matches visual feedback behavior of Items and Salesperson modules
* Corporate SO: PIC_Sales Field Optimization
- Changed PIC_Sales from select dropdown to readonly text input
- Eliminates dropdown option mismatch errors when loading customer data
- Auto-populated from customer PICSales field on customer selection
* Technical: Removed loadPICSalesDropdown() and loadCustomerDropdown() functions
* Technical: Added openCustomerLookupModal() and initCustomerLookupTable() functions
* Technical: Comprehensive backups created for all modified files in corporate_so/backups/
Version 2.13 - 16/02/2026
* Sales Quotation UI: Moved form higher (margin-top: 0), compacted field spacing (26-28px), reorganized layout with Validated By in first row
* Sales Quotation Modal: Consolidated audit fields inline (Dibuat, DibuatOleh, Diubah, DiubahOleh); renamed PIC_Klien to PIC Client; marked key fields readonly
* Customer Search Feature: Created searchable customer lookup modal with DataTables; 5 filter columns (IdCustomer, NmLegal, NmAlias, TipeIndustri, GolonganKust)
* Validation Lock System: Implemented Validate_SQ flag preventing edits when validated; added password verification modal for validation changes
* PDF Generation: Right-aligned numeric columns (Qty, Discount); removed sub-labels (TNC, Delivery Notes, Other Notes); retained Information section
* PPN/VAT Calculation: Normalized PPN rate conversion (11 → 0.11); validated discount/cashback percent range 0-100; improved mixed separator number parsing
* DataTable Enhancements: Replaced boolean text with checkmark (✓) and cross (✗) icons; added double-click edit handler for modal opening
* Customer Search: 5 columns (IdCustomer, NmLegal, NmAlias, TipeIndustri, GolonganKust); replaced dropdown select with search button; select handler updates form
* Validation Lock: isCurrentValidated flag; toggleValidationLock() function; openSqEditModal() prevents edit when locked; ensurePasswordModal custom modal
* Number Validation: sanitizePercent (0-100) and formatPercent helpers; normalizePPNRate function handles rate conversions; mixed thousand/decimal separators
* File backups created: modals_sq.php, sales_quotation_ui.js, sq_modal_handler.js, generate_pdf_sq.php, read_customers_for_lookup.php with 2026-02-16 timestamps
* New file: read_customers_for_lookup.php endpoint for customer DataTables lookup with filter support
Version 2.12 - 11/02/2026
* Users module: added Validate_SQ flag across CRUD (create/update/read) and DataTable display, including modal checkbox and API defaults.
* Users listing: UI now matches customers module (Font Awesome buttons, filters, column toggles, boolean icons, column visibility, scroll settings).
* Sales Quotation: fixed PDF button to send id parameter, refined modal vertical positioning/padding, and removed spinners on discount/cashback inputs for consistency.
* Sales Quotation: created new Sales_Quotation modules; filter button still has a bug (needs follow-up fix).
Version 2.11 - 06/02/2026
* Font Sizing: Applied standardized DataTable CSS (13px headers, 12px body) to Runchise, B2B Sales, and system log modules
* Button Optimization: Reduced action button sizes from w3-small to w3-tiny with inline styles (padding:2px 6px; font-size:11px) and icon sizing 12px
* Pagination: Set default pageLength to 50 records per page across all 7 modules
- Runchise modules updated: rcs_map_items, rcs_map_pay_cust, salesRekap_RCS, exp_si_rcs (no action buttons)
- B2B Sales: Corporate SO Management (corp_so) updated with font sizing, pagination, and button styling
- System utilities: importlog and exportlog updated with font sizing and pagination (no action buttons)
- File backups: All 12 files (7 PHP + 5 _ui.js) backed up with timestamps 2026-02-06 10.26 in module/backups/ folders
- Backup folders created: importlog/backups and exportlog/backups (previously missing)
Version 2.10 - 05/02/2026
* Font Sizing: Standardized DataTable headers to 13px bold; body text to 12px across all 13 Master Data modules for consistent UI
* Button Optimization: Changed action buttons from w3-small to w3-tiny with 2px 6px padding; reduced icon size 16px to 12px; buttons now fit side-by-side
* Pagination: Set default pageLength to 50 records per page (was 10) across all 13 Master Data modules
- Affected modules: items, cabang, cara_bayar, salesperson, customers, jenis, kategori, subkategori, tipe, satuan, expedisi, area, driver
- File backups: All 26 files (13 PHP + 13 _ui.js) backed up with timestamps in module/backups/ folders
Version 2.09 - 05/02/2026
* Add Customers Module: Complete CRUD operations with 27 customer fields (IdCustomer, NmLegal, NmAlias, GolonganKust, TipeIndustri, KatIndustri, Kota, Alamat, etc)
* Customers UI: 31-column DataTable with server-side filtering, pagination, column visibility toggles
* Modal Layout: 3-column compact form grid reducing height from 100vh to 70vh with 1000px width
* Font Styling: 12px fonts for DataTable body and modal forms; 13px bold headers with specific DataTables class selectors
* Option Management: 4 option tables (Opt_TipeCust, Opt_TipeIndustri, Opt_KatIndustri, Opt_Kota) with CRUD via master_opt.php API
* Option Modals: Hamburger buttons for each option field triggering DataTable-based modals with add/edit/delete capabilities
* Cascade Updates: Option renaming automatically updates all customer records using old values; deletion blocked if references exist
* PICSales Field: Converted to relational dropdown from salespersons table with "PICSales -- FullName" format; active-only filtering (TdkAktif <> 1)
* Kota Field: Complete conversion matching TipeIndustri pattern - select dropdown with CRUD management and cascade updates
* Import System: Column mapping with "Default Mapping" auto-selection; validation table auto-creation with ensureCustomersValidationTable()
* Import Workflow: Mandatory field validation (IdCustomer + NmLegal required); individual and bulk review with approve/ignore; real-time progress bar
* Progress Tracking: Real-time updates during bulk import with 20-record chunks and 10ms delays between chunks for UI responsiveness
* Navigation: "Back to Master Customer" buttons added to all import review pages for consistent workflow
* Bug Fix: Corrected bind_param types in 4 files (update_customer.php, import_process_customer.php, review_validation_customer.php, import_chunk_handler_customer.php) - type string "ssssssssssssssssissdddssdss" for 27 parameters
* Styling: Compact input elements (28px height, 4px 8px padding); readonly fields with #F0F0F0 background; 6px row margins for visual separation
Version 2.08 - 26/01/2026
* Corporate SO Module: Header-Detail Split Architecture
- SO Header APIs: create_so, read_so, update_so, delete_so, read_so_full with lock validation
- SO Detail APIs: create_so_detail, read_so_detail, update_so_detail, delete_so_detail with line-level locks
- Lock Mechanisms: check_so_lock_status and check_detail_lock prevent editing when DO assigned or confirmed
- Number Generators: generate_no_so (SOC/SOB/SOF prefix) and generate_no_do (DO.YYYY.MM.DD.seq-subseq)
* UI Redesign: Modal with SO Header + Card-Based Line Items
- Modal Structure: so_modal_handler.js orchestrates header tab and scrollable card grid for detail lines
- Card Features: Edit/delete buttons, lock badges (yellow bg + 🔒), photo count indicators, hover effects
- Photo Upload: upload_photo.php stores POD images in photo/pod/ with preview frames in detail modal
- Financial Calculations: Auto-calc Total_Price, Price_DPP, Total_DPP, PPN, Total_Invoice from get_ppn_rate.php
- Keyboard Shortcuts: ESC closes modals, Ctrl+S saves, Enter navigates fields without submitting
* Migration & Validation Toolkit
- Migration Script: migration_corporate_so_to_split.sql extracts headers to so, details to so_detail with FK constraints
- Validation Suite: validation_queries.sql runs 9 checks (row counts, FK integrity, No_SO/DO format, financials)
- Backup Tool: backup_corporate_so.sql creates timestamped backup before migration
- Rollback Plan: Includes DROP/RENAME commands and restore instructions in migration script
* Documentation Package
- Implementation Plan: Complete roadmap with data model, API structure, UI design, workflow diagrams
- Testing Checklists: 150+ test cases covering CRUD, locks, photos, numbering, calculations, keyboard shortcuts
- Quick Reference: UI guide with modal tabs, card states, business rules, API endpoints, validation rules
- Phase 5 README: Migration workflow with pre/post checks, test environment setup, sign-off checklist
- Logic Analysis: No_SO/No_DO generation rules, locking triggers, format validation, uniqueness checks
* Utility & Helper APIs
- Populate Options: populate_options.php, read_drivers.php, read_items.php for dynamic dropdowns
- PPN Rate: get_ppn_rate.php retrieves tax rate from export_option table (default 11%)
* Outstanding Issues
- TODO: Logistic fields (No_DO, Status_POD, Courier) need to move from product tab to logistics section in detail modal
- TODO: Select/Options dropdowns (PIC_Sales, Season, Status) not yet populated from master tables - need dynamic loading
Version 2.07 - 26/01/2026
* Corporate SO overhaul: header-detail split into so/so_detail tables with new CRUD APIs, lock checks, and No_SO/No_DO generators
* UI redesign: SO modal with header+card line items, photo upload/preview, keyboard shortcuts, lock badges, aggregated totals in DataTable
* Migration toolkit: migration_corporate_so_to_split.sql with backups, validations, rollback plan, plus validation_queries.sql & testing checklist
* Docs: Phase 5 README, implementation plan, and quick reference covering workflows, numbering rules, and role-based behaviors for new SO module
Version 2.06 - 14/01/2026
* Login page UI optimization: reduced acc-form-wrapper size for more compact display
* Login page: reduced logo size from 300px to 220px for better proportions
* Login page: made version, modified date, and developer info text smaller (11px)
* Login page: adjusted "What's New in SALVO" card dimensions (700px width, 200px height) for better visibility
* Login page: reduced card padding and margins to ensure bottom content is visible
* Fix: corrected variable shadowing in message loop (foreach $message as $msg)
* CSS: reduced acc-form-wrapper width from 520px to 450px and margin from 40px to 20px
* PHP 8.1 compatibility: fixed htmlspecialchars() null deprecation in import_preview_map_esb_items.php
* Import preview: added null coalescing operator (??) for safe CSV cell display
Version 2.05 - 06/01/2026
* Corporate SO: Convert Courier Type/Name/Area to dynamic dropdowns
- Courier Type populated from expedisi table
- Courier Name auto-filters by selected Courier Type from driver_list
- No Polisi auto-fills when Courier Name is selected
- Area dropdown shows area - wilayah format
* Corporate SO: Auto-calculate Total Waktu Trip (minutes) from Waktu Berangkat and Waktu Kembali ke HO
* Corporate SO: Add double-click on table rows to open edit modal (in addition to Ctrl+Click)
* Transport Manifest: Implement QR code generation in PDF view using endroid/qr-code
* Transport Manifest: Embed logo (Logo_Kibo.webp) in print preview
* Transport Manifest: Fix signature pad canvas initialization for POD delivery updates
* Fix: delete_trans_manifest.php now uses correct column names (Courier_Name, No_Polisi)
* Fix: save_trans_manifest.php courier info update with correct column names
* Fix: Replace non-functional Back button with Close in PDF preview (window.close)
* Fix: Signature pad not rendering - properly size canvas and initialize on modal display
* Fix: Enable PHP error display in generate_pdf_trans_manifest.php for debugging
* Technical: Installed composer dependencies mpdf/mpdf and endroid/qr-code ^6.0
* Technical: Added lightweight url_app() helper to PDF generation to avoid OPcache conflicts
* Technical: Improved modal initialization timing for signature pad (200ms delay)
* Created read_drivers.php endpoint for filtered driver/expedisi lookups
* All dropdowns use existing populate_options.php utility
Version 2.04 - 26/12/2025
* Add Transport Manifest module: list, create, view/edit with server-side DataTables
* Global search enabled in TM list (search box filters on keyup)
* DO selection modal with server-side data, aggregation, and filters
* Courier/Driver dropdowns with auto license plate; DD/MM/YYYY date overlay
* corporate_so courier fields synced on TM create/update and cleared on DO/TM removal
* Endpoints: save/update/delete TM, remove DO, read TM, read available DOs, generate TM number, helpers
* POD groundwork: modal UI and server-side scaffolding (images/signature/GPS)
* Print preview scaffold for TM (future PDF with QR/branding)
Version 2.03 - 23/12/2025
* Add Expedisi Module: using the Driver module as a template. Implementing the CRUD, dataTables & UI, import mechanism.
Version 2.02 - 22/12/2025
* Add Area Module : CRUD + DataTables UI and full import workflow (preview, mapping, validation, chunked apply) modeled on the Driver module.
Version 2.01 - 19/12/2025
* Driver module: added fields NoPolisi, JenisKendaraan, TipeKendaraan, Ekspedisi, TdkAktif and audit columns CreatedBy, EditedBy, TStamp_Created, TStamp_Edited
* Import pipeline: updated preview/process/chunk handler to support new driver fields and import update mode
* Review UI: re-enabled "Add and Update All" and hardened JS for robust server response handling
* Fix: corrected SQL existence check to use driver column and prevent 500 errors during chunk import
* Backups: created Ready_*.bak backups for modified files and removed temporary debug artifacts
* Misc: imports set CreatedBy/TStamp_Created; updates mark EditedBy with " (i)" suffix and set TStamp_Edited on update
Version 1.93 - 28/11/2025
* Users module now supports new fields: Expedition Role, Courier Role, Expiry Date.
* Login blocks expired and inactive users with clear messages.
* Improved error handling for duplicate and invalid user creation.
Version 1.91 - 26/11/2025
* User can change the password either from login page or from users management page.
* User Roles are now available in the users management.
Version 1.88 - 21/11/2025
* RCS Import Enhancement: Excel files now auto-convert to CSV with server-side chunking for faster, timeout-free imports
* Progress Tracking: Real-time progress bar shows accurate chunk processing with duration display (HH:mm:ss)
* Import Logging: All imports now record to Import Log with cumulative totals across chunks
* WIB Timezone: All timestamps now display in Asia/Jakarta timezone (UTC+7)
* Error Logging: Invalid records tracked in errorLog.txt for easy debugging
* Supports both CSV and Excel (XLSX) files imports