# Sivakasi Crackers V30 – Retail Price + Percentage/Amount Discount

## Pricing model

The Admin Product form now uses **Retail / Selling Price** as the final customer price and calculates the original/reference **MRP** from the selected discount.

### Percentage (%)
Example:
- Retail / Selling Price = ₹9
- Discount Type = Percentage
- Discount Value = 90
- Original / MRP = `9 / (1 - 90/100)` = ₹90
- Discount Amount = ₹81
- Final Selling Price = ₹9

### Fixed Amount (₹)
Example:
- Retail / Selling Price = ₹9
- Discount Type = Amount
- Discount Value = ₹20
- Original / MRP = `9 + 20` = ₹29
- Discount Amount = ₹20
- Final Selling Price = ₹9

## Database
Migration:
`database/migrations/2026_09_01_000001_add_discount_type_and_value_to_products_table.php`

Adds:
- `discount_type`: `percentage` or `amount`
- `discount_value`: percentage value or fixed rupee discount

Existing products are preserved as percentage-type products using their existing `discount_percentage` value.

## Frontend
Product cards, Shop rows, product details and admin product listing now show the correct discount label:
- `90% OFF`
- `₹20.00 OFF`

The final customer price remains `selling_price`, so cart and checkout continue to use the same final price.

## Bulk Excel
New columns are supported:
- `discount_type`
- `discount_value`

Older Excel files containing `mrp` + `selling_price` remain supported.

## Validation
Percentage discount must be below 100% because a finite original MRP cannot be calculated at exactly 100%.
