From a94f31db04bf749ab2781ba66867db552344a239 Mon Sep 17 00:00:00 2001 From: hamid zarghami Date: Mon, 24 Feb 2025 16:09:39 +0330 Subject: [PATCH] invoice --- src/langs/fa.json | 1 + src/pages/annoncement/Create.tsx | 3 +- src/pages/receipts/Create.tsx | 57 +++++++++++++++++++++++--------- 3 files changed, 44 insertions(+), 17 deletions(-) diff --git a/src/langs/fa.json b/src/langs/fa.json index c7f2f4a..9fc176c 100644 --- a/src/langs/fa.json +++ b/src/langs/fa.json @@ -280,6 +280,7 @@ "price": "مبلغ تخفیف", "title": "عنوان کد", "code": "کد تخفیف", + "CODE": "کد تخفیف", "enter_discount_description": "عنوان کد تخفیف را وارد کنید", "add_new_discount": "افزودن تخفیف", "auto_generate_code": "ساخت کد", diff --git a/src/pages/annoncement/Create.tsx b/src/pages/annoncement/Create.tsx index 6d1bdce..9cb0a2b 100644 --- a/src/pages/annoncement/Create.tsx +++ b/src/pages/annoncement/Create.tsx @@ -15,6 +15,7 @@ import { ServiceItemType } from '../service/types/ServiceTypes' import { useCreateAnnoncement } from './hooks/useAnnoncementData' import { ErrorType } from '../../helpers/types' import { toast } from 'react-toastify' +import moment from 'moment-jalaali' const Create: FC = () => { @@ -119,7 +120,7 @@ const Create: FC = () => {
formik.setFieldValue('publishAt', d)} + onChange={(d) => formik.setFieldValue('publishAt', moment(d, 'jYYYY-jMM-jDD').format('YYYY-MM-DD'))} placeholder={t('select')} /> diff --git a/src/pages/receipts/Create.tsx b/src/pages/receipts/Create.tsx index db0ee4d..e420f3c 100644 --- a/src/pages/receipts/Create.tsx +++ b/src/pages/receipts/Create.tsx @@ -269,12 +269,25 @@ const CreateReceipt: FC = () => { { items.map((item, index: number) => { return ( -
- +
-
- {t('receip.product_name')} + { + index === 0 && +
+ {t('receip.number')} +
+ } +
+ {index + 1}
+
+
+ { + index === 0 && +
+ {t('receip.product_name')} +
+ } {
-
- {t('receip.count')} -
+ { + index === 0 && +
+ {t('receip.count')} +
+ } {
-
- {t('receip.unit_amount')} -
+ { + index === 0 && +
+ {t('receip.unit_amount')} +
+ } {
-
- {t('receip.discount')} -
+ { + index === 0 && +
+ {t('receip.discount')} +
+ } {
-
- {t('receip.total_amount')} -
+ { + index === 0 && +
+ {t('receip.total_amount')} +
+ }