chenrui
5 天以前 b497a0b35c09e6b53324c14b7697c1e9e0ed36a9
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};