@things-factory/tax-invoice 8.0.75 → 8.0.78
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/client/pages/tax-invoice-send/tax-invoice-send-page.ts +20 -11
- package/dist-client/pages/tax-invoice-send/tax-invoice-send-page.d.ts +1 -0
- package/dist-client/pages/tax-invoice-send/tax-invoice-send-page.js +17 -10
- package/dist-client/pages/tax-invoice-send/tax-invoice-send-page.js.map +1 -1
- package/dist-client/route.d.ts +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/service/tax-invoice/tax-invoice-query.js +9 -4
- package/dist-server/service/tax-invoice/tax-invoice-query.js.map +1 -1
- package/dist-server/service/unipost-api/tax-invoice-inquiry.js +2 -0
- package/dist-server/service/unipost-api/tax-invoice-inquiry.js.map +1 -1
- package/dist-server/service/unipost-api/tax-invoice-send.js +1 -0
- package/dist-server/service/unipost-api/tax-invoice-send.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/server/service/tax-invoice/tax-invoice-query.ts +9 -5
- package/server/service/unipost-api/tax-invoice-inquiry.ts +16 -2
- package/server/service/unipost-api/tax-invoice-send.ts +14 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/tax-invoice",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.78",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "dist-client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -34,5 +34,5 @@
|
|
|
34
34
|
"@things-factory/export-ui-excel": "^8.0.64",
|
|
35
35
|
"@things-factory/shell": "^8.0.64"
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "28d6bf42a06e7b00b158199fbafe81c6ca54981f"
|
|
38
38
|
}
|
|
@@ -99,10 +99,14 @@ export class TaxInvoiceQuery {
|
|
|
99
99
|
|
|
100
100
|
@FieldResolver(type => Boolean)
|
|
101
101
|
async isMatched(@Root() taxInvoice: TaxInvoice): Promise<boolean> {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
102
|
+
try {
|
|
103
|
+
const binding = await getRepository('tax_invoice_binding').findOne({
|
|
104
|
+
where: { taxInvoice: { id: taxInvoice.id } }
|
|
105
|
+
})
|
|
106
|
+
|
|
107
|
+
return !!binding
|
|
108
|
+
} catch (e) {
|
|
109
|
+
return false
|
|
110
|
+
}
|
|
107
111
|
}
|
|
108
112
|
}
|
|
@@ -64,7 +64,14 @@ export async function getTaxInvoiceByUniposApi(businessRegistrationNumber: strin
|
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
async function _callTaxInvoiceInquiry(
|
|
67
|
+
async function _callTaxInvoiceInquiry(
|
|
68
|
+
businessRegistrationNumber: string,
|
|
69
|
+
aid: string,
|
|
70
|
+
bearer: string,
|
|
71
|
+
taxType: UnipostTaxType
|
|
72
|
+
) {
|
|
73
|
+
businessRegistrationNumber = businessRegistrationNumber.replace(/-/g, '')
|
|
74
|
+
|
|
68
75
|
const response = await fetch(INQUIRY_URL, {
|
|
69
76
|
method: 'POST',
|
|
70
77
|
headers: {
|
|
@@ -83,7 +90,14 @@ async function _callTaxInvoiceInquiry(businessRegistrationNumber: string, aid: s
|
|
|
83
90
|
|
|
84
91
|
return response
|
|
85
92
|
}
|
|
86
|
-
export async function callTaxInvoiceConfirm(
|
|
93
|
+
export async function callTaxInvoiceConfirm(
|
|
94
|
+
businessRegistrationNumber: string,
|
|
95
|
+
aid: string,
|
|
96
|
+
bearer: string,
|
|
97
|
+
confirmData: ConfirmData[]
|
|
98
|
+
) {
|
|
99
|
+
businessRegistrationNumber = businessRegistrationNumber.replace(/-/g, '')
|
|
100
|
+
|
|
87
101
|
const response = await fetch(CONFIRM_URL, {
|
|
88
102
|
method: 'POST',
|
|
89
103
|
headers: {
|
|
@@ -4,7 +4,12 @@ const UNITAX_CONFIG = config.get('unitax', {})
|
|
|
4
4
|
// 세금계산서 발행 API
|
|
5
5
|
const SEND_URL = UNITAX_CONFIG.SEND_URL || ''
|
|
6
6
|
|
|
7
|
-
export async function sendTaxInvoiceByUniposApi(
|
|
7
|
+
export async function sendTaxInvoiceByUniposApi(
|
|
8
|
+
businessRegistrationNumber: string,
|
|
9
|
+
aid: string,
|
|
10
|
+
bearer: string,
|
|
11
|
+
taxInvoiceSendList
|
|
12
|
+
) {
|
|
8
13
|
if (!businessRegistrationNumber || !aid || !bearer || !taxInvoiceSendList) {
|
|
9
14
|
throw new Error('no parameter in unipos api')
|
|
10
15
|
}
|
|
@@ -14,7 +19,14 @@ export async function sendTaxInvoiceByUniposApi(businessRegistrationNumber: stri
|
|
|
14
19
|
return response?.status === 200 ? await response.json() : false
|
|
15
20
|
}
|
|
16
21
|
|
|
17
|
-
async function _callTaxInvoiceSend(
|
|
22
|
+
async function _callTaxInvoiceSend(
|
|
23
|
+
businessRegistrationNumber: string,
|
|
24
|
+
aid: string,
|
|
25
|
+
bearer: string,
|
|
26
|
+
taxInvoiceSendList
|
|
27
|
+
) {
|
|
28
|
+
businessRegistrationNumber = businessRegistrationNumber.replace(/-/g, '')
|
|
29
|
+
|
|
18
30
|
try {
|
|
19
31
|
return await fetch(SEND_URL, {
|
|
20
32
|
method: 'POST',
|