diff options
| author | HATEC\SPVDEV001 <tri.susilo@altama.co.id> | 2023-04-03 10:55:07 +0700 |
|---|---|---|
| committer | HATEC\SPVDEV001 <tri.susilo@altama.co.id> | 2023-04-03 10:55:07 +0700 |
| commit | de3c0915c6167264982af981399b728134ae7d1a (patch) | |
| tree | 577ed3d63c1eec2af94c331e20003878ae59d7bf | |
| parent | 44eb2dad8d343f00c6038ebe2893a0c4c5014bf7 (diff) | |
| parent | 495f8cfc8339441fb7256424a3895fb12288fb51 (diff) | |
Merge branch 'master' of https://bitbucket.org/altafixco/next-indoteknik
| -rw-r--r-- | src/lib/transaction/components/Transaction.jsx | 35 |
1 files changed, 23 insertions, 12 deletions
diff --git a/src/lib/transaction/components/Transaction.jsx b/src/lib/transaction/components/Transaction.jsx index 51c89b28..e992580a 100644 --- a/src/lib/transaction/components/Transaction.jsx +++ b/src/lib/transaction/components/Transaction.jsx @@ -103,14 +103,14 @@ const Transaction = ({ id }) => { <p className='text-gray_r-12/70'>Total Diskon</p> <p>{currencyFormat(-totalDiscountAmount)}</p> </div> + <div className='flex justify-between mt-1'> + <p className='text-gray_r-12/70'>PPN 11%</p> + <p>{currencyFormat(transaction.data?.amountTax)}</p> + </div> <div className='flex justify-between mt-1 font-medium'> <p>Total Belanja</p> <p>{currencyFormat(transaction.data?.amountTotal)}</p> </div> - <div className='flex justify-between mt-1'> - <p className='text-gray_r-12/70'>PPN 11% (Incl.)</p> - <p>{currencyFormat(totalAmount * 0.11)}</p> - </div> </div> ), [transaction.data, totalAmount, totalDiscountAmount] @@ -144,7 +144,11 @@ const Transaction = ({ id }) => { > Ya, Batalkan </button> - <button className='btn-light w-full md:w-fit' type='button' onClick={closeCancelTransaction}> + <button + className='btn-light w-full md:w-fit' + type='button' + onClick={closeCancelTransaction} + > Batal </button> </div> @@ -392,35 +396,42 @@ const Transaction = ({ id }) => { </div> </td> <td>{product.quantity}</td> - <td>{currencyFormat(product.price.price)}</td> + <td> + {product.price.discountPercentage > 0 && ( + <div className='line-through mb-1 text-caption-1 text-gray_r-12/70'> + {currencyFormat(product.price.price)} + </div> + )} + <div>{currencyFormat(product.price.priceDiscount)}</div> + </td> <td> {product.price.discountPercentage > 0 ? `${product.price.discountPercentage}%` : ''} </td> - <td>{currencyFormat(product.price.priceDiscount * product.quantity)}</td> + <td>{currencyFormat(product.price.subtotal)}</td> </tr> ))} </tbody> </table> <div className='flex justify-end mt-4'> - <div className='w-1/4 grid grid-cols-2 gap-y-2 text-gray_r-12/80'> + <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'>{currencyFormat(totalAmount)}</div> <div className='text-right'>Total Diskon</div> - <div className='text-right font-medium'> + <div className='text-right font-medium text-red_r-11'> {currencyFormat(-totalDiscountAmount)} </div> + <div className='text-right'>PPN 11%</div> + <div className='text-right font-medium'>{currencyFormat(transaction.data?.amountTax)}</div> + <div className='text-right'>Grand Total</div> <div className='text-right font-medium text-gray_r-12'> {currencyFormat(transaction.data?.amountTotal)} </div> - - <div className='text-right'>PPN 11% (Incl.)</div> - <div className='text-right font-medium'>{currencyFormat(totalAmount * 0.11)}</div> </div> </div> |
