# Promotion & Exchange Test Matrix

## Matrix Columns

| test_id | condition_type | condition_value | action_type | action_value | scope | scope_value | date_state | stacking | multi_repeat | vat_mode | vat_source | limit_type | limit_value | exchange_scenario | expected_result |
|---------|----------------|-----------------|-------------|--------------|-------|-------------|------------|----------|-------------|----------|------------|------------|-------------|-------------------|-----------------|
| T001 | invoice_total | min:1000 | percentage_discount | 10% | none | - | valid | allowed | false | prices_exclude_vat | invoice_rate | none | - | none | 10% discount applied, VAT calculated on net |
| T002 | invoice_total | min:1000 max:5000 | buy_x_get_y | buy:2 get:1 | branch | [1,2] | valid | allowed | true | prices_exclude_vat | branch_rate | max_per_order | 2 | return_paid | Buy 2 Get 1, max 2 groups, branch restricted |
| T003 | category | category:5 qty:2 | fixed_discount | 100 EGP | customer | group:5 | valid | not_allowed | false | prices_include_vat | invoice_rate | max_per_customer | 3 | toggle | Fixed discount, category condition, customer scope |
| T004 | product | products:[1,2,3] qty:3 | free_gift | product_id:10 | date_range | 2024-01-01 to 2024-12-31 | expired | allowed | false | prices_exclude_vat | branch_rate | max_global | 50 | multi_group | Free gift, product condition, expired date |
| T005 | combined | invoice_total:1000 + category:5 qty:2 | buy_x_get_y | buy:2 get:1 | global | - | valid | allowed | true | prices_include_vat | historical | max_per_order | 1 | stacking | Combined conditions, stacking allowed, historical VAT |

