@things-factory/tax-invoice 6.2.86 → 6.2.90
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/tax-invoice-detail-popup.ts +12 -6
- package/client/pages/tax-invoice/tax-invoice-list-page.ts +147 -176
- package/client/pages/tax-invoice-api/tax-invoice-api-page.ts +52 -114
- package/client/pages/tax-invoice-company/tax-invoice-company-importer.ts +2 -2
- package/client/pages/tax-invoice-send/tax-invoice-send-page.ts +580 -0
- package/client/route.ts +4 -4
- package/dist-client/pages/tax-invoice/tax-invoice-detail-popup.js +18 -9
- package/dist-client/pages/tax-invoice/tax-invoice-detail-popup.js.map +1 -1
- package/dist-client/pages/tax-invoice/tax-invoice-list-page.d.ts +63 -23
- package/dist-client/pages/tax-invoice/tax-invoice-list-page.js +149 -168
- package/dist-client/pages/tax-invoice/tax-invoice-list-page.js.map +1 -1
- package/dist-client/pages/tax-invoice-api/tax-invoice-api-page.d.ts +3 -5
- package/dist-client/pages/tax-invoice-api/tax-invoice-api-page.js +52 -105
- package/dist-client/pages/tax-invoice-api/tax-invoice-api-page.js.map +1 -1
- package/dist-client/pages/tax-invoice-company/tax-invoice-company-importer.js +2 -2
- package/dist-client/pages/tax-invoice-company/tax-invoice-company-importer.js.map +1 -1
- package/dist-client/pages/tax-invoice-send/tax-invoice-send-page.d.ts +100 -0
- package/dist-client/pages/tax-invoice-send/tax-invoice-send-page.js +510 -0
- package/dist-client/pages/tax-invoice-send/tax-invoice-send-page.js.map +1 -0
- package/dist-client/route.d.ts +1 -1
- package/dist-client/route.js +3 -3
- package/dist-client/route.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/service/tax-invoice/tax-invoice-mutation.js +132 -27
- package/dist-server/service/tax-invoice/tax-invoice-mutation.js.map +1 -1
- package/dist-server/service/tax-invoice/tax-invoice-query.js +24 -1
- package/dist-server/service/tax-invoice/tax-invoice-query.js.map +1 -1
- package/dist-server/service/tax-invoice/tax-invoice-type.js +22 -259
- package/dist-server/service/tax-invoice/tax-invoice-type.js.map +1 -1
- package/dist-server/service/tax-invoice/tax-invoice.js +22 -16
- package/dist-server/service/tax-invoice/tax-invoice.js.map +1 -1
- package/dist-server/service/tax-invoice-api/tax-invoice-api-mutation.js +13 -21
- package/dist-server/service/tax-invoice-api/tax-invoice-api-mutation.js.map +1 -1
- package/dist-server/service/tax-invoice-api/tax-invoice-api-query.js +4 -25
- package/dist-server/service/tax-invoice-api/tax-invoice-api-query.js.map +1 -1
- package/dist-server/service/tax-invoice-api/tax-invoice-api-type.js +5 -0
- package/dist-server/service/tax-invoice-api/tax-invoice-api-type.js.map +1 -1
- package/dist-server/service/tax-invoice-api/tax-invoice-api.js +7 -1
- package/dist-server/service/tax-invoice-api/tax-invoice-api.js.map +1 -1
- package/dist-server/service/tax-invoice-item/tax-invoice-item-query.js.map +1 -1
- package/dist-server/service/tax-invoice-item/tax-invoice-item-type.js +4 -4
- package/dist-server/service/tax-invoice-item/tax-invoice-item-type.js.map +1 -1
- package/dist-server/service/tax-invoice-item/tax-invoice-item.js +3 -3
- package/dist-server/service/tax-invoice-item/tax-invoice-item.js.map +1 -1
- package/dist-server/service/unipost-api/tax-invoice-inquiry.js +90 -0
- package/dist-server/service/unipost-api/tax-invoice-inquiry.js.map +1 -0
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -5
- package/server/service/tax-invoice/tax-invoice-mutation.ts +137 -36
- package/server/service/tax-invoice/tax-invoice-query.ts +21 -3
- package/server/service/tax-invoice/tax-invoice-type.ts +21 -199
- package/server/service/tax-invoice/tax-invoice.ts +38 -45
- package/server/service/tax-invoice-api/tax-invoice-api-mutation.ts +19 -33
- package/server/service/tax-invoice-api/tax-invoice-api-query.ts +4 -21
- package/server/service/tax-invoice-api/tax-invoice-api-type.ts +4 -0
- package/server/service/tax-invoice-api/tax-invoice-api.ts +7 -15
- package/server/service/tax-invoice-item/tax-invoice-item-query.ts +1 -1
- package/server/service/tax-invoice-item/tax-invoice-item-type.ts +4 -7
- package/server/service/tax-invoice-item/tax-invoice-item.ts +3 -3
- package/server/service/unipost-api/tax-invoice-inquiry.ts +103 -0
- package/translations/ko.json +10 -1
|
@@ -0,0 +1,580 @@
|
|
|
1
|
+
import '@operato/data-grist'
|
|
2
|
+
|
|
3
|
+
import { CommonButtonStyles, CommonGristStyles, ScrollbarStyles } from '@operato/styles'
|
|
4
|
+
import { PageView } from '@operato/shell'
|
|
5
|
+
import { css, html } from 'lit'
|
|
6
|
+
import { customElement, property, query, state } from 'lit/decorators.js'
|
|
7
|
+
import { ScopedElementsMixin } from '@open-wc/scoped-elements'
|
|
8
|
+
import { client } from '@operato/graphql'
|
|
9
|
+
import { i18next, localize } from '@operato/i18n'
|
|
10
|
+
import { notify } from '@operato/layout'
|
|
11
|
+
import gql from 'graphql-tag'
|
|
12
|
+
import { BUSINESS_REGISTRATION_CATEGORY, BusinessRegistrationCategory, Category, INVOICE_TYPE, InvoiceType, Purpose } from '../tax-invoice/tax-invoice-list-page'
|
|
13
|
+
|
|
14
|
+
const SHORT_INVOICE_TYPE = {
|
|
15
|
+
TAX_INVOICE: {
|
|
16
|
+
[InvoiceType.TAX_INVOICE]: '일반',
|
|
17
|
+
[InvoiceType.SMALL_BUSINESS_TAX_INVOICE]: '영세율',
|
|
18
|
+
[InvoiceType.CONSIGNMENT_TAX_INVOICE]: '위수탁',
|
|
19
|
+
[InvoiceType.SMALL_BUSINESS_CONSIGNMENT_TAX_INVOICE]: '위수탁영세율'
|
|
20
|
+
},
|
|
21
|
+
INVOICE: {
|
|
22
|
+
[InvoiceType.INVOICE]: '일반',
|
|
23
|
+
[InvoiceType.CONSIGNMENT_INVOICE]: '위수탁'
|
|
24
|
+
// [InvoiceType.IMPORT_INVOICE]: INVOICE_TYPE[IMPORT_INVOICE],
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const SHORT_BUSINESS_REGISTRATION_CATEGORY = {
|
|
29
|
+
[BusinessRegistrationCategory.BUSINESS_REGISTRATION_NUMBER]: '사업자',
|
|
30
|
+
[BusinessRegistrationCategory.RESIDENT_REGISTRATION_NUMBER]: '개인',
|
|
31
|
+
[BusinessRegistrationCategory.FOREIGNER_REGISTRATION_NUMBER]: '외국인'
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
interface Supplier {
|
|
35
|
+
supplierBusinessRegistrationNumber: string
|
|
36
|
+
supplierBranchIdentification?: string
|
|
37
|
+
supplierBusinessName: string
|
|
38
|
+
supplierRepresentativeName: string
|
|
39
|
+
supplierAddress?: string
|
|
40
|
+
supplierBusinessType?: string
|
|
41
|
+
supplierIndustryType?: string
|
|
42
|
+
supplierDepartment?: string
|
|
43
|
+
supplierContactName?: string
|
|
44
|
+
supplierContactPhone?: string
|
|
45
|
+
supplierContactEmail?: string
|
|
46
|
+
supplierContactCellPhone?: string
|
|
47
|
+
}
|
|
48
|
+
interface Buyer {
|
|
49
|
+
buyerBusinessRegistrationCategory: BusinessRegistrationCategory
|
|
50
|
+
buyerBusinessRegistrationNumber: string
|
|
51
|
+
buyerBranchIdentification?: string
|
|
52
|
+
buyerBusinessName: string
|
|
53
|
+
buyerRepresentativeName: string
|
|
54
|
+
buyerAddress?: string
|
|
55
|
+
buyerBusinessType?: string
|
|
56
|
+
buyerIndustryType?: string
|
|
57
|
+
buyer1stDepartment?: string
|
|
58
|
+
buyer1stContactName?: string
|
|
59
|
+
buyer1stContactPhone?: string
|
|
60
|
+
buyer1stContactEmail?: string
|
|
61
|
+
buyer1stContactCellPhone?: string
|
|
62
|
+
buyer2ndDepartment?: string
|
|
63
|
+
buyer2ndContactName?: string
|
|
64
|
+
buyer2ndContactPhone?: string
|
|
65
|
+
buyer2ndContactEmail?: string
|
|
66
|
+
buyer2ndContactCellPhone?: string
|
|
67
|
+
}
|
|
68
|
+
interface TaxInvoice {
|
|
69
|
+
category: Category
|
|
70
|
+
issueNo?: string
|
|
71
|
+
approvalNo?: string
|
|
72
|
+
originalApprovalNo?: string
|
|
73
|
+
issueDate: Date | null
|
|
74
|
+
signatureDate?: Date
|
|
75
|
+
invoiceType: InvoiceType
|
|
76
|
+
purpose: Purpose
|
|
77
|
+
remark0?: string
|
|
78
|
+
remark1?: string
|
|
79
|
+
remark2?: string
|
|
80
|
+
paymentAmountCash?: number
|
|
81
|
+
paymentAmountCheck?: number
|
|
82
|
+
paymentAmountPromissoryNote?: number
|
|
83
|
+
paymentAmountAccountsReceivable?: number
|
|
84
|
+
supplyAmount: number
|
|
85
|
+
taxAmount?: number
|
|
86
|
+
totalAmount: number
|
|
87
|
+
taxInvoiceItems?: TaxInvoiceItem[]
|
|
88
|
+
// revisedReason?: RevisedReason
|
|
89
|
+
}
|
|
90
|
+
interface TaxInvoiceItem {
|
|
91
|
+
sequence?: number
|
|
92
|
+
supplyDate: Date
|
|
93
|
+
itemName: string
|
|
94
|
+
specification: string
|
|
95
|
+
quantity: number
|
|
96
|
+
unitPrice: number
|
|
97
|
+
supplyPrice: number
|
|
98
|
+
taxPrice: number
|
|
99
|
+
remark?: string
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
@customElement('tax-invoice-send-page')
|
|
103
|
+
export class TaxInvoiceSendPage extends localize(i18next)(ScopedElementsMixin(PageView)) {
|
|
104
|
+
static styles = [
|
|
105
|
+
ScrollbarStyles,
|
|
106
|
+
CommonGristStyles,
|
|
107
|
+
css`
|
|
108
|
+
:host {
|
|
109
|
+
display: flex;
|
|
110
|
+
flex-direction: column;
|
|
111
|
+
|
|
112
|
+
width: 100%;
|
|
113
|
+
min-width: 850px;
|
|
114
|
+
margin: 0 40px;
|
|
115
|
+
|
|
116
|
+
--grid-record-emphasized-background-color: red;
|
|
117
|
+
--grid-record-emphasized-color: yellow;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
div.invoice-type {
|
|
121
|
+
font-size: 18px;
|
|
122
|
+
margin-top: 15px;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
table {
|
|
126
|
+
border: solid;
|
|
127
|
+
border-width: 2px 0;
|
|
128
|
+
border-collapse: collapse;
|
|
129
|
+
border-spacing: 0;
|
|
130
|
+
|
|
131
|
+
input[type='text'] {
|
|
132
|
+
height: 14px;
|
|
133
|
+
margin: 0;
|
|
134
|
+
padding: 4px 5px 5px;
|
|
135
|
+
line-height: 14px;
|
|
136
|
+
border: 1px solid #bbb;
|
|
137
|
+
background: #fff;
|
|
138
|
+
letter-spacing: 0.5px;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.title table {
|
|
143
|
+
border-color: #d3dbe5;
|
|
144
|
+
width: 100%;
|
|
145
|
+
height: 33px;
|
|
146
|
+
margin-top: 10px;
|
|
147
|
+
font-size: 12px;
|
|
148
|
+
|
|
149
|
+
th {
|
|
150
|
+
font-size: 13px;
|
|
151
|
+
background-color: #e9edf6;
|
|
152
|
+
min-width: 140px;
|
|
153
|
+
}
|
|
154
|
+
td {
|
|
155
|
+
width: 50%;
|
|
156
|
+
padding-left: 10px;
|
|
157
|
+
|
|
158
|
+
& > * {
|
|
159
|
+
vertical-align: middle;
|
|
160
|
+
}
|
|
161
|
+
& > input {
|
|
162
|
+
margin: 0 5px 0 1px;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
div.body {
|
|
168
|
+
margin-top: 15px;
|
|
169
|
+
font-size: 14px;
|
|
170
|
+
|
|
171
|
+
div.data {
|
|
172
|
+
display: flex;
|
|
173
|
+
margin-top: 5px;
|
|
174
|
+
|
|
175
|
+
table {
|
|
176
|
+
flex: 1;
|
|
177
|
+
|
|
178
|
+
td,
|
|
179
|
+
th {
|
|
180
|
+
padding: 5px;
|
|
181
|
+
}
|
|
182
|
+
th.target {
|
|
183
|
+
width: 25px;
|
|
184
|
+
writing-mode: vertical-rl;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
&.supplier {
|
|
188
|
+
border-color: #f64843;
|
|
189
|
+
|
|
190
|
+
td,
|
|
191
|
+
th {
|
|
192
|
+
background-color: #fef5f7;
|
|
193
|
+
border: solid 1.5px #f5b1b1;
|
|
194
|
+
}
|
|
195
|
+
th.target {
|
|
196
|
+
background-color: #fedbde;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
&.buyer {
|
|
200
|
+
border-color: #007ed9;
|
|
201
|
+
|
|
202
|
+
td,
|
|
203
|
+
th {
|
|
204
|
+
background-color: #f7f7ff;
|
|
205
|
+
border: solid 1.5px #a7bcff;
|
|
206
|
+
}
|
|
207
|
+
th.target {
|
|
208
|
+
background-color: #c6daf6;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
div.items,
|
|
215
|
+
div.info,
|
|
216
|
+
div.summary {
|
|
217
|
+
margin-top: 15px;
|
|
218
|
+
|
|
219
|
+
table {
|
|
220
|
+
width: 100%;
|
|
221
|
+
border-color: #000;
|
|
222
|
+
border-width: 2px 0px 0px 0px;
|
|
223
|
+
|
|
224
|
+
th {
|
|
225
|
+
background-color: #e9edf5;
|
|
226
|
+
}
|
|
227
|
+
th,
|
|
228
|
+
td {
|
|
229
|
+
border: solid 1.5px #c4d2ff;
|
|
230
|
+
padding: 5px;
|
|
231
|
+
text-align: center;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
div.summary {
|
|
237
|
+
display: flex;
|
|
238
|
+
|
|
239
|
+
& > table {
|
|
240
|
+
flex: 6.7;
|
|
241
|
+
}
|
|
242
|
+
& > div {
|
|
243
|
+
flex: 3.2;
|
|
244
|
+
display: flex;
|
|
245
|
+
justify-content: center;
|
|
246
|
+
align-items: center;
|
|
247
|
+
border: 1.5px solid #c4d2ff;
|
|
248
|
+
border-top: 2px solid #000;
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
`
|
|
253
|
+
]
|
|
254
|
+
|
|
255
|
+
@query('form[name="tax-invoice-form"]') private taxInvoiceForm!: HTMLFormElement
|
|
256
|
+
|
|
257
|
+
@state() supplier: Supplier = {
|
|
258
|
+
supplierBusinessRegistrationNumber: '',
|
|
259
|
+
supplierBusinessName: '',
|
|
260
|
+
supplierRepresentativeName: ''
|
|
261
|
+
}
|
|
262
|
+
@property() buyer: Buyer = {
|
|
263
|
+
buyerBusinessRegistrationCategory: BusinessRegistrationCategory.BUSINESS_REGISTRATION_NUMBER,
|
|
264
|
+
buyerBusinessRegistrationNumber: '',
|
|
265
|
+
buyerBusinessName: '',
|
|
266
|
+
buyerRepresentativeName: ''
|
|
267
|
+
}
|
|
268
|
+
@property() taxInvoice: TaxInvoice = {
|
|
269
|
+
invoiceType: InvoiceType.TAX_INVOICE,
|
|
270
|
+
category: Category.EXPORT,
|
|
271
|
+
issueDate: null,
|
|
272
|
+
purpose: Purpose.RECEIPT,
|
|
273
|
+
supplyAmount: 0,
|
|
274
|
+
totalAmount: 0
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
get context() {
|
|
278
|
+
return {
|
|
279
|
+
title: i18next.t('title.tax invoice send'),
|
|
280
|
+
help: 'tax-invoice-send/tax-invoice-send',
|
|
281
|
+
actions: [
|
|
282
|
+
{
|
|
283
|
+
title: i18next.t('button.tax invoice send'),
|
|
284
|
+
action: this._sendTaxInvoice.bind(this),
|
|
285
|
+
...CommonButtonStyles.add
|
|
286
|
+
}
|
|
287
|
+
]
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
render() {
|
|
292
|
+
return html`
|
|
293
|
+
<div class="invoice-type">
|
|
294
|
+
* ${INVOICE_TYPE[this.taxInvoice?.invoiceType]} (${SHORT_BUSINESS_REGISTRATION_CATEGORY[this.buyer.buyerBusinessRegistrationCategory]})
|
|
295
|
+
</div>
|
|
296
|
+
|
|
297
|
+
<div class="title">
|
|
298
|
+
<table>
|
|
299
|
+
<tr>
|
|
300
|
+
<th>${i18next.t('field.short invoice type')}</th>
|
|
301
|
+
<td>
|
|
302
|
+
${Object.keys(SHORT_INVOICE_TYPE['TAX_INVOICE']).map(key => {
|
|
303
|
+
const disabled: boolean = key !== InvoiceType.TAX_INVOICE
|
|
304
|
+
const checked: boolean = key === InvoiceType.TAX_INVOICE
|
|
305
|
+
return html`
|
|
306
|
+
<label for="${'tax_' + key}">${SHORT_INVOICE_TYPE['TAX_INVOICE'][key]}</label>
|
|
307
|
+
<input type="radio" id="${'tax_' + key}" value="${key}" name="taxInvoice" ?checked=${checked} ?disabled=${disabled} />
|
|
308
|
+
`
|
|
309
|
+
})}
|
|
310
|
+
</td>
|
|
311
|
+
<th>${i18next.t('field.tax invoice buyer registration category')}</th>
|
|
312
|
+
<td>
|
|
313
|
+
${Object.keys(BUSINESS_REGISTRATION_CATEGORY).map(key => {
|
|
314
|
+
const disabled: boolean = key !== BusinessRegistrationCategory.BUSINESS_REGISTRATION_NUMBER
|
|
315
|
+
const checked: boolean = key === BusinessRegistrationCategory.BUSINESS_REGISTRATION_NUMBER
|
|
316
|
+
return html`
|
|
317
|
+
<label for="${'tax_' + key}">${BUSINESS_REGISTRATION_CATEGORY[key]}</label>
|
|
318
|
+
<input type="radio" id="${'tax_' + key}" value="${key}" name="buyerBusinessRegistrationCategory" ?checked=${checked} ?disabled=${disabled} />
|
|
319
|
+
`
|
|
320
|
+
})}
|
|
321
|
+
</td>
|
|
322
|
+
</tr>
|
|
323
|
+
</table>
|
|
324
|
+
</div>
|
|
325
|
+
|
|
326
|
+
<div class="body">
|
|
327
|
+
<form id="tax-invoice-form">
|
|
328
|
+
<div class="data">
|
|
329
|
+
<table class="supplier">
|
|
330
|
+
<colgroup>
|
|
331
|
+
<col width="150px" />
|
|
332
|
+
<col width="18%" />
|
|
333
|
+
<col width="32%" />
|
|
334
|
+
<col width="18%" />
|
|
335
|
+
<col width="32%" />
|
|
336
|
+
</colgroup>
|
|
337
|
+
<tr>
|
|
338
|
+
<th rowspan="6" class="target">${i18next.t('field.tax invoice supplier')}</th>
|
|
339
|
+
<th>${i18next.t('field.short business registration number')}</th>
|
|
340
|
+
<td><input type="text" name="supplierBusinessRegistrationNumber" .value=${this.supplier?.supplierBusinessRegistrationNumber || ''} readonly /></td>
|
|
341
|
+
<th>${i18next.t('field.short branch identification')}</th>
|
|
342
|
+
<td><input type="text" name="supplierBranchIdentification" .value=${this.supplier?.supplierBranchIdentification || ''} readonly /></td>
|
|
343
|
+
</tr>
|
|
344
|
+
<tr>
|
|
345
|
+
<th>${i18next.t('field.short tax invoice business name')}</th>
|
|
346
|
+
<td><input type="text" name="supplierBusinessName" .value=${this.supplier?.supplierBusinessName || ''} @input=${this._onInputTaxInvoice} /></td>
|
|
347
|
+
<th>${i18next.t('field.short representative name')}</th>
|
|
348
|
+
<td>${this.supplier?.supplierRepresentativeName}</td>
|
|
349
|
+
</tr>
|
|
350
|
+
<tr>
|
|
351
|
+
<th>${i18next.t('field.address')}</th>
|
|
352
|
+
<td colspan="3">${this.supplier?.supplierAddress}</td>
|
|
353
|
+
</tr>
|
|
354
|
+
<tr>
|
|
355
|
+
<th>${i18next.t('field.business type')}</th>
|
|
356
|
+
<td>${this.supplier?.supplierBusinessType}</td>
|
|
357
|
+
<th>${i18next.t('field.industry type')}</th>
|
|
358
|
+
<td>${this.supplier?.supplierIndustryType}</td>
|
|
359
|
+
</tr>
|
|
360
|
+
<tr>
|
|
361
|
+
<th rowspan="2">${i18next.t('field.email')}</th>
|
|
362
|
+
<td rowspan="2" colspan="3">${this.supplier?.supplierContactEmail}</td>
|
|
363
|
+
</tr>
|
|
364
|
+
<tr></tr>
|
|
365
|
+
</table>
|
|
366
|
+
|
|
367
|
+
<table class="buyer">
|
|
368
|
+
<colgroup>
|
|
369
|
+
<col width="150px" />
|
|
370
|
+
<col width="18%" />
|
|
371
|
+
<col width="32%" />
|
|
372
|
+
<col width="18%" />
|
|
373
|
+
<col width="32%" />
|
|
374
|
+
</colgroup>
|
|
375
|
+
<tr>
|
|
376
|
+
<th rowspan="6" class="target">${i18next.t('field.tax invoice buyer')}</th>
|
|
377
|
+
<th>${i18next.t('field.short business registration number')}</th>
|
|
378
|
+
<td>${this.buyer?.buyerBusinessRegistrationNumber}</td>
|
|
379
|
+
<th>${i18next.t('field.short branch identification')}</th>
|
|
380
|
+
<td>${this.buyer?.buyerBranchIdentification}</td>
|
|
381
|
+
</tr>
|
|
382
|
+
<tr>
|
|
383
|
+
<th>${i18next.t('field.short tax invoice business name')}</th>
|
|
384
|
+
<td>${this.buyer?.buyerBusinessName}</td>
|
|
385
|
+
<th>${i18next.t('field.short representative name')}</th>
|
|
386
|
+
<td>${this.buyer?.buyerRepresentativeName}</td>
|
|
387
|
+
</tr>
|
|
388
|
+
<tr>
|
|
389
|
+
<th>${i18next.t('field.address')}</th>
|
|
390
|
+
<td colspan="3">${this.buyer?.buyerAddress}</td>
|
|
391
|
+
</tr>
|
|
392
|
+
<tr>
|
|
393
|
+
<th>${i18next.t('field.business type')}</th>
|
|
394
|
+
<td>${this.buyer?.buyerBusinessType}</td>
|
|
395
|
+
<th>${i18next.t('field.industry type')}</th>
|
|
396
|
+
<td>${this.buyer?.buyerIndustryType}</td>
|
|
397
|
+
</tr>
|
|
398
|
+
<tr>
|
|
399
|
+
<th>${i18next.t('field.email')}</th>
|
|
400
|
+
<td colspan="3">${this.buyer?.buyer1stContactEmail}</td>
|
|
401
|
+
</tr>
|
|
402
|
+
<tr>
|
|
403
|
+
<th>${i18next.t('field.email')}</th>
|
|
404
|
+
<td colspan="3">${this.buyer?.buyer2ndContactEmail}</td>
|
|
405
|
+
</tr>
|
|
406
|
+
</table>
|
|
407
|
+
</div>
|
|
408
|
+
|
|
409
|
+
<div class="info">
|
|
410
|
+
<table>
|
|
411
|
+
<colgroup>
|
|
412
|
+
<col width="15%" />
|
|
413
|
+
<col width="15%" />
|
|
414
|
+
<col width="15%" />
|
|
415
|
+
<col width="40%" />
|
|
416
|
+
</colgroup>
|
|
417
|
+
<tr>
|
|
418
|
+
<th>${i18next.t('field.issue date')}</th>
|
|
419
|
+
<th>${i18next.t('field.supply amount')}</th>
|
|
420
|
+
<th>${i18next.t('field.tax amount')}</th>
|
|
421
|
+
<th>${i18next.t('field.remark0')}</th>
|
|
422
|
+
</tr>
|
|
423
|
+
<tr>
|
|
424
|
+
<td>${this.taxInvoice?.issueDate}</td>
|
|
425
|
+
<td>${this._numberFormat(this.taxInvoice?.supplyAmount)}</td>
|
|
426
|
+
<td>${this._numberFormat(this.taxInvoice?.taxAmount)}</td>
|
|
427
|
+
<td>${this.taxInvoice?.remark0}</td>
|
|
428
|
+
</tr>
|
|
429
|
+
</table>
|
|
430
|
+
</div>
|
|
431
|
+
|
|
432
|
+
<div class="items">
|
|
433
|
+
<table>
|
|
434
|
+
<colgroup>
|
|
435
|
+
<col width="4%" />
|
|
436
|
+
<col width="4%" />
|
|
437
|
+
<col width="15%" />
|
|
438
|
+
<col width="9%" />
|
|
439
|
+
<col width="9%" />
|
|
440
|
+
<col width="13%" />
|
|
441
|
+
<col width="13%" />
|
|
442
|
+
<col width="13%" />
|
|
443
|
+
<col width="20%" />
|
|
444
|
+
</colgroup>
|
|
445
|
+
<tr>
|
|
446
|
+
<th>${i18next.t('field.tax invoice month')}</th>
|
|
447
|
+
<th>${i18next.t('field.tax invoice day')}</th>
|
|
448
|
+
<th>${i18next.t('field.tax invoice item name')}</th>
|
|
449
|
+
<th>${i18next.t('field.tax invoice ea')}</th>
|
|
450
|
+
<th>${i18next.t('field.tax invoice quantity')}</th>
|
|
451
|
+
<th>${i18next.t('field.tax invoice price')}</th>
|
|
452
|
+
<th>${i18next.t('field.supply amount')}</th>
|
|
453
|
+
<th>${i18next.t('field.tax amount')}</th>
|
|
454
|
+
<th>${i18next.t('field.remark0')}</th>
|
|
455
|
+
</tr>
|
|
456
|
+
|
|
457
|
+
${this.taxInvoice?.taxInvoiceItems?.map(
|
|
458
|
+
item =>
|
|
459
|
+
html`
|
|
460
|
+
<tr>
|
|
461
|
+
<td>${item.supplyDate}</td>
|
|
462
|
+
<td>${item.supplyDate}</td>
|
|
463
|
+
<td>${item.itemName}</td>
|
|
464
|
+
<td>${item.specification}</td>
|
|
465
|
+
<td>${item.quantity}</td>
|
|
466
|
+
<td>${this._numberFormat(item.unitPrice)}</td>
|
|
467
|
+
<td>${this._numberFormat(item.supplyPrice)}</td>
|
|
468
|
+
<td>${this._numberFormat(item.taxPrice)}</td>
|
|
469
|
+
<td>${item.remark}</td>
|
|
470
|
+
</tr>
|
|
471
|
+
`
|
|
472
|
+
)}
|
|
473
|
+
</table>
|
|
474
|
+
</div>
|
|
475
|
+
|
|
476
|
+
<div class="summary">
|
|
477
|
+
<table>
|
|
478
|
+
<colgroup>
|
|
479
|
+
<col width="20%" />
|
|
480
|
+
<col width="20%" />
|
|
481
|
+
<col width="20%" />
|
|
482
|
+
<col width="20%" />
|
|
483
|
+
<col width="20%" />
|
|
484
|
+
</colgroup>
|
|
485
|
+
<tr>
|
|
486
|
+
<th>${i18next.t('field.total amount')}</th>
|
|
487
|
+
<th>${i18next.t('field.tax invoice payment cash')}</th>
|
|
488
|
+
<th>${i18next.t('field.tax invoice payment check')}</th>
|
|
489
|
+
<th>${i18next.t('field.tax invoice payment promissory note')}</th>
|
|
490
|
+
<th>${i18next.t('field.tax invoice payment accounts receivable')}</th>
|
|
491
|
+
</tr>
|
|
492
|
+
<tr>
|
|
493
|
+
<td>${this._numberFormat(this.taxInvoice?.totalAmount)}</td>
|
|
494
|
+
<td>${this._numberFormat(this.taxInvoice?.paymentAmountCash)}</td>
|
|
495
|
+
<td>${this._numberFormat(this.taxInvoice?.paymentAmountCheck)}</td>
|
|
496
|
+
<td>${this._numberFormat(this.taxInvoice?.paymentAmountPromissoryNote)}</td>
|
|
497
|
+
<td>${this._numberFormat(this.taxInvoice?.paymentAmountAccountsReceivable)}</td>
|
|
498
|
+
</tr>
|
|
499
|
+
</table>
|
|
500
|
+
<div>${i18next.t('text.tax invoice description payment', { value: i18next.t(`text.tax invoice description purpose ${this.taxInvoice?.purpose}`) })}</div>
|
|
501
|
+
</div>
|
|
502
|
+
</form>
|
|
503
|
+
</div>
|
|
504
|
+
`
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
async pageInitialized(lifecycle: any) {
|
|
508
|
+
this._fetchSupplier()
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
async _fetchSupplier() {
|
|
512
|
+
const response = await client.query({
|
|
513
|
+
query: gql`
|
|
514
|
+
query TaxInvoiceApi() {
|
|
515
|
+
taxInvoiceApi() {
|
|
516
|
+
businessRegistrationNumber
|
|
517
|
+
branchIdentification
|
|
518
|
+
businessName
|
|
519
|
+
representativeName
|
|
520
|
+
address
|
|
521
|
+
businessType
|
|
522
|
+
industryType
|
|
523
|
+
department
|
|
524
|
+
contactName
|
|
525
|
+
contactPhone
|
|
526
|
+
contactEmail
|
|
527
|
+
contactCellPhone
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
`
|
|
531
|
+
})
|
|
532
|
+
|
|
533
|
+
console.log('response.data.responses : ', response.data.responses)
|
|
534
|
+
|
|
535
|
+
this.supplier = response.data.responses
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
async pageUpdated(changes: any, lifecycle: any) {
|
|
539
|
+
if (this.active) {
|
|
540
|
+
// do something here when this page just became as active
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
async _sendTaxInvoice(num: string) {
|
|
545
|
+
console.log(this.taxInvoiceForm)
|
|
546
|
+
console.log(this.supplier)
|
|
547
|
+
|
|
548
|
+
return
|
|
549
|
+
|
|
550
|
+
const response = await client.mutate({
|
|
551
|
+
mutation: gql`
|
|
552
|
+
mutation SendTaxInvoiceByApi($taxInvoice: NewTaxInvoice!, $taxInvoiceItems: [NewTaxInvoiceItem!]!) {
|
|
553
|
+
sendTaxInvoiceByApi(taxInvoice: $taxInvoice, taxInvoiceItems: $taxInvoiceItems) {
|
|
554
|
+
id
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
`,
|
|
558
|
+
variables: {
|
|
559
|
+
// taxInvoice,
|
|
560
|
+
// taxInvoiceItems
|
|
561
|
+
}
|
|
562
|
+
})
|
|
563
|
+
|
|
564
|
+
if (!response.errors) {
|
|
565
|
+
notify({
|
|
566
|
+
message: i18next.t('text.info_x_successfully', { x: i18next.t('text.delete') })
|
|
567
|
+
})
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
private _numberFormat(value: number | undefined): string {
|
|
572
|
+
return !value ? '' : new Intl.NumberFormat('en-US').format(value)
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
// Input 요소의 값이 변경될 때 호출되는 콜백 함수
|
|
576
|
+
private _onInputTaxInvoice(event: InputEvent) {
|
|
577
|
+
const target = event.target as HTMLInputElement
|
|
578
|
+
this.supplier[target.name] = target.value
|
|
579
|
+
}
|
|
580
|
+
}
|
package/client/route.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
export default function route(page: string) {
|
|
2
2
|
switch (page) {
|
|
3
|
-
case 'tax-invoice-main':
|
|
4
|
-
import('./pages/main')
|
|
5
|
-
return page
|
|
6
|
-
|
|
7
3
|
case 'tax-invoice-list':
|
|
8
4
|
import('./pages/tax-invoice/tax-invoice-list-page')
|
|
9
5
|
return page
|
|
10
6
|
|
|
7
|
+
case 'tax-invoice-send':
|
|
8
|
+
// import('./pages/tax-invoice-send/tax-invoice-send-page')
|
|
9
|
+
return page
|
|
10
|
+
|
|
11
11
|
case 'tax-invoice-company-list':
|
|
12
12
|
import('./pages/tax-invoice-company/tax-invoice-company-list-page')
|
|
13
13
|
return page
|
|
@@ -15,13 +15,13 @@ let TaxInvoiceDetailPopup = class TaxInvoiceDetailPopup extends localize(i18next
|
|
|
15
15
|
this.detail = {};
|
|
16
16
|
}
|
|
17
17
|
render() {
|
|
18
|
-
var _a;
|
|
18
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
19
19
|
return html `
|
|
20
20
|
<div class="title">
|
|
21
21
|
<table>
|
|
22
22
|
<tr>
|
|
23
23
|
<th>${i18next.t('field.approval no')}</th>
|
|
24
|
-
<td>${this.detail.approvalNo}</td>
|
|
24
|
+
<td>${(_b = (_a = this.detail) === null || _a === void 0 ? void 0 : _a.approvalNo) === null || _b === void 0 ? void 0 : _b.replace(/(\S{8})(\S{8})(\S{8})/g, '$1-$2-$3')}</td>
|
|
25
25
|
</tr>
|
|
26
26
|
</table>
|
|
27
27
|
</div>
|
|
@@ -40,7 +40,7 @@ let TaxInvoiceDetailPopup = class TaxInvoiceDetailPopup extends localize(i18next
|
|
|
40
40
|
<tr>
|
|
41
41
|
<th rowspan="6" class="target">${i18next.t('field.tax invoice supplier')}</th>
|
|
42
42
|
<th>${i18next.t('field.short business registration number')}</th>
|
|
43
|
-
<td>${this.detail.supplierBusinessRegistrationNumber}</td>
|
|
43
|
+
<td>${(_d = (_c = this.detail) === null || _c === void 0 ? void 0 : _c.supplierBusinessRegistrationNumber) === null || _d === void 0 ? void 0 : _d.replace(/(\d{3})(\d{2})(\d{5})/g, '$1-$2-$3')}</td>
|
|
44
44
|
<th>${i18next.t('field.short branch identification')}</th>
|
|
45
45
|
<td>${this.detail.supplierBranchIdentification}</td>
|
|
46
46
|
</tr>
|
|
@@ -68,10 +68,17 @@ let TaxInvoiceDetailPopup = class TaxInvoiceDetailPopup extends localize(i18next
|
|
|
68
68
|
</table>
|
|
69
69
|
|
|
70
70
|
<table class="buyer">
|
|
71
|
+
<colgroup>
|
|
72
|
+
<col width="150px" />
|
|
73
|
+
<col width="18%" />
|
|
74
|
+
<col width="32%" />
|
|
75
|
+
<col width="18%" />
|
|
76
|
+
<col width="32%" />
|
|
77
|
+
</colgroup>
|
|
71
78
|
<tr>
|
|
72
79
|
<th rowspan="6" class="target">${i18next.t('field.tax invoice buyer')}</th>
|
|
73
80
|
<th>${i18next.t('field.short business registration number')}</th>
|
|
74
|
-
<td>${this.detail.buyerBusinessRegistrationNumber}</td>
|
|
81
|
+
<td>${(_f = (_e = this.detail) === null || _e === void 0 ? void 0 : _e.buyerBusinessRegistrationNumber) === null || _f === void 0 ? void 0 : _f.replace(/(\d{3})(\d{2})(\d{5})/g, '$1-$2-$3')}</td>
|
|
75
82
|
<th>${i18next.t('field.short branch identification')}</th>
|
|
76
83
|
<td>${this.detail.buyerBranchIdentification}</td>
|
|
77
84
|
</tr>
|
|
@@ -119,7 +126,7 @@ let TaxInvoiceDetailPopup = class TaxInvoiceDetailPopup extends localize(i18next
|
|
|
119
126
|
<th>${i18next.t('field.remark0')}</th>
|
|
120
127
|
</tr>
|
|
121
128
|
<tr>
|
|
122
|
-
<td>${this.detail.issueDate}</td>
|
|
129
|
+
<td>${(_g = this.detail.issueDate) === null || _g === void 0 ? void 0 : _g.split('T')[0]}</td>
|
|
123
130
|
<td>${this._numberFormat(this.detail.supplyAmount)}</td>
|
|
124
131
|
<td>${this._numberFormat(this.detail.taxAmount)}</td>
|
|
125
132
|
<td>${this.detail.modificationReason}</td>
|
|
@@ -153,10 +160,12 @@ let TaxInvoiceDetailPopup = class TaxInvoiceDetailPopup extends localize(i18next
|
|
|
153
160
|
<th>${i18next.t('field.remark0')}</th>
|
|
154
161
|
</tr>
|
|
155
162
|
|
|
156
|
-
${(
|
|
163
|
+
${(_h = this.detail.taxInvoiceItems) === null || _h === void 0 ? void 0 : _h.map(item => {
|
|
164
|
+
var _a;
|
|
165
|
+
return html `
|
|
157
166
|
<tr>
|
|
158
167
|
<td>${item.supplyDate.split('-')[1]}</td>
|
|
159
|
-
<td>${item.supplyDate.split('-')[2]}</td>
|
|
168
|
+
<td>${(_a = item.supplyDate.split('-')[2]) === null || _a === void 0 ? void 0 : _a.split('T')[0]}</td>
|
|
160
169
|
<td>${item.itemName}</td>
|
|
161
170
|
<td>${item.specification}</td>
|
|
162
171
|
<td>${item.quantity}</td>
|
|
@@ -165,7 +174,8 @@ let TaxInvoiceDetailPopup = class TaxInvoiceDetailPopup extends localize(i18next
|
|
|
165
174
|
<td>${this._numberFormat(item.taxPrice)}</td>
|
|
166
175
|
<td>${item.remark}</td>
|
|
167
176
|
</tr>
|
|
168
|
-
|
|
177
|
+
`;
|
|
178
|
+
})}
|
|
169
179
|
</table>
|
|
170
180
|
</div>
|
|
171
181
|
|
|
@@ -211,7 +221,6 @@ let TaxInvoiceDetailPopup = class TaxInvoiceDetailPopup extends localize(i18next
|
|
|
211
221
|
query ($id: String!) {
|
|
212
222
|
responses: taxInvoice(id: $id) {
|
|
213
223
|
id
|
|
214
|
-
name
|
|
215
224
|
category
|
|
216
225
|
approvalNo
|
|
217
226
|
originalApprovalNo
|