chenrui
8 天以前 b77cb967a3ae670fead19a461daa127a8a4647b2
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 };
export { summarizeTable, calculateTaxExclusiveTotalPrice ,calculateTaxIncludeTotalPrice};