@things-factory/tax-invoice 6.2.84 → 6.2.88

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.
Files changed (58) hide show
  1. package/client/pages/tax-invoice/tax-invoice-detail-popup.ts +34 -11
  2. package/client/pages/tax-invoice/tax-invoice-list-page.ts +150 -152
  3. package/client/pages/tax-invoice-api/tax-invoice-api-page.ts +6 -5
  4. package/client/pages/tax-invoice-company/tax-invoice-company-importer.ts +2 -2
  5. package/client/pages/tax-invoice-send/tax-invoice-send-page.ts +580 -0
  6. package/client/route.ts +4 -4
  7. package/dist-client/pages/tax-invoice/tax-invoice-detail-popup.js +39 -13
  8. package/dist-client/pages/tax-invoice/tax-invoice-detail-popup.js.map +1 -1
  9. package/dist-client/pages/tax-invoice/tax-invoice-list-page.d.ts +63 -23
  10. package/dist-client/pages/tax-invoice/tax-invoice-list-page.js +149 -143
  11. package/dist-client/pages/tax-invoice/tax-invoice-list-page.js.map +1 -1
  12. package/dist-client/pages/tax-invoice-api/tax-invoice-api-page.d.ts +1 -1
  13. package/dist-client/pages/tax-invoice-api/tax-invoice-api-page.js +6 -5
  14. package/dist-client/pages/tax-invoice-api/tax-invoice-api-page.js.map +1 -1
  15. package/dist-client/pages/tax-invoice-company/tax-invoice-company-importer.js +2 -2
  16. package/dist-client/pages/tax-invoice-company/tax-invoice-company-importer.js.map +1 -1
  17. package/dist-client/pages/tax-invoice-send/tax-invoice-send-page.d.ts +100 -0
  18. package/dist-client/pages/tax-invoice-send/tax-invoice-send-page.js +510 -0
  19. package/dist-client/pages/tax-invoice-send/tax-invoice-send-page.js.map +1 -0
  20. package/dist-client/route.d.ts +1 -1
  21. package/dist-client/route.js +3 -3
  22. package/dist-client/route.js.map +1 -1
  23. package/dist-client/tsconfig.tsbuildinfo +1 -1
  24. package/dist-server/service/tax-invoice/tax-invoice-mutation.js +137 -41
  25. package/dist-server/service/tax-invoice/tax-invoice-mutation.js.map +1 -1
  26. package/dist-server/service/tax-invoice/tax-invoice-query.js +25 -2
  27. package/dist-server/service/tax-invoice/tax-invoice-query.js.map +1 -1
  28. package/dist-server/service/tax-invoice/tax-invoice-type.js +22 -259
  29. package/dist-server/service/tax-invoice/tax-invoice-type.js.map +1 -1
  30. package/dist-server/service/tax-invoice/tax-invoice.js +22 -24
  31. package/dist-server/service/tax-invoice/tax-invoice.js.map +1 -1
  32. package/dist-server/service/tax-invoice-api/tax-invoice-api-type.js +5 -0
  33. package/dist-server/service/tax-invoice-api/tax-invoice-api-type.js.map +1 -1
  34. package/dist-server/service/tax-invoice-api/tax-invoice-api.js +0 -8
  35. package/dist-server/service/tax-invoice-api/tax-invoice-api.js.map +1 -1
  36. package/dist-server/service/tax-invoice-company/tax-invoice-company.js +0 -8
  37. package/dist-server/service/tax-invoice-company/tax-invoice-company.js.map +1 -1
  38. package/dist-server/service/tax-invoice-item/tax-invoice-item-query.js.map +1 -1
  39. package/dist-server/service/tax-invoice-item/tax-invoice-item-type.js +4 -12
  40. package/dist-server/service/tax-invoice-item/tax-invoice-item-type.js.map +1 -1
  41. package/dist-server/service/tax-invoice-item/tax-invoice-item.js +6 -15
  42. package/dist-server/service/tax-invoice-item/tax-invoice-item.js.map +1 -1
  43. package/dist-server/service/unipost-api/tax-invoice-inquiry.js +90 -0
  44. package/dist-server/service/unipost-api/tax-invoice-inquiry.js.map +1 -0
  45. package/dist-server/tsconfig.tsbuildinfo +1 -1
  46. package/package.json +5 -5
  47. package/server/service/tax-invoice/tax-invoice-mutation.ts +143 -45
  48. package/server/service/tax-invoice/tax-invoice-query.ts +22 -4
  49. package/server/service/tax-invoice/tax-invoice-type.ts +21 -199
  50. package/server/service/tax-invoice/tax-invoice.ts +38 -49
  51. package/server/service/tax-invoice-api/tax-invoice-api-type.ts +4 -0
  52. package/server/service/tax-invoice-api/tax-invoice-api.ts +0 -4
  53. package/server/service/tax-invoice-company/tax-invoice-company.ts +0 -4
  54. package/server/service/tax-invoice-item/tax-invoice-item-query.ts +1 -1
  55. package/server/service/tax-invoice-item/tax-invoice-item-type.ts +4 -13
  56. package/server/service/tax-invoice-item/tax-invoice-item.ts +6 -10
  57. package/server/service/unipost-api/tax-invoice-inquiry.ts +103 -0
  58. package/translations/ko.json +10 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/tax-invoice",
3
- "version": "6.2.84",
3
+ "version": "6.2.88",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "dist-client/index.js",
6
6
  "things-factory": true,
@@ -29,9 +29,9 @@
29
29
  "dependencies": {
30
30
  "@operato/graphql": "^1.0.0",
31
31
  "@operato/shell": "^1.0.0",
32
- "@things-factory/auth-base": "^6.2.84",
33
- "@things-factory/export-ui-excel": "^6.2.84",
34
- "@things-factory/shell": "^6.2.84"
32
+ "@things-factory/auth-base": "^6.2.88",
33
+ "@things-factory/export-ui-excel": "^6.2.88",
34
+ "@things-factory/shell": "^6.2.88"
35
35
  },
36
- "gitHead": "3c272e989acc14bbd02f4ec79624dfd7dc4e6acd"
36
+ "gitHead": "700ee6ac193bb6b6bc4f1a569c3ca046a7a049ee"
37
37
  }
@@ -1,70 +1,50 @@
1
1
  import { Resolver, Mutation, Arg, Ctx, Directive } from 'type-graphql'
2
2
  import { In } from 'typeorm'
3
3
 
4
- import { TaxInvoice } from './tax-invoice'
4
+ import { Category, TaxInvoice } from './tax-invoice'
5
5
  import { NewTaxInvoice, TaxInvoicePatch } from './tax-invoice-type'
6
+ import { NewTaxInvoiceItem } from '../tax-invoice-item/tax-invoice-item-type'
7
+ import { TaxInvoiceItem } from '../tax-invoice-item/tax-invoice-item'
8
+ import { TaxInvoiceApi } from '../tax-invoice-api/tax-invoice-api'
9
+ import { AttributeSet } from '@things-factory/shell/dist-server/service/attribute-set/attribute-set'
10
+ import { ConfirmData, UnipostTaxType, callTaxInvoiceConfirm, getTaxInvoiceByUniposApi } from '../unipost-api/tax-invoice-inquiry'
6
11
 
7
12
  @Resolver(TaxInvoice)
8
13
  export class TaxInvoiceMutation {
9
14
  @Directive('@transaction')
10
15
  @Mutation(returns => TaxInvoice, { description: 'To create new TaxInvoice' })
11
- async createTaxInvoice(@Arg('taxInvoice') taxInvoice: NewTaxInvoice, @Ctx() context: ResolverContext): Promise<TaxInvoice> {
16
+ async createTaxInvoice(
17
+ @Arg('taxInvoice') taxInvoice: NewTaxInvoice,
18
+ @Arg('taxInvoiceItems', () => [NewTaxInvoiceItem]) taxInvoiceItems: NewTaxInvoiceItem[],
19
+ @Ctx() context: ResolverContext
20
+ ): Promise<TaxInvoice> {
12
21
  const { domain, user, tx } = context.state
13
22
 
14
- const result = await tx.getRepository(TaxInvoice).save({
23
+ const newTaxInvoice = await tx.getRepository(TaxInvoice).save({
15
24
  ...taxInvoice,
16
25
  domain,
17
26
  creator: user,
18
27
  updater: user
19
28
  })
20
29
 
21
- return result
22
- }
23
-
24
- @Directive('@transaction')
25
- @Mutation(returns => TaxInvoice, { description: 'To modify TaxInvoice information' })
26
- async updateTaxInvoice(@Arg('id') id: string, @Arg('patch') patch: TaxInvoicePatch, @Ctx() context: ResolverContext): Promise<TaxInvoice> {
27
- const { domain, user, tx } = context.state
28
-
29
- const repository = tx.getRepository(TaxInvoice)
30
- const taxInvoice = await repository.findOne({
31
- where: { domain: { id: domain.id }, id }
32
- })
33
-
34
- const result = await repository.save({
35
- ...taxInvoice,
36
- ...patch,
37
- updater: user
38
- })
30
+ // 아이템 저장
31
+ for (const item of taxInvoiceItems) {
32
+ await tx.getRepository(TaxInvoiceItem).save({ ...item, taxInvoice: newTaxInvoice, domain, creator: user })
33
+ }
39
34
 
40
- return result
35
+ return newTaxInvoice
41
36
  }
42
37
 
38
+ // 그리드에서 메모 수정용 으로만
43
39
  @Directive('@transaction')
44
40
  @Mutation(returns => [TaxInvoice], { description: "To modify multiple TaxInvoices' information" })
45
41
  async updateMultipleTaxInvoice(@Arg('patches', type => [TaxInvoicePatch]) patches: TaxInvoicePatch[], @Ctx() context: ResolverContext): Promise<TaxInvoice[]> {
46
42
  const { domain, user, tx } = context.state
47
43
 
48
44
  let results = []
49
- const _createRecords = patches.filter((patch: any) => patch.cuFlag.toUpperCase() === '+')
50
45
  const _updateRecords = patches.filter((patch: any) => patch.cuFlag.toUpperCase() === 'M')
51
46
  const taxInvoiceRepo = tx.getRepository(TaxInvoice)
52
47
 
53
- if (_createRecords.length > 0) {
54
- for (let i = 0; i < _createRecords.length; i++) {
55
- const newRecord = _createRecords[i]
56
-
57
- const result = await taxInvoiceRepo.save({
58
- ...newRecord,
59
- domain,
60
- creator: user,
61
- updater: user
62
- })
63
-
64
- results.push({ ...result, cuFlag: '+' })
65
- }
66
- }
67
-
68
48
  if (_updateRecords.length > 0) {
69
49
  for (let i = 0; i < _updateRecords.length; i++) {
70
50
  const updateRecord = _updateRecords[i]
@@ -107,16 +87,134 @@ export class TaxInvoiceMutation {
107
87
  }
108
88
 
109
89
  @Directive('@transaction')
110
- @Mutation(returns => Boolean, { description: 'To import multiple TaxInvoices' })
111
- async importTaxInvoices(@Arg('taxInvoices', type => [TaxInvoicePatch]) taxInvoices: TaxInvoicePatch[], @Ctx() context: ResolverContext): Promise<boolean> {
112
- const { domain, tx } = context.state
90
+ @Mutation(returns => Boolean, { description: 'create tax invoice data by API' })
91
+ async fetchTaxInvoiceByApi(@Ctx() context: ResolverContext): Promise<boolean> {
92
+ const { domain, user, tx } = context.state
93
+ const taxInvoiceApiRepo = tx.getRepository(TaxInvoiceApi)
94
+ const taxInvoiceRepo = tx.getRepository(TaxInvoice)
95
+ const insertedData: ConfirmData[] = [] // API 호출 후 결과 회신용
113
96
 
114
- await Promise.all(
115
- taxInvoices.map(async (taxInvoice: TaxInvoicePatch) => {
116
- const createdTaxInvoice: TaxInvoice = await tx.getRepository(TaxInvoice).save({ domain, ...taxInvoice })
97
+ const apiInfo = (await taxInvoiceApiRepo.find()).at(0)
98
+ const businessRegistrationNumber = apiInfo.businessRegistrationNumber
99
+ const { aid = '', bearer = '' } = apiInfo?.attributes
100
+
101
+ // API 호출하여 세금계산서 데이터 가져옴
102
+ const { approvalNoList, taxList } = await getTaxInvoiceByUniposApi(businessRegistrationNumber, aid, bearer)
103
+
104
+ // 이미 있는 데이터 아이디 검색
105
+ const existingTaxInvoice = await taxInvoiceRepo.find({
106
+ select: ['approvalNo'],
107
+ where: { approvalNo: In(approvalNoList) }
108
+ })
109
+ const existingIds = existingTaxInvoice.map(taxInvoice => taxInvoice.approvalNo)
110
+
111
+ // 매입, 매출 for문
112
+ for (let tax of taxList) {
113
+ // 있는지 없는지 확인
114
+ if (existingIds.includes(tax.tid_issueid)) continue
115
+
116
+ // 세금계산서 데이터 객체 생성
117
+ const newTaxInvoice: NewTaxInvoice = {
118
+ issueNo: tax.exd_id,
119
+ approvalNo: tax.tid_issueid,
120
+ originalApprovalNo: tax.tid_originalissueid,
121
+ issueDate: this._dateFormat(tax.tid_issuedatetime),
122
+ signatureDate: this._dateFormat(tax.exd_issuedatetime),
123
+ invoiceType: tax.tid_typecode,
124
+ purpose: tax.tid_purposecode,
125
+ revisedReason: tax.tid_amendcode,
126
+ remark0: tax.tid_desc0,
127
+ remark1: tax.tid_desc1,
128
+ remark2: tax.tid_desc2,
129
+ category: tax.category,
130
+ supplierBusinessRegistrationCategory: tax.tit_alice_specorg_biztypecode,
131
+ supplierBusinessRegistrationNumber: tax.tit_alice_id,
132
+ supplierBranchIdentification: tax.tit_alice_specorg_taxregid,
133
+ supplierBusinessName: tax.tit_alice_name,
134
+ supplierRepresentativeName: tax.tit_alice_specperson_name,
135
+ supplierAddress: tax.tit_alice_specaddr_lineone,
136
+ supplierBusinessType: tax.tit_alice_typecode,
137
+ supplierIndustryType: tax.tit_alice_classcode,
138
+ supplierDepartment: tax.tit_alice_defcont_deptname,
139
+ supplierContactName: tax.tit_alice_defcont_personname,
140
+ supplierContactPhone: tax.tit_alice_defcont_telcomm,
141
+ supplierContactEmail: tax.tit_alice_defcont_uricomm,
142
+ supplierContactCellPhone: tax.tit_alice_defcont_cellphone,
143
+ buyerBusinessRegistrationCategory: tax.tit_bob_specorg_biztypecode,
144
+ buyerBusinessRegistrationNumber: tax.tit_bob_id,
145
+ buyerBranchIdentification: tax.tit_bob_specorg_taxregid,
146
+ buyerBusinessName: tax.tit_bob_name,
147
+ buyerRepresentativeName: tax.tit_bob_specperson_name,
148
+ buyerAddress: tax.tit_bob_specaddr_lineone,
149
+ buyerBusinessType: tax.tit_bob_typecode,
150
+ buyerIndustryType: tax.tit_bob_classcode,
151
+ buyer1stDepartment: tax.tit_bob_1stdefcont_deptname,
152
+ buyer1stContactName: tax.tit_bob_1stdefcont_personname,
153
+ buyer1stContactPhone: tax.tit_bob_1stdefcont_telcomm,
154
+ buyer1stContactEmail: tax.tit_bob_1stdefcont_uricomm,
155
+ buyer1stContactCellPhone: tax.tit_bob_1stdefcont_cellphone,
156
+ buyer2ndDepartment: tax.tit_bob_2nddefcont_deptname,
157
+ buyer2ndContactName: tax.tit_bob_2nddefcont_personname,
158
+ buyer2ndContactPhone: tax.tit_bob_2nddefcont_telcomm,
159
+ buyer2ndContactEmail: tax.tit_bob_2nddefcont_uricomm,
160
+ buyer2ndContactCellPhone: tax.tit_bob_2nddefcont_cellphone,
161
+ agentBusinessRegistrationCategory: tax.tit_broker_specorg_biztypecode,
162
+ agentBusinessRegistrationNumber: tax.tit_broker_id,
163
+ agentBranchIdentification: tax.tit_broker_specorg_taxregid,
164
+ agentBusinessName: tax.tit_broker_name,
165
+ agentRepresentativeName: tax.tit_broker_specperson_name,
166
+ agentAddress: tax.tit_broker_specaddr_lineone,
167
+ agentBusinessType: tax.tit_broker_typecode,
168
+ agentIndustryType: tax.tit_broker_classcode,
169
+ agentDepartment: tax.tit_broker_defcont_deptname,
170
+ agentContactName: tax.tit_broker_defcont_personname,
171
+ agentContactPhone: tax.tit_broker_defcont_telcomm,
172
+ agentContactEmail: tax.tit_broker_defcont_uricomm,
173
+ agentContactCellPhone: tax.tit_broker_defcont_cellphone,
174
+ paymentAmountCash: tax.tit_specpay_paidamount10,
175
+ paymentAmountCheck: tax.tit_specpay_paidamount20,
176
+ paymentAmountPromissoryNote: tax.tit_specpay_paidamount30,
177
+ paymentAmountAccountsReceivable: tax.tit_specpay_paidamount40,
178
+ supplyAmount: tax.tit_specsum_chargeamount,
179
+ taxAmount: tax.tit_specsum_taxamount,
180
+ totalAmount: tax.tit_specsum_grandamount
181
+ }
182
+
183
+ // 세금계산서 아이템 데이터 객체 생성
184
+ const newTaxInvoiceItem: NewTaxInvoiceItem[] = []
185
+ for (let item of tax.tAliceItemList) {
186
+ newTaxInvoiceItem.push({
187
+ sequence: item.tii_seqnumeric,
188
+ supplyDate: this._dateFormat(item.tii_purchaseexpirydatetime),
189
+ itemName: item.tii_nametext,
190
+ specification: item.tii_informationtext,
191
+ quantity: item.tii_chargeableunitquantity,
192
+ unitPrice: item.tii_unitprice_unitamount,
193
+ supplyPrice: item.tii_invoiceamount,
194
+ taxPrice: item.tii_totaltax_calcamount,
195
+ remark: item.tii_descriptiontext
196
+ })
197
+ }
198
+
199
+ // Insert
200
+ this.createTaxInvoice(newTaxInvoice, newTaxInvoiceItem, context)
201
+
202
+ // API 결과 회신 데이터 생성
203
+ insertedData.push({
204
+ aid: aid,
205
+ tax_type: tax.category == Category.EXPORT ? UnipostTaxType.EXPORT : UnipostTaxType.IMPORT,
206
+ tid_issueid: tax.tid_issueid,
207
+ success: true,
208
+ message: ''
117
209
  })
118
- )
210
+ }
211
+
212
+ // 유니 포스트에 조회 후 결과 회신 API 호출
213
+ callTaxInvoiceConfirm(businessRegistrationNumber, aid, bearer, insertedData)
119
214
 
120
215
  return true
121
216
  }
217
+
218
+ // YYYYMMDD => YYYY-MM-DD
219
+ private _dateFormat = date => date.replace(/(\d{4})(\d{2})(\d{2})/g, '$1-$2-$3')
122
220
  }
@@ -2,7 +2,7 @@ import { Resolver, Query, FieldResolver, Root, Args, Arg, Ctx } from 'type-graph
2
2
  import { Domain, getQueryBuilderFromListParams, getRepository, ListParam } from '@things-factory/shell'
3
3
  import { User } from '@things-factory/auth-base'
4
4
  import { TaxInvoice } from './tax-invoice'
5
- import { TaxInvoiceList } from './tax-invoice-type'
5
+ import { TaxInvoiceList, TaxInvoiceSummary } from './tax-invoice-type'
6
6
  import { TaxInvoiceItem } from '../tax-invoice-item/tax-invoice-item'
7
7
 
8
8
  @Resolver(TaxInvoice)
@@ -24,17 +24,35 @@ export class TaxInvoiceQuery {
24
24
  domain,
25
25
  params,
26
26
  repository: await getRepository(TaxInvoice),
27
- searchables: ['name']
27
+ searchables: ['memo']
28
28
  })
29
-
30
29
  const [items, total] = await queryBuilder.getManyAndCount()
31
30
 
32
31
  return { items, total }
33
32
  }
34
33
 
34
+ @Query(returns => TaxInvoiceSummary, { description: 'To fetch TaxInvoices Summary' })
35
+ async taxInvoicesSummary(@Args() params: ListParam, @Ctx() context: ResolverContext): Promise<TaxInvoiceSummary> {
36
+ const { domain } = context.state
37
+
38
+ const queryBuilder = getQueryBuilderFromListParams({
39
+ domain,
40
+ params: { ...params, pagination: {} },
41
+ repository: await getRepository(TaxInvoice)
42
+ })
43
+ const summary = await queryBuilder
44
+ .select('SUM(supply_amount)', 'supply_amount')
45
+ .addSelect('SUM(tax_amount)', 'tax_amount')
46
+ .addSelect('SUM(total_amount)', 'total_amount')
47
+ .addSelect('COUNT(id)', 'cnt')
48
+ .getRawOne()
49
+
50
+ return { summary }
51
+ }
52
+
35
53
  @FieldResolver(type => [TaxInvoiceItem])
36
54
  async taxInvoiceItems(@Root() taxInvoice: TaxInvoice): Promise<TaxInvoiceItem[]> {
37
- return taxInvoice.id && (await getRepository(TaxInvoiceItem).findBy({ taxInvoiceId: taxInvoice.id }))
55
+ return taxInvoice.id && (await getRepository(TaxInvoiceItem).findBy({ taxInvoice: { id: taxInvoice.id } }))
38
56
  }
39
57
 
40
58
  @FieldResolver(type => Domain)
@@ -1,14 +1,11 @@
1
- import type { FileUpload } from 'graphql-upload/GraphQLUpload.js'
2
- import GraphQLUpload from 'graphql-upload/GraphQLUpload.js'
3
1
  import { ObjectType, Field, InputType, Int, ID } from 'type-graphql'
4
-
5
2
  import { BusinessRegistrationCategory, Category, InvoiceType, Purpose, RevisedReason, TaxInvoice } from './tax-invoice'
6
- import { TaxInvoiceItem } from '../tax-invoice-item/tax-invoice-item'
3
+ import { ScalarObject } from '@things-factory/shell'
7
4
 
8
5
  @InputType()
9
6
  export class NewTaxInvoice {
10
7
  @Field({ nullable: true })
11
- name?: string
8
+ memo?: string
12
9
 
13
10
  @Field({ nullable: true })
14
11
  apiRefId?: string
@@ -16,6 +13,9 @@ export class NewTaxInvoice {
16
13
  @Field({ nullable: false })
17
14
  category: Category
18
15
 
16
+ @Field({ nullable: true })
17
+ issueNo?: string
18
+
19
19
  @Field({ nullable: true })
20
20
  approvalNo?: string
21
21
 
@@ -23,10 +23,10 @@ export class NewTaxInvoice {
23
23
  originalApprovalNo?: string
24
24
 
25
25
  @Field({ nullable: false })
26
- issueDate: string
26
+ issueDate: Date
27
27
 
28
28
  @Field({ nullable: true })
29
- signatureDate: string
29
+ signatureDate: Date
30
30
 
31
31
  @Field({ nullable: false })
32
32
  invoiceType: InvoiceType
@@ -46,7 +46,7 @@ export class NewTaxInvoice {
46
46
  @Field({ nullable: true })
47
47
  remark2?: string
48
48
 
49
- @Field({ nullable: false })
49
+ @Field({ nullable: true })
50
50
  supplierBusinessRegistrationCategory: BusinessRegistrationCategory
51
51
 
52
52
  @Field({ nullable: false })
@@ -85,7 +85,7 @@ export class NewTaxInvoice {
85
85
  @Field({ nullable: true })
86
86
  supplierContactCellPhone?: string
87
87
 
88
- @Field({ nullable: false })
88
+ @Field({ nullable: true })
89
89
  buyerBusinessRegistrationCategory: BusinessRegistrationCategory
90
90
 
91
91
  @Field({ nullable: false })
@@ -206,196 +206,7 @@ export class TaxInvoicePatch {
206
206
  id?: string
207
207
 
208
208
  @Field({ nullable: true })
209
- name?: string
210
-
211
- @Field({ nullable: true })
212
- apiRefId?: string
213
-
214
- @Field({ nullable: false })
215
- category: Category
216
-
217
- @Field({ nullable: true })
218
- approvalNo?: string
219
-
220
- @Field({ nullable: true })
221
- originalApprovalNo?: string
222
-
223
- @Field({ nullable: false })
224
- issueDate: string
225
-
226
- @Field({ nullable: true })
227
- signatureDate: string
228
-
229
- @Field({ nullable: false })
230
- invoiceType: InvoiceType
231
-
232
- @Field({ nullable: false })
233
- purpose: Purpose
234
-
235
- @Field({ nullable: true })
236
- revisedReason?: RevisedReason
237
-
238
- @Field({ nullable: true })
239
- remark0?: string
240
-
241
- @Field({ nullable: true })
242
- remark1?: string
243
-
244
- @Field({ nullable: true })
245
- remark2?: string
246
-
247
- @Field({ nullable: false })
248
- supplierBusinessRegistrationCategory: BusinessRegistrationCategory
249
-
250
- @Field({ nullable: false })
251
- supplierBusinessRegistrationNumber: string
252
-
253
- @Field({ nullable: true })
254
- supplierBranchIdentification?: string
255
-
256
- @Field({ nullable: false })
257
- supplierBusinessName: string
258
-
259
- @Field({ nullable: false })
260
- supplierRepresentativeName: string
261
-
262
- @Field({ nullable: true })
263
- supplierAddress?: string
264
-
265
- @Field({ nullable: true })
266
- supplierBusinessType?: string
267
-
268
- @Field({ nullable: true })
269
- supplierIndustryType?: string
270
-
271
- @Field({ nullable: true })
272
- supplierDepartment?: string
273
-
274
- @Field({ nullable: true })
275
- supplierContactName?: string
276
-
277
- @Field({ nullable: true })
278
- supplierContactPhone?: string
279
-
280
- @Field({ nullable: true })
281
- supplierContactEmail?: string
282
-
283
- @Field({ nullable: true })
284
- supplierContactCellPhone?: string
285
-
286
- @Field({ nullable: false })
287
- buyerBusinessRegistrationCategory: BusinessRegistrationCategory
288
-
289
- @Field({ nullable: false })
290
- buyerBusinessRegistrationNumber: string
291
-
292
- @Field({ nullable: true })
293
- buyerBranchIdentification?: string
294
-
295
- @Field({ nullable: false })
296
- buyerBusinessName: string
297
-
298
- @Field({ nullable: false })
299
- buyerRepresentativeName: string
300
-
301
- @Field({ nullable: true })
302
- buyerAddress?: string
303
-
304
- @Field({ nullable: true })
305
- buyerBusinessType?: string
306
-
307
- @Field({ nullable: true })
308
- buyerIndustryType?: string
309
-
310
- @Field({ nullable: true })
311
- buyer1stDepartment?: string
312
-
313
- @Field({ nullable: true })
314
- buyer1stContactName?: string
315
-
316
- @Field({ nullable: true })
317
- buyer1stContactPhone?: string
318
-
319
- @Field({ nullable: true })
320
- buyer1stContactEmail?: string
321
-
322
- @Field({ nullable: true })
323
- buyer1stContactCellPhone?: string
324
-
325
- @Field({ nullable: true })
326
- buyer2ndDepartment?: string
327
-
328
- @Field({ nullable: true })
329
- buyer2ndContactName?: string
330
-
331
- @Field({ nullable: true })
332
- buyer2ndContactPhone?: string
333
-
334
- @Field({ nullable: true })
335
- buyer2ndContactEmail?: string
336
-
337
- @Field({ nullable: true })
338
- buyer2ndContactCellPhone?: string
339
-
340
- @Field({ nullable: true })
341
- agentBusinessRegistrationCategory: BusinessRegistrationCategory
342
-
343
- @Field({ nullable: true })
344
- agentBusinessRegistrationNumber?: string
345
-
346
- @Field({ nullable: true })
347
- agentBranchIdentification?: string
348
-
349
- @Field({ nullable: true })
350
- agentBusinessName?: string
351
-
352
- @Field({ nullable: true })
353
- agentRepresentativeName?: string
354
-
355
- @Field({ nullable: true })
356
- agentAddress?: string
357
-
358
- @Field({ nullable: true })
359
- agentBusinessType?: string
360
-
361
- @Field({ nullable: true })
362
- agentIndustryType?: string
363
-
364
- @Field({ nullable: true })
365
- agentDepartment?: string
366
-
367
- @Field({ nullable: true })
368
- agentContactName?: string
369
-
370
- @Field({ nullable: true })
371
- agentContactPhone?: string
372
-
373
- @Field({ nullable: true })
374
- agentContactEmail?: string
375
-
376
- @Field({ nullable: true })
377
- agentContactCellPhone?: string
378
-
379
- @Field(type => Int, { nullable: true })
380
- paymentAmountCash?: number
381
-
382
- @Field(type => Int, { nullable: true })
383
- paymentAmountCheck?: number
384
-
385
- @Field(type => Int, { nullable: true })
386
- paymentAmountPromissoryNote?: number
387
-
388
- @Field(type => Int, { nullable: true })
389
- paymentAmountAccountsReceivable?: number
390
-
391
- @Field(type => Int, { nullable: false })
392
- supplyAmount: number
393
-
394
- @Field(type => Int, { nullable: true })
395
- taxAmount: number
396
-
397
- @Field(type => Int, { nullable: false })
398
- totalAmount: number
209
+ memo?: string
399
210
 
400
211
  @Field({ nullable: true })
401
212
  cuFlag?: string
@@ -409,3 +220,14 @@ export class TaxInvoiceList {
409
220
  @Field(type => Int)
410
221
  total: number
411
222
  }
223
+
224
+ @ObjectType()
225
+ export class TaxInvoiceSummary {
226
+ @Field(type => ScalarObject)
227
+ summary: {
228
+ supply_amount: number
229
+ tax_amount: number
230
+ total_amount: number
231
+ cnt: number
232
+ }
233
+ }