Skip to content

Medco

INACT for Medco, version 3. One of the big five. Medco ran INACT v2 before, and the v3 fork carries the history of that upgrade.

At a glance

JiraINA28, INACT Medco Upgrade. Clones from INA27 are common.
INA05 INACT Instance valueMedco. Medco Bangkanai is a separate value and a separate repository.
Repositorybinari-digital/ina-medco-v3
Encrypted twinbinari-digital/ina-medco-v3-encrypted
INARTS GitLabinact/inact-medco-v3. Only the encrypted twin is pushed there, not the plain repository.
Permanent branches on originmain, staging, development. Only development and main deploy.
DatabaseSQL Server
ProductionThe client's own Linux server, no internet access. Releases are uploaded as a zip.
Stagingnone
Dev (QA)inact-medco-v3-encrypted.bdt.dev and inact-medco-v3-encrypted-testable.bdt.dev on the Lab box
Previous versionbinari-digital/ina-medco-v2

TODO: production SQL Server version.

Repositories and remotes

Unlike the other instances, Medco pushes only the encrypted twin to INARTS. The plain repository lives on GitHub alone. The encrypted twin differs from the plain repository in two files: main.php, which is ionCube-encoded, and setting.php, which keeps display_errors on for troubleshooting on production.

Environments and deploy

Push toScriptWhat happens
developmentdeploy/dev.shProducer on the Rumah box syncs plain to encrypted and pushes. The consumer runs on the Lab box, not the Rumah box, because Medco QA uses SQL Server that is reachable only from the office LAN. It pulls both served roots, ~/www/inact-medco-v3-encrypted and ~/www/inact-medco-v3-encrypted-testable, and runs phinx migrate on each.
maindeploy/prod.shSync plain main to encrypted main, push to GitHub and INARTS. No consumer, on purpose. The client's box has no internet. Production is delivered as a release zip cut with deploy/lib/inact-release.sh and applied by hand on site. Migrations travel with the zip.

Database

DriverSQL Server, DB_CONNECTION=mssql
QA databasesSQL Server on the shared dev DB host 192.168.1.52, databases inact-medco-v3-encrypted and inact-medco-v3-encrypted-testable, one per QA site
Test databaseShared dev DB host 192.168.1.52, port 1433, database inact-medco-v3-prod-20260819. A production snapshot from 2026-08-19.

This snapshot is the best place to check whether a bug bites real data. The master test databases are nearly empty, so a query that depends on a rarely filled table looks fine there and is still wrong in production.

How this fork differs from master

Measured on 2026-09-05.

Module files that differ93
Modules with the most changesrouting 16, documents_master 9, documents 9, adms 8, adms_reference 7, member 6, dms_reference 6
Libraries that differInactPDO.php, additional_global_variables.inc.php, inweb.lib.php, reference_function.inc.php, tracking_function.inc.php
Top-level files that differauto_logout.php, db_config.php, setting.php
Migrations450 in total. 39 only here, 20 in master not taken. Newest 2026-07-16.

Files only in this fork

  • modules/dms_reference/business_unit.php
  • modules/dms_reference/code_package_identifier.php
  • modules/dms_reference/file_name_setting.php
  • modules/dms_reference/location.php
  • modules/dms_reference/region.php
  • modules/dms_reference/sdrl_code.php
  • modules/dms_reference/sub_discipline.php
  • modules/dms_reference/vendor_package.php
  • modules/routing/routing_handler_ext_reviewer_download.php
  • modules/routing/routing_handler_ext_reviewer_upload.php
  • modules/routing/routing_handler_ext_reviewer_upload_form.php
  • modules/routing/routing_handler_print_commentsummary.php

Two backup copies of the multi-upload handler also sit in modules/documents_master/. They are not part of the feature.

Files in master that this fork lacks

  • modules/adms/adms_rev_sort.inc.php
  • modules/adms_reference/adms_reference_import.inc.php

inweb_config keys

Keys
Only in this forkenable_code_package_identifier, enable_location, enable_ref_business_unit, enable_region, enable_sdrl_code, enable_vendor_package
Missing hereenable_last_login_wins, enable_routing_overdue_notif_digest

From v2 to v3

Medco ran INACT v2 (binari-digital/ina-medco-v2) before the v3 fork. v3 is not a rewrite: every v2 module still exists with the same folder name, so the document-management steps are the same for users. What changed is the scaffolding around the modules and a set of new modules on top. Summarised from the comparison pages that used to live in the v3 repository, verified June 2026.

Under the hood

Dimensionv2v3
Dependenciesnone, vendored librariesComposer, PSR-4 autoloading, src/
Environment confighard-coded in PHP.env via symfony/dotenv plus db_config.php
Database accessmysql_*, mysqli_*, iw_mysql_query only$pdo (InactPDO / PDOLogActivity) alongside the legacy path; the legacy helper now throws
Schemaone SQL patch filephinx migrations and seeds under db/; one-off data backfills under migrations/scripts/
Themingper-company templates"flavour" classes under src/{basic,custom,resindo,minerba}, picked by the Feature\PrintDoc\Html config key
LibrariesPHPExcel, FPDFPhpSpreadsheet, TCPDF, HTML2PDF, PHPMailer, illuminate/database, Slim

For users

  • Permissions are per project. Group-based ts_privileges became resource-group-based ts_privileges_resource. See Users and Privileges.
  • LDAP login, idle auto-logout, finer action types (upload, archive, ready_to_return), dashboard privileges.
  • Modular menus built from the module registry, so two installs can show different menus.
  • New modules: Draft PO, AP Invoices, Rekom Handak, Vendor Management, Work Order Progress, ADMS, Master Stamp, and the DMS / Procurement / Cost Control / ADMS reference areas.
  • Auto Folder Creation replaced the three fixed project_east_java library layouts. See Auto Folder Creation.
  • Upload lost its options dialog and SPRD / VOID watermarking; the two old bugs stayed. Medco later brought the dialog back with Force Upload only. See Upload.
  • Upload Transmittal fails on an unmatched row and no longer imports remarks. Return is gated by enable_return_on_audit and has a Ready to Return view. Clear Return Status lost its button; the bug was never fixed.
  • Nothing was removed apart from that button. _proto_202205191643_ is leftover prototype code, not a feature.

One-off data scripts for the v1 to v3 migration live under migrations/scripts/ in the v3 repository, 63 files. No other fork has that folder.

Customizations documented so far

None yet. Feature pages arrive in phase 3 of the docs plan.

Known gotchas

  • staging exists but does not deploy. The workflow only maps development and main. A PR merged into staging changes nothing anywhere.
  • Production cannot be pulled. Nothing on our side reaches it. A fix is not live until the release zip has been applied on site.
  • SQL Server rules bite here first. LIMIT does not exist; use InactPDO::getLimit() after an ORDER BY. Identity inserts need SET IDENTITY_INSERT.