@things-factory/tax-invoice 8.0.41 → 8.0.55
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/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/service/index.d.ts +2 -2
- package/dist-server/service/tax-invoice/index.d.ts +1 -1
- package/dist-server/service/tax-invoice/tax-invoice-mutation.js +1 -1
- package/dist-server/service/tax-invoice/tax-invoice-mutation.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -5
- package/server/service/tax-invoice/tax-invoice-mutation.ts +15 -4
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.55",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "dist-client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -29,10 +29,10 @@
|
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@operato/graphql": "^8.0.0",
|
|
31
31
|
"@operato/shell": "^8.0.0",
|
|
32
|
-
"@things-factory/auth-base": "^8.0.
|
|
32
|
+
"@things-factory/auth-base": "^8.0.55",
|
|
33
33
|
"@things-factory/env": "^8.0.37",
|
|
34
|
-
"@things-factory/export-ui-excel": "^8.0.
|
|
35
|
-
"@things-factory/shell": "^8.0.
|
|
34
|
+
"@things-factory/export-ui-excel": "^8.0.55",
|
|
35
|
+
"@things-factory/shell": "^8.0.55"
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "172e2730c2e249faa839070c1b21d81bb4b6c946"
|
|
38
38
|
}
|
|
@@ -7,7 +7,12 @@ import { NewTaxInvoiceItem } from '../tax-invoice-item/tax-invoice-item-type'
|
|
|
7
7
|
import { TaxInvoiceItem } from '../tax-invoice-item/tax-invoice-item'
|
|
8
8
|
import { TaxInvoiceApi } from '../tax-invoice-api/tax-invoice-api'
|
|
9
9
|
import { AttributeSet } from '@things-factory/shell/dist-server/service/attribute-set/attribute-set'
|
|
10
|
-
import {
|
|
10
|
+
import {
|
|
11
|
+
ConfirmData,
|
|
12
|
+
UnipostTaxType,
|
|
13
|
+
callTaxInvoiceConfirm,
|
|
14
|
+
getTaxInvoiceByUniposApi
|
|
15
|
+
} from '../unipost-api/tax-invoice-inquiry'
|
|
11
16
|
import { parseTaxInvoiceByUnipostFormat } from './tax-invoice-util'
|
|
12
17
|
|
|
13
18
|
@Resolver(TaxInvoice)
|
|
@@ -39,7 +44,10 @@ export class TaxInvoiceMutation {
|
|
|
39
44
|
// 그리드에서 메모 수정용 으로만
|
|
40
45
|
@Directive('@transaction')
|
|
41
46
|
@Mutation(returns => [TaxInvoice], { description: "To modify multiple TaxInvoices' information" })
|
|
42
|
-
async updateMultipleTaxInvoice(
|
|
47
|
+
async updateMultipleTaxInvoice(
|
|
48
|
+
@Arg('patches', type => [TaxInvoicePatch]) patches: TaxInvoicePatch[],
|
|
49
|
+
@Ctx() context: ResolverContext
|
|
50
|
+
): Promise<TaxInvoice[]> {
|
|
43
51
|
const { domain, user, tx } = context.state
|
|
44
52
|
|
|
45
53
|
let results = []
|
|
@@ -76,7 +84,10 @@ export class TaxInvoiceMutation {
|
|
|
76
84
|
|
|
77
85
|
@Directive('@transaction')
|
|
78
86
|
@Mutation(returns => Boolean, { description: 'To delete multiple TaxInvoices' })
|
|
79
|
-
async deleteTaxInvoices(
|
|
87
|
+
async deleteTaxInvoices(
|
|
88
|
+
@Arg('ids', type => [String]) ids: string[],
|
|
89
|
+
@Ctx() context: ResolverContext
|
|
90
|
+
): Promise<boolean> {
|
|
80
91
|
const { domain, tx } = context.state
|
|
81
92
|
|
|
82
93
|
await tx.getRepository(TaxInvoice).delete({
|
|
@@ -95,7 +106,7 @@ export class TaxInvoiceMutation {
|
|
|
95
106
|
const taxInvoiceRepo = tx.getRepository(TaxInvoice)
|
|
96
107
|
const insertedData: ConfirmData[] = [] // API 호출 후 결과 회신용
|
|
97
108
|
|
|
98
|
-
const apiInfo = (await taxInvoiceApiRepo.find())
|
|
109
|
+
const apiInfo = (await taxInvoiceApiRepo.find())[0]
|
|
99
110
|
const businessRegistrationNumber = apiInfo.businessRegistrationNumber
|
|
100
111
|
const { aid = '', bearer = '' } = apiInfo?.attributes
|
|
101
112
|
|