sehoo 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.ts +3 -1
- package/package.json +1 -1
package/index.ts
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
import * as fs from "fs/promises";
|
2
|
+
import path = require("path");
|
2
3
|
|
3
4
|
const 절사 = (num: number) => {
|
4
5
|
return Math.floor(num / 10) * 10;
|
@@ -52,7 +53,8 @@ const sehoo = async (option: Option) => {
|
|
52
53
|
const 장기요양보험 = 절사(과세대상 * 장기요양보험_공제율);
|
53
54
|
const 건강보험 = 절사(과세대상 * 건강보험_공제율);
|
54
55
|
const 고용보험 = 절사(과세대상 * 고용보험_공제율);
|
55
|
-
const
|
56
|
+
const taxFilePath = path.join(__dirname, "tax.csv");
|
57
|
+
const 간이세액_기준 = await fs.readFile(taxFilePath, "utf-8")
|
56
58
|
.then((data) => data.split("\n").map((line) => line.split("\t")))
|
57
59
|
let 소득세 = 절사(Number(간이세액_기준.find(line => Number(line[0]) > 과세대상 / 1000)?.[공제대상가족_수]));
|
58
60
|
if (!소득세) {
|