diff --git a/src/components/MoneyInput.vue b/src/components/MoneyInput.vue
index 03c2b8b..c7dbcf7 100644
--- a/src/components/MoneyInput.vue
+++ b/src/components/MoneyInput.vue
@@ -1,7 +1,16 @@
diff --git a/src/pages/PluginTenantPage.vue b/src/pages/PluginTenantPage.vue
index a913232..29853a4 100644
--- a/src/pages/PluginTenantPage.vue
+++ b/src/pages/PluginTenantPage.vue
@@ -351,8 +351,8 @@ onMounted(loadDetail)
دوره رایگان فعال است — مبلغ صفر میشود. مدت ۱ / ۳ / ۶ / ۱۲ ماه میتواند رایگان باشد. @@ -448,8 +448,8 @@ onMounted(loadDetail)
دوره رایگان — مبلغ صفر. مدت ۱ / ۳ / ۶ / ۱۲ ماه میتواند رایگان باشد.
@@ -523,8 +523,8 @@ onMounted(loadDetail)
دوره رایگان — مبلغ صفر. مدت ۱ / ۳ / ۶ / ۱۲ ماه میتواند رایگان باشد.
diff --git a/src/utils/money.ts b/src/utils/money.ts
index 006cdb3..f62b6da 100644
--- a/src/utils/money.ts
+++ b/src/utils/money.ts
@@ -1,4 +1,21 @@
-/** Display/parse helpers for rial money inputs with thousand separators. */
+/**
+ * SuperAdmin money helpers.
+ *
+ * Storage / product remote APIs use integer **rials**.
+ * SuperAdmin UI displays and accepts **tomans** (rial ÷ 10).
+ */
+
+/** Convert stored rial amount to toman for display/input. */
+export function rialToToman(value: number | null | undefined) {
+ if (value == null || Number.isNaN(Number(value))) return 0
+ return Math.trunc(Number(value) / 10)
+}
+
+/** Convert UI toman amount to stored rial. */
+export function tomanToRial(value: number | null | undefined) {
+ if (value == null || Number.isNaN(Number(value))) return 0
+ return Math.trunc(Number(value)) * 10
+}
export function toGroupedDisplay(value: number | null | undefined) {
if (value == null || Number.isNaN(Number(value))) return ''
@@ -23,7 +40,8 @@ export function formatNumber(value: number | null | undefined) {
return new Intl.NumberFormat('fa-IR').format(value)
}
+/** Format a **rial** storage value as toman for SuperAdmin UI. */
export function formatMoney(value: number | null | undefined) {
if (value == null) return '—'
- return `${formatNumber(value)} ریال`
+ return `${formatNumber(rialToToman(value))} تومان`
}