# Rule: VAT (Lebanese)

- Standard Lebanese VAT rate is **11%** (the posting logic divides VAT-inclusive amounts by 1.11 to extract the 11% VAT portion).
- Accounts are tagged **VAT** vs **NVT (non-VAT)** by the last digit of the account number (`…1` = VAT, `…0` = NVT). A single invoice can mix VAT and non-VAT lines, which is why each sales line has both a VAT and an NVT account.
- Invoice types define a **VAT account** and a separate **Non-VAT account** used when posting to the journal.
- **TCC** is a Lebanese tax-document type (alongside "VAT" and "No VAT") selectable at invoice level.

## Article 59
"Article 59" accounts (e.g. `711400 Local Sales Article 59`) refer to **Lebanese VAT Law Article 59** — a special/exempt or zero-rated treatment. The system tracks these sales **separately on purpose** for VAT reporting. Treat Article-59 sales as a distinct category; do not merge them into standard VATable sales.

> CONFIRM with the user before relying on the exact Article-59 treatment (exempt vs zero-rated) in formal VAT reporting.

## VAT account structure (verified live)
- **Input VAT (refundable, on purchases) = `4421x`** — a DEBIT balance. Includes per-supplier sub-accounts named **"VAT Full Refund <supplier>"** (`442120-xxxxx`) and Article-59 purchase VAT (`442123-…` "VAT 59 <supplier>"). Sum of debits = total input VAT.
- **Output VAT (collected, on sales) = `4427x`** — a CREDIT balance. Sum of credits = total output VAT.
- **Net VAT = output − input.** Positive = payable to the authority; negative = refundable/credit carried forward.
- `inc_vat` on invoice lines is the **rate** (e.g. 11), NOT an amount — the VAT amounts live in the GL 442 accounts (authoritative). Use the GL, not invoice lines, for VAT totals.
- Standard taxable sales base ≈ output_vat ÷ 0.11.

## VAT tools
- **`vat_return`** — full period declaration: output, input, net, position, taxable base, Article-59 exempt sales, settlement check. The core report.
- **`vat_by_period`** — output/input/net per month or quarter (filing schedule).
- **`vat_account_detail`** — every 442 account split into input (with per-supplier refund accounts) and output.
- **`vat_summary`** — quick net-position snapshot.
All are ESTIMATES from the GL — always tell the user to confirm with the accountant before filing.

## VAT position vs VAT paid (settlement)
- **Position** = output VAT (4427, collected on sales) − input VAT (4421, paid on purchases) = net VAT payable/refundable. `vat_summary` reports this.
- **Paid?** VAT is only *accrued* by invoices (SA/PU/…). It's *settled* when a Payment/Receipt voucher (PV/RV) or settlement JV clears the 442 accounts and cash goes to the authority. `vat_summary` returns `appears_settled` + `settlement_status`: if there's little/no PV-RV cash activity on the 442 accounts and the VAT still sits accrued, **VAT was NOT paid to the state** (or it was filed/paid outside the system — confirm with the accountant).
- There is **no dedicated "VAT due to MOF/Treasury" account** in this chart; `Mof#…` in names are *customers'* tax-registration numbers, not the authority.

