invoice create

This commit is contained in:
hamid zarghami
2025-05-04 09:57:14 +03:30
parent ef43ea82bc
commit 406043be1e
2 changed files with 47 additions and 9 deletions
+38
View File
@@ -14,7 +14,27 @@ export type CustomerItemType = {
// Add other properties of role if needed
};
legalUser: {
id: string;
economicCode: string;
nationalIdentity: string;
registrationCode: string;
registrationName: string;
phone: string;
address: {
id: string;
createdAt: string;
updatedAt: string;
fullAddress: string;
postalCode: string;
city: {
id: number;
name: string;
province: {
id: number;
name: string;
};
};
};
};
subscriptions: unknown[];
tickets: unknown[];
@@ -23,6 +43,24 @@ export type CustomerItemType = {
subscriptionsCount: string;
ticketsCount: string;
invoicesCount: string;
realUser: {
phone: string;
address: {
id: string;
createdAt: string;
updatedAt: string;
fullAddress: string;
postalCode: string;
city: {
id: number;
name: string;
province: {
id: number;
name: string;
};
};
};
};
};
export type CreateCustomerType = {
+9 -9
View File
@@ -140,7 +140,7 @@ const CreateReceipt: FC = () => {
<div className='flex justify-between items-center border-b border-border border-dashed pb-7'>
<div className='flex items-center gap-2'>
<div className='text-description'>{t('receip.type_person')}</div>
<div>حقوقی</div>
<div>{customer.legalUser ? 'حقوقی' : 'حقیقی'}</div>
</div>
<div className='flex items-center gap-2'>
<div className='text-description'>{t('receip.representativeـname')}</div>
@@ -148,39 +148,39 @@ const CreateReceipt: FC = () => {
</div>
<div className='flex items-center gap-2'>
<div className='text-description'>{t('receip.company_name')}</div>
<div>راوک</div>
<div>{customer?.legalUser?.registrationName}</div>
</div>
<div className='flex items-center gap-2'>
<div className='text-description'>{t('receip.registration_number')}</div>
<div>۱۲۳۴</div>
<div>{customer?.legalUser?.registrationCode}</div>
</div>
</div>
<div className='flex justify-between items-center mt-7'>
<div className='flex items-center gap-2 flex-1'>
<div className='text-description'>{t('receip.tel_company')}</div>
<div>۰۸۶۹۱۰۰۹۱۰۰۱</div>
<div>{customer?.realUser?.phone || customer?.legalUser?.phone}</div>
</div>
<div className='flex items-center gap-2 flex-1'>
<div className='text-description'>{t('receip.national_code')}</div>
<div>۰۰۱۲۳۴۵۶۷۸</div>
<div>{customer.nationalCode}</div>
</div>
<div className='flex items-center gap-2 flex-1'>
<div className='text-description'>{t('receip.postal_code')}</div>
<div>۰۰۱۲۳۴۵۶۷۸</div>
<div>{customer?.realUser?.address?.postalCode || customer?.legalUser?.address?.postalCode}</div>
</div>
</div>
<div className='flex justify-between items-center mt-7'>
<div className='flex items-center gap-2 flex-1'>
<div className='text-description'>{t('receip.state')}</div>
<div>مرکزی </div>
<div>{customer?.realUser?.address?.city?.province?.name || customer?.legalUser?.address?.city?.province?.name}</div>
</div>
<div className='flex items-center gap-2 flex-1'>
<div className='text-description'>{t('receip.city')}</div>
<div>اراک </div>
<div>{customer?.realUser?.address?.city?.name || customer?.legalUser?.address?.city?.name}</div>
</div>
<div className='flex items-center gap-2 flex-1'>
<div className='text-description'>{t('receip.address')}</div>
<div>اراک -خیابان شریعتی-خیابان جنت</div>
<div>{customer?.realUser?.address?.fullAddress || customer?.legalUser?.address?.fullAddress}</div>
</div>
</div>
</div>