+
+ {{ row.label }}
+ {{ formatCurrency(row.price) }}
+
مبلغ فاکتور
diff --git a/src/utils/orderInvoice.ts b/src/utils/orderInvoice.ts
index 4c5c20e..af9b094 100644
--- a/src/utils/orderInvoice.ts
+++ b/src/utils/orderInvoice.ts
@@ -8,6 +8,39 @@ export function orderItemMeterage(
return item.confirmedMeterage ?? item.requestedMeterage
}
+/** قیمت پرداختی هر متر، بعد از کسر تخفیف قلم. */
+export function orderItemUnitPrice(
+ item: Pick,
+): number | null {
+ if (item.unitPrice == null) return null
+ const price = Number(item.unitPrice)
+ if (!Number.isFinite(price) || price <= 0) return null
+ const discount = Number(item.discount ?? 0)
+ const net = price - (Number.isFinite(discount) ? discount : 0)
+ return net > 0 ? net : null
+}
+
+export function orderUnitPriceRows(
+ order: Order | null | undefined,
+): { id: string; label: string; price: number }[] {
+ if (!isInvoicePriced(order) || !order) return []
+ const priced = order.items.flatMap((item) => {
+ const price = orderItemUnitPrice(item)
+ if (price == null) return []
+ return [{ id: item.id, name: item.productName, price }]
+ })
+ if (!priced.length) return []
+ const first = priced[0]
+ if (!first || !priced.every((row) => row.price === first.price)) {
+ return priced.map((row) => ({
+ id: row.id,
+ label: `قیمت هر متر · ${row.name}`,
+ price: row.price,
+ }))
+ }
+ return [{ id: 'unit-price', label: 'قیمت هر متر', price: first.price }]
+}
+
/** سفارش وقتی قابل تسویه/چک است که مبلغ فاکتور توسط ادمین تعیین شده باشد. */
export function isInvoicePriced(order: Order | null | undefined): boolean {
return !!order && order.finalAmount != null && Number(order.finalAmount) > 0
diff --git a/src/views/auth/LoginView.vue b/src/views/auth/LoginView.vue
index 34ab1c4..0025c16 100644
--- a/src/views/auth/LoginView.vue
+++ b/src/views/auth/LoginView.vue
@@ -71,7 +71,7 @@ async function submit() {
-
+
به نادمی تکس خوش آمدید
برای ادامه، وارد حساب کاربری خود شوید
diff --git a/src/views/auth/RegisterView.vue b/src/views/auth/RegisterView.vue
index 486c125..85ae1e1 100644
--- a/src/views/auth/RegisterView.vue
+++ b/src/views/auth/RegisterView.vue
@@ -106,7 +106,7 @@ async function submit() {
-
+
ثبتنام
برای ساخت حساب کاربری، اطلاعات زیر را وارد کنید
diff --git a/src/views/cart/components/DesktopCartPage.vue b/src/views/cart/components/DesktopCartPage.vue
index 4096b66..324aa0e 100644
--- a/src/views/cart/components/DesktopCartPage.vue
+++ b/src/views/cart/components/DesktopCartPage.vue
@@ -165,17 +165,6 @@ const quickLinks = [
{{ formatMeterage(totalMeterage) }}
-
- {{ row.companyName }}
-
- {{ formatMeterage(row.meterage) }}
- / {{ formatMeterage(row.maxMeterage) }}
-
-
@@ -217,10 +206,6 @@ const quickLinks = [
محصولات موردنظر را به سبد اضافه کنید، متراژ کل را بررسی کنید و «ثبت پیشسفارش» را بزنید.
-
- سقف مجاز: {{ formatMeterage(maxMeterage) }} — باقیمانده:
- {{ formatMeterage(remainingCapacity) }}.
-
پس از قیمتگذاری، از صفحه سفارش روش تسویه را انتخاب میکنید.
@@ -510,17 +495,6 @@ const quickLinks = [
border-bottom: 1px solid var(--color-border);
}
-.cart-summary-card__row--sub {
- padding-block: 6px;
- font-size: 0.8125rem;
- color: var(--color-text-muted);
-}
-
-.cart-summary-card__cap {
- font-weight: 500;
- color: var(--color-text-muted);
-}
-
.cart-summary-card__row:last-child {
border-bottom: none;
}
diff --git a/src/views/cart/components/MobileCartPage.vue b/src/views/cart/components/MobileCartPage.vue
index 1075a68..40fa1f3 100644
--- a/src/views/cart/components/MobileCartPage.vue
+++ b/src/views/cart/components/MobileCartPage.vue
@@ -82,27 +82,6 @@ const emit = defineEmits<{
جمع متراژ کل
{{ formatMeterage(totalMeterage) }}
-