# Executive Dashboard H1/H2 Report

- Generated at: `2026-04-11 01:25:29`
- Database: `san_13mar` on `192.168.5.14`

## Scope Data

- Transaksi aktif: `198424` rows
- Rentang transaksi aktif: `2019-01-16` s/d `2026-04-10`
- Outstanding payment source (`sisa>0`): `7797` rows
- Cabang terbesar: `1` (`jakarta`) dengan `45349` transaksi aktif

## H1 - Benchmark Query Besar

### Full range - semua cabang

| Query | AVG (ms) | MIN (ms) | MAX (ms) | Rows | Explain |
|---|---:|---:|---:|---:|---|
| `ledger_ytd_pl` | 4422.48 | 4304.94 | 4596.93 | 83 | `c:ALL:null | h:ALL:null` |
| `table_negative_margin` | 2520.84 | 2488.7 | 2575.23 | 0 | `t:ref:INDEX_VW1J | d:ref:ok` |
| `table_sales_summary` | 2048.82 | 2017.71 | 2093.96 | 17 | `transaksi:ref:INDEX_VW1J` |
| `kpi_sales_total` | 1896.02 | 1889.47 | 1903.96 | 1 | `transaksi:ref:INDEX_VW1J` |
| `kpi_expense_total` | 1884.76 | 1883.03 | 1887.06 | 1 | `transaksi:ref:INDEX_VW1J` |
| `table_purchase_summary` | 425.9 | 424.36 | 428.49 | 200 | `transaksi:range:ok` |
| `kpi_purchase_total` | 369.41 | 363.27 | 375.08 | 1 | `transaksi:range:ok` |
| `ledger_latest_harian` | 133.44 | 131.72 | 135.23 | 409 | `<derived2>:ALL:null | h:eq_ref:PRIMARY | _rek_master_cache:ALL:null` |
| `table_payable_aging` | 72.7 | 63.96 | 87.76 | 1000 | `ps:ALL:null | <derived2>:ref:key0 | transaksi_due_date:ALL:null` |
| `table_receivable_aging` | 69.04 | 62.29 | 75.37 | 518 | `ps:ALL:null | <derived2>:ref:key0 | transaksi_due_date:ALL:null` |

### Full range - cabang terbesar

| Query | AVG (ms) | MIN (ms) | MAX (ms) | Rows | Explain |
|---|---:|---:|---:|---:|---|
| `ledger_ytd_pl` | 4263.49 | 4261.61 | 4265.02 | 12 | `c:ALL:null | h:ALL:null` |
| `table_negative_margin` | 2183.32 | 2154.53 | 2233.95 | 0 | `t:ref:INDEX_VW1J | d:ref:ok` |
| `table_sales_summary` | 1961.43 | 1959.15 | 1963.31 | 2 | `transaksi:ref:INDEX_VW1J` |
| `kpi_sales_total` | 1914.28 | 1873.29 | 1992.8 | 1 | `transaksi:ref:INDEX_VW1J` |
| `kpi_expense_total` | 1866.86 | 1866.29 | 1867.35 | 1 | `transaksi:ref:INDEX_VW1J` |
| `ledger_latest_harian` | 188.86 | 177.9 | 209.93 | 71 | `<derived2>:ALL:null | h:eq_ref:PRIMARY | _rek_master_cache:index:ok` |
| `table_receivable_aging` | 62.15 | 57.51 | 69.14 | 278 | `ps:ALL:null | <derived2>:ref:key0 | transaksi_due_date:ALL:null` |
| `table_payable_aging` | 56.96 | 55.43 | 59.9 | 2 | `ps:ALL:null | <derived2>:ref:key0 | transaksi_due_date:ALL:null` |
| `kpi_purchase_total` | 23.7 | 19.02 | 30.58 | 1 | `transaksi:range:ok` |
| `table_purchase_summary` | 15.15 | 13.16 | 16.88 | 0 | `transaksi:range:ok` |

## H2 - Rekonsiliasi Dashboard vs Existing

- Periode Activity: `2026-04-01` s/d `2026-04-10`
- Ringkasan check: `12` PASS, `0` FAIL

### Scope: Semua Cabang

| Check | Dashboard | Existing | Diff | Status |
|---|---:|---:|---:|---|
| `activitySales` | 0 | 0 | 0 | **PASS** |
| `activityPurchase` | 1033019333.28 | 1033019333.28 | 0 | **PASS** |
| `activityExpense` | 0 | 0 | 0 | **PASS** |
| `neracaDebet` | 796151268797.79 | 796151268797.79 | 0 | **PASS** |
| `neracaKredit` | 796151268797.79 | 796151268797.79 | 0 | **PASS** |
| `rugilabaProfitEstimate` | 1467272501.63 | 1467272501.63 | 0 | **PASS** |

### Scope: Cabang Terbesar

| Check | Dashboard | Existing | Diff | Status |
|---|---:|---:|---:|---|
| `activitySales` | 0 | 0 | 0 | **PASS** |
| `activityPurchase` | 0 | 0 | 0 | **PASS** |
| `activityExpense` | 0 | 0 | 0 | **PASS** |
| `neracaDebet` | 226646259878.92 | 226646259878.92 | 0 | **PASS** |
| `neracaKredit` | 226646259878.92 | 226646259878.92 | 0 | **PASS** |
| `rugilabaProfitEstimate` | 3291575014.27 | 3291575014.27 | 0 | **PASS** |

## Catatan

- Neraca: sumber `_rek_master_cache` periode `forever` (jalur existing `ComRekening::fetchAllBalances_raw`).
- RugiLaba: sumber ledger + mapping flag akun `acc_coa` (income/expense).
- Activity: sumber `transaksi` aktif sesuai mapping domain `heTransaksi_ui`.
- Tabel materialized `neraca`/`rugilaba` pada DB ini terdeteksi tidak realtime (max neraca: `2019-12-02`, max rugilaba: `2019-12-02`).

