Operations platform

Built for clear, connected work

SALVO logo

One focused workspace for sales, logistics, delivery, and invoicing operations.

Welcome back

Sign in to continue to your SALVO workspace.

Change Password

Version 🖥️ 2.51

Modified 🛠️ 01/09/2026

Developed By 👷 Billy Wijaya - 0815.931.8188

What's New in SALVO

Version 2.51 - 01/09/2026
* Release 2.51: branch (KodeCabang) and department (Dept) integration across SO/Draft SO/SI, Master Department module, salesperson IdKary, user audit logging, navigation reorganization, and UI/data fixes.
* Workspace cleanup: removed obsolete COMMIT_MSG_2.39/2.42/2.47/2.48 files and temporary v2.46-v2.48 diff/status files.
- Removed unused _tmp_deploy/build_zip_fourth.php and verify_zip.php helpers.
* .github: updated agent routing for corporate-so-expert, database-migration, and module-generator; refreshed copilot-instructions.md routing map.
- salvo-core SKILL.md now allows one or two additional skills; deployment-zip SKILL.md cross-references commit-changelog and salvo-core.
* Corporate SO: added KodeCabang and Dept columns, filters, modal dropdowns, create/update/import persistence, and read_so.php filters.
- Draft SO: added KodeCabang/Dept to DataTable, filters, create/update, import, and modal dropdowns.
- Draft SO: added Generate Draft No SQ button and blocked Draft_No_SQ reuse when another Draft SO has Sudah_Jadi_SQ = 1.
- Draft SO bulk-create-to-SQ now validates KodeCabang against cabang and Dept against department.
* Sales Quotation: create SO from Draft now copies KodeCabang and Dept to the new SO header.
* Salesperson: added IdKary field to tables, CRUD, modals, DataTable, import, validation, and review pages.
- Added idx_IdKary index on salespersons.
* New module options/department: full Master Department CRUD, access control, modals, and Excel import with preview/process/review.
* Menu: added Master Department link and reorganized Dashboard/Laporan dropdowns.
* Users: added audit logging for user delete, user update (role flags and wewenang changes), and password reset/update.
- Users update now discovers role-flag columns dynamically from master_wewenang.
* Logs dashboard: added Data Maintenance tab for primary-key delete with cascading child deletes and audit logging.
- Added logs/data_maintenance.php JSON endpoint for table primary-key detection and cascade delete.
* Kuota Harian DO: fixed area/wilayah joins by joining area directly via Area_Seq fallback and ordering by address hierarchy.
- Delivery Order: updated table header color and row hover highlight.
* SQ/SO/DO Tracking: formatted date ranges and added group-level SO selection with synced row/group checkboxes.
* Database schema drift: local salvo_db has department/department_validation tables, KodeCabang/Dept columns on draft_so/so/si, IdKary on salespersons, and matching indexes not yet on Hostinger.
- Generated migration script _tmp_export/migration_script.sql for Hostinger; all new columns are nullable so ALTER statements are safe to run without backfilling existing rows.
* Deployment tooling: added _build_salvo_v2_49_50_deploy.php and generated _deploy_payload_v2_49_50 staging ZIP.
Version 2.50 - 31/08/2026
* Release 2.50: Area Picker master integration across SO/Draft SO/Delivery Order, Antlia SO sync endpoint, and UI/data quality fixes.
* api/sales_order: push_to_erp now accepts IdTrans or No_SO, returns full SO header, customer data, and so_detail, and tracks sync with Synched_to_Antlia/TStamp_Synched.
- Added api/sales_order/erp_sync_so.php for Antlia list/get/mark_synched actions with HMAC auth, filters, and header-pagination keeping detail children together.
- Added local curl-based test harnesses erp_sync_so_test.php and push_to_erp_test.php.
* Corporate SO: replaced Area dropdown with an Area Picker modal backed by read_area_picker.php and persist Area_Seq on create/update.
- Area Picker displays Prov, Kab/Kota, Kecamatan, Kelurahan, KodePos, Wilayah, Expedisi, and Area Fee with column filters.
- Auto-populate Area_Fee from the picked area when Courier Type matches; warn on mismatched expedisi or zero fee.
- Changed Season default/options from "Regular" to "Reguler" in Corporate SO and Draft SO.
* Draft SO: replaced Area dropdown with Area Picker modal, persist Area_Seq, and relax No_SO validation.
- No_SO is no longer mandatory in Draft SO; duplicate check only runs when No_SO is provided.
- Draft SO detail Price validation now allows zero and rejects only negative values.
* Delivery Order: added Area Picker modal for area/address editing and persist Area_Seq via update_do_field.php.
- Added DataTables CSS/JS includes to delivery_order.php and exposed Area_Seq in read_delivery_order.php.
* Master Area (options/area): extended with Prov, KabKota, Kecamatan, Kelurahan, KodePos across CRUD, import, and review pages.
- Area uniqueness checks now include Prov/Kab/Kec/Kel; added Expedisi+KodePos collision warning.
- Area import now reports added/updated/invalid/skipped counts, handles skipped empty rows, and maps new address columns.
- Removed obsolete options/area/area.php.php and options/area/area_ui.js.php files.
* Sales Quotation: create SO from Draft now copies Area_Seq to the new so header.
- Over-limit protection (>20 records) changed from hard reject to browser confirmation with confirm_over_limit flag.
* Salesperson: fixed TdkAktif rendering with colored active/inactive badges and checkbox binding in edit modal.
* SQ/SO/DO Tracking: rebuilt query base on so optionally joined to sq, improved item search across so_detail and sq_detail.
- Tracking date filters changed to dd/mm/yyyy text inputs with validation, normalization, and inline error styling.
- Tracking fulfillment/delivery metrics now handle rows without an SQ as N/A instead of zero-percent.
* Documentation: updated salvo-core SKILL.md CRUD extension rules and API_WEBHOOK_INTEGRATION_GUIDE.md to v1.1.
* Deployment tooling: added v2.48/season-reguler ZIP builders, manifest files, and migration runner for v2.49 Antlia sync.
Version 2.49 - 28/08/2026
* Release 2.49: Antlia SO sync endpoint with HMAC auth, filtered list, detail fetch, and sync flag tracking.
- Added so.TStamp_Synched column to record when an SO was last successfully synced to Antlia.
- Added index on so(Synched_to_Antlia, TStamp_Edited) to speed incremental Antlia sync polling.
- Created api/sales_order/erp_sync_so.php supporting list, get, and mark_synched actions with sandbox mode.
- ERP sync endpoint returns full so header fields, limited customer fields, and so_detail lines for single-record fetch.
Version 2.48 - 27/08/2026
* Release 2.48: Corporate SO access, lock, and POD validation hardening plus login refresh.
* Login & access: refreshed the login page and kept session expiry and inactive-user handling consistent.
- Corporate SO: tightened create/update validation and authorization gates.
- SO create/update now validates Sales Channel, No SO prefix, duplicate values, and required header fields before saving.
- SO update logic protects logistic/POD fields from unauthorized changes and prevents accidental photo-path clearing.
- Submit_Order editing is restricted to allowed customer types, and Complete/Cancel status changes require proper authorization.
- Updated the Corporate SO specialist guidance so authorization, lock, and POD handling rules match the current implementation.
Version 2.47 - 21/08/2026
* Release 2.47: new Delivery Order quota and Area Fee reports, Master Sales Type, and Corporate SO/Delivery Order workflow updates.
* Kuota Harian Delivery Order: added daily DO quota reporting and Master Kuota Kirim management.
- Added Season, year, Sales Channel, delivery-date, address-normalization, and empty-DO filters with daily product, address, DO, quota, and remaining-quota summaries.
- Added product and address detail drill-downs, remaining-quota color indicators, CRUD operations, and access control for quota management.
* Laporan Area Fee Bulanan: added monthly Area Fee and Ongkir reporting with server-side DataTables and access-scoped data.
- Added operational and logistics filters, DO/Submit Order/POD summaries, fee and ongkir totals, and Excel/PDF report output.
* Master Sales Type: added CRUD management, DataTables UI, modal editing, delete confirmation, and update highlighting.
- Added Excel/CSV preview and column mapping, bulk validation, chunk processing, review workflow, and credential-based view/edit/import access control.
* Corporate SO: added Picked Up and Cancel POD statuses with corresponding status badge presentation.
* Delivery Order: added Picked Up and Cancel POD statuses, Note for Item and Note detail columns, and Driver Phone logistics display.
- Updated Delivery Order detail queries and table layout to return and display the additional item notes and driver phone data.
* Menu and Navigation: added access links for Master Sales Type, Area Fee report, and Daily DO Quota report, and grouped Delivery Update under Expedisi.
* Repository: updated Module Generator argument guidance and added the deployment manifest for versions 2.44 through 2.46.
Version 2.46 - 13/08/2026
* Release 2.46: Sales Rekap RCS access control, import/export hardening, Finance handover reporting, and validation-log improvements.
* Sales Rekap RCS: added role-based access control for viewing and modifying Runchise sales recap data.
- Added salesRekap_RCS/salesRekap_rcs_access.php with UserGroup and wewenang checks for Super Admin, Administrator, Admin Retail, Sales Manager, Admin Sales, and BOD roles.
- Protected Sales Rekap read, create, update, delete, import, mapping, validation, export, status, and bulk-delete endpoints with session and permission gates.
- Added page and JavaScript permission gating for add, edit, delete, import, validation, and bulk-delete actions, including scope and role indicators.
- Improved Sales Rekap import validation, required-field checks, duplicate handling, mapping flow, JSON error responses, and audit/event logging.
- Updated salesRekap_RCS_query endpoints with access checks, output buffering, query error handling, and consistent JSON responses.
* Finance Handover Report: added the Surat Jalan handover report module for Finance.
- Added lap_serah_terima_sj_ke_finance report page with filtered SO, delivery, and POD status data.
- Added PDF and Excel report export endpoints plus shared helpers for Finance handover output.
- Added Finance handover report navigation under the Laporan menu.
* Corporate SO and Draft SO: consolidated per-record import result logging.
- Updated Corporate SO and Draft SO validation pages to accumulate added, updated, ignored, and invalid counts in session state.
- Added import-log flush handling on page exit, tab hiding, Back navigation, and bulk-import transitions using browser sendBeacon.
* Transport Manifest: made report company address configurable.
- Updated manifest PDF generation to read Company_Address from export_option with a default Head Office address fallback.
* Import Log: updated import-log reading support for consolidated validation and import results.
* Agent Configuration: expanded Module Generator guidance for reusable helpers, audit logging, unified logging, access control, backups, and PHP validation.
Version 2.45 - 11/08/2026
* Release 2.45: Corporate SO inline editing, Draft SO import safeguards, Delivery Order No_DO generation, and POD workflow updates.
* Corporate SO: added controlled inline header editing and improved filtering/navigation.
- Added corporate_so/update_so_field.php for secure single-field updates with status restrictions and audit logging.
- Enabled inline editing for Submit_Order, Konfirmasi, Delivery_Date, and Receiver_Name with locked-state checks.
- Added Konfirmasi and delivery-date filters, column visibility controls, date-range filter summaries, and cross-tab row highlighting.
- Improved SO import/update handling, detail replacement, and Indonesian number parsing.
* Draft SO: changed import grouping and duplicate protection to Draft_No_SQ.
- Added group-level Draft_No_SQ validation, lock checks, re-import protection, and consistent header/detail update handling.
- Updated Draft SO approval and bulk validation screens to process complete Draft_No_SQ groups and record group-based audit data.
- Added Konfirmasi filtering and aligned Draft SO validation with Draft_No_SQ-based records.
* Delivery Order: added filtered No_DO generation and improved delivery/POD editing.
- Added delivery_order/generate_no_do.php and toolbar controls to generate No_DO from eligible filtered SO records.
- Added duplicate No_DO suffixing, required date-range safeguards, and exclusions for completed, returned, POD, and ready-for-DO records.
- Added delivery-date, timestamp, and empty Status_POD filters plus controlled inline delivery-field editing.
* POD and delivery status: strengthened replacement confirmation and mobile workflow feedback.
- Added confirmation before replacing existing POD/Return statuses and preserved current POD and delivery status context.
- Updated delivery_order and transport_manifest POD mobile labels, validation messages, status processing, and cross-tab refresh behavior.
* Transport Manifest: adjusted delivery/POD handling and manifest output behavior.
- Updated transport manifest PDF and helper logic for delivery and POD consistency.
* Validation and shared rules: expanded excluded-customer handling.
- Expanded default-limit exclusions for Retail, WhatsApp, Instagram, Web Site, Shopee, and Tokopedia customer records.
Version 2.44 - 06/08/2026
* Release 2.44: SO/SQ/Draft number normalization, external courier dashboard, sandbox log viewer, and dashboard/logistics fixes.
* New module delivery_update_courier: PIN-based external courier/driver dashboard for delivery status updates.
- Added delivery_update_courier_login.php, delivery_update_courier.php, delivery_update_courier_ui.js, and read_delivery_update_courier.php.
- Added delivery_update_scope table (User_Name, Courier_Type, PIN, DriverRole) for scoped external access.
* New module sandbox_log: log viewer for sandbox API request/response audit trail.
- Added sandbox_log.php, sandbox_log_ui.js, read_sandbox_log.php, read_sandbox_log_detail.php, and export helpers.
* Corporate SO: deep-link, number format, and logistics header fixes.
- corp_so_ui.js: deep-link now supports No_DO and opens the Logistic tab directly from Delivery Order grid.
- so_modal_handler.js: force Indonesian number format (id-ID); parser detects format by last separator.
- create_so_detail.php / update_so_detail.php: normalize Indonesian-formatted decimals; switch logistics header update from NULLIF to COALESCE so empty values can clear fields.
* Draft SO: bulk SQ creation and number normalization improvements.
- bulk_create_sq_from_draft.php / corp_draft_so_ui.js: Bulk Create SQ now allows Draft_No_SQ-only filtering without requiring PIC/date ranges.
- bulk_create_sq_from_draft.php: added Legal_Name consistency check across rows grouped for bulk SQ creation.
- corp_draft_so.php: mark required filter labels with * in the filter panel.
- draft_so_modal_handler.js / create_draft_so_detail.php / update_draft_so_detail.php: apply Indonesian number normalization.
* Sales Quotation: Create SO from Draft validation and number normalization.
- create_so_from_draft.php: allow No_SQ-only filter bypass.
- create_so_from_draft.php: reject SQ rows where Validated <> 1 or Draft_No_SQ is empty/invalid.
- create_so_from_draft.php: add draft_so consistency validation on Id_Customer, Legal_Name, PIC_Sales and mark inconsistent rows with Gagal.
- create_sq_detail.php / update_sq_detail.php: normalize Indonesian-formatted decimals.
- sales_quotation_ui.js: Bulk Validation filters allow No_SQ-only bypass.
* Delivery Order: SO link, PDF layout, and POD save fixes.
- delivery_order_ui.js: DO grid link to SO now opens the Logistic tab instead of Header.
- generate_pdf_delivery_order.php: resize page to 200mm x 130mm, increase fonts and QR codes, tighten signature block, hide Konfirmasi notes.
- save_pod_delivery.php: treat empty recipient_name as null; use COALESCE for Diterima_Oleh.
* Transport Manifest: PDF print stability improvements.
- generate_pdf_trans_manifest.php: add A4 @page rule, prevent page breaks inside DO sections and signature area, adjust footer font size.
* Sales Ops Dashboard: refactor metrics to use SO header fields.
- read_dashboard_data.php: refactor metrics to read from SO header fields (No_DO, Courier_Type, Status_POD, Tgl_Tiba, Area_Fee) instead of so_detail.
- read_dashboard_data.php: remove separate DO where-builder and consolidate filtering under SO header query.
- sales_ops_dashboard_ui.js: update dashboard notes to reflect header-based DO counts.
* Default limit check: expanded excluded customer handling.
- includes/default_limit_check.php: add Is_Excluded_Customer helper and expand mandatory/tax/identity skip list to Retail, WA, Instagram, Web Site, Shopee, Tokopedia.
* Menu: add new module navigation links.
- menu/header-menu.php: add Delivery Update - Courier link.
- menu/header-menu.php: add Sandbox Log link under Logs.
* Documentation and skill rules updates.
- api/SO_Status_Check/API_MANUAL.md: update credentials to halo_ai and endpoints to www.salvo-kibo.com.
- .github/skills/salvo-core/SKILL.md: add Regional / Currency Number Normalization rule.
Version 2.43 - 03/08/2026
* Release 2.43: Corporate SO Driver Phone, Delivery Order Routing Excel workflow, DataTables stability fixes, and external SO Status API.
* Corporate SO: added Driver_Phone field to SO header/logistics tab.
- Updated create_so.php to insert Driver_Phone with dynamic placeholder generation preventing column/value mismatch.
- Updated create_so_detail.php and update_so_detail.php to include Driver_Phone in header COALESCE updates.
- Updated update_so.php to read, audit, and persist Driver_Phone; preserves existing value for non-logistic editors.
- Updated read_so.php and read_so_detail.php to return s.Driver_Phone in result sets.
- Updated modal_so_combined.php to add Driver Phone input in logistics section.
- Updated so_modal_handler.js to sync, clear, and lock Driver_Phone alongside other No_DO-dependent logistics fields.
* Delivery Order: added Routing Excel Export and Import workflow.
- Added Export Routing and Import Routing buttons to delivery_order.php toolbar.
- Added delivery_order/export_routing_excel.php to export selected DOs for expedition data entry.
- Added delivery_order/import_routing_excel.php to import expedition-filled Excel and update SO logistics + Sudah_Dapat_Kurir flag.
- Added delivery_order/filter_helpers.php for shared filter parsing in routing export/import.
- Updated delivery_order_ui.js with selection validation, export filename prompt, AJAX import handling, and case-insensitive POD badge styles.
- Updated modals_delivery_order.php with routingImportModal file upload dialog.
* DataTables stability: disabled fixedHeader on Items and Customers grids to prevent crashes when FixedHeader plugin is unavailable.
- Updated items/items.php to cache-bust items_ui.js with ?v=3 query string.
- Updated items/items_ui.js and customers/customers_ui.js to comment out fixedHeader: true.
* External API: new SO_Status_Check endpoint for querying Sales Order status and POD details.
- Added api/SO_Status_Check/index.php with list and single actions, API-Key + API-Token auth, default ±14 day range, and sandbox_log auditing.
- Added api/SO_Status_Check/API_MANUAL.md with request/response syntax and examples for external developers.
- SO_Status_Check detail rows exclude service/non-inventory items (items.Non_Inventory = 1).
* Documentation: added Integrasi HALO dengan API SALVO.pdf integration guide.
Version 2.42 - 30/07/2026
* Release 2.42: secure HMAC-signed API/webhook integration layer for Antlia and Accurate Online.
* Sales Rekap Runchise: added Bulk Delete with safety guards and audit logging.
- Added Bulk Delete button, modal filters, and backend handlers for preview/options/delete.
- Safety rule: delete allowed only with Bill Num or all three filter groups filled.
- Added Sum SubTotal (No Tax, No Disc) to filter summary, computed from Price + Harga_Tambahan.
- Improved modal compact styling: tighter margins, smaller inputs, scrollable form.
* API & Webhook Integration: added HMAC auth utilities and sandbox/real request logging.
- Added includes/hmac.php with secret retrieval, HMAC validation, JSON helpers, and response sender.
- Added salvo_sandbox_log() in unified_logger.php to persist API/webhook audit trail.
- New REST API endpoints: item CRUD, SO shipment creation, and SO push to ERP with sandbox mode.
- New inbound webhooks: Accurate item master sync and expedition POD delivery status updates.
* Database Schema: added api_secrets and sandbox_log tables for HMAC secrets and audit trail.
- Added integration documentation: API_WEBHOOK_INTEGRATION_GUIDE.md and PDF guide.
- All new endpoints follow SALVO JSON hygiene: clean output, prepared statements, unified logging.
Version 2.41 - 27/07/2026
* Delivery Order: added inline double-click editing for Area, Alamat, Batch, No_Route, Receiver, Konfirmasi, and No_HP.
- Added Batch column and filter to the delivery_order list; removed obsolete SO Det column.
- Implemented double-click handlers in delivery_order/delivery_order_ui.js with highlight animation and accordion-aware row restore.
- Added area/Alamat lookup modal and single-field edit modal in delivery_order/modals_delivery_order.php.
- Created delivery_order/read_area_options.php to return grouped Area options filtered by expedisi.
- Created delivery_order/update_do_field.php generic update endpoint with Status != Complete and Status_POD not containing POD guards, plus user_log audit logging.
- Updated delivery_order/read_delivery_order.php to return Batch and Area_Fee, apply Batch filter, and use case-insensitive grouping/ordering.
* Cabang: fixed duplicate Kode_Cabang save message so the ribbon shows the actual server error instead of a success message.
- Updated cabang/cabang_ui.js save handler to keep the modal open and display the backend error response when Kode_Cabang already exists.
* UI/PDF polish: adjusted header-menu z-index and trans_manifest PDF labels.
- Raised menu/header-menu.php z-index to prevent overlap issues.
- Updated label formatting in trans_manifest/generate_pdf_trans_manifest.php.
Version 2.40 - 23/07/2026
* Project conventions: documented module-local backup naming and expanded module structure guidance.
- Updated .github/copilot-instructions.md to add a Backup Naming Convention section requiring timestamped .bak files inside each module's backups/ folder.
- Expanded .github/skills/module-structure/SKILL.md with categorized file sets: Core, CRUD, Access Control, Audit/Unified Logs, Import & Validation, Supporting Helpers, and Backups.
- Updated .github/skills/salvo-core/SKILL.md Backup Convention to the new {yyyy-mm-dd HH.mm.ss} {file name} _{intent}.bak format.
- Clarified .github/skills/audit-logging/SKILL.md truncation marker meaning: ~ suffix indicates truncated text.
* Corporate SO: expose No_SQ in the SO list, filter, and DataTables.
- Added No_SQ column, column toggle, filter input, and DataTables header in corporate_so/corp_so.php.
- Added No_SQ DataTables column definition in corporate_so/corp_so_ui.js.
- Added No_SQ to the SELECT list and a LIKE-parameter filter in corporate_so/read_so.php.
* Draft SO: expanded bulk SQ creation filters and changed Delivery Date filter to a range.
- Expanded draft_so/bulk_create_sq_from_draft.php filters to include IdTrans, Season, Sales, No_SO, No_SQ, PIC_Klien, Gagal, Status, Sudah_Jadi_SQ, Receiver_Name, Created_By, Edited_By, TStamp_Created, and TStamp_Edited.
- Changed Delivery_Date filter from a single date to a from/to date range in draft_so/bulk_create_sq_from_draft.php and draft_so/read_draft_so.php.
- Added boolean filters for Sudah_Jadi_SQ and Ready_For_DO in draft_so/bulk_create_sq_from_draft.php.
- Reorganized the draft_so/corp_draft_so.php filter panel to match the expanded filter set.
- Updated draft_so/corp_draft_so_ui.js date-filter keys, validation messages, and active-filter summary for the new filter fields.
* Draft SO: added SQ-conversion lock to prevent changes on already-converted drafts.
- Blocked edit and delete in draft_so/update_draft_so.php and draft_so/delete_draft_so.php when Sudah_Jadi_SQ = 1.
- Locked header save/delete and disabled Add Line Item / detail-tab buttons in draft_so/draft_so_modal_handler.js when Sudah_Jadi_SQ is checked.
- Prevented form updates to the system-managed Sudah_Jadi_SQ flag in draft_so/update_draft_so.php.
* Draft SO: improved import apply handling and Delivery/Handling item fallback.
- Added skipped status in draft_so/import_apply_draft_so.php when re-importing a Draft SO whose No_SO already has an SQ (Sudah_Jadi_SQ = 1).
- Handled the new skipped apply status in draft_so/review_validation_draft_so.php and draft_so/review_validation_bulk_draft_so.php with orange styling and alert messages.
- Treated both "Delivery" and "Handling" product names as fallback item DH000001 during bulk SQ creation in draft_so/bulk_create_sq_from_draft.php.
- Synchronized fallback DH000001 item IDs back to draft_so_detail after bulk SQ creation so downstream SO creation does not fail.
* Sales Quotation: added "Buat SO dari Draft_SO" feature to auto-create corporate SO from validated SQ.
- Added new endpoint sales_quotation/create_so_from_draft.php that creates SO headers and details from validated SQ + matching draft_so records.
- Generate No_SO with SOC/SOB/SOF prefix based on draft Sales_Channel; selectable order-date source (draft Order Date, draft Delivery Date, or SQ Doc Date).
- Maps empty Delivery/Handling items to DH000001 and marks all SQ records in the same No_SQ + Draft_No_SQ group as Sudah_Buat_SO = 1.
- Enforces can_validate + can_create_so access gates and logs attempts/results; rejects processing more than 20 records at once.
- Added the "Buat SO dari Draft_SO" button, modal, and AJAX flow in sales_quotation/sales_quotation.php, sales_quotation_ui.js, and modals_sq.php.
- Added Sudah_Buat_SO flag, filter, and DataTables column to the SQ list in sales_quotation/sales_quotation.php, sales_quotation_ui.js, and read_sq.php.
- Expanded sales_quotation/bulk_validate_sq.php filters (Created_By, Edited_By, Tidak_Lolos_Validasi, Sudah_Buat_SO) and included already-validated records as skipped instead of hiding them.
- Removed obsolete documentation files from sales_quotation/: FILES_CREATED.md, QUICK_START.md, README.md.
Version 2.39 - 14/07/2026
* Draft SO: new module for managing draft Sales Orders and converting them to Sales Quotations in bulk.
- Added draft_so header/detail CRUD, list page (corp_draft_so.php), DataTable UI, and combined modal.
- Added bulk_create_sq_from_draft.php: groups filtered drafts by Draft_No_SQ, validates customer/salesperson/item existence case-insensitively, merges identical detail lines, inserts sq/sq_detail, recalculates totals, and marks drafts as converted.
- Added full Draft SO Excel import flow: preview, mapping, chunk processing, validation review, and apply endpoints.
- Added Gagal column to draft_so to record per-group validation failure reasons; added Submit_Order, PIC_Sales, and PIC_Klien columns to draft_so and the list UI.
- Bulk SQ creation writes canonical salespersons.PICSales and customers.IdCustomer values to the sq header; PIC_Klien prefers the draft value and falls back to customers.PICKlien only when empty.
* Sales Quotation: bulk validation and PIC_Sales binding improvements.
- Added sales_quotation/bulk_validate_sq.php endpoint to validate multiple SQ records at once with password and credential checks.
- Updated validate_sq.php to tighten password/credential verification, record failed-check counts in Tidak_Lolos_Validasi, and emit per-check failure messages.
- Updated sales_quotation_ui.js to bind PIC_Sales select values case-insensitively so values like retail match the canonical Retail option.
* Default limit validation: Retail customer exceptions.
- Updated includes/default_limit_check.php so Max_Value_Check skips budget-limit checks when IdCustomer = Retail.
- Updated Mandatory_Check to skip NPWP and NPWP_16 mandatory checks when IdCustomer = Retail.
- Updated Field_Value_Check to skip Cust_Status checks when IdCustomer = Retail; all other field value checks still run.
* Corporate SO: scope enforcement, date normalization, and import/validation refinements.
- Added date-format normalization in corp_so_ui.js so so-date-input filters accept dd/mm/yyyy and normalize to ISO before sending; invalid dates show inline error highlighting.
- Added Order_Date and Delivery_Date display formatting in the Corporate SO DataTable; added No_Route column.
- Added scope badge in corp_so.php header showing active user name/role and access level (own/admin_soc/admin_retail/all).
- Hardened record-lock checks in check_detail_lock.php and check_so_lock_status.php to block edits on locked/confirmed headers or validated downstream SQ records.
- Updated so_access.php and read endpoints (read_so.php, read_so_full.php, read_so_detail.php) to enforce own/admin_soc/admin_retail/all access scopes.
- Improved Corporate SO import flow: cleaner preview mapping UI, normalized column handling, chunk robustness, and safer apply validation feedback.
- Updated review validation pages (review_validation_corp_so.php, review_validation_bulk_corp_so.php) with unified styling and importlog summary logging when all rows finish processing.
- Aligned Corporate SO modal and CRUD endpoints (create/update/delete for header/detail, populate_options, generate_no_so, generate_no_do, upload_photo) with scope, lock state, and validation rules.
* Delivery Order: grouped accordion UI and POD status visibility.
- Added grouped accordion view in delivery_order.php and delivery_order_ui.js: DO rows grouped by courier (type, name, license plate) with expandable cards, row counts, and per-group select-all checkbox.
- Added date display helpers and Tgl_Berangkat, Tgl_Tiba, Tanggal_Terima_POD, Status_POD, Konfirmasi, and Ready_For_DO columns to the DO grouped table.
- Added compact filter panel styling with filterSummary bar consistent with other modules.
- Updated generate_pdf_delivery_order.php, modals_delivery_order.php, and read_delivery_order.php for layout/field consistency and additional POD fields.
* Transport Manifest: POD write-back and TM lifecycle cleanup.
- Updated save_pod_delivery.php to write Status_Kirim, Tanggal_Terima_POD, Tgl_Tiba, Waktu_Tiba, Diterima_Oleh, Status_POD, and photo paths back to the parent so header on success; failed deliveries record failure status and notes without overwriting existi
- Updated read_available_do.php to include Status_POD in availability checks and return fields needed for TM assignment.
- Updated add_do_to_tm.php to block DOs whose Status_POD already indicates POD completion from being added to a new manifest.
- Updated remove_do_from_tm.php and delete_trans_manifest.php to clear/reset related so POD status fields when a DO is removed or a manifest is deleted.
- Updated generate_pdf_handover.php for handover PDF layout consistency.
* System: navigation, logging, and Copilot instructions.
- Updated menu/header-menu.php for new module navigation.
- Updated includes/unified_logger.php and includes/error_handler.php for improved logging and error handling used by new flows.
- Updated includes/role_helpers.php for role/credential helper adjustments.
- Updated .github/AGENTS.md, .github/copilot-instructions.md, and .github/skills/salvo-core/SKILL.md for agent routing, skill registry, and core SALVO rules.
- Removed obsolete text files: includes/default_limit Diagram - Geeneral.txt, includes/default_limit Diagram.txt, includes/default_limit_check.txt.
Version 2.38 - 06/07/2026
* Corporate SO ACL, security gates, import/audit hardening, and SQ detail query safety updates.
- Added role-based Corporate SO access context (own, admin_soc, admin_retail, all, none) with scope and permission mapping via so_access.php.
- Enforced ACL scope and write permissions across SO header/detail create, update, delete, and read endpoints, including scoped fetch behavior for read_so, read_so_detail, read_so_full, and SQ lookup.
- Expanded Corporate SO list and filter coverage with No_DO, Expedisi, Status_POD, PIC_Sales, routing/invoice flags, edited metadata, and timestamp filters; added scope badge/filter summary in UI.
- Added and propagated No_SR logistics field in modal/UI and update flow with role-aware field protection between header and logistic edit capabilities.
- Strengthened status and lock controls: scoped lock checks, Complete/Cancel credential gate, default_limit_check enforcement, and controlled POD revoke handling.
- Expanded observability and audit trail: unified logger events and changed-fields user_log records for SO/SO detail update/delete/import flows.
- Improved Corporate SO import reliability by replacing stale so_detail rows for update imports to prevent stacked duplicate line items and by logging final import processing summaries to importlog.
- Fixed data-loss and UI reset issues by preserving existing POD photo paths on empty submits and avoiding unnecessary photo input clearing in modal handlers.
- Hardened Sales Quotation detail read query by fully qualifying selected detail columns with table alias to avoid ambiguity in joined reads.
Version 2.37 - 30/06/2026
* Corporate SO import, locking, and typing guidance updates.
- Added persistent PHP typing guidance to .github Copilot instructions and all skill files.
- Added import access guard and aligned import preview, process, chunk, apply, and review flow.
- Refined SO modal locking for Complete/Cancel, Ready_For_DO, generate buttons, and unlock permission.
- Synced delivery_order, trans_manifest, sales_ops_dashboard, sq_so_do_tracking, and default limit checks with the new SO/DO model.
Version 2.36 - 22/06/2026
* Default Limit Rules module: new ACL-gated CRUD feature with UI and backend safeguards.
- Added Default Limit Rules page with DataTable listing, compact filter panel, modal form, and confirmation delete flow.
- Added module ACL helper to enforce access by user group (administrator, manager, super-admin).
- Added create/read/update/delete endpoints for default_limit with session checks, ACL checks, prepared statements, and field validation.
- Added SQL command guardrail for rule queries to allow only SELECT/WITH patterns.
- Added client-side validation and ribbon feedback messaging in the module UI.
* Shared includes: default_limit_check engine and integration support for rule execution.
- Added event-based default_limit_check pipeline for reusable rule evaluation flow.
- Added support include and flow documentation for integrating default limit checks in other modules.
* Sales Quotation hardening: centralized access control, JSON hygiene, and unified logging/audit.
- Added centralized SQ access helper (scope none/own/all) and refactored endpoints to remove duplicated access logic.
- Hardened JSON responses with output-buffer cleanup and improved DB error handling with denied-access logging.
- Integrated unified_logger across read/create/update/delete/pack/validate flows and expanded audit writes.
- Strengthened validation flow by separating validate permission from revoke permission and tightening mutation guardrails.
- Enhanced PDF flow with print modal options for package content and price-tax mode.
* Corporate SO Sales Type improvements with dynamic options and backward compatibility.
- Changed Sales Type input from free-text to dropdown populated from opt_sales_type via read endpoint.
- Handled unlisted existing Sales Type values by appending labeled options and preserving selected value state.
* Navigation and supporting module updates.
- Added new header menu entry for Default Limit Rules.
- Updated Audit User Log detail labels to clearer English wording for changed-field comparison.
- Tightened customers CSV helper function typing (typed parameters and boolean return).
Version 2.35 - 29/05/2026
* Customers module: Prospect/Cust_Status/Notes integrated across UI, CRUD, draft, and import validation/apply flows.
- MOD: customers/customers.php, customers/modals_customer.php, customers/customers_ui.js - added new fields in table/filter/modal, Cust_Status select filter, Prospect icon render, and modal print action.
- MOD: customers/create_customer.php, customers/update_customer.php, customers/read_customer.php, customers/save_customer_draft.php - persisted Prospect/Cust_Status/Notes and exact-match Cust_Status filtering.
- MOD: import_preview_customer.php, import_process_customer.php, import_chunk_handler_customer.php, review_validation_customer.php, review_validation_bulk_customer.php - added Prospect/Cust_Status/Notes support in mapping, staging, and apply review.
Version 2.34 - 28/05/2026
* Customers module: added draft lifecycle and stricter save-time validation rules.
- NEW: customers/save_customer_draft.php, customers/read_customer_draft.php, customers/delete_customer_draft.php, customers/check_customer_id_exists.php for draft CRUD and duplicate IdCustomer precheck.
- MOD: customers/customers_ui.js, customers/modals_customer.php, customers/create_customer.php, customers/update_customer.php for draft buttons, overwrite confirmation, RET/RETAIL exception, NPWP + NPWP_16 validation, and draft cleanup on successful save.
* Audit helper compaction tuned for readability under varchar(255) limits.
- MOD: includes/salvo_audit.php now uses ~ (not ...) as truncation suffix and rebalanced profiles to preserve 2 extra visible characters per compacted token.
* Items module extended with Non_Inventory end-to-end support.
- MOD: items CRUD/import/review/UI files updated to read, save, filter, display, and audit Non_Inventory across create/update/delete/import/validation flows.
* Sales Quotation UX and print behavior enhancements.
- MOD: sales_quotation/generate_pdf_sq.php adds optional show_pack output and print layout refinements; sales_quotation_ui.js adds pre-print show-pack chooser; modal/page scripts add clearer button tooltips and validation-lock UX polish.
* Menu cleanup and audit label normalization.
- MOD: menu/header-menu.php label updated to Audit Log; DEL: menu/backup_header-menu.php; backups consolidated under menu/backups/.
* Agent and skill documentation synchronized with latest audit compaction lesson.
- MOD: .github/skills/*.md and .github/agents/*.agent.md updated to document truncation suffix ~ and +2 visible-character gain in compact audit summaries.
* Removed 34 logistics/DO/POD fields from so_detail table (migrated to so header): No_DO, Courier_Type, Courier_Name, No_Polisi, Order_Id_Pengiriman, No_Invoice_Xpdc, Batch, Nm_Helper_Kenek, KM_Awal, KM_Akhir, Jarak_Tempuh, Tgl_Berangkat, Waktu_Berangkat, T
* Removed 34 logistics/DO/POD fields from so_detail table (migrated to so header): No_DO, Courier_Type, Courier_Name, No_Polisi, Order_Id_Pengiriman, No_Invoice_Xpdc, Batch, Nm_Helper_Kenek, KM_Awal, KM_Akhir, Jarak_Tempuh, Tgl_Berangkat, Waktu_Berangkat, T
* Removed 34 logistics/DO/POD fields from so_detail table (migrated to so header): No_DO, Courier_Type, Courier_Name, No_Polisi, Order_Id_Pengiriman, No_Invoice_Xpdc, Batch, Nm_Helper_Kenek, KM_Awal, KM_Akhir, Jarak_Tempuh, Tgl_Berangkat, Waktu_Berangkat, T
* Removed 34 logistics/DO/POD fields from so_detail table (migrated to so header): No_DO, Courier_Type, Courier_Name, No_Polisi, Order_Id_Pengiriman, No_Invoice_Xpdc, Batch, Nm_Helper_Kenek, KM_Awal, KM_Akhir, Jarak_Tempuh, Tgl_Berangkat, Waktu_Berangkat, T
* Removed 34 logistics/DO/POD fields from so_detail table (migrated to so header): No_DO, Courier_Type, Courier_Name, No_Polisi, Order_Id_Pengiriman, No_Invoice_Xpdc, Batch, Nm_Helper_Kenek, KM_Awal, KM_Akhir, Jarak_Tempuh, Tgl_Berangkat, Waktu_Berangkat, T
* Verified all runtime endpoints (corporate_so, trans_manifest, delivery_order, sq_so_do_tracking, sales_ops_dashboard) use so header sources; UI (modal_so_combined.php, so_modal_handler.js) updated to remove legacy logistics tab and card rendering.
Version 2.33 - 20/05/2026
* Sales Quotation: package customization via sq_pack with per-line content management.
- Added Customize button and package-content modal to add, edit, and delete hampers/package content items with Qty.
- Added line-card content summary badge and eye preview popup (Content: X items) with dynamic gray/green visual state.
- Removed PDF print validation dependency: printing can be opened without validated status.
- Hardened validated-lock rules on backend for SQ header/detail/package updates and deletes; revoke required before mutation.
- Improved SQ UI feedback using ribbon notifications and fixed revoke style reset on line-item card action buttons.
- Fixed item-lookup select button to register selection on first click (no double-click needed).
* Menu + Delivery: added Expedisi menu and Driver POD Mobile manual open flow.
- Added delivery_order/pod_mobile_open.php to validate No_DO and redirect using signed QR-compatible access parameters.
* Corporate SO and Items: import preview/review UX and null-safety improvements.
- Corporate SO import preview mapping UX refined; review validation bulk UI streamlined; items import preview output hardened for nullable values.
Version 2.32 - 15/05/2026
* Implementing user_log, new credentials/wewenang mechanism, and unified error/system log in Logs module.
- FEATURE: Added double-click-to-edit functionality for modules: jenis, kategori, subkategori, tipe, satuan.
- FEATURE: Introduced access control files for various modules (cabang, cara_bayar, customers, items, options, salesperson).
- FIX: Resolved audit logging issue in delete_customer.php to ensure proper logging of delete operations.
- FIX: Updated salvo_audit.php for improved logging consistency.
- IMPROVEMENT: Refined import workflows for cabang, cara_bayar, customers, items, and salesperson modules.
- IMPROVEMENT: Enhanced DataTables UI scripts for better user interaction and responsiveness.
- OTHER: Updated skill documentation for audit logging, changelog summaries, debugging, and deployment.
- OTHER: Minor adjustments to prompt.txt and other utility files.
Version 2.31 - 11/05/2026
* Unified audit logging via shared user_log table with changed-fields-only capture
- Jakarta timezone enforcement across PHP and MySQL for audit timestamp consistency
- Wewenang table credential gating on Items and Customers import endpoints
- Progressive multi-profile truncation strategy for audit field compaction
* Items module: audit logging on update, delete, and bulk import branches
* Customers module: audit logging on update, delete, and per-record/bulk import branches
* New Audit Logs read-only module with filter panel, two-layer pagination (10K server + 100 DataTables), dashboard metrics, and CSV export
- Double-click row opens detail modal with scrollable before/after comparison panes
- Export with progress polling via sentinel file tokens and user-configurable separator/decimal options
* Items import performance optimization: preview shows sample only (header + 5 rows), full parsing deferred to process endpoint
- Temp file storage with session token handoff; auto-cleanup of stale uploads older than 2 hours
- Preview delay reduced from 45+ seconds to instant; full import remains server-side deferred
* UI improvements: loading spinners on Preview and Import buttons with single-click disable to prevent duplicate submissions
* Menu restructure: new "Logs" dropdown containing Import Log, Export Log, and Audit Logs (moved from Master Data)
* SKILL documentation updates for audit logging patterns, import performance optimization, and new audit-logging agent skill
Version 2.30 - 07/05/2026
* v2.30: Unified credential system (master_wewenang), Users module overhaul, Sales Quotation wewenang access control, and filter panel standardization across all modules
- NEW MODULE: master_wewenang ??? manage credential master records assigned to users
- NEW: master_wewenang/master_wewenang.php ??? iframe-safe CRUD page; restricted to administrator/manager/super-admin
- NEW: master_wewenang/master_wewenang_ui.js ??? DataTable with dblclick-to-edit, usage warning, highlight-on-save
- NEW: master_wewenang/modal_master_wewenang_combined.php ??? add/edit/delete modals
- NEW: master_wewenang/create_master_wewenang.php ??? INSERT credential master; rejects duplicates
- NEW: master_wewenang/read_master_wewenang.php ??? list credentials with used_count; single-record GET
- NEW: master_wewenang/update_master_wewenang.php ??? UPDATE with usage guard
- NEW: master_wewenang/delete_master_wewenang.php ??? DELETE with usage guard
- DB: CREATE TABLE IF NOT EXISTS master_wewenang (wewenang PK varchar(50), module varchar(100) NOT NULL)
- MOD: users/users.php ??? UserGroup access check; added eye (view) button per row; added credentials popup modal (#viewCredModal)
- MOD: users/users_ui.js ??? viewCredBtn click handler; dblclick-to-edit excludes view button; credentials DataTable alignment fix (removed scrollY, table-layout:fixed, explicit column widths)
- MOD: users/modals.php ??? replaced role checkboxes with Credentials DataTable; wrapper uses CSS max-height scroll instead of DataTables scrollY
- MOD: users/read.php ??? returns credential_grid (all master_wewenang rows with per-user assigned flag) and CredentialCount
- MOD: users/create.php ??? dual-write: INSERT to wewenang table AND update legacy role columns; sets CreatedBy/TStamp_Created
- MOD: users/update.php ??? syncs wewenang table (DELETE+INSERT) AND updates legacy role columns; sets EditedBy/TStamp_Edit
- MOD: users/delete.php ??? cascades DELETE from wewenang table before deleting user
- MOD: users/change_pwd.php ??? admin/manager reset mode: hides old-password field when resetting another user
- MOD: users/update_password.php ??? role-aware: admin/manager/super-admin resetting another user skips old-password check
- MOD: sales_quotation/sales_quotation.php ??? queries wewenang table for $sqAccessLevel (none/own/all): Sales Role=own; Admin Sales/Sales Manager/BOD=all; passes window.sqAccessLevel to JS
- MOD: sales_quotation/read_sq.php ??? enforces wewenang access level: admin UserGroup bypass=all; none=empty response; own=WHERE PIC_Sales=currentUser; all=no filter
- MOD: sales_quotation/sales_quotation_ui.js ??? added updateFilterSummary() with icon+bold values; wired to Reload and Clear Filter
- MOD: logs/index.php ??? added Master_Wewenang tab embedding master_wewenang.php via iframe
- MOD: corporate_so/corp_so.php ??? filter panel CSS standardized; Status filter changed to dropdown with all valid SO statuses; filterInfo bar compact style
- MOD: corporate_so/corp_so_ui.js ??? filterSummary update wired to apply/clear actions
- MOD: corporate_so/modal_so_combined.php ??? minor formatting fix
- MOD: cabang/cabang.php + cabang_ui.js ??? compact filter panel CSS + filterSummary bar
- MOD: cara_bayar/cara_bayar.php + cara_bayar_ui.js ??? compact filter panel CSS + filterSummary bar
- MOD: customers/customers.php + customers_ui.js ??? compact filter panel CSS + filterSummary bar
- MOD: items/items.php + items_ui.js ??? compact filter panel CSS + filterSummary bar
- MOD: map_esb_items/map_esb_items.php + map_esb_items_ui.js ??? compact filter panel CSS + filterSummary bar
- MOD: map_pay_cust/map_pay_cust.php + map_pay_cust_ui.js ??? compact filter panel CSS + filterSummary bar
- MOD: rcs_map_items/rcs_map_items.php + rcs_map_items_ui.js ??? compact filter panel CSS + filterSummary bar
- MOD: rcs_map_pay_cust/rcs_map_pay_cust.php + rcs_map_pay_cust_ui.js ??? compact filter panel CSS + filterSummary bar
- MOD: rcs_project/rcs_project.php + rcs_project_ui.js ??? compact filter panel CSS + filterSummary bar
- MOD: salesRekap_ESB/salesRekap.php + salesRekap_ui.js ??? compact filter panel CSS + filterSummary bar
- MOD: salesRekap_RCS/salesRekap_rcs.php + salesRekap_rcs_ui.js ??? compact filter panel CSS + filterSummary bar
- MOD: salesRekap_RCS_query/salesRekap_rcs_query.php + salesRekap_rcs_query_ui.js ??? compact filter panel CSS + filterSummary bar
- MOD: exp_si_esb/exp_si_esb.php + exp_si_esb_ui.js ??? filter panel CSS standardized; filter-options-inline layout; filter-actions-row flex
- MOD: exp_si_rcs/exp_si_rcs.php + exp_si_rcs_ui.js ??? filter panel CSS standardized; filter-options-inline layout; filter-actions-row flex
- MOD: trans_manifest/trans_manifest.php ??? filter panel CSS standardized; filterSummary with date range/No TM/Courier; filter-actions flex layout
- MOD: options/area/area.php ??? filter panel restructured into #filterPanel card; added Wilayah and Expedisi dropdown filters
- MOD: delivery_order/delivery_order.php + delivery_order_ui.js + generate_pdf_delivery_order.php ??? minor layout and fix updates
- MOD: sq_so_do_tracking/sq_so_do_tracking_ui.js + tracking_filter_option_helper.php ??? minor updates
- NEW: .github/skills/filter-panel-styling/SKILL.md ??? compact filter panel CSS conventions, filterSummary logic, XSS-safe escaping
- NEW: .github/skills/deployment-zip/SKILL.md ??? partial Hostinger deployment ZIP packaging process
- MOD: .github/AGENTS.md + agents/* + copilot-instructions.md ??? filter-panel-styling skill routing; agent cross-references updated
Version 2.29 - 23/04/2026
* Introduced SQ-SO-DO fulfillment tracking module with grouped visibility, default filter persistence, and batch SO handoff for downstream billing flows.
- NEW: sq_so_do_tracking/sq_so_do_tracking.php - tracking page UI with grouped table, filters, and batch action controls.
- NEW: sq_so_do_tracking/sq_so_do_tracking_ui.js - grouped renderer, quick search, default filter sync, and SO/DO deep-link behavior.
- NEW: sq_so_do_tracking/read_sq_so_do_tracking.php - aggregated SQ->SO->DO->POD read endpoint with filter support.
- NEW: sq_so_do_tracking/tracking_filter_option_helper.php - default filter normalization and export_option persistence helper.
- NEW: sq_so_do_tracking/save_default_filter_sq_so_do_tracking.php - save default filter endpoint.
- NEW: sq_so_do_tracking/load_default_filter_sq_so_do_tracking.php - load default filter endpoint.
- NEW: sq_so_do_tracking/prepare_so_batch_action.php - session batch token prep for invoice/payment action redirects.
- NEW: sq_so_do_tracking/read_so_batch_action.php - read/clear batch SO action payload by token.
* Expanded B2B transaction navigation and document flow usability across Corporate SO, Delivery Order, and related master-data modules.
- MOD: menu/header-menu.php - added SQ-SO-DO Fulfillment Tracking menu entry under B2B Sales.
- MOD: delivery_order/generate_pdf_delivery_order.php - changed print default paper size from A4 to A5.
- MOD: trans_manifest/create_trans_manifest.php - pass Courier_Type parameter when requesting generated No_TM.
- MOD: trans_manifest/trans_manifest.php and multiple module UI files - added safe row double-click shortcut reusing existing edit/view action buttons.
* Improved Sales Quotation and driver form resilience: mobile modal usability, numeric normalization, and master-data aligned Ekspedisi input behavior.
- MOD: sales_quotation/modals_sq.php - mobile-first modal layout and lookup table responsiveness without transaction logic changes.
- MOD: sales_quotation/sq_modal_handler.js, create_sq_detail.php, update_sq_detail.php - allow Price = 0, enforce Qty > 0, and normalize numeric payloads safely.
- MOD: options/driver/modals_driver.php and options/driver/driver_ui.js - switched Ekspedisi to master dropdown with fallback unlisted option support.
* Updated Copilot/agent governance to enforce explicit Hostinger DB write confirmations and expanded reusable skill routing/documentation.
- NEW: .github/skills/changelog-executive-summary/SKILL.md - executive changelog summarization capability.
- MOD: .github/agents/*, .github/skills/*, .github/copilot-instructions.md - added Hostinger DB confirmation guardrails and updated skill routing/lessons.
- MOD: customers/customers.php, salesRekap_RCS_query/salesRekap_rcs_query_ui.js - table layout and summary/date-display refinements.
- MOD: options/driver/modals_driver.php and options/driver/driver_ui.js - switched Ekspedisi to master dropdown with fallback unlisted option support.
* Updated Copilot/agent governance to enforce explicit Hostinger DB write confirmations and expanded reusable skill routing/documentation.
- NEW: .github/skills/changelog-executive-summary/SKILL.md - executive changelog summarization capability.
- MOD: .github/agents/*, .github/skills/*, .github/copilot-instructions.md - added Hostinger DB confirmation guardrails and updated skill routing/lessons.
- MOD: customers/customers.php, salesRekap_RCS_query/salesRekap_rcs_query_ui.js - table layout and summary/date-display refinements.
Version 2.28 - 16/04/2026
* DataTables query/export flow stabilization, hybrid pagination, CSV export progress, and alignment/filter reliability improvements.
- MOD: .github/agents/module-generator.agent.md - added DataTables query/export lessons learned.
- MOD: .github/agents/ui-datatables-specialist.agent.md - added alignment/filter/pagination/export playbook.
- MOD: .github/copilot-instructions.md - added DataTables query/export debugging lessons.
- MOD: .github/skills/import-export/SKILL.md - added query/export DataTables lessons section.
- MOD: customers/customers.php - widened Nm Legal, Submit Order, Kota, Alamat, Alm Legal columns.
- MOD: menu/header-menu.php - updated query page menu label to include export CSV.
- MOD: salesRekap_RCS/export_salesRekap_rcs.php - export query speed/index optimization + query timing log.
- MOD: salesRekap_RCS/read_salesRekap_rcs.php - added 10,000 cap + SQL summary + truncation metadata.
- MOD: salesRekap_RCS/salesRekap_rcs.php - cache-busted UI script include for fresh JS deploy.
- MOD: salesRekap_RCS/salesRekap_rcs_ui.js - truncation warning display for capped result set.
- NEW: salesRekap_RCS_query/query_helpers.php - shared filters/search/binding utilities for query module.
- NEW: salesRekap_RCS_query/read_salesRekap_rcs_query.php - server-side read with block metadata and summary.
- NEW: salesRekap_RCS_query/get_filter_options_rcs_query.php - date-range based pay method/branch options API.
- NEW: salesRekap_RCS_query/export_salesRekap_rcs_query.php - clean CSV stream with BOM/sep and token sentinel.
- NEW: salesRekap_RCS_query/export_status_rcs_query.php - export progress polling endpoint.
- NEW: salesRekap_RCS_query/salesRekap_rcs_query.php - query UI page with filter panel, block nav, and export dialogs.
- NEW: salesRekap_RCS_query/salesRekap_rcs_query_ui.js - appliedFilters reload semantics + block paging + export progress UI.
- NEW: salesRekap_RCS_query/get_filter_options_rcs_query.php - date-range based pay method/branch options API.
- NEW: salesRekap_RCS_query/export_salesRekap_rcs_query.php - clean CSV stream with BOM/sep and token sentinel.
- NEW: salesRekap_RCS_query/export_status_rcs_query.php - export progress polling endpoint.
- NEW: salesRekap_RCS_query/salesRekap_rcs_query.php - query UI page with filter panel, block nav, and export dialogs.
- NEW: salesRekap_RCS_query/salesRekap_rcs_query_ui.js - appliedFilters reload semantics + block paging + export progress UI.
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