@things-factory/tax-invoice 6.2.84

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 (151) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/assets/images/hatiolab-logo.png +0 -0
  3. package/client/bootstrap.ts +0 -0
  4. package/client/index.ts +0 -0
  5. package/client/pages/main.ts +25 -0
  6. package/client/pages/tax-audit-result/tax-audit-result-importer.ts +97 -0
  7. package/client/pages/tax-audit-result/tax-audit-result-list-page.ts +355 -0
  8. package/client/pages/tax-invoice/tax-invoice-detail-popup.ts +424 -0
  9. package/client/pages/tax-invoice/tax-invoice-list-page.ts +517 -0
  10. package/client/pages/tax-invoice-api/tax-invoice-api-page.ts +428 -0
  11. package/client/pages/tax-invoice-company/tax-invoice-company-importer.ts +175 -0
  12. package/client/pages/tax-invoice-company/tax-invoice-company-list-page.ts +496 -0
  13. package/client/route.ts +23 -0
  14. package/client/tsconfig.json +11 -0
  15. package/dist-client/bootstrap.d.ts +0 -0
  16. package/dist-client/bootstrap.js +2 -0
  17. package/dist-client/bootstrap.js.map +1 -0
  18. package/dist-client/index.d.ts +0 -0
  19. package/dist-client/index.js +2 -0
  20. package/dist-client/index.js.map +1 -0
  21. package/dist-client/pages/main.d.ts +1 -0
  22. package/dist-client/pages/main.js +27 -0
  23. package/dist-client/pages/main.js.map +1 -0
  24. package/dist-client/pages/tax-audit-result/tax-audit-result-importer.d.ts +22 -0
  25. package/dist-client/pages/tax-audit-result/tax-audit-result-importer.js +100 -0
  26. package/dist-client/pages/tax-audit-result/tax-audit-result-importer.js.map +1 -0
  27. package/dist-client/pages/tax-audit-result/tax-audit-result-list-page.d.ts +62 -0
  28. package/dist-client/pages/tax-audit-result/tax-audit-result-list-page.js +331 -0
  29. package/dist-client/pages/tax-audit-result/tax-audit-result-list-page.js.map +1 -0
  30. package/dist-client/pages/tax-invoice/tax-invoice-detail-popup.d.ts +14 -0
  31. package/dist-client/pages/tax-invoice/tax-invoice-detail-popup.js +430 -0
  32. package/dist-client/pages/tax-invoice/tax-invoice-detail-popup.js.map +1 -0
  33. package/dist-client/pages/tax-invoice/tax-invoice-list-page.d.ts +70 -0
  34. package/dist-client/pages/tax-invoice/tax-invoice-list-page.js +500 -0
  35. package/dist-client/pages/tax-invoice/tax-invoice-list-page.js.map +1 -0
  36. package/dist-client/pages/tax-invoice-api/tax-invoice-api-page.d.ts +36 -0
  37. package/dist-client/pages/tax-invoice-api/tax-invoice-api-page.js +419 -0
  38. package/dist-client/pages/tax-invoice-api/tax-invoice-api-page.js.map +1 -0
  39. package/dist-client/pages/tax-invoice-company/tax-invoice-company-importer.d.ts +31 -0
  40. package/dist-client/pages/tax-invoice-company/tax-invoice-company-importer.js +182 -0
  41. package/dist-client/pages/tax-invoice-company/tax-invoice-company-importer.js.map +1 -0
  42. package/dist-client/pages/tax-invoice-company/tax-invoice-company-list-page.d.ts +57 -0
  43. package/dist-client/pages/tax-invoice-company/tax-invoice-company-list-page.js +477 -0
  44. package/dist-client/pages/tax-invoice-company/tax-invoice-company-list-page.js.map +1 -0
  45. package/dist-client/route.d.ts +1 -0
  46. package/dist-client/route.js +20 -0
  47. package/dist-client/route.js.map +1 -0
  48. package/dist-client/tsconfig.tsbuildinfo +1 -0
  49. package/dist-server/index.js +6 -0
  50. package/dist-server/index.js.map +1 -0
  51. package/dist-server/routes.js +25 -0
  52. package/dist-server/routes.js.map +1 -0
  53. package/dist-server/service/index.js +37 -0
  54. package/dist-server/service/index.js.map +1 -0
  55. package/dist-server/service/tax-audit-result/event-subscriber.js +21 -0
  56. package/dist-server/service/tax-audit-result/event-subscriber.js.map +1 -0
  57. package/dist-server/service/tax-audit-result/index.js +12 -0
  58. package/dist-server/service/tax-audit-result/index.js.map +1 -0
  59. package/dist-server/service/tax-audit-result/tax-audit-result-history.js +123 -0
  60. package/dist-server/service/tax-audit-result/tax-audit-result-history.js.map +1 -0
  61. package/dist-server/service/tax-audit-result/tax-audit-result-mutation.js +168 -0
  62. package/dist-server/service/tax-audit-result/tax-audit-result-mutation.js.map +1 -0
  63. package/dist-server/service/tax-audit-result/tax-audit-result-query.js +97 -0
  64. package/dist-server/service/tax-audit-result/tax-audit-result-query.js.map +1 -0
  65. package/dist-server/service/tax-audit-result/tax-audit-result-type.js +86 -0
  66. package/dist-server/service/tax-audit-result/tax-audit-result-type.js.map +1 -0
  67. package/dist-server/service/tax-audit-result/tax-audit-result.js +110 -0
  68. package/dist-server/service/tax-audit-result/tax-audit-result.js.map +1 -0
  69. package/dist-server/service/tax-invoice/index.js +9 -0
  70. package/dist-server/service/tax-invoice/index.js.map +1 -0
  71. package/dist-server/service/tax-invoice/tax-invoice-mutation.js +127 -0
  72. package/dist-server/service/tax-invoice/tax-invoice-mutation.js.map +1 -0
  73. package/dist-server/service/tax-invoice/tax-invoice-query.js +90 -0
  74. package/dist-server/service/tax-invoice/tax-invoice-query.js.map +1 -0
  75. package/dist-server/service/tax-invoice/tax-invoice-type.js +553 -0
  76. package/dist-server/service/tax-invoice/tax-invoice-type.js.map +1 -0
  77. package/dist-server/service/tax-invoice/tax-invoice.js +465 -0
  78. package/dist-server/service/tax-invoice/tax-invoice.js.map +1 -0
  79. package/dist-server/service/tax-invoice-api/index.js +9 -0
  80. package/dist-server/service/tax-invoice-api/index.js.map +1 -0
  81. package/dist-server/service/tax-invoice-api/tax-invoice-api-mutation.js +64 -0
  82. package/dist-server/service/tax-invoice-api/tax-invoice-api-mutation.js.map +1 -0
  83. package/dist-server/service/tax-invoice-api/tax-invoice-api-query.js +79 -0
  84. package/dist-server/service/tax-invoice-api/tax-invoice-api-query.js.map +1 -0
  85. package/dist-server/service/tax-invoice-api/tax-invoice-api-type.js +103 -0
  86. package/dist-server/service/tax-invoice-api/tax-invoice-api-type.js.map +1 -0
  87. package/dist-server/service/tax-invoice-api/tax-invoice-api.js +163 -0
  88. package/dist-server/service/tax-invoice-api/tax-invoice-api.js.map +1 -0
  89. package/dist-server/service/tax-invoice-company/index.js +9 -0
  90. package/dist-server/service/tax-invoice-company/index.js.map +1 -0
  91. package/dist-server/service/tax-invoice-company/tax-invoice-company-mutation.js +80 -0
  92. package/dist-server/service/tax-invoice-company/tax-invoice-company-mutation.js.map +1 -0
  93. package/dist-server/service/tax-invoice-company/tax-invoice-company-query.js +89 -0
  94. package/dist-server/service/tax-invoice-company/tax-invoice-company-query.js.map +1 -0
  95. package/dist-server/service/tax-invoice-company/tax-invoice-company-type.js +100 -0
  96. package/dist-server/service/tax-invoice-company/tax-invoice-company-type.js.map +1 -0
  97. package/dist-server/service/tax-invoice-company/tax-invoice-company.js +166 -0
  98. package/dist-server/service/tax-invoice-company/tax-invoice-company.js.map +1 -0
  99. package/dist-server/service/tax-invoice-item/index.js +9 -0
  100. package/dist-server/service/tax-invoice-item/index.js.map +1 -0
  101. package/dist-server/service/tax-invoice-item/tax-invoice-item-mutation.js +127 -0
  102. package/dist-server/service/tax-invoice-item/tax-invoice-item-mutation.js.map +1 -0
  103. package/dist-server/service/tax-invoice-item/tax-invoice-item-query.js +87 -0
  104. package/dist-server/service/tax-invoice-item/tax-invoice-item-query.js.map +1 -0
  105. package/dist-server/service/tax-invoice-item/tax-invoice-item-type.js +121 -0
  106. package/dist-server/service/tax-invoice-item/tax-invoice-item-type.js.map +1 -0
  107. package/dist-server/service/tax-invoice-item/tax-invoice-item.js +115 -0
  108. package/dist-server/service/tax-invoice-item/tax-invoice-item.js.map +1 -0
  109. package/dist-server/tsconfig.tsbuildinfo +1 -0
  110. package/helps/tax-invoice/tax-audit-result.md +160 -0
  111. package/helps/tax-invoice/tax-invoice-api.md +160 -0
  112. package/helps/tax-invoice/tax-invoice-send.md +160 -0
  113. package/helps/tax-invoice/tax-invoice.md +160 -0
  114. package/package.json +37 -0
  115. package/server/index.ts +2 -0
  116. package/server/routes.ts +28 -0
  117. package/server/service/index.ts +36 -0
  118. package/server/service/tax-audit-result/event-subscriber.ts +17 -0
  119. package/server/service/tax-audit-result/index.ts +9 -0
  120. package/server/service/tax-audit-result/tax-audit-result-history.ts +110 -0
  121. package/server/service/tax-audit-result/tax-audit-result-mutation.ts +198 -0
  122. package/server/service/tax-audit-result/tax-audit-result-query.ts +62 -0
  123. package/server/service/tax-audit-result/tax-audit-result-type.ts +61 -0
  124. package/server/service/tax-audit-result/tax-audit-result.ts +95 -0
  125. package/server/service/tax-invoice/index.ts +6 -0
  126. package/server/service/tax-invoice/tax-invoice-mutation.ts +122 -0
  127. package/server/service/tax-invoice/tax-invoice-query.ts +54 -0
  128. package/server/service/tax-invoice/tax-invoice-type.ts +411 -0
  129. package/server/service/tax-invoice/tax-invoice.ts +389 -0
  130. package/server/service/tax-invoice-api/index.ts +6 -0
  131. package/server/service/tax-invoice-api/tax-invoice-api-mutation.ts +67 -0
  132. package/server/service/tax-invoice-api/tax-invoice-api-query.ts +48 -0
  133. package/server/service/tax-invoice-api/tax-invoice-api-type.ts +71 -0
  134. package/server/service/tax-invoice-api/tax-invoice-api.ts +137 -0
  135. package/server/service/tax-invoice-company/index.ts +6 -0
  136. package/server/service/tax-invoice-company/tax-invoice-company-mutation.ts +84 -0
  137. package/server/service/tax-invoice-company/tax-invoice-company-query.ts +53 -0
  138. package/server/service/tax-invoice-company/tax-invoice-company-type.ts +69 -0
  139. package/server/service/tax-invoice-company/tax-invoice-company.ts +142 -0
  140. package/server/service/tax-invoice-item/index.ts +6 -0
  141. package/server/service/tax-invoice-item/tax-invoice-item-mutation.ts +128 -0
  142. package/server/service/tax-invoice-item/tax-invoice-item-query.ts +57 -0
  143. package/server/service/tax-invoice-item/tax-invoice-item-type.ts +86 -0
  144. package/server/service/tax-invoice-item/tax-invoice-item.ts +85 -0
  145. package/server/tsconfig.json +10 -0
  146. package/things-factory.config.js +23 -0
  147. package/translations/en.json +1 -0
  148. package/translations/ja.json +1 -0
  149. package/translations/ko.json +71 -0
  150. package/translations/ms.json +1 -0
  151. package/translations/zh.json +1 -0
@@ -0,0 +1,122 @@
1
+ import { Resolver, Mutation, Arg, Ctx, Directive } from 'type-graphql'
2
+ import { In } from 'typeorm'
3
+
4
+ import { TaxInvoice } from './tax-invoice'
5
+ import { NewTaxInvoice, TaxInvoicePatch } from './tax-invoice-type'
6
+
7
+ @Resolver(TaxInvoice)
8
+ export class TaxInvoiceMutation {
9
+ @Directive('@transaction')
10
+ @Mutation(returns => TaxInvoice, { description: 'To create new TaxInvoice' })
11
+ async createTaxInvoice(@Arg('taxInvoice') taxInvoice: NewTaxInvoice, @Ctx() context: ResolverContext): Promise<TaxInvoice> {
12
+ const { domain, user, tx } = context.state
13
+
14
+ const result = await tx.getRepository(TaxInvoice).save({
15
+ ...taxInvoice,
16
+ domain,
17
+ creator: user,
18
+ updater: user
19
+ })
20
+
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
+ })
39
+
40
+ return result
41
+ }
42
+
43
+ @Directive('@transaction')
44
+ @Mutation(returns => [TaxInvoice], { description: "To modify multiple TaxInvoices' information" })
45
+ async updateMultipleTaxInvoice(@Arg('patches', type => [TaxInvoicePatch]) patches: TaxInvoicePatch[], @Ctx() context: ResolverContext): Promise<TaxInvoice[]> {
46
+ const { domain, user, tx } = context.state
47
+
48
+ let results = []
49
+ const _createRecords = patches.filter((patch: any) => patch.cuFlag.toUpperCase() === '+')
50
+ const _updateRecords = patches.filter((patch: any) => patch.cuFlag.toUpperCase() === 'M')
51
+ const taxInvoiceRepo = tx.getRepository(TaxInvoice)
52
+
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
+ if (_updateRecords.length > 0) {
69
+ for (let i = 0; i < _updateRecords.length; i++) {
70
+ const updateRecord = _updateRecords[i]
71
+ const taxInvoice = await taxInvoiceRepo.findOneBy({ id: updateRecord.id })
72
+
73
+ const result = await taxInvoiceRepo.save({
74
+ ...taxInvoice,
75
+ ...updateRecord,
76
+ updater: user
77
+ })
78
+
79
+ results.push({ ...result, cuFlag: 'M' })
80
+ }
81
+ }
82
+
83
+ return results
84
+ }
85
+
86
+ @Directive('@transaction')
87
+ @Mutation(returns => Boolean, { description: 'To delete TaxInvoice' })
88
+ async deleteTaxInvoice(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<boolean> {
89
+ const { domain, tx } = context.state
90
+
91
+ await tx.getRepository(TaxInvoice).delete({ domain: { id: domain.id }, id })
92
+
93
+ return true
94
+ }
95
+
96
+ @Directive('@transaction')
97
+ @Mutation(returns => Boolean, { description: 'To delete multiple TaxInvoices' })
98
+ async deleteTaxInvoices(@Arg('ids', type => [String]) ids: string[], @Ctx() context: ResolverContext): Promise<boolean> {
99
+ const { domain, tx } = context.state
100
+
101
+ await tx.getRepository(TaxInvoice).delete({
102
+ domain: { id: domain.id },
103
+ id: In(ids)
104
+ })
105
+
106
+ return true
107
+ }
108
+
109
+ @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
113
+
114
+ await Promise.all(
115
+ taxInvoices.map(async (taxInvoice: TaxInvoicePatch) => {
116
+ const createdTaxInvoice: TaxInvoice = await tx.getRepository(TaxInvoice).save({ domain, ...taxInvoice })
117
+ })
118
+ )
119
+
120
+ return true
121
+ }
122
+ }
@@ -0,0 +1,54 @@
1
+ import { Resolver, Query, FieldResolver, Root, Args, Arg, Ctx } from 'type-graphql'
2
+ import { Domain, getQueryBuilderFromListParams, getRepository, ListParam } from '@things-factory/shell'
3
+ import { User } from '@things-factory/auth-base'
4
+ import { TaxInvoice } from './tax-invoice'
5
+ import { TaxInvoiceList } from './tax-invoice-type'
6
+ import { TaxInvoiceItem } from '../tax-invoice-item/tax-invoice-item'
7
+
8
+ @Resolver(TaxInvoice)
9
+ export class TaxInvoiceQuery {
10
+ @Query(returns => TaxInvoice!, { nullable: true, description: 'To fetch a TaxInvoice' })
11
+ async taxInvoice(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<TaxInvoice> {
12
+ const { domain } = context.state
13
+
14
+ return await getRepository(TaxInvoice).findOne({
15
+ where: { domain: { id: domain.id }, id }
16
+ })
17
+ }
18
+
19
+ @Query(returns => TaxInvoiceList, { description: 'To fetch multiple TaxInvoices' })
20
+ async taxInvoices(@Args() params: ListParam, @Ctx() context: ResolverContext): Promise<TaxInvoiceList> {
21
+ const { domain } = context.state
22
+
23
+ const queryBuilder = getQueryBuilderFromListParams({
24
+ domain,
25
+ params,
26
+ repository: await getRepository(TaxInvoice),
27
+ searchables: ['name']
28
+ })
29
+
30
+ const [items, total] = await queryBuilder.getManyAndCount()
31
+
32
+ return { items, total }
33
+ }
34
+
35
+ @FieldResolver(type => [TaxInvoiceItem])
36
+ async taxInvoiceItems(@Root() taxInvoice: TaxInvoice): Promise<TaxInvoiceItem[]> {
37
+ return taxInvoice.id && (await getRepository(TaxInvoiceItem).findBy({ taxInvoiceId: taxInvoice.id }))
38
+ }
39
+
40
+ @FieldResolver(type => Domain)
41
+ async domain(@Root() taxInvoice: TaxInvoice): Promise<Domain> {
42
+ return taxInvoice.domainId && (await getRepository(Domain).findOneBy({ id: taxInvoice.domainId }))
43
+ }
44
+
45
+ @FieldResolver(type => User)
46
+ async updater(@Root() taxInvoice: TaxInvoice): Promise<User> {
47
+ return taxInvoice.updaterId && (await getRepository(User).findOneBy({ id: taxInvoice.updaterId }))
48
+ }
49
+
50
+ @FieldResolver(type => User)
51
+ async creator(@Root() taxInvoice: TaxInvoice): Promise<User> {
52
+ return taxInvoice.creatorId && (await getRepository(User).findOneBy({ id: taxInvoice.creatorId }))
53
+ }
54
+ }
@@ -0,0 +1,411 @@
1
+ import type { FileUpload } from 'graphql-upload/GraphQLUpload.js'
2
+ import GraphQLUpload from 'graphql-upload/GraphQLUpload.js'
3
+ import { ObjectType, Field, InputType, Int, ID } from 'type-graphql'
4
+
5
+ import { BusinessRegistrationCategory, Category, InvoiceType, Purpose, RevisedReason, TaxInvoice } from './tax-invoice'
6
+ import { TaxInvoiceItem } from '../tax-invoice-item/tax-invoice-item'
7
+
8
+ @InputType()
9
+ export class NewTaxInvoice {
10
+ @Field({ nullable: true })
11
+ name?: string
12
+
13
+ @Field({ nullable: true })
14
+ apiRefId?: string
15
+
16
+ @Field({ nullable: false })
17
+ category: Category
18
+
19
+ @Field({ nullable: true })
20
+ approvalNo?: string
21
+
22
+ @Field({ nullable: true })
23
+ originalApprovalNo?: string
24
+
25
+ @Field({ nullable: false })
26
+ issueDate: string
27
+
28
+ @Field({ nullable: true })
29
+ signatureDate: string
30
+
31
+ @Field({ nullable: false })
32
+ invoiceType: InvoiceType
33
+
34
+ @Field({ nullable: false })
35
+ purpose: Purpose
36
+
37
+ @Field({ nullable: true })
38
+ revisedReason?: RevisedReason
39
+
40
+ @Field({ nullable: true })
41
+ remark0?: string
42
+
43
+ @Field({ nullable: true })
44
+ remark1?: string
45
+
46
+ @Field({ nullable: true })
47
+ remark2?: string
48
+
49
+ @Field({ nullable: false })
50
+ supplierBusinessRegistrationCategory: BusinessRegistrationCategory
51
+
52
+ @Field({ nullable: false })
53
+ supplierBusinessRegistrationNumber: string
54
+
55
+ @Field({ nullable: true })
56
+ supplierBranchIdentification?: string
57
+
58
+ @Field({ nullable: false })
59
+ supplierBusinessName: string
60
+
61
+ @Field({ nullable: false })
62
+ supplierRepresentativeName: string
63
+
64
+ @Field({ nullable: true })
65
+ supplierAddress?: string
66
+
67
+ @Field({ nullable: true })
68
+ supplierBusinessType?: string
69
+
70
+ @Field({ nullable: true })
71
+ supplierIndustryType?: string
72
+
73
+ @Field({ nullable: true })
74
+ supplierDepartment?: string
75
+
76
+ @Field({ nullable: true })
77
+ supplierContactName?: string
78
+
79
+ @Field({ nullable: true })
80
+ supplierContactPhone?: string
81
+
82
+ @Field({ nullable: true })
83
+ supplierContactEmail?: string
84
+
85
+ @Field({ nullable: true })
86
+ supplierContactCellPhone?: string
87
+
88
+ @Field({ nullable: false })
89
+ buyerBusinessRegistrationCategory: BusinessRegistrationCategory
90
+
91
+ @Field({ nullable: false })
92
+ buyerBusinessRegistrationNumber: string
93
+
94
+ @Field({ nullable: true })
95
+ buyerBranchIdentification?: string
96
+
97
+ @Field({ nullable: false })
98
+ buyerBusinessName: string
99
+
100
+ @Field({ nullable: false })
101
+ buyerRepresentativeName: string
102
+
103
+ @Field({ nullable: true })
104
+ buyerAddress?: string
105
+
106
+ @Field({ nullable: true })
107
+ buyerBusinessType?: string
108
+
109
+ @Field({ nullable: true })
110
+ buyerIndustryType?: string
111
+
112
+ @Field({ nullable: true })
113
+ buyer1stDepartment?: string
114
+
115
+ @Field({ nullable: true })
116
+ buyer1stContactName?: string
117
+
118
+ @Field({ nullable: true })
119
+ buyer1stContactPhone?: string
120
+
121
+ @Field({ nullable: true })
122
+ buyer1stContactEmail?: string
123
+
124
+ @Field({ nullable: true })
125
+ buyer1stContactCellPhone?: string
126
+
127
+ @Field({ nullable: true })
128
+ buyer2ndDepartment?: string
129
+
130
+ @Field({ nullable: true })
131
+ buyer2ndContactName?: string
132
+
133
+ @Field({ nullable: true })
134
+ buyer2ndContactPhone?: string
135
+
136
+ @Field({ nullable: true })
137
+ buyer2ndContactEmail?: string
138
+
139
+ @Field({ nullable: true })
140
+ buyer2ndContactCellPhone?: string
141
+
142
+ @Field({ nullable: true })
143
+ agentBusinessRegistrationCategory?: BusinessRegistrationCategory
144
+
145
+ @Field({ nullable: true })
146
+ agentBusinessRegistrationNumber?: string
147
+
148
+ @Field({ nullable: true })
149
+ agentBranchIdentification?: string
150
+
151
+ @Field({ nullable: true })
152
+ agentBusinessName?: string
153
+
154
+ @Field({ nullable: true })
155
+ agentRepresentativeName?: string
156
+
157
+ @Field({ nullable: true })
158
+ agentAddress?: string
159
+
160
+ @Field({ nullable: true })
161
+ agentBusinessType?: string
162
+
163
+ @Field({ nullable: true })
164
+ agentIndustryType?: string
165
+
166
+ @Field({ nullable: true })
167
+ agentDepartment?: string
168
+
169
+ @Field({ nullable: true })
170
+ agentContactName?: string
171
+
172
+ @Field({ nullable: true })
173
+ agentContactPhone?: string
174
+
175
+ @Field({ nullable: true })
176
+ agentContactEmail?: string
177
+
178
+ @Field({ nullable: true })
179
+ agentContactCellPhone?: string
180
+
181
+ @Field(type => Int, { nullable: true })
182
+ paymentAmountCash?: number
183
+
184
+ @Field(type => Int, { nullable: true })
185
+ paymentAmountCheck?: number
186
+
187
+ @Field(type => Int, { nullable: true })
188
+ paymentAmountPromissoryNote?: number
189
+
190
+ @Field(type => Int, { nullable: true })
191
+ paymentAmountAccountsReceivable?: number
192
+
193
+ @Field(type => Int, { nullable: false })
194
+ supplyAmount: number
195
+
196
+ @Field(type => Int, { nullable: true })
197
+ taxAmount: number
198
+
199
+ @Field(type => Int, { nullable: false })
200
+ totalAmount: number
201
+ }
202
+
203
+ @InputType()
204
+ export class TaxInvoicePatch {
205
+ @Field(type => ID, { nullable: false })
206
+ id?: string
207
+
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
399
+
400
+ @Field({ nullable: true })
401
+ cuFlag?: string
402
+ }
403
+
404
+ @ObjectType()
405
+ export class TaxInvoiceList {
406
+ @Field(type => [TaxInvoice])
407
+ items: TaxInvoice[]
408
+
409
+ @Field(type => Int)
410
+ total: number
411
+ }