diff options
| author | Miqdad <ahmadmiqdad27@gmail.com> | 2025-10-26 00:48:47 +0700 |
|---|---|---|
| committer | Miqdad <ahmadmiqdad27@gmail.com> | 2025-10-26 00:48:47 +0700 |
| commit | 6efad9b51621e74b0322c128db2ee68f9ee28a61 (patch) | |
| tree | 65188fb941d269943e86552e9a48bac1cc6806ee | |
| parent | 1bbdc0ad8b5c23b53a64b9880e0acb7e127bf2c4 (diff) | |
<Miqdad> remove floor disc amount
| -rw-r--r-- | src-migrate/modules/product-detail/components/ProductDetail.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src-migrate/modules/product-detail/components/ProductDetail.tsx b/src-migrate/modules/product-detail/components/ProductDetail.tsx index abd7188a..693d0a93 100644 --- a/src-migrate/modules/product-detail/components/ProductDetail.tsx +++ b/src-migrate/modules/product-detail/components/ProductDetail.tsx @@ -167,9 +167,9 @@ const ProductDetail = ({ product }: Props) => { let cut = 0; if (type.toLowerCase().startsWith('percent')) { - cut = Math.floor(basePrice * (percent / 100)); + cut = basePrice * (percent / 100); } else { - cut = Math.floor(amount || 0); + cut = amount || 0; } if (max > 0) cut = Math.min(cut, max); |
