# Rule: Contacts, Customers & Suppliers

- A **Contact** is the master person/firm. It is NOT the same as an account.
- A single contact can act as **both a Customer (Client) AND a Supplier at the same time**, and can have accounts in **multiple currencies**. So one real entity (e.g. "Dry Company SAL") may have 4+ accounts: Client-LBP, Client-USD, Supplier-LBP, Supplier-USD.
- `thirdparty_type` on the account = **'Client'** (customer) or **'Supplier'**. (UNO stores customers as "Client".)

## Consolidating an entity's balance — IMPORTANT
- In this database, a contact's accounts are **NOT reliably linked by a shared `ContactID`** — each account often has its own Contact record, with the currency baked into the firm name ("… - LBP" / "… - USD"). So **do not consolidate by ContactID.**
- **Consolidate by NAME + `thirdparty_type`** instead. Use the **`third_party_balance`** tool — it finds all Client+Supplier accounts for a name, in all currencies, and returns each balance plus the net position.
- The `442xxx` accounts (VAT Full Refund / Normal / Partial / Goods / Service) carry a third party's NAME but have a blank `thirdparty_type` — they are **VAT tracking accounts, not the entity's balance.** Exclude them (the `thirdparty_type` filter does this automatically).

## Balance meaning
- A **Client** account is a **receivable** (debit balance = they owe you).
- A **Supplier** account is a **payable** (credit balance = you owe them).
- Never add LBP and USD balances together; report each currency leg separately.
