# Pricing Operations Dashboard

The Pricing Dashboard is an internal, platform-controlled surface for configuring TZS selling-price books and testing deterministic quotes. Only authenticated users with the existing `platform_admin` role may view or mutate pricing. Tenant workspace roles have no access.

## Operating model

- Price books use the existing platform, tenant, and application scopes. Application ownership is validated against its tenant.
- Resolution precedence is Application → Tenant → Platform. Within the winning scope, the longest exact canonical E.164 prefix wins.
- Amounts are positive integer TZS minor units per SMS segment; floating-point values are never accepted.
- Effective From is inclusive and Effective Until is exclusive. UTC is used throughout.
- Current and historical rates are immutable. A changed price is a new scheduled rate. Only a future rate may be deactivated.
- Existing transactional overlap checks and `DatabaseAuditLogger` events are shared by Artisan and the dashboard.
- The quote simulator normalizes recipients through `SmsAddress::internationalRecipient()`, does not persist the quote, does not submit a message, and does not debit a wallet.
- Provider cost, margin reporting, commercial enforcement, billing, and SMS charging are outside this milestone.

## Manual verification

1. Log in as an authorized platform operator.
2. Open **Pricing** in the platform workspace.
3. Create a platform TZS price book.
4. Add a `255` prefix rate.
5. Add a longer `2557` rate in a non-overlapping effective window.
6. Create a tenant override.
7. Create an application override owned by that tenant.
8. Quote a Tanzanian recipient such as `+255754123456`.
9. Confirm Application → Tenant → Platform precedence.
10. Confirm the longest prefix wins within the winning scope.
11. Schedule a future price change.
12. Confirm historical, current, future, and inactive rows display correctly in UTC.
13. Attempt an overlapping rate and confirm it is rejected without a new row.
14. Confirm an ordinary tenant user receives HTTP 403 for Pricing and its mutations.
15. Confirm wallet balance and ledger rows are unchanged.
16. Submit a test SMS and confirm pricing still has no effect on acceptance or dispatch.
17. Repeat through approved public and LAN subdirectory base paths and confirm navigation, forms, details, and redirects retain the base path.
