---
name: pph23-26-calculator
description: Calculate Indonesian withholding tax on domestic services/rent (PPh 23) and foreign offshore payments (PPh 26 / Tax Treaty DGT Form).
argument-hint: "<gross_amount> <transaction_type> <has_npwp> [has_dgt_form]"
risk_level: HIGH
rule_type: statutory
---

# PPh 23 & PPh 26 Tax Calculator (Hybrid Engine)

Calculates local service withholdings (PPh 23) and foreign offshore cross-border payments (PPh 26).

## Statutory Provenance
* **Statute**: UU No. 36/2008 & UU No. 7/2021 (HPP).

## Hybrid Execution Model
Pass input parameters to `engines/pph23-26-calculator.js`:
* **PPh 23 Domestic**: 2% rate on services, maintenance, and equipment rental. Applies **100% penalty (4% rate)** if `hasNpwp` is `false`. 15% rate on dividends, royalties, and interest.
* **PPh 26 Foreign**: Default statutory rate is **20%**. If a valid **DGT Form (Formulir DGT / SKD)** is provided under a Tax Treaty (P3B), apply the lower treaty rate.

## Trust Envelope (Confidence Contract)
Every engine output must be wrapped in a structured envelope declaring production trust attributes:
* **`regulatory_framework`**: Applying regulation with article references (e.g. `PP No. 58/2023 jo. PMK 168/2023 - TER`).
* **`ruleset_version`**: Versioned Id of the `engines/rules/*.json` ruleset consulted (e.g. `PPH21-2024 v1.0.0`).
* **`effective_window`**: `[effective_from] – [effective_to]` of the applied ruleset.
* **`integrity_status`**: `VERIFIED` after SHA-256 ruleset check, or `UNVERIFIED` — never present silent calculations when UNVERIFIED.
* **`risk_level`**: Contextual `LOW / MEDIUM / HIGH` per skill risk metadata.
* **`requires_human_review`**: `true` for HIGH risk outputs — mandatory professional sign-off before filing, payment, or execution.
* **`currency`**: IDR, rounded to the nearest whole Rupiah unless another precision is stated.
* **`as_of`**: The simulation/effective date used to select the ruleset.
