original price
This commit is contained in:
@@ -157,6 +157,7 @@ const ReceiptsDetail: FC = () => {
|
|||||||
</div>
|
</div>
|
||||||
{
|
{
|
||||||
getInvoce.data?.data?.invoice?.items?.map((item: ReceiptDetailItemType) => {
|
getInvoce.data?.data?.invoice?.items?.map((item: ReceiptDetailItemType) => {
|
||||||
|
const originalPrice = Number(item.unitPrice) * Number(item.count)
|
||||||
return (
|
return (
|
||||||
<div key={item.id} className='flex justify-between items-center text-xs border-t border-[#EAEDF5] h-14'>
|
<div key={item.id} className='flex justify-between items-center text-xs border-t border-[#EAEDF5] h-14'>
|
||||||
<div className='flex gap-0.5'>
|
<div className='flex gap-0.5'>
|
||||||
@@ -164,7 +165,12 @@ const ReceiptsDetail: FC = () => {
|
|||||||
<span>{item.count}</span>
|
<span>{item.count}</span>
|
||||||
<span>عدد</span>
|
<span>عدد</span>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div className='flex gap-1'>
|
||||||
|
{
|
||||||
|
originalPrice !== item.totalPrice && (
|
||||||
|
<><span className='line-through'>{NumberFormat(originalPrice)}</span></>
|
||||||
|
)
|
||||||
|
}
|
||||||
<span>{NumberFormat(item.totalPrice)}</span> تومان
|
<span>{NumberFormat(item.totalPrice)}</span> تومان
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user