@things-factory/tax-invoice 7.0.0-alpha.9 → 7.0.0
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/bootstrap.ts +1 -0
- package/client/pages/tax-audit-result/tax-audit-result-importer.ts +8 -19
- package/client/pages/tax-audit-result/tax-audit-result-list-page.ts +10 -25
- package/client/pages/tax-invoice/tax-invoice-detail-popup.ts +21 -19
- package/client/pages/tax-invoice-api/tax-invoice-api-page.ts +99 -61
- package/client/pages/tax-invoice-company/tax-invoice-company-list-page.ts +2 -67
- package/client/pages/{tax-invoice-company/tax-invoice-company-importer.ts → tax-invoice-send/company-list-popup.ts} +69 -57
- package/client/pages/tax-invoice-send/tax-invoice-send-page.ts +78 -742
- package/client/pages/tax-invoice-send/tax-invoice-send.ts +1181 -0
- package/config/config.development.js +13 -0
- package/config/config.production.js +13 -0
- package/dist-client/bootstrap.d.ts +1 -0
- package/dist-client/bootstrap.js +1 -1
- package/dist-client/bootstrap.js.map +1 -1
- package/dist-client/pages/main.js.map +1 -1
- package/dist-client/pages/tax-audit-result/tax-audit-result-importer.d.ts +1 -0
- package/dist-client/pages/tax-audit-result/tax-audit-result-importer.js +5 -12
- package/dist-client/pages/tax-audit-result/tax-audit-result-importer.js.map +1 -1
- package/dist-client/pages/tax-audit-result/tax-audit-result-list-page.js +8 -16
- package/dist-client/pages/tax-audit-result/tax-audit-result-list-page.js.map +1 -1
- package/dist-client/pages/tax-invoice/tax-invoice-detail-popup.d.ts +0 -1
- package/dist-client/pages/tax-invoice/tax-invoice-detail-popup.js +20 -17
- 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 +5 -5
- 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 -2
- package/dist-client/pages/tax-invoice-api/tax-invoice-api-page.js +91 -61
- 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-list-page.d.ts +0 -16
- package/dist-client/pages/tax-invoice-company/tax-invoice-company-list-page.js +3 -62
- package/dist-client/pages/tax-invoice-company/tax-invoice-company-list-page.js.map +1 -1
- package/dist-client/pages/tax-invoice-send/company-list-popup.d.ts +69 -0
- package/dist-client/pages/{tax-invoice-company/tax-invoice-company-importer.js → tax-invoice-send/company-list-popup.js} +75 -60
- package/dist-client/pages/tax-invoice-send/company-list-popup.js.map +1 -0
- package/dist-client/pages/tax-invoice-send/tax-invoice-send-page.d.ts +11 -78
- package/dist-client/pages/tax-invoice-send/tax-invoice-send-page.js +65 -654
- package/dist-client/pages/tax-invoice-send/tax-invoice-send-page.js.map +1 -1
- package/dist-client/pages/tax-invoice-send/tax-invoice-send.d.ts +112 -0
- package/dist-client/pages/tax-invoice-send/tax-invoice-send.js +1086 -0
- package/dist-client/pages/tax-invoice-send/tax-invoice-send.js.map +1 -0
- package/dist-client/route.d.ts +1 -1
- package/dist-client/route.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/index.d.ts +2 -0
- package/dist-server/routes.d.ts +1 -0
- package/dist-server/service/index.d.ts +9 -0
- package/dist-server/service/index.js +1 -0
- package/dist-server/service/index.js.map +1 -1
- package/dist-server/service/tax-audit-result/event-subscriber.d.ts +7 -0
- package/dist-server/service/tax-audit-result/event-subscriber.js +2 -2
- package/dist-server/service/tax-audit-result/event-subscriber.js.map +1 -1
- package/dist-server/service/tax-audit-result/index.d.ts +7 -0
- package/dist-server/service/tax-audit-result/tax-audit-result-history.d.ts +25 -0
- package/dist-server/service/tax-audit-result/tax-audit-result-history.js +10 -6
- package/dist-server/service/tax-audit-result/tax-audit-result-history.js.map +1 -1
- package/dist-server/service/tax-audit-result/tax-audit-result-mutation.d.ts +10 -0
- package/dist-server/service/tax-audit-result/tax-audit-result-mutation.js +2 -2
- package/dist-server/service/tax-audit-result/tax-audit-result-mutation.js.map +1 -1
- package/dist-server/service/tax-audit-result/tax-audit-result-query.d.ts +12 -0
- package/dist-server/service/tax-audit-result/tax-audit-result-query.js +3 -3
- package/dist-server/service/tax-audit-result/tax-audit-result-query.js.map +1 -1
- package/dist-server/service/tax-audit-result/tax-audit-result-type.d.ts +23 -0
- package/dist-server/service/tax-audit-result/tax-audit-result-type.js +6 -6
- package/dist-server/service/tax-audit-result/tax-audit-result-type.js.map +1 -1
- package/dist-server/service/tax-audit-result/tax-audit-result.d.ts +25 -0
- package/dist-server/service/tax-audit-result/tax-audit-result.js +4 -4
- package/dist-server/service/tax-audit-result/tax-audit-result.js.map +1 -1
- package/dist-server/service/tax-invoice/index.d.ts +5 -0
- package/dist-server/service/tax-invoice/tax-invoice-mutation.d.ts +10 -0
- package/dist-server/service/tax-invoice/tax-invoice-mutation.js +2 -6
- package/dist-server/service/tax-invoice/tax-invoice-mutation.js.map +1 -1
- package/dist-server/service/tax-invoice/tax-invoice-query.d.ts +14 -0
- package/dist-server/service/tax-invoice/tax-invoice-query.js +22 -10
- package/dist-server/service/tax-invoice/tax-invoice-query.js.map +1 -1
- package/dist-server/service/tax-invoice/tax-invoice-type.d.ts +86 -0
- package/dist-server/service/tax-invoice/tax-invoice-type.js +12 -8
- package/dist-server/service/tax-invoice/tax-invoice-type.js.map +1 -1
- package/dist-server/service/tax-invoice/tax-invoice-util.d.ts +133 -0
- package/dist-server/service/tax-invoice/tax-invoice-util.js +2 -2
- package/dist-server/service/tax-invoice/tax-invoice-util.js.map +1 -1
- package/dist-server/service/tax-invoice/tax-invoice.d.ts +120 -0
- package/dist-server/service/tax-invoice/tax-invoice.js +15 -10
- package/dist-server/service/tax-invoice/tax-invoice.js.map +1 -1
- package/dist-server/service/tax-invoice-api/index.d.ts +5 -0
- package/dist-server/service/tax-invoice-api/tax-invoice-api-mutation.d.ts +8 -0
- package/dist-server/service/tax-invoice-api/tax-invoice-api-mutation.js +46 -16
- 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.d.ts +10 -0
- package/dist-server/service/tax-invoice-api/tax-invoice-api-query.js +15 -9
- 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.d.ts +32 -0
- package/dist-server/service/tax-invoice-api/tax-invoice-api-type.js +9 -13
- 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.d.ts +31 -0
- package/dist-server/service/tax-invoice-api/tax-invoice-api.js +12 -24
- package/dist-server/service/tax-invoice-api/tax-invoice-api.js.map +1 -1
- package/dist-server/service/tax-invoice-company/index.d.ts +5 -0
- package/dist-server/service/tax-invoice-company/tax-invoice-company-mutation.d.ts +7 -0
- package/dist-server/service/tax-invoice-company/tax-invoice-company-mutation.js +2 -2
- package/dist-server/service/tax-invoice-company/tax-invoice-company-mutation.js.map +1 -1
- package/dist-server/service/tax-invoice-company/tax-invoice-company-query.d.ts +14 -0
- package/dist-server/service/tax-invoice-company/tax-invoice-company-query.js +44 -9
- package/dist-server/service/tax-invoice-company/tax-invoice-company-query.js.map +1 -1
- package/dist-server/service/tax-invoice-company/tax-invoice-company-type.d.ts +38 -0
- package/dist-server/service/tax-invoice-company/tax-invoice-company-type.js +59 -9
- package/dist-server/service/tax-invoice-company/tax-invoice-company-type.js.map +1 -1
- package/dist-server/service/tax-invoice-company/tax-invoice-company.d.ts +29 -0
- package/dist-server/service/tax-invoice-company/tax-invoice-company.js +14 -24
- package/dist-server/service/tax-invoice-company/tax-invoice-company.js.map +1 -1
- package/dist-server/service/tax-invoice-item/index.d.ts +5 -0
- package/dist-server/service/tax-invoice-item/tax-invoice-item-mutation.d.ts +10 -0
- package/dist-server/service/tax-invoice-item/tax-invoice-item-mutation.js +2 -2
- package/dist-server/service/tax-invoice-item/tax-invoice-item-mutation.js.map +1 -1
- package/dist-server/service/tax-invoice-item/tax-invoice-item-query.d.ts +11 -0
- package/dist-server/service/tax-invoice-item/tax-invoice-item-query.js +3 -3
- 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.d.ts +29 -0
- package/dist-server/service/tax-invoice-item/tax-invoice-item-type.js +6 -6
- 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.d.ts +23 -0
- package/dist-server/service/tax-invoice-item/tax-invoice-item.js +7 -7
- package/dist-server/service/tax-invoice-item/tax-invoice-item.js.map +1 -1
- package/dist-server/service/unipost-api/tax-invoice-inquiry.d.ts +16 -0
- package/dist-server/service/unipost-api/tax-invoice-inquiry.js +10 -14
- package/dist-server/service/unipost-api/tax-invoice-inquiry.js.map +1 -1
- package/dist-server/service/unipost-api/tax-invoice-send.d.ts +1 -0
- package/dist-server/service/unipost-api/tax-invoice-send.js +5 -7
- package/dist-server/service/unipost-api/tax-invoice-send.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +8 -7
- package/server/service/index.ts +1 -0
- package/server/service/tax-audit-result/tax-audit-result-history.ts +10 -6
- package/server/service/tax-audit-result/tax-audit-result-query.ts +4 -1
- package/server/service/tax-audit-result/tax-audit-result.ts +6 -2
- package/server/service/tax-invoice/tax-invoice-mutation.ts +0 -3
- package/server/service/tax-invoice/tax-invoice-query.ts +36 -9
- package/server/service/tax-invoice/tax-invoice-type.ts +3 -0
- package/server/service/tax-invoice/tax-invoice-util.ts +1 -0
- package/server/service/tax-invoice/tax-invoice.ts +19 -4
- package/server/service/tax-invoice-api/tax-invoice-api-mutation.ts +63 -24
- package/server/service/tax-invoice-api/tax-invoice-api-query.ts +15 -6
- package/server/service/tax-invoice-api/tax-invoice-api-type.ts +2 -5
- package/server/service/tax-invoice-api/tax-invoice-api.ts +23 -20
- package/server/service/tax-invoice-company/tax-invoice-company-query.ts +39 -6
- package/server/service/tax-invoice-company/tax-invoice-company-type.ts +40 -4
- package/server/service/tax-invoice-company/tax-invoice-company.ts +11 -21
- package/server/service/tax-invoice-item/tax-invoice-item-query.ts +4 -1
- package/server/service/tax-invoice-item/tax-invoice-item.ts +22 -8
- package/server/service/unipost-api/tax-invoice-inquiry.ts +6 -10
- package/server/service/unipost-api/tax-invoice-send.ts +5 -5
- package/translations/ko.json +3 -0
- package/dist-client/pages/tax-invoice-company/tax-invoice-company-importer.d.ts +0 -31
- package/dist-client/pages/tax-invoice-company/tax-invoice-company-importer.js.map +0 -1
|
@@ -1,52 +1,38 @@
|
|
|
1
1
|
import { __decorate, __metadata } from "tslib";
|
|
2
2
|
import '@operato/data-grist';
|
|
3
3
|
import { CommonButtonStyles, CommonGristStyles, ScrollbarStyles } from '@operato/styles';
|
|
4
|
-
import { PageView } from '@operato/shell';
|
|
4
|
+
import { CustomAlert, PageView } from '@operato/shell';
|
|
5
5
|
import { css, html } from 'lit';
|
|
6
|
-
import { customElement,
|
|
6
|
+
import { customElement, state } from 'lit/decorators.js';
|
|
7
7
|
import { ScopedElementsMixin } from '@open-wc/scoped-elements';
|
|
8
8
|
import { client } from '@operato/graphql';
|
|
9
9
|
import { i18next, localize } from '@operato/i18n';
|
|
10
10
|
import { notify } from '@operato/layout';
|
|
11
11
|
import gql from 'graphql-tag';
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
[InvoiceType.TAX_INVOICE]: '일반',
|
|
16
|
-
[InvoiceType.SMALL_BUSINESS_TAX_INVOICE]: '영세율',
|
|
17
|
-
[InvoiceType.CONSIGNMENT_TAX_INVOICE]: '위수탁',
|
|
18
|
-
[InvoiceType.SMALL_BUSINESS_CONSIGNMENT_TAX_INVOICE]: '위수탁영세율'
|
|
19
|
-
},
|
|
20
|
-
INVOICE: {
|
|
21
|
-
[InvoiceType.INVOICE]: '일반',
|
|
22
|
-
[InvoiceType.CONSIGNMENT_INVOICE]: '위수탁'
|
|
23
|
-
// [InvoiceType.IMPORT_INVOICE]: INVOICE_TYPE[IMPORT_INVOICE],
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
const SHORT_BUSINESS_REGISTRATION_CATEGORY = {
|
|
27
|
-
[BusinessRegistrationCategory.BUSINESS_REGISTRATION_NUMBER]: '사업자',
|
|
28
|
-
[BusinessRegistrationCategory.RESIDENT_REGISTRATION_NUMBER]: '개인',
|
|
29
|
-
[BusinessRegistrationCategory.FOREIGNER_REGISTRATION_NUMBER]: '외국인'
|
|
30
|
-
};
|
|
12
|
+
import { BusinessRegistrationCategory, Category, InvoiceType, Purpose } from '../tax-invoice/tax-invoice-list-page';
|
|
13
|
+
import { CompanyListPopup } from './company-list-popup';
|
|
14
|
+
import './tax-invoice-send';
|
|
31
15
|
let TaxInvoiceSendPage = class TaxInvoiceSendPage extends localize(i18next)(ScopedElementsMixin(PageView)) {
|
|
32
16
|
constructor() {
|
|
33
17
|
super(...arguments);
|
|
34
18
|
// 오늘 날짜 YYYY-MM-DD 형식으로 뽑기
|
|
35
19
|
this.today = new Intl.DateTimeFormat('fr-CA', { timeZone: 'Asia/Seoul' }).format(new Date());
|
|
36
|
-
this.
|
|
20
|
+
this.defaultSupplier = {
|
|
37
21
|
supplierBusinessRegistrationCategory: '01',
|
|
38
22
|
supplierBusinessRegistrationNumber: '',
|
|
39
23
|
supplierBranchIdentification: '',
|
|
40
24
|
supplierBusinessName: '',
|
|
41
25
|
supplierRepresentativeName: ''
|
|
42
26
|
};
|
|
43
|
-
this.
|
|
27
|
+
this.supplier = this.defaultSupplier;
|
|
28
|
+
this.defaultBuyer = {
|
|
44
29
|
buyerBusinessRegistrationCategory: BusinessRegistrationCategory.BUSINESS_REGISTRATION_NUMBER,
|
|
45
30
|
buyerBusinessRegistrationNumber: '',
|
|
46
31
|
buyerBusinessName: '',
|
|
47
32
|
buyerRepresentativeName: ''
|
|
48
33
|
};
|
|
49
|
-
this.
|
|
34
|
+
this.buyer = this.defaultBuyer;
|
|
35
|
+
this.defaultTaxInvoice = {
|
|
50
36
|
invoiceType: InvoiceType.TAX_INVOICE,
|
|
51
37
|
category: Category.EXPORT,
|
|
52
38
|
issueDate: this.today,
|
|
@@ -55,8 +41,9 @@ let TaxInvoiceSendPage = class TaxInvoiceSendPage extends localize(i18next)(Scop
|
|
|
55
41
|
taxAmount: 0,
|
|
56
42
|
totalAmount: 0
|
|
57
43
|
};
|
|
44
|
+
this.taxInvoice = this.defaultTaxInvoice;
|
|
58
45
|
this.defaultTaxInvoiceItem = {
|
|
59
|
-
sequence: new Date().getTime(),
|
|
46
|
+
sequence: new Date().getTime(), // 구분용 임시 값 (중복되면 안되니 생성 마다 넣어주기)
|
|
60
47
|
supplyDate: '',
|
|
61
48
|
itemName: '',
|
|
62
49
|
specification: '',
|
|
@@ -67,6 +54,11 @@ let TaxInvoiceSendPage = class TaxInvoiceSendPage extends localize(i18next)(Scop
|
|
|
67
54
|
};
|
|
68
55
|
this.taxInvoiceItems = [Object.assign({}, this.defaultTaxInvoiceItem)];
|
|
69
56
|
}
|
|
57
|
+
static get scopedElements() {
|
|
58
|
+
return {
|
|
59
|
+
'company-list-popup': CompanyListPopup
|
|
60
|
+
};
|
|
61
|
+
}
|
|
70
62
|
get context() {
|
|
71
63
|
return {
|
|
72
64
|
title: i18next.t('title.tax invoice send'),
|
|
@@ -77,308 +69,9 @@ let TaxInvoiceSendPage = class TaxInvoiceSendPage extends localize(i18next)(Scop
|
|
|
77
69
|
};
|
|
78
70
|
}
|
|
79
71
|
render() {
|
|
80
|
-
|
|
81
|
-
return html `
|
|
82
|
-
<div class="invoice-type">
|
|
83
|
-
* ${INVOICE_TYPE[(_a = this.taxInvoice) === null || _a === void 0 ? void 0 : _a.invoiceType]} (${SHORT_BUSINESS_REGISTRATION_CATEGORY[this.buyer.buyerBusinessRegistrationCategory]})
|
|
84
|
-
</div>
|
|
85
|
-
|
|
86
|
-
<div class="title">
|
|
87
|
-
<table>
|
|
88
|
-
<tr>
|
|
89
|
-
<th>${i18next.t('field.short invoice type')}</th>
|
|
90
|
-
<td>
|
|
91
|
-
${Object.keys(SHORT_INVOICE_TYPE['TAX_INVOICE']).map(key => {
|
|
92
|
-
const disabled = key !== InvoiceType.TAX_INVOICE;
|
|
93
|
-
const checked = key === InvoiceType.TAX_INVOICE;
|
|
94
|
-
return html `
|
|
95
|
-
<label for="${'tax_' + key}">${SHORT_INVOICE_TYPE['TAX_INVOICE'][key]}</label>
|
|
96
|
-
<input type="radio" id="${'tax_' + key}" value="${key}" name="invoiceType" ?checked=${checked} ?disabled=${disabled} />
|
|
97
|
-
`;
|
|
98
|
-
})}
|
|
99
|
-
</td>
|
|
100
|
-
<th>${i18next.t('field.tax invoice buyer registration category')}</th>
|
|
101
|
-
<td>
|
|
102
|
-
${Object.keys(BUSINESS_REGISTRATION_CATEGORY).map(key => {
|
|
103
|
-
const disabled = key !== BusinessRegistrationCategory.BUSINESS_REGISTRATION_NUMBER;
|
|
104
|
-
const checked = key === BusinessRegistrationCategory.BUSINESS_REGISTRATION_NUMBER;
|
|
105
|
-
return html `
|
|
106
|
-
<label for="${'tax_' + key}">${BUSINESS_REGISTRATION_CATEGORY[key]}</label>
|
|
107
|
-
<input type="radio" id="${'tax_' + key}" value="${key}" name="buyerBusinessRegistrationCategory" ?checked=${checked} ?disabled=${disabled} />
|
|
108
|
-
`;
|
|
109
|
-
})}
|
|
110
|
-
</td>
|
|
111
|
-
</tr>
|
|
112
|
-
</table>
|
|
113
|
-
</div>
|
|
114
|
-
|
|
115
|
-
<div class="body">
|
|
116
|
-
<div class="data">
|
|
117
|
-
<table class="supplier">
|
|
118
|
-
<colgroup>
|
|
119
|
-
<col width="150px" />
|
|
120
|
-
<col width="18%" />
|
|
121
|
-
<col width="32%" />
|
|
122
|
-
<col width="18%" />
|
|
123
|
-
<col width="32%" />
|
|
124
|
-
</colgroup>
|
|
125
|
-
<tr>
|
|
126
|
-
<th rowspan="6" class="target">${i18next.t('field.tax invoice supplier')}</th>
|
|
127
|
-
<th required>${i18next.t('field.short business registration number')}</th>
|
|
128
|
-
<td>${(_b = this.supplier) === null || _b === void 0 ? void 0 : _b.supplierBusinessRegistrationNumber.replace(/(\S{3})(\S{2})(\S{5})/g, '$1-$2-$3')}</td>
|
|
129
|
-
<th>${i18next.t('field.short branch identification')}</th>
|
|
130
|
-
<td>${(_c = this.supplier) === null || _c === void 0 ? void 0 : _c.supplierBranchIdentification}</td>
|
|
131
|
-
</tr>
|
|
132
|
-
<tr>
|
|
133
|
-
<th required>${i18next.t('field.short tax invoice business name')}</th>
|
|
134
|
-
<td><input type="text" name="supplierBusinessName" .value=${((_d = this.supplier) === null || _d === void 0 ? void 0 : _d.supplierBusinessName) || ''} @input=${this._onInputTaxInvoice} /></td>
|
|
135
|
-
<th required>${i18next.t('field.tax invoice representative name')}</th>
|
|
136
|
-
<td>
|
|
137
|
-
<input type="text" name="supplierRepresentativeName" .value=${((_e = this.supplier) === null || _e === void 0 ? void 0 : _e.supplierRepresentativeName) || ''} @input=${this._onInputTaxInvoice} />
|
|
138
|
-
</td>
|
|
139
|
-
</tr>
|
|
140
|
-
<tr>
|
|
141
|
-
<th>${i18next.t('field.address')}</th>
|
|
142
|
-
<td colspan="3">${(_f = this.supplier) === null || _f === void 0 ? void 0 : _f.supplierAddress}</td>
|
|
143
|
-
</tr>
|
|
144
|
-
<tr>
|
|
145
|
-
<th>${i18next.t('field.business type')}</th>
|
|
146
|
-
<td><input type="text" name="supplierBusinessType" .value=${((_g = this.supplier) === null || _g === void 0 ? void 0 : _g.supplierBusinessType) || ''} @input=${this._onInputTaxInvoice} /></td>
|
|
147
|
-
<th>${i18next.t('field.industry type')}</th>
|
|
148
|
-
<td><input type="text" name="supplierIndustryType" .value=${((_h = this.supplier) === null || _h === void 0 ? void 0 : _h.supplierIndustryType) || ''} @input=${this._onInputTaxInvoice} /></td>
|
|
149
|
-
</tr>
|
|
150
|
-
<tr>
|
|
151
|
-
<th rowspan="2">${i18next.t('field.email')}</th>
|
|
152
|
-
<td rowspan="2" colspan="3">
|
|
153
|
-
<input type="text" name="supplierContactEmail" .value=${((_j = this.supplier) === null || _j === void 0 ? void 0 : _j.supplierContactEmail) || ''} @input=${this._onInputTaxInvoice} />
|
|
154
|
-
</td>
|
|
155
|
-
</tr>
|
|
156
|
-
<tr></tr>
|
|
157
|
-
</table>
|
|
158
|
-
|
|
159
|
-
<table class="buyer">
|
|
160
|
-
<colgroup>
|
|
161
|
-
<col width="150px" />
|
|
162
|
-
<col width="18%" />
|
|
163
|
-
<col width="32%" />
|
|
164
|
-
<col width="18%" />
|
|
165
|
-
<col width="32%" />
|
|
166
|
-
</colgroup>
|
|
167
|
-
<tr>
|
|
168
|
-
<th rowspan="6" class="target">${i18next.t('field.tax invoice buyer')}</th>
|
|
169
|
-
<th required>${i18next.t('field.short business registration number')}</th>
|
|
170
|
-
<td>
|
|
171
|
-
<input
|
|
172
|
-
type="text"
|
|
173
|
-
maxlength="10"
|
|
174
|
-
name="buyerBusinessRegistrationNumber"
|
|
175
|
-
.value=${((_k = this.buyer) === null || _k === void 0 ? void 0 : _k.buyerBusinessRegistrationNumber) || ''}
|
|
176
|
-
@input=${this._onInputTaxInvoice}
|
|
177
|
-
/>
|
|
178
|
-
</td>
|
|
179
|
-
<th>${i18next.t('field.short branch identification')}</th>
|
|
180
|
-
<td><input type="text" name="buyerBranchIdentification" .value=${((_l = this.buyer) === null || _l === void 0 ? void 0 : _l.buyerBranchIdentification) || ''} @input=${this._onInputTaxInvoice} /></td>
|
|
181
|
-
</tr>
|
|
182
|
-
<tr>
|
|
183
|
-
<th required>${i18next.t('field.short tax invoice business name')}</th>
|
|
184
|
-
<td><input type="text" name="buyerBusinessName" .value=${((_m = this.buyer) === null || _m === void 0 ? void 0 : _m.buyerBusinessName) || ''} @input=${this._onInputTaxInvoice} /></td>
|
|
185
|
-
<th required>${i18next.t('field.tax invoice representative name')}</th>
|
|
186
|
-
<td><input type="text" name="buyerRepresentativeName" .value=${((_o = this.buyer) === null || _o === void 0 ? void 0 : _o.buyerRepresentativeName) || ''} @input=${this._onInputTaxInvoice} /></td>
|
|
187
|
-
</tr>
|
|
188
|
-
<tr>
|
|
189
|
-
<th>${i18next.t('field.address')}</th>
|
|
190
|
-
<td colspan="3"><input type="text" name="buyerAddress" .value=${((_p = this.buyer) === null || _p === void 0 ? void 0 : _p.buyerAddress) || ''} @input=${this._onInputTaxInvoice} /></td>
|
|
191
|
-
</tr>
|
|
192
|
-
<tr>
|
|
193
|
-
<th>${i18next.t('field.business type')}</th>
|
|
194
|
-
<td><input type="text" name="buyerBusinessType" .value=${((_q = this.buyer) === null || _q === void 0 ? void 0 : _q.buyerBusinessType) || ''} @input=${this._onInputTaxInvoice} /></td>
|
|
195
|
-
|
|
196
|
-
<th>${i18next.t('field.industry type')}</th>
|
|
197
|
-
<td><input type="text" name="buyerIndustryType" .value=${((_r = this.buyer) === null || _r === void 0 ? void 0 : _r.buyerIndustryType) || ''} @input=${this._onInputTaxInvoice} /></td>
|
|
198
|
-
</tr>
|
|
199
|
-
<tr>
|
|
200
|
-
<th>${i18next.t('field.email')}</th>
|
|
201
|
-
<td colspan="3"><input type="text" name="buyer1stContactEmail" .value=${((_s = this.buyer) === null || _s === void 0 ? void 0 : _s.buyer1stContactEmail) || ''} @input=${this._onInputTaxInvoice} /></td>
|
|
202
|
-
</tr>
|
|
203
|
-
<tr>
|
|
204
|
-
<th>${i18next.t('field.email')}</th>
|
|
205
|
-
<td colspan="3"><input type="text" name="buyer2ndContactEmail" .value=${((_t = this.buyer) === null || _t === void 0 ? void 0 : _t.buyer2ndContactEmail) || ''} @input=${this._onInputTaxInvoice} /></td>
|
|
206
|
-
</tr>
|
|
207
|
-
</table>
|
|
208
|
-
</div>
|
|
209
|
-
|
|
210
|
-
<div class="info flex-column">
|
|
211
|
-
<div class="flex-row">
|
|
212
|
-
<div class="title" required>${i18next.t('field.issue date')}</div>
|
|
213
|
-
<div class="value">
|
|
214
|
-
<input type="date" name="issueDate" .value=${this.taxInvoice.issueDate} @input=${this._onInputTaxInvoice} />
|
|
215
|
-
<span class="desc">※ 작성일자는 공급 연월일을 의미함</span>
|
|
216
|
-
</div>
|
|
217
|
-
<div class="title">${i18next.t('field.remark0')}</div>
|
|
218
|
-
<div class="value"><input type="text" name="remark0" .value=${((_u = this.taxInvoice) === null || _u === void 0 ? void 0 : _u.remark0) || ''} @input=${this._onInputTaxInvoice} /></div>
|
|
219
|
-
</div>
|
|
220
|
-
<div class="flex-row">
|
|
221
|
-
<div class="title">${i18next.t('field.total amount')}</div>
|
|
222
|
-
<div class="value">${this._numberFormat((_v = this.taxInvoice) === null || _v === void 0 ? void 0 : _v.totalAmount)}</div>
|
|
223
|
-
<div class="title">${i18next.t('field.supply amount')}</div>
|
|
224
|
-
<div class="value">${this._numberFormat((_w = this.taxInvoice) === null || _w === void 0 ? void 0 : _w.supplyAmount)}</div>
|
|
225
|
-
<div class="title">${i18next.t('field.tax amount')}</div>
|
|
226
|
-
<div class="value">${this._numberFormat((_x = this.taxInvoice) === null || _x === void 0 ? void 0 : _x.taxAmount)}</div>
|
|
227
|
-
</div>
|
|
228
|
-
</div>
|
|
229
|
-
|
|
230
|
-
<div class="items">
|
|
231
|
-
<div class="desc desc-date">
|
|
232
|
-
※ 아래 '품목'의 '월'은 상단 '작성일자'의 '월'이 자동 반영됩니다. 합계의 '계산' 버튼은 금액을 공급가액과 세액으로 계산할 수 있습니다.
|
|
233
|
-
</div>
|
|
234
|
-
<div class="desc"><button class="btn-add" @click=${this._onAddInvoiceItem}>품목추가</button> 품목은 최대 16개까지 추가, 삭제 가능</div>
|
|
235
|
-
|
|
236
|
-
<table>
|
|
237
|
-
<colgroup>
|
|
238
|
-
<col width="5%" />
|
|
239
|
-
<col width="5%" />
|
|
240
|
-
<col width="14%" />
|
|
241
|
-
<col width="7%" />
|
|
242
|
-
<col width="7%" />
|
|
243
|
-
<col width="12%" />
|
|
244
|
-
<col width="12%" />
|
|
245
|
-
<col width="12%" />
|
|
246
|
-
<col width="16%" />
|
|
247
|
-
<col width="8%" />
|
|
248
|
-
</colgroup>
|
|
249
|
-
<tr>
|
|
250
|
-
<th>${i18next.t('field.tax invoice month')}</th>
|
|
251
|
-
<th required>${i18next.t('field.tax invoice day')}</th>
|
|
252
|
-
<th required>${i18next.t('field.tax invoice item name')}</th>
|
|
253
|
-
<th>${i18next.t('field.tax invoice ea')}</th>
|
|
254
|
-
<th required>${i18next.t('field.tax invoice quantity')}</th>
|
|
255
|
-
<th required>${i18next.t('field.tax invoice price')}</th>
|
|
256
|
-
<th>${i18next.t('field.supply amount')}</th>
|
|
257
|
-
<th>${i18next.t('field.tax amount')}</th>
|
|
258
|
-
<th>${i18next.t('field.remark0')}</th>
|
|
259
|
-
<th>${i18next.t('field.delete')}</th>
|
|
260
|
-
</tr>
|
|
261
|
-
|
|
262
|
-
${this.taxInvoiceItems.map((item, idx) => html `
|
|
263
|
-
<tr>
|
|
264
|
-
<input type="hidden" name="sequence" value=${item.sequence} />
|
|
265
|
-
<td>${this.taxInvoice.issueDate.split('-')[1]}</td>
|
|
266
|
-
<td><input type="text" numeric maxlength="2" name="supplyDate" @input=${e => this._onInputItem(e, idx)} /></td>
|
|
267
|
-
<td><input type="text" name="itemName" .value=${item.itemName} @input=${e => this._onInputItem(e, idx)} /></td>
|
|
268
|
-
<td><input type="text" name="specification" .value=${item.specification} @input=${e => this._onInputItem(e, idx)} /></td>
|
|
269
|
-
<td><input type="text" numeric name="quantity" .value=${this._numberFormat(item.quantity)} @input=${e => this._onInputItem(e, idx)} /></td>
|
|
270
|
-
<td><input type="text" numeric name="unitPrice" .value=${this._numberFormat(item.unitPrice)} @input=${e => this._onInputItem(e, idx)} /></td>
|
|
271
|
-
<td><input type="text" readonly name="supplyPrice" .value=${this._numberFormat(item.supplyPrice)} @input=${e => this._onInputItem(e, idx)} /></td>
|
|
272
|
-
<td><input type="text" readonly name="taxPrice" .value=${this._numberFormat(item.taxPrice)} @input=${e => this._onInputItem(e, idx)} /></td>
|
|
273
|
-
<td><input type="text" name="remark" .value=${item.remark || ''} @input=${e => this._onInputItem(e, idx)} /></td>
|
|
274
|
-
<td><button class="btn-delete" @click=${e => this._onRemoveInvoiceItem(e, item.sequence)}>삭제</button></td>
|
|
275
|
-
</tr>
|
|
276
|
-
`)}
|
|
277
|
-
</table>
|
|
278
|
-
</div>
|
|
279
|
-
|
|
280
|
-
<div class="summary">
|
|
281
|
-
<table>
|
|
282
|
-
<colgroup>
|
|
283
|
-
<col width="25%" />
|
|
284
|
-
<col width="25%" />
|
|
285
|
-
<col width="25%" />
|
|
286
|
-
<col width="25%" />
|
|
287
|
-
</colgroup>
|
|
288
|
-
<tr>
|
|
289
|
-
<th>${i18next.t('field.tax invoice payment cash')}</th>
|
|
290
|
-
<th>${i18next.t('field.tax invoice payment check')}</th>
|
|
291
|
-
<th>${i18next.t('field.tax invoice payment promissory note')}</th>
|
|
292
|
-
<th>${i18next.t('field.tax invoice payment accounts receivable')}</th>
|
|
293
|
-
</tr>
|
|
294
|
-
<tr>
|
|
295
|
-
<td><input type="text" numeric name="paymentAmountCash" .value=${((_y = this.taxInvoice) === null || _y === void 0 ? void 0 : _y.paymentAmountCash) || ''} @input=${this._onInputTaxInvoice} /></td>
|
|
296
|
-
<td><input type="text" numeric name="paymentAmountCheck" .value=${((_z = this.taxInvoice) === null || _z === void 0 ? void 0 : _z.paymentAmountCheck) || ''} @input=${this._onInputTaxInvoice} /></td>
|
|
297
|
-
<td>
|
|
298
|
-
<input
|
|
299
|
-
type="text"
|
|
300
|
-
numeric
|
|
301
|
-
name="paymentAmountPromissoryNote"
|
|
302
|
-
.value=${((_0 = this.taxInvoice) === null || _0 === void 0 ? void 0 : _0.paymentAmountPromissoryNote) || ''}
|
|
303
|
-
@input=${this._onInputTaxInvoice}
|
|
304
|
-
/>
|
|
305
|
-
</td>
|
|
306
|
-
<td>
|
|
307
|
-
<input
|
|
308
|
-
type="text"
|
|
309
|
-
numeric
|
|
310
|
-
name="paymentAmountAccountsReceivable"
|
|
311
|
-
.value=${((_1 = this.taxInvoice) === null || _1 === void 0 ? void 0 : _1.paymentAmountAccountsReceivable) || ''}
|
|
312
|
-
@input=${this._onInputTaxInvoice}
|
|
313
|
-
/>
|
|
314
|
-
</td>
|
|
315
|
-
</tr>
|
|
316
|
-
</table>
|
|
317
|
-
<div>
|
|
318
|
-
${i18next.t('text.prev tax invoice description payment') + ' ('}
|
|
319
|
-
<span class="type-wrapper">
|
|
320
|
-
<div>
|
|
321
|
-
<input type="radio" id="purpose_20" name="purpose" .value=${Purpose.INVOICE} @change=${this._onInputTaxInvoice} checked />
|
|
322
|
-
<label for="purpose_20">${PURPOSE[Purpose.INVOICE]}</label>
|
|
323
|
-
</div>
|
|
324
|
-
<div>
|
|
325
|
-
<input type="radio" id="purpose_10" name="purpose" .value=${Purpose.RECEIPT} @change=${this._onInputTaxInvoice} />
|
|
326
|
-
<label for="purpose_10">${PURPOSE[Purpose.RECEIPT]}</label>
|
|
327
|
-
</div>
|
|
328
|
-
</span>
|
|
329
|
-
${') ' + i18next.t('text.next tax invoice description payment')}
|
|
330
|
-
</div>
|
|
331
|
-
</div>
|
|
332
|
-
</div>
|
|
333
|
-
`;
|
|
334
|
-
}
|
|
335
|
-
async pageInitialized(lifecycle) {
|
|
336
|
-
this._fetchSupplier();
|
|
337
|
-
}
|
|
338
|
-
async _fetchSupplier() {
|
|
339
|
-
const response = await client.query({
|
|
340
|
-
query: gql `
|
|
341
|
-
query TaxInvoiceApi {
|
|
342
|
-
response: taxInvoiceApi {
|
|
343
|
-
businessRegistrationNumber
|
|
344
|
-
branchIdentification
|
|
345
|
-
businessName
|
|
346
|
-
representativeName
|
|
347
|
-
address
|
|
348
|
-
businessType
|
|
349
|
-
industryType
|
|
350
|
-
department
|
|
351
|
-
contactName
|
|
352
|
-
contactPhone
|
|
353
|
-
contactEmail
|
|
354
|
-
contactCellPhone
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
|
-
`
|
|
358
|
-
});
|
|
359
|
-
const supplier = response.data.response;
|
|
360
|
-
this.supplier = {
|
|
361
|
-
supplierBusinessRegistrationCategory: supplier.businessRegistrationCategory,
|
|
362
|
-
supplierBusinessRegistrationNumber: supplier.businessRegistrationNumber,
|
|
363
|
-
supplierBranchIdentification: supplier.branchIdentification,
|
|
364
|
-
supplierBusinessName: supplier.businessName,
|
|
365
|
-
supplierRepresentativeName: supplier.representativeName,
|
|
366
|
-
supplierAddress: supplier.address,
|
|
367
|
-
supplierBusinessType: supplier.businessType,
|
|
368
|
-
supplierIndustryType: supplier.industryType,
|
|
369
|
-
supplierDepartment: supplier.department,
|
|
370
|
-
supplierContactName: supplier.contactName,
|
|
371
|
-
supplierContactPhone: supplier.contactPhone,
|
|
372
|
-
supplierContactEmail: supplier.contactEmail,
|
|
373
|
-
supplierContactCellPhone: supplier.contactCellPhone
|
|
374
|
-
};
|
|
375
|
-
}
|
|
376
|
-
async pageUpdated(changes, lifecycle) {
|
|
377
|
-
if (this.active) {
|
|
378
|
-
// do something here when this page just became as active
|
|
379
|
-
}
|
|
72
|
+
return html ` <tax-invoice-send></tax-invoice-send> `;
|
|
380
73
|
}
|
|
381
|
-
async _sendTaxInvoice(
|
|
74
|
+
async _sendTaxInvoice() {
|
|
382
75
|
// 아이템 시퀀스 재 할당 + 날짜, 품목, 규격, 수량이 없으면 필터
|
|
383
76
|
let taxInvoiceItems = this.taxInvoiceItems.map((item, idx) => (Object.assign(Object.assign({}, item), { sequence: idx + 1, quantity: Number(item.quantity), unitPrice: Number(item.unitPrice) })));
|
|
384
77
|
taxInvoiceItems = taxInvoiceItems.filter(item => item.supplyDate && item.itemName && item.quantity && item.unitPrice);
|
|
@@ -388,20 +81,54 @@ let TaxInvoiceSendPage = class TaxInvoiceSendPage extends localize(i18next)(Scop
|
|
|
388
81
|
taxInvoice.paymentAmountCheck = Number(taxInvoice.paymentAmountCheck || 0);
|
|
389
82
|
taxInvoice.paymentAmountPromissoryNote = Number(taxInvoice.paymentAmountPromissoryNote || 0);
|
|
390
83
|
taxInvoice.paymentAmountAccountsReceivable = Number(taxInvoice.paymentAmountAccountsReceivable || 0);
|
|
84
|
+
taxInvoice.supplyAmount = Number(taxInvoice.supplyAmount || 0);
|
|
85
|
+
taxInvoice.taxAmount = Number(taxInvoice.taxAmount || 0);
|
|
86
|
+
taxInvoice.buyerBusinessRegistrationNumber = taxInvoice.buyerBusinessRegistrationNumber.replace(/-/gi, '');
|
|
87
|
+
taxInvoice.supplierBusinessRegistrationNumber = taxInvoice.supplierBusinessRegistrationNumber.replace(/-/gi, '');
|
|
391
88
|
// 공급받는자 필수 값 체크
|
|
392
|
-
if (!this.buyer.buyerBusinessRegistrationNumber ||
|
|
393
|
-
|
|
89
|
+
if (!this.buyer.buyerBusinessRegistrationNumber ||
|
|
90
|
+
!this.buyer.buyerBusinessName ||
|
|
91
|
+
!this.buyer.buyerRepresentativeName) {
|
|
92
|
+
await CustomAlert({
|
|
93
|
+
type: 'warning',
|
|
94
|
+
title: '공급받는자 필수 값을 모두 입력해 주세요.',
|
|
95
|
+
text: '공급받는자 필수 값을 모두 입력해 주세요.',
|
|
96
|
+
confirmButton: { text: i18next.t('button.confirm') }
|
|
97
|
+
});
|
|
394
98
|
return;
|
|
395
99
|
}
|
|
396
100
|
// 아이템 개수 체크
|
|
397
101
|
if (taxInvoiceItems.length === 0) {
|
|
398
|
-
|
|
102
|
+
await CustomAlert({
|
|
103
|
+
type: 'warning',
|
|
104
|
+
title: '등록 가능한 아이템의 개수는 1개 이상이여야 합니다.',
|
|
105
|
+
text: '등록 가능한 아이템의 개수는 1개 이상이여야 합니다.',
|
|
106
|
+
confirmButton: { text: i18next.t('button.confirm') }
|
|
107
|
+
});
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
// 세금이 없는 타입인데 세금이 있는지 체크
|
|
111
|
+
if (taxInvoice.invoiceType === InvoiceType.SMALL_BUSINESS_TAX_INVOICE && taxInvoice.taxAmount > 0) {
|
|
112
|
+
await CustomAlert({
|
|
113
|
+
type: 'warning',
|
|
114
|
+
title: '세금이 0원이 아닙니다.',
|
|
115
|
+
text: '세금이 0원이 아닙니다.',
|
|
116
|
+
confirmButton: { text: i18next.t('button.confirm') }
|
|
117
|
+
});
|
|
399
118
|
return;
|
|
400
119
|
}
|
|
401
120
|
// 현금, 수표, 어음, 외상미수금의 합계 = 총 합계금액 체크
|
|
402
|
-
const paymentAmount = taxInvoice.paymentAmountCash +
|
|
121
|
+
const paymentAmount = taxInvoice.paymentAmountCash +
|
|
122
|
+
taxInvoice.paymentAmountCheck +
|
|
123
|
+
taxInvoice.paymentAmountPromissoryNote +
|
|
124
|
+
taxInvoice.paymentAmountAccountsReceivable;
|
|
403
125
|
if (paymentAmount > 0 && paymentAmount !== taxInvoice.totalAmount) {
|
|
404
|
-
|
|
126
|
+
await CustomAlert({
|
|
127
|
+
type: 'warning',
|
|
128
|
+
title: '현금, 수표, 어음, 외상미수금의 합계는 총 합계금액과 동일해야 합니다.',
|
|
129
|
+
text: '현금, 수표, 어음, 외상미수금의 합계는 총 합계금액과 동일해야 합니다.',
|
|
130
|
+
confirmButton: { text: i18next.t('button.confirm') }
|
|
131
|
+
});
|
|
405
132
|
return;
|
|
406
133
|
}
|
|
407
134
|
const response = await client.mutate({
|
|
@@ -421,82 +148,12 @@ let TaxInvoiceSendPage = class TaxInvoiceSendPage extends localize(i18next)(Scop
|
|
|
421
148
|
});
|
|
422
149
|
if (!response.errors) {
|
|
423
150
|
notify({ message: i18next.t('text.success tax send') });
|
|
151
|
+
this.taxInvoice = this.defaultTaxInvoice;
|
|
152
|
+
this.supplier = this.defaultSupplier;
|
|
153
|
+
this.buyer = this.defaultBuyer;
|
|
154
|
+
this.taxInvoiceItems = [Object.assign({}, this.defaultTaxInvoiceItem)];
|
|
424
155
|
}
|
|
425
156
|
}
|
|
426
|
-
_numberFormat(value) {
|
|
427
|
-
return !value ? '' : new Intl.NumberFormat('en-US').format(value) || '';
|
|
428
|
-
}
|
|
429
|
-
// Input 요소의 값이 변경될 때 호출되는 콜백 함수
|
|
430
|
-
_onInputTaxInvoice(event) {
|
|
431
|
-
const target = event.target;
|
|
432
|
-
// 숫자 타입은 다른 문자 입력 제거
|
|
433
|
-
if (target.hasAttribute('numeric')) {
|
|
434
|
-
target.value = target.value.replace(/\D/g, '');
|
|
435
|
-
}
|
|
436
|
-
if (target.name.startsWith('supplier')) {
|
|
437
|
-
this.supplier[target.name] = target.value;
|
|
438
|
-
}
|
|
439
|
-
else if (target.name.startsWith('buyer')) {
|
|
440
|
-
this.buyer[target.name] = target.value;
|
|
441
|
-
}
|
|
442
|
-
else {
|
|
443
|
-
// 날짜 체크가 오늘 날짜를 넘어가면 값 변경 되면 안됨
|
|
444
|
-
if (target.name === 'issueDate' && target.value > this.today) {
|
|
445
|
-
target.value = this.taxInvoice['issueDate'];
|
|
446
|
-
alert('작성일자는 현재일까지 입력하시기 바랍니다.');
|
|
447
|
-
return;
|
|
448
|
-
}
|
|
449
|
-
this.taxInvoice[target.name] = target.value;
|
|
450
|
-
// 날짜 변경시에는 아이템 변경도 리 렌더가 필요해서 데이터 갱신
|
|
451
|
-
if (target.name === 'issueDate')
|
|
452
|
-
this.taxInvoice = Object.assign({}, this.taxInvoice);
|
|
453
|
-
}
|
|
454
|
-
}
|
|
455
|
-
// Input 요소의 값이 변경될 때 호출되는 콜백 함수
|
|
456
|
-
_onInputItem(e, idx) {
|
|
457
|
-
const target = e.target;
|
|
458
|
-
let inputVal = target.value;
|
|
459
|
-
// 숫자 타입은 다른 문자 입력 제거
|
|
460
|
-
if (target.hasAttribute('numeric')) {
|
|
461
|
-
inputVal = inputVal.replace(/\D/g, '');
|
|
462
|
-
target.value = inputVal;
|
|
463
|
-
}
|
|
464
|
-
// 공급일자 케이스 시 => 세금계산서의 작성일자의 YYYY-MM + 아이템의 입력된 DD
|
|
465
|
-
if (target.name === 'supplyDate') {
|
|
466
|
-
const itemDate = this.taxInvoice.issueDate.substring(0, 8) + inputVal.padStart(2, '0');
|
|
467
|
-
if (itemDate > this.taxInvoice.issueDate) {
|
|
468
|
-
alert('품목의 일자는 작성일자보다 클 수 없습니다.');
|
|
469
|
-
target.value = '';
|
|
470
|
-
}
|
|
471
|
-
inputVal = itemDate;
|
|
472
|
-
}
|
|
473
|
-
if (target.name == 'quantity' || target.name == 'unitPrice') {
|
|
474
|
-
const supplyPrice = target.name == 'quantity' ? Number(inputVal) * this.taxInvoiceItems[idx]['unitPrice'] : Number(inputVal) * this.taxInvoiceItems[idx]['quantity'];
|
|
475
|
-
this.taxInvoiceItems[idx]['supplyPrice'] = supplyPrice;
|
|
476
|
-
this.taxInvoiceItems[idx]['taxPrice'] = Math.floor(supplyPrice / 10);
|
|
477
|
-
this.taxInvoiceItems = [...this.taxInvoiceItems];
|
|
478
|
-
this._setTaxInvoiceSummaryCalc();
|
|
479
|
-
}
|
|
480
|
-
this.taxInvoiceItems[idx][target.name] = inputVal;
|
|
481
|
-
}
|
|
482
|
-
_onAddInvoiceItem(e) {
|
|
483
|
-
e.preventDefault();
|
|
484
|
-
if (this.taxInvoiceItems.length >= 16) {
|
|
485
|
-
alert('품목은 최대 16개까지 추가 가능합니다.');
|
|
486
|
-
return;
|
|
487
|
-
}
|
|
488
|
-
this.taxInvoiceItems = [...this.taxInvoiceItems, Object.assign(Object.assign({}, this.defaultTaxInvoiceItem), { sequence: new Date().getTime() })];
|
|
489
|
-
}
|
|
490
|
-
_onRemoveInvoiceItem(e, sequence) {
|
|
491
|
-
e.preventDefault();
|
|
492
|
-
this.taxInvoiceItems = [...this.taxInvoiceItems.filter(item => item.sequence != sequence)];
|
|
493
|
-
this._setTaxInvoiceSummaryCalc();
|
|
494
|
-
}
|
|
495
|
-
_setTaxInvoiceSummaryCalc() {
|
|
496
|
-
const supplyPrice = this.taxInvoiceItems.reduce((prev, item) => prev + item.supplyPrice, 0);
|
|
497
|
-
const taxPrice = this.taxInvoiceItems.reduce((prev, item) => prev + item.taxPrice, 0);
|
|
498
|
-
this.taxInvoice = Object.assign(Object.assign({}, this.taxInvoice), { supplyAmount: supplyPrice, taxAmount: taxPrice, totalAmount: supplyPrice + taxPrice });
|
|
499
|
-
}
|
|
500
157
|
};
|
|
501
158
|
TaxInvoiceSendPage.styles = [
|
|
502
159
|
ScrollbarStyles,
|
|
@@ -504,252 +161,6 @@ TaxInvoiceSendPage.styles = [
|
|
|
504
161
|
css `
|
|
505
162
|
:host {
|
|
506
163
|
display: flex;
|
|
507
|
-
flex-direction: column;
|
|
508
|
-
overflow-y: auto;
|
|
509
|
-
overflow-x: hidden;
|
|
510
|
-
|
|
511
|
-
width: 100%;
|
|
512
|
-
min-width: 850px;
|
|
513
|
-
padding: 0 40px 40px 40px;
|
|
514
|
-
|
|
515
|
-
--grid-record-emphasized-background-color: red;
|
|
516
|
-
--grid-record-emphasized-color: yellow;
|
|
517
|
-
}
|
|
518
|
-
|
|
519
|
-
.flex-row {
|
|
520
|
-
display: flex;
|
|
521
|
-
flex-direction: row;
|
|
522
|
-
}
|
|
523
|
-
.flex-column {
|
|
524
|
-
display: flex;
|
|
525
|
-
flex-direction: column;
|
|
526
|
-
}
|
|
527
|
-
|
|
528
|
-
input[type='text'],
|
|
529
|
-
input[type='date'],
|
|
530
|
-
input[type='number'] {
|
|
531
|
-
width: 85%;
|
|
532
|
-
max-width: calc(100% - 12px);
|
|
533
|
-
height: 14px;
|
|
534
|
-
margin: 0;
|
|
535
|
-
padding: 4px 5px 5px;
|
|
536
|
-
line-height: 14px;
|
|
537
|
-
border: 1px solid #bbb;
|
|
538
|
-
background: #fff;
|
|
539
|
-
letter-spacing: 0.5px;
|
|
540
|
-
}
|
|
541
|
-
input[type='date'] {
|
|
542
|
-
width: auto;
|
|
543
|
-
}
|
|
544
|
-
input[readonly] {
|
|
545
|
-
background-color: #eee;
|
|
546
|
-
}
|
|
547
|
-
|
|
548
|
-
div.invoice-type {
|
|
549
|
-
font-size: 18px;
|
|
550
|
-
margin-top: 15px;
|
|
551
|
-
}
|
|
552
|
-
|
|
553
|
-
table {
|
|
554
|
-
border: solid;
|
|
555
|
-
border-width: 2px 0;
|
|
556
|
-
border-collapse: collapse;
|
|
557
|
-
border-spacing: 0;
|
|
558
|
-
}
|
|
559
|
-
|
|
560
|
-
.title table {
|
|
561
|
-
border-color: #d3dbe5;
|
|
562
|
-
width: 100%;
|
|
563
|
-
height: 33px;
|
|
564
|
-
margin-top: 10px;
|
|
565
|
-
font-size: 12px;
|
|
566
|
-
|
|
567
|
-
th {
|
|
568
|
-
font-size: 13px;
|
|
569
|
-
background-color: #e9edf6;
|
|
570
|
-
min-width: 140px;
|
|
571
|
-
}
|
|
572
|
-
td {
|
|
573
|
-
width: 50%;
|
|
574
|
-
padding-left: 10px;
|
|
575
|
-
|
|
576
|
-
& > * {
|
|
577
|
-
vertical-align: middle;
|
|
578
|
-
}
|
|
579
|
-
& > input {
|
|
580
|
-
margin: 0 5px 0 1px;
|
|
581
|
-
}
|
|
582
|
-
}
|
|
583
|
-
}
|
|
584
|
-
|
|
585
|
-
div.body {
|
|
586
|
-
margin-top: 15px;
|
|
587
|
-
font-size: 14px;
|
|
588
|
-
|
|
589
|
-
div.data {
|
|
590
|
-
display: flex;
|
|
591
|
-
margin-top: 5px;
|
|
592
|
-
|
|
593
|
-
table {
|
|
594
|
-
flex: 1;
|
|
595
|
-
|
|
596
|
-
td,
|
|
597
|
-
th {
|
|
598
|
-
padding: 5px;
|
|
599
|
-
min-width: 60px;
|
|
600
|
-
}
|
|
601
|
-
td {
|
|
602
|
-
padding-left: 8px;
|
|
603
|
-
}
|
|
604
|
-
th.target {
|
|
605
|
-
width: 25px;
|
|
606
|
-
writing-mode: vertical-rl;
|
|
607
|
-
min-width: unset;
|
|
608
|
-
}
|
|
609
|
-
|
|
610
|
-
&.supplier {
|
|
611
|
-
border-color: #f64843;
|
|
612
|
-
|
|
613
|
-
td,
|
|
614
|
-
th {
|
|
615
|
-
background-color: #fef5f7;
|
|
616
|
-
border: solid 1.5px #f5b1b1;
|
|
617
|
-
}
|
|
618
|
-
th.target {
|
|
619
|
-
background-color: #fedbde;
|
|
620
|
-
}
|
|
621
|
-
}
|
|
622
|
-
&.buyer {
|
|
623
|
-
border-color: #007ed9;
|
|
624
|
-
|
|
625
|
-
td,
|
|
626
|
-
th {
|
|
627
|
-
background-color: #f7f7ff;
|
|
628
|
-
border: solid 1.5px #a7bcff;
|
|
629
|
-
}
|
|
630
|
-
th.target {
|
|
631
|
-
background-color: #c6daf6;
|
|
632
|
-
}
|
|
633
|
-
}
|
|
634
|
-
}
|
|
635
|
-
}
|
|
636
|
-
|
|
637
|
-
div.info {
|
|
638
|
-
margin-top: 15px;
|
|
639
|
-
border: solid;
|
|
640
|
-
border-color: #000;
|
|
641
|
-
border-width: 2px 0px 0px 0px;
|
|
642
|
-
|
|
643
|
-
div.flex-row div {
|
|
644
|
-
border: solid #c4d2ff;
|
|
645
|
-
border-width: 0px 1.5px 1.5px 1.5px;
|
|
646
|
-
margin-right: -1px;
|
|
647
|
-
padding: 5px;
|
|
648
|
-
text-align: center;
|
|
649
|
-
|
|
650
|
-
&.title {
|
|
651
|
-
background-color: #e9edf5;
|
|
652
|
-
font-weight: bold;
|
|
653
|
-
flex: 1;
|
|
654
|
-
}
|
|
655
|
-
&.value {
|
|
656
|
-
flex: 3;
|
|
657
|
-
text-align: left;
|
|
658
|
-
|
|
659
|
-
.desc {
|
|
660
|
-
font-size: 11px;
|
|
661
|
-
color: #c90000;
|
|
662
|
-
}
|
|
663
|
-
}
|
|
664
|
-
}
|
|
665
|
-
}
|
|
666
|
-
|
|
667
|
-
div.items,
|
|
668
|
-
div.summary {
|
|
669
|
-
margin-top: 20px;
|
|
670
|
-
|
|
671
|
-
table {
|
|
672
|
-
width: 100%;
|
|
673
|
-
border-color: #000;
|
|
674
|
-
border-width: 2px 0px 0px 0px;
|
|
675
|
-
|
|
676
|
-
th {
|
|
677
|
-
background-color: #e9edf5;
|
|
678
|
-
}
|
|
679
|
-
th,
|
|
680
|
-
td {
|
|
681
|
-
border: solid 1.5px #c4d2ff;
|
|
682
|
-
padding: 5px;
|
|
683
|
-
text-align: center;
|
|
684
|
-
}
|
|
685
|
-
}
|
|
686
|
-
}
|
|
687
|
-
|
|
688
|
-
div.summary {
|
|
689
|
-
display: flex;
|
|
690
|
-
|
|
691
|
-
& > table {
|
|
692
|
-
flex: 6.7;
|
|
693
|
-
}
|
|
694
|
-
& > div {
|
|
695
|
-
flex: 3.2;
|
|
696
|
-
display: flex;
|
|
697
|
-
justify-content: center;
|
|
698
|
-
align-items: center;
|
|
699
|
-
border: 1.5px solid #c4d2ff;
|
|
700
|
-
border-top: 2px solid #000;
|
|
701
|
-
}
|
|
702
|
-
|
|
703
|
-
span.type-wrapper {
|
|
704
|
-
margin: 0 10px;
|
|
705
|
-
|
|
706
|
-
& > div {
|
|
707
|
-
display: flex;
|
|
708
|
-
justify-content: center;
|
|
709
|
-
align-items: center;
|
|
710
|
-
gap: 4px;
|
|
711
|
-
|
|
712
|
-
input[type='radio' i] {
|
|
713
|
-
margin: 0px;
|
|
714
|
-
}
|
|
715
|
-
}
|
|
716
|
-
}
|
|
717
|
-
}
|
|
718
|
-
|
|
719
|
-
div.items {
|
|
720
|
-
div.desc {
|
|
721
|
-
font-weight: 400;
|
|
722
|
-
font-size: 12px;
|
|
723
|
-
margin-bottom: 5px;
|
|
724
|
-
}
|
|
725
|
-
div.desc-date {
|
|
726
|
-
color: #005d98;
|
|
727
|
-
}
|
|
728
|
-
button {
|
|
729
|
-
font-size: 13px;
|
|
730
|
-
height: 25px;
|
|
731
|
-
cursor: pointer;
|
|
732
|
-
text-align: center;
|
|
733
|
-
font-weight: 600;
|
|
734
|
-
border-radius: 2px;
|
|
735
|
-
border-color: #ccc;
|
|
736
|
-
}
|
|
737
|
-
.btn-add {
|
|
738
|
-
color: #333;
|
|
739
|
-
background-color: #f9f9f9;
|
|
740
|
-
}
|
|
741
|
-
.btn-delete {
|
|
742
|
-
color: #fff;
|
|
743
|
-
background-color: #5c636e;
|
|
744
|
-
border: none;
|
|
745
|
-
}
|
|
746
|
-
}
|
|
747
|
-
|
|
748
|
-
*[required]::before {
|
|
749
|
-
content: '*';
|
|
750
|
-
color: red;
|
|
751
|
-
margin-right: 2px;
|
|
752
|
-
}
|
|
753
164
|
}
|
|
754
165
|
`
|
|
755
166
|
];
|
|
@@ -758,15 +169,15 @@ __decorate([
|
|
|
758
169
|
__metadata("design:type", Object)
|
|
759
170
|
], TaxInvoiceSendPage.prototype, "supplier", void 0);
|
|
760
171
|
__decorate([
|
|
761
|
-
|
|
172
|
+
state(),
|
|
762
173
|
__metadata("design:type", Object)
|
|
763
174
|
], TaxInvoiceSendPage.prototype, "buyer", void 0);
|
|
764
175
|
__decorate([
|
|
765
|
-
|
|
176
|
+
state(),
|
|
766
177
|
__metadata("design:type", Object)
|
|
767
178
|
], TaxInvoiceSendPage.prototype, "taxInvoice", void 0);
|
|
768
179
|
__decorate([
|
|
769
|
-
|
|
180
|
+
state(),
|
|
770
181
|
__metadata("design:type", Array)
|
|
771
182
|
], TaxInvoiceSendPage.prototype, "taxInvoiceItems", void 0);
|
|
772
183
|
TaxInvoiceSendPage = __decorate([
|