# Taxes & Discounts Configuration

## Why Configurable?

The original system had hardcoded values: 16% GST tax and 15% early payment
discount. EIMS lets each tenant configure their own tax and discount rules.

---

## Tax Configurations

### Fields

| Field | Description |
|---|---|
| `name` | Label shown on bill (e.g. "GST") |
| `rate` | Numeric rate |
| `type` | `percentage` or `fixed` |
| `applies_to` | What it applies to (e.g. `package_fee`) |
| `compound_on` | JSON array of other tax names to compound on top of |
| `is_default` | Auto-applied to new bills if `true` |
| `status` | `active` / `inactive` |

### Managing Taxes

1. Go to **Configuration → Taxes**
2. Click **Add Tax**
3. Enter name, rate, type
4. Set as default to auto-apply to all new bills

### Default (Demo)
- **GST** — 16% percentage on `package_fee`, set as default

---

## Discount Configurations

### Fields

| Field | Description |
|---|---|
| `name` | Label (e.g. "Early Payment Discount") |
| `value` | Discount amount/rate |
| `type` | `percentage` or `fixed` |
| `condition` | `always`, `before_due_date`, `manual` |
| `applies_to` | What it reduces (e.g. `package_fee`) |
| `is_default` | Auto-applied when condition is met |
| `status` | `active` / `inactive` |

### Conditions

| Condition | When applied |
|---|---|
| `always` | Applied to every bill automatically |
| `before_due_date` | Applied only if payment is recorded before the due date |
| `manual` | Only applied when billing staff explicitly selects it |

### Managing Discounts

1. Go to **Configuration → Discounts**
2. Click **Add Discount**
3. Set value, type, and condition

### Default (Demo)
- **Early Payment Discount** — 15% percentage on `package_fee`, condition: `always`
