From 22138e7d2baecded261c38904d028962558951a4 Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Tue, 13 Aug 2024 15:10:01 +0700
Subject: <iman> update bug grand total

---
 src/lib/transaction/components/Transaction.jsx | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'src/lib/transaction/components/Transaction.jsx')

diff --git a/src/lib/transaction/components/Transaction.jsx b/src/lib/transaction/components/Transaction.jsx
index 85f6163b..4d401037 100644
--- a/src/lib/transaction/components/Transaction.jsx
+++ b/src/lib/transaction/components/Transaction.jsx
@@ -853,8 +853,8 @@ const Transaction = ({ id }) => {
                 </div>
               )}
 
-              {transaction?.data?.products?.map((product) => (
-                <div className='flex justify-end mt-4' key={product.id}>
+              {transaction?.data?.products?.length > 0 && (
+                <div className='flex justify-end mt-4'>
                   <div className='w-1/4 grid grid-cols-2 gap-y-3 text-gray_r-12/80'>
                     <div className='text-right'>Subtotal</div>
                     <div className='text-right font-medium'>
@@ -879,7 +879,7 @@ const Transaction = ({ id }) => {
                     </div>
                   </div>
                 </div>
-              ))}
+              )} 
 
               {transaction?.data?.productsRejectLine.length > 0 && (
                 <div className='text-h-sm font-semibold mt-10 mb-4'>
-- 
cgit v1.2.3

