From 4b1304917b0b16b09dd50191fab59d96933c0cf3 Mon Sep 17 00:00:00 2001
From: 曹睿 <360930172@qq.com>
Date: 星期二, 17 六月 2025 17:31:11 +0800
Subject: [PATCH] feat: 6月15日任务完90%

---
 src/utils/summarizeTable.js |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/src/utils/summarizeTable.js b/src/utils/summarizeTable.js
index 3b3a178..e24d99f 100644
--- a/src/utils/summarizeTable.js
+++ b/src/utils/summarizeTable.js
@@ -34,6 +34,15 @@
         }
     });
     return sums;
-};
+}
+// 涓嶅惈绋庢�讳环璁$畻
+const calculateTaxExclusiveTotalPrice = (taxInclusiveTotalPrice, taxRate) => {
+    const taxRateDecimal = taxRate / 100;
+    return (taxInclusiveTotalPrice / (1 + taxRateDecimal)).toFixed(2);
+}
+// 鍚◣鎬讳环璁$畻
+const calculateTaxIncludeTotalPrice = (taxInclusiveUnitPrice, quantity) => {
+    return (taxInclusiveUnitPrice * quantity).toFixed(2);
+}
 // 瀵煎嚭鍑芥暟渚涘叾浠栨枃浠朵娇鐢�
-export { summarizeTable };
\ No newline at end of file
+export { summarizeTable, calculateTaxExclusiveTotalPrice ,calculateTaxIncludeTotalPrice};

--
Gitblit v1.9.3