summaryrefslogtreecommitdiff
path: root/src/core/utils
diff options
context:
space:
mode:
authorit-fixcomart <it@fixcomart.co.id>2025-01-15 16:29:48 +0700
committerit-fixcomart <it@fixcomart.co.id>2025-01-15 16:29:48 +0700
commit98236a47c3558c4b701009a275c7ae917ee8bf67 (patch)
tree21e0300680a724c8a24ed815ea4e9a32ab13a895 /src/core/utils
parent1fa1a7873aa67cdd9ca211c239276a148cd4cdda (diff)
parent7a14ed5ccdde86d0400d6aa02ac866317d4add63 (diff)
Merge branch 'new-release' into Feature/switch-account
# Conflicts: # src/lib/auth/components/CompanyProfile.jsx # src/lib/auth/components/Menu.jsx
Diffstat (limited to 'src/core/utils')
-rw-r--r--src/core/utils/googleTag.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/utils/googleTag.js b/src/core/utils/googleTag.js
index 96a6bd2e..f1550071 100644
--- a/src/core/utils/googleTag.js
+++ b/src/core/utils/googleTag.js
@@ -1,3 +1,5 @@
+const PPN = process.env.NEXT_PUBLIC_PPN
+
const mapVariants = (variants) => {
return variants.map((variant) => {
const res = {
@@ -22,7 +24,7 @@ const sumTotal = (variants) => {
0
)
let subtotal = totalPurchase - totalDiscount
- let tax = Math.round(subtotal * 0.11)
+ let tax = Math.round(subtotal * (PPN - 1))
let grandTotal = subtotal + tax
return {
totalPurchase: totalPurchase,