@things-factory/tax-invoice 7.0.0-alpha.8 → 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.
Files changed (153) hide show
  1. package/client/bootstrap.ts +1 -0
  2. package/client/pages/tax-audit-result/tax-audit-result-importer.ts +8 -19
  3. package/client/pages/tax-audit-result/tax-audit-result-list-page.ts +10 -25
  4. package/client/pages/tax-invoice/tax-invoice-detail-popup.ts +21 -19
  5. package/client/pages/tax-invoice-api/tax-invoice-api-page.ts +99 -61
  6. package/client/pages/tax-invoice-company/tax-invoice-company-list-page.ts +2 -67
  7. package/client/pages/{tax-invoice-company/tax-invoice-company-importer.ts → tax-invoice-send/company-list-popup.ts} +69 -57
  8. package/client/pages/tax-invoice-send/tax-invoice-send-page.ts +78 -742
  9. package/client/pages/tax-invoice-send/tax-invoice-send.ts +1181 -0
  10. package/config/config.development.js +13 -0
  11. package/config/config.production.js +13 -0
  12. package/dist-client/bootstrap.d.ts +1 -0
  13. package/dist-client/bootstrap.js +1 -1
  14. package/dist-client/bootstrap.js.map +1 -1
  15. package/dist-client/pages/main.js.map +1 -1
  16. package/dist-client/pages/tax-audit-result/tax-audit-result-importer.d.ts +1 -0
  17. package/dist-client/pages/tax-audit-result/tax-audit-result-importer.js +5 -12
  18. package/dist-client/pages/tax-audit-result/tax-audit-result-importer.js.map +1 -1
  19. package/dist-client/pages/tax-audit-result/tax-audit-result-list-page.js +8 -16
  20. package/dist-client/pages/tax-audit-result/tax-audit-result-list-page.js.map +1 -1
  21. package/dist-client/pages/tax-invoice/tax-invoice-detail-popup.d.ts +0 -1
  22. package/dist-client/pages/tax-invoice/tax-invoice-detail-popup.js +20 -17
  23. package/dist-client/pages/tax-invoice/tax-invoice-detail-popup.js.map +1 -1
  24. package/dist-client/pages/tax-invoice/tax-invoice-list-page.d.ts +5 -5
  25. package/dist-client/pages/tax-invoice/tax-invoice-list-page.js.map +1 -1
  26. package/dist-client/pages/tax-invoice-api/tax-invoice-api-page.d.ts +3 -2
  27. package/dist-client/pages/tax-invoice-api/tax-invoice-api-page.js +91 -61
  28. package/dist-client/pages/tax-invoice-api/tax-invoice-api-page.js.map +1 -1
  29. package/dist-client/pages/tax-invoice-company/tax-invoice-company-list-page.d.ts +0 -16
  30. package/dist-client/pages/tax-invoice-company/tax-invoice-company-list-page.js +3 -62
  31. package/dist-client/pages/tax-invoice-company/tax-invoice-company-list-page.js.map +1 -1
  32. package/dist-client/pages/tax-invoice-send/company-list-popup.d.ts +69 -0
  33. package/dist-client/pages/{tax-invoice-company/tax-invoice-company-importer.js → tax-invoice-send/company-list-popup.js} +75 -60
  34. package/dist-client/pages/tax-invoice-send/company-list-popup.js.map +1 -0
  35. package/dist-client/pages/tax-invoice-send/tax-invoice-send-page.d.ts +11 -78
  36. package/dist-client/pages/tax-invoice-send/tax-invoice-send-page.js +65 -654
  37. package/dist-client/pages/tax-invoice-send/tax-invoice-send-page.js.map +1 -1
  38. package/dist-client/pages/tax-invoice-send/tax-invoice-send.d.ts +112 -0
  39. package/dist-client/pages/tax-invoice-send/tax-invoice-send.js +1086 -0
  40. package/dist-client/pages/tax-invoice-send/tax-invoice-send.js.map +1 -0
  41. package/dist-client/route.d.ts +1 -1
  42. package/dist-client/route.js.map +1 -1
  43. package/dist-client/tsconfig.tsbuildinfo +1 -1
  44. package/dist-server/index.d.ts +2 -0
  45. package/dist-server/routes.d.ts +1 -0
  46. package/dist-server/service/index.d.ts +9 -0
  47. package/dist-server/service/index.js +1 -0
  48. package/dist-server/service/index.js.map +1 -1
  49. package/dist-server/service/tax-audit-result/event-subscriber.d.ts +7 -0
  50. package/dist-server/service/tax-audit-result/event-subscriber.js +2 -2
  51. package/dist-server/service/tax-audit-result/event-subscriber.js.map +1 -1
  52. package/dist-server/service/tax-audit-result/index.d.ts +7 -0
  53. package/dist-server/service/tax-audit-result/tax-audit-result-history.d.ts +25 -0
  54. package/dist-server/service/tax-audit-result/tax-audit-result-history.js +10 -6
  55. package/dist-server/service/tax-audit-result/tax-audit-result-history.js.map +1 -1
  56. package/dist-server/service/tax-audit-result/tax-audit-result-mutation.d.ts +10 -0
  57. package/dist-server/service/tax-audit-result/tax-audit-result-mutation.js +2 -2
  58. package/dist-server/service/tax-audit-result/tax-audit-result-mutation.js.map +1 -1
  59. package/dist-server/service/tax-audit-result/tax-audit-result-query.d.ts +12 -0
  60. package/dist-server/service/tax-audit-result/tax-audit-result-query.js +3 -3
  61. package/dist-server/service/tax-audit-result/tax-audit-result-query.js.map +1 -1
  62. package/dist-server/service/tax-audit-result/tax-audit-result-type.d.ts +23 -0
  63. package/dist-server/service/tax-audit-result/tax-audit-result-type.js +6 -6
  64. package/dist-server/service/tax-audit-result/tax-audit-result-type.js.map +1 -1
  65. package/dist-server/service/tax-audit-result/tax-audit-result.d.ts +25 -0
  66. package/dist-server/service/tax-audit-result/tax-audit-result.js +4 -4
  67. package/dist-server/service/tax-audit-result/tax-audit-result.js.map +1 -1
  68. package/dist-server/service/tax-invoice/index.d.ts +5 -0
  69. package/dist-server/service/tax-invoice/tax-invoice-mutation.d.ts +10 -0
  70. package/dist-server/service/tax-invoice/tax-invoice-mutation.js +2 -6
  71. package/dist-server/service/tax-invoice/tax-invoice-mutation.js.map +1 -1
  72. package/dist-server/service/tax-invoice/tax-invoice-query.d.ts +14 -0
  73. package/dist-server/service/tax-invoice/tax-invoice-query.js +22 -10
  74. package/dist-server/service/tax-invoice/tax-invoice-query.js.map +1 -1
  75. package/dist-server/service/tax-invoice/tax-invoice-type.d.ts +86 -0
  76. package/dist-server/service/tax-invoice/tax-invoice-type.js +12 -8
  77. package/dist-server/service/tax-invoice/tax-invoice-type.js.map +1 -1
  78. package/dist-server/service/tax-invoice/tax-invoice-util.d.ts +133 -0
  79. package/dist-server/service/tax-invoice/tax-invoice-util.js +2 -2
  80. package/dist-server/service/tax-invoice/tax-invoice-util.js.map +1 -1
  81. package/dist-server/service/tax-invoice/tax-invoice.d.ts +120 -0
  82. package/dist-server/service/tax-invoice/tax-invoice.js +15 -10
  83. package/dist-server/service/tax-invoice/tax-invoice.js.map +1 -1
  84. package/dist-server/service/tax-invoice-api/index.d.ts +5 -0
  85. package/dist-server/service/tax-invoice-api/tax-invoice-api-mutation.d.ts +8 -0
  86. package/dist-server/service/tax-invoice-api/tax-invoice-api-mutation.js +46 -16
  87. package/dist-server/service/tax-invoice-api/tax-invoice-api-mutation.js.map +1 -1
  88. package/dist-server/service/tax-invoice-api/tax-invoice-api-query.d.ts +10 -0
  89. package/dist-server/service/tax-invoice-api/tax-invoice-api-query.js +15 -9
  90. package/dist-server/service/tax-invoice-api/tax-invoice-api-query.js.map +1 -1
  91. package/dist-server/service/tax-invoice-api/tax-invoice-api-type.d.ts +32 -0
  92. package/dist-server/service/tax-invoice-api/tax-invoice-api-type.js +9 -13
  93. package/dist-server/service/tax-invoice-api/tax-invoice-api-type.js.map +1 -1
  94. package/dist-server/service/tax-invoice-api/tax-invoice-api.d.ts +31 -0
  95. package/dist-server/service/tax-invoice-api/tax-invoice-api.js +12 -24
  96. package/dist-server/service/tax-invoice-api/tax-invoice-api.js.map +1 -1
  97. package/dist-server/service/tax-invoice-company/index.d.ts +5 -0
  98. package/dist-server/service/tax-invoice-company/tax-invoice-company-mutation.d.ts +7 -0
  99. package/dist-server/service/tax-invoice-company/tax-invoice-company-mutation.js +2 -2
  100. package/dist-server/service/tax-invoice-company/tax-invoice-company-mutation.js.map +1 -1
  101. package/dist-server/service/tax-invoice-company/tax-invoice-company-query.d.ts +14 -0
  102. package/dist-server/service/tax-invoice-company/tax-invoice-company-query.js +44 -9
  103. package/dist-server/service/tax-invoice-company/tax-invoice-company-query.js.map +1 -1
  104. package/dist-server/service/tax-invoice-company/tax-invoice-company-type.d.ts +38 -0
  105. package/dist-server/service/tax-invoice-company/tax-invoice-company-type.js +59 -9
  106. package/dist-server/service/tax-invoice-company/tax-invoice-company-type.js.map +1 -1
  107. package/dist-server/service/tax-invoice-company/tax-invoice-company.d.ts +29 -0
  108. package/dist-server/service/tax-invoice-company/tax-invoice-company.js +14 -24
  109. package/dist-server/service/tax-invoice-company/tax-invoice-company.js.map +1 -1
  110. package/dist-server/service/tax-invoice-item/index.d.ts +5 -0
  111. package/dist-server/service/tax-invoice-item/tax-invoice-item-mutation.d.ts +10 -0
  112. package/dist-server/service/tax-invoice-item/tax-invoice-item-mutation.js +2 -2
  113. package/dist-server/service/tax-invoice-item/tax-invoice-item-mutation.js.map +1 -1
  114. package/dist-server/service/tax-invoice-item/tax-invoice-item-query.d.ts +11 -0
  115. package/dist-server/service/tax-invoice-item/tax-invoice-item-query.js +3 -3
  116. package/dist-server/service/tax-invoice-item/tax-invoice-item-query.js.map +1 -1
  117. package/dist-server/service/tax-invoice-item/tax-invoice-item-type.d.ts +29 -0
  118. package/dist-server/service/tax-invoice-item/tax-invoice-item-type.js +6 -6
  119. package/dist-server/service/tax-invoice-item/tax-invoice-item-type.js.map +1 -1
  120. package/dist-server/service/tax-invoice-item/tax-invoice-item.d.ts +23 -0
  121. package/dist-server/service/tax-invoice-item/tax-invoice-item.js +7 -7
  122. package/dist-server/service/tax-invoice-item/tax-invoice-item.js.map +1 -1
  123. package/dist-server/service/unipost-api/tax-invoice-inquiry.d.ts +16 -0
  124. package/dist-server/service/unipost-api/tax-invoice-inquiry.js +10 -14
  125. package/dist-server/service/unipost-api/tax-invoice-inquiry.js.map +1 -1
  126. package/dist-server/service/unipost-api/tax-invoice-send.d.ts +1 -0
  127. package/dist-server/service/unipost-api/tax-invoice-send.js +5 -7
  128. package/dist-server/service/unipost-api/tax-invoice-send.js.map +1 -1
  129. package/dist-server/tsconfig.tsbuildinfo +1 -1
  130. package/package.json +8 -7
  131. package/server/service/index.ts +1 -0
  132. package/server/service/tax-audit-result/tax-audit-result-history.ts +10 -6
  133. package/server/service/tax-audit-result/tax-audit-result-query.ts +4 -1
  134. package/server/service/tax-audit-result/tax-audit-result.ts +6 -2
  135. package/server/service/tax-invoice/tax-invoice-mutation.ts +0 -3
  136. package/server/service/tax-invoice/tax-invoice-query.ts +36 -9
  137. package/server/service/tax-invoice/tax-invoice-type.ts +3 -0
  138. package/server/service/tax-invoice/tax-invoice-util.ts +1 -0
  139. package/server/service/tax-invoice/tax-invoice.ts +19 -4
  140. package/server/service/tax-invoice-api/tax-invoice-api-mutation.ts +63 -24
  141. package/server/service/tax-invoice-api/tax-invoice-api-query.ts +15 -6
  142. package/server/service/tax-invoice-api/tax-invoice-api-type.ts +2 -5
  143. package/server/service/tax-invoice-api/tax-invoice-api.ts +23 -20
  144. package/server/service/tax-invoice-company/tax-invoice-company-query.ts +39 -6
  145. package/server/service/tax-invoice-company/tax-invoice-company-type.ts +40 -4
  146. package/server/service/tax-invoice-company/tax-invoice-company.ts +11 -21
  147. package/server/service/tax-invoice-item/tax-invoice-item-query.ts +4 -1
  148. package/server/service/tax-invoice-item/tax-invoice-item.ts +22 -8
  149. package/server/service/unipost-api/tax-invoice-inquiry.ts +6 -10
  150. package/server/service/unipost-api/tax-invoice-send.ts +5 -5
  151. package/translations/ko.json +3 -0
  152. package/dist-client/pages/tax-invoice-company/tax-invoice-company-importer.d.ts +0 -31
  153. package/dist-client/pages/tax-invoice-company/tax-invoice-company-importer.js.map +0 -1
@@ -0,0 +1,1086 @@
1
+ import { __decorate, __metadata } from "tslib";
2
+ import '@operato/data-grist';
3
+ import { css, html, LitElement } from 'lit';
4
+ import { CustomAlert } from '@operato/shell';
5
+ import { CommonGristStyles, ScrollbarStyles } from '@operato/styles';
6
+ import { property, customElement } from 'lit/decorators.js';
7
+ import { client } from '@operato/graphql';
8
+ import { i18next, localize } from '@operato/i18n';
9
+ import gql from 'graphql-tag';
10
+ import { BUSINESS_REGISTRATION_CATEGORY, BusinessRegistrationCategory, Category, INVOICE_TYPE, InvoiceType, PURPOSE, Purpose } from '../tax-invoice/tax-invoice-list-page';
11
+ import { openPopup } from '@operato/layout';
12
+ export const SHORT_INVOICE_TYPE = {
13
+ TAX_INVOICE: {
14
+ [InvoiceType.TAX_INVOICE]: '일반',
15
+ [InvoiceType.SMALL_BUSINESS_TAX_INVOICE]: '영세율',
16
+ [InvoiceType.CONSIGNMENT_TAX_INVOICE]: '위수탁',
17
+ [InvoiceType.SMALL_BUSINESS_CONSIGNMENT_TAX_INVOICE]: '위수탁영세율'
18
+ },
19
+ INVOICE: {
20
+ [InvoiceType.INVOICE]: '일반',
21
+ [InvoiceType.CONSIGNMENT_INVOICE]: '위수탁'
22
+ // [InvoiceType.IMPORT_INVOICE]: INVOICE_TYPE[IMPORT_INVOICE],
23
+ }
24
+ };
25
+ export const SHORT_BUSINESS_REGISTRATION_CATEGORY = {
26
+ [BusinessRegistrationCategory.BUSINESS_REGISTRATION_NUMBER]: '사업자',
27
+ [BusinessRegistrationCategory.RESIDENT_REGISTRATION_NUMBER]: '개인',
28
+ [BusinessRegistrationCategory.FOREIGNER_REGISTRATION_NUMBER]: '외국인'
29
+ };
30
+ let TaxInvoiceSend = class TaxInvoiceSend extends localize(i18next)(LitElement) {
31
+ constructor() {
32
+ super(...arguments);
33
+ // 오늘 날짜 YYYY-MM-DD 형식으로 뽑기
34
+ this.today = new Intl.DateTimeFormat('fr-CA', { timeZone: 'Asia/Seoul' }).format(new Date());
35
+ this.isTaxFree = false;
36
+ this.defaultSupplier = {
37
+ supplierBusinessRegistrationCategory: '01',
38
+ supplierBusinessRegistrationNumber: '',
39
+ supplierBranchIdentification: '',
40
+ supplierBusinessName: '',
41
+ supplierRepresentativeName: ''
42
+ };
43
+ this.defaultBuyer = {
44
+ buyerBusinessRegistrationCategory: BusinessRegistrationCategory.BUSINESS_REGISTRATION_NUMBER,
45
+ buyerBusinessRegistrationNumber: '',
46
+ buyerBusinessName: '',
47
+ buyerRepresentativeName: ''
48
+ };
49
+ this.defaultTaxInvoice = {
50
+ invoiceType: InvoiceType.TAX_INVOICE,
51
+ category: Category.EXPORT,
52
+ issueDate: this.today,
53
+ purpose: Purpose.INVOICE,
54
+ supplyAmount: 0,
55
+ taxAmount: 0,
56
+ totalAmount: 0
57
+ };
58
+ this.defaultTaxInvoiceItem = {
59
+ sequence: new Date().getTime(), // 구분용 임시 값 (중복되면 안되니 생성 마다 넣어주기)
60
+ supplyDate: '',
61
+ itemName: '',
62
+ specification: '',
63
+ quantity: 0,
64
+ unitPrice: 0,
65
+ supplyPrice: 0,
66
+ taxPrice: 0
67
+ };
68
+ this.supplier = this.defaultSupplier;
69
+ this.buyer = this.defaultBuyer;
70
+ this.taxInvoice = this.defaultTaxInvoice;
71
+ this.taxInvoiceItems = [Object.assign({}, this.defaultTaxInvoiceItem)];
72
+ }
73
+ render() {
74
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2;
75
+ return html `
76
+ <div class="invoice-type">
77
+ * ${INVOICE_TYPE[(_a = this.taxInvoice) === null || _a === void 0 ? void 0 : _a.invoiceType]}
78
+ (${SHORT_BUSINESS_REGISTRATION_CATEGORY[this.buyer.buyerBusinessRegistrationCategory]})
79
+ </div>
80
+
81
+ <div class="title">
82
+ <table>
83
+ <tr>
84
+ <th>${i18next.t('field.short invoice type')}</th>
85
+ <td>
86
+ ${Object.keys(SHORT_INVOICE_TYPE['TAX_INVOICE']).map(key => {
87
+ const disabled = key !== InvoiceType.TAX_INVOICE && key !== InvoiceType.SMALL_BUSINESS_TAX_INVOICE;
88
+ const checked = key === InvoiceType.TAX_INVOICE;
89
+ return html `
90
+ <label for="${'tax_' + key}">${SHORT_INVOICE_TYPE['TAX_INVOICE'][key]}</label>
91
+ <input
92
+ type="radio"
93
+ id="${'tax_' + key}"
94
+ .value="${key}"
95
+ name="invoiceType"
96
+ ?checked=${checked}
97
+ ?disabled=${disabled}
98
+ @change=${this._onInputTaxInvoice}
99
+ />
100
+ `;
101
+ })}
102
+ </td>
103
+ <th>${i18next.t('field.tax invoice buyer registration category')}</th>
104
+ <td>
105
+ ${Object.keys(BUSINESS_REGISTRATION_CATEGORY).map(key => {
106
+ const disabled = key !== BusinessRegistrationCategory.BUSINESS_REGISTRATION_NUMBER;
107
+ const checked = key === BusinessRegistrationCategory.BUSINESS_REGISTRATION_NUMBER;
108
+ return html `
109
+ <label for="${'tax_' + key}">${BUSINESS_REGISTRATION_CATEGORY[key]}</label>
110
+ <input
111
+ type="radio"
112
+ id="${'tax_' + key}"
113
+ value="${key}"
114
+ name="buyerBusinessRegistrationCategory"
115
+ ?checked=${checked}
116
+ ?disabled=${disabled}
117
+ />
118
+ `;
119
+ })}
120
+ </td>
121
+ </tr>
122
+ </table>
123
+ </div>
124
+
125
+ <div class="body">
126
+ <div class="header">
127
+ <span><button @click=${this._openSupplierPopup}>공급처 선택</button></span>
128
+ <span><button @click=${this._openBuyerPopup}>공급받는자 선택</button></span>
129
+ </div>
130
+
131
+ <div class="data">
132
+ <table class="supplier">
133
+ <colgroup>
134
+ <col width="150px" />
135
+ <col width="18%" />
136
+ <col width="32%" />
137
+ <col width="18%" />
138
+ <col width="32%" />
139
+ </colgroup>
140
+ <tr>
141
+ <th rowspan="6" class="target">${i18next.t('field.tax invoice supplier')}</th>
142
+ <th required>${i18next.t('field.short business registration number')}</th>
143
+ <td>
144
+ ${(_c = (_b = this.supplier) === null || _b === void 0 ? void 0 : _b.supplierBusinessRegistrationNumber) === null || _c === void 0 ? void 0 : _c.replace(/(\S{3})(\S{2})(\S{5})/g, '$1-$2-$3')}
145
+ </td>
146
+ <th>${i18next.t('field.short branch identification')}</th>
147
+ <td>${(_d = this.supplier) === null || _d === void 0 ? void 0 : _d.supplierBranchIdentification}</td>
148
+ </tr>
149
+ <tr>
150
+ <th required>${i18next.t('field.short tax invoice business name')}</th>
151
+ <td>
152
+ <input
153
+ type="text"
154
+ name="supplierBusinessName"
155
+ .value=${((_e = this.supplier) === null || _e === void 0 ? void 0 : _e.supplierBusinessName) || ''}
156
+ @input=${this._onInputTaxInvoice}
157
+ />
158
+ </td>
159
+ <th required>${i18next.t('field.tax invoice representative name')}</th>
160
+ <td>
161
+ <input
162
+ type="text"
163
+ name="supplierRepresentativeName"
164
+ .value=${((_f = this.supplier) === null || _f === void 0 ? void 0 : _f.supplierRepresentativeName) || ''}
165
+ @input=${this._onInputTaxInvoice}
166
+ />
167
+ </td>
168
+ </tr>
169
+ <tr>
170
+ <th>${i18next.t('field.address')}</th>
171
+ <td colspan="3">${(_g = this.supplier) === null || _g === void 0 ? void 0 : _g.supplierAddress}</td>
172
+ </tr>
173
+ <tr>
174
+ <th>${i18next.t('field.business type')}</th>
175
+ <td>
176
+ <input
177
+ type="text"
178
+ name="supplierBusinessType"
179
+ .value=${((_h = this.supplier) === null || _h === void 0 ? void 0 : _h.supplierBusinessType) || ''}
180
+ @input=${this._onInputTaxInvoice}
181
+ />
182
+ </td>
183
+ <th>${i18next.t('field.industry type')}</th>
184
+ <td>
185
+ <input
186
+ type="text"
187
+ name="supplierIndustryType"
188
+ .value=${((_j = this.supplier) === null || _j === void 0 ? void 0 : _j.supplierIndustryType) || ''}
189
+ @input=${this._onInputTaxInvoice}
190
+ />
191
+ </td>
192
+ </tr>
193
+ <tr>
194
+ <th rowspan="2">${i18next.t('field.email')}</th>
195
+ <td rowspan="2" colspan="3">
196
+ <input
197
+ type="text"
198
+ name="supplierContactEmail"
199
+ .value=${((_k = this.supplier) === null || _k === void 0 ? void 0 : _k.supplierContactEmail) || ''}
200
+ @input=${this._onInputTaxInvoice}
201
+ />
202
+ </td>
203
+ </tr>
204
+ <tr></tr>
205
+ </table>
206
+
207
+ <table class="buyer">
208
+ <colgroup>
209
+ <col width="150px" />
210
+ <col width="18%" />
211
+ <col width="32%" />
212
+ <col width="18%" />
213
+ <col width="32%" />
214
+ </colgroup>
215
+ <tr>
216
+ <th rowspan="6" class="target">${i18next.t('field.tax invoice buyer')}</th>
217
+ <th required>${i18next.t('field.short business registration number')}</th>
218
+ <td>
219
+ <input
220
+ type="text"
221
+ maxlength="10"
222
+ name="buyerBusinessRegistrationNumber"
223
+ .value=${((_l = this.buyer) === null || _l === void 0 ? void 0 : _l.buyerBusinessRegistrationNumber) || ''}
224
+ @input=${this._onInputTaxInvoice}
225
+ />
226
+ </td>
227
+ <th>${i18next.t('field.short branch identification')}</th>
228
+ <td>
229
+ <input
230
+ type="text"
231
+ name="buyerBranchIdentification"
232
+ .value=${((_m = this.buyer) === null || _m === void 0 ? void 0 : _m.buyerBranchIdentification) || ''}
233
+ @input=${this._onInputTaxInvoice}
234
+ />
235
+ </td>
236
+ </tr>
237
+ <tr>
238
+ <th required>${i18next.t('field.short tax invoice business name')}</th>
239
+ <td>
240
+ <input
241
+ type="text"
242
+ name="buyerBusinessName"
243
+ .value=${((_o = this.buyer) === null || _o === void 0 ? void 0 : _o.buyerBusinessName) || ''}
244
+ @input=${this._onInputTaxInvoice}
245
+ />
246
+ </td>
247
+ <th required>${i18next.t('field.tax invoice representative name')}</th>
248
+ <td>
249
+ <input
250
+ type="text"
251
+ name="buyerRepresentativeName"
252
+ .value=${((_p = this.buyer) === null || _p === void 0 ? void 0 : _p.buyerRepresentativeName) || ''}
253
+ @input=${this._onInputTaxInvoice}
254
+ />
255
+ </td>
256
+ </tr>
257
+ <tr>
258
+ <th>${i18next.t('field.address')}</th>
259
+ <td colspan="3">
260
+ <input
261
+ type="text"
262
+ name="buyerAddress"
263
+ .value=${((_q = this.buyer) === null || _q === void 0 ? void 0 : _q.buyerAddress) || ''}
264
+ @input=${this._onInputTaxInvoice}
265
+ />
266
+ </td>
267
+ </tr>
268
+ <tr>
269
+ <th>${i18next.t('field.business type')}</th>
270
+ <td>
271
+ <input
272
+ type="text"
273
+ name="buyerBusinessType"
274
+ .value=${((_r = this.buyer) === null || _r === void 0 ? void 0 : _r.buyerBusinessType) || ''}
275
+ @input=${this._onInputTaxInvoice}
276
+ />
277
+ </td>
278
+
279
+ <th>${i18next.t('field.industry type')}</th>
280
+ <td>
281
+ <input
282
+ type="text"
283
+ name="buyerIndustryType"
284
+ .value=${((_s = this.buyer) === null || _s === void 0 ? void 0 : _s.buyerIndustryType) || ''}
285
+ @input=${this._onInputTaxInvoice}
286
+ />
287
+ </td>
288
+ </tr>
289
+ <tr>
290
+ <th>${i18next.t('field.email')}</th>
291
+ <td colspan="3">
292
+ <input
293
+ type="text"
294
+ name="buyer1stContactEmail"
295
+ .value=${((_t = this.buyer) === null || _t === void 0 ? void 0 : _t.buyer1stContactEmail) || ''}
296
+ @input=${this._onInputTaxInvoice}
297
+ />
298
+ </td>
299
+ </tr>
300
+ <tr>
301
+ <th>${i18next.t('field.email')}</th>
302
+ <td colspan="3">
303
+ <input
304
+ type="text"
305
+ name="buyer2ndContactEmail"
306
+ .value=${((_u = this.buyer) === null || _u === void 0 ? void 0 : _u.buyer2ndContactEmail) || ''}
307
+ @input=${this._onInputTaxInvoice}
308
+ />
309
+ </td>
310
+ </tr>
311
+ </table>
312
+ </div>
313
+
314
+ <div class="info flex-column">
315
+ <div class="flex-row">
316
+ <div class="title" required>${i18next.t('field.issue date')}</div>
317
+ <div class="value">
318
+ <input
319
+ type="date"
320
+ name="issueDate"
321
+ .value=${this.taxInvoice.issueDate}
322
+ @input=${this._onInputTaxInvoice}
323
+ />
324
+ <span class="desc">※ 작성일자는 공급 연월일을 의미함</span>
325
+ </div>
326
+ <div class="title">${i18next.t('field.remark0')}</div>
327
+ <div class="value">
328
+ <input
329
+ type="text"
330
+ name="remark0"
331
+ .value=${((_v = this.taxInvoice) === null || _v === void 0 ? void 0 : _v.remark0) || ''}
332
+ @input=${this._onInputTaxInvoice}
333
+ />
334
+ </div>
335
+ </div>
336
+ <div class="flex-row">
337
+ <div class="title">${i18next.t('field.total amount')}</div>
338
+ <div class="value">${this._numberFormat((_w = this.taxInvoice) === null || _w === void 0 ? void 0 : _w.totalAmount)}</div>
339
+ <div class="title">${i18next.t('field.supply amount')}</div>
340
+ <div class="value">${this._numberFormat((_x = this.taxInvoice) === null || _x === void 0 ? void 0 : _x.supplyAmount)}</div>
341
+ <div class="title">${i18next.t('field.tax amount')}</div>
342
+ <div class="value">${this._numberFormat((_y = this.taxInvoice) === null || _y === void 0 ? void 0 : _y.taxAmount)}</div>
343
+ </div>
344
+ </div>
345
+
346
+ <div class="items">
347
+ <div class="desc desc-date">
348
+ ※ 아래 '품목'의 '월'은 상단 '작성일자'의 '월'이 자동 반영됩니다. 합계의 '계산' 버튼은 금액을 공급가액과
349
+ 세액으로 계산할 수 있습니다.
350
+ </div>
351
+ <div class="desc">
352
+ <button class="btn-add" @click=${this._onAddInvoiceItem}>품목추가</button> 품목은 최대 16개까지 추가, 삭제
353
+ 가능
354
+ </div>
355
+
356
+ <table>
357
+ <colgroup>
358
+ <col width="5%" />
359
+ <col width="5%" />
360
+ <col width="14%" />
361
+ <col width="7%" />
362
+ <col width="7%" />
363
+ <col width="12%" />
364
+ <col width="12%" />
365
+ <col width="12%" />
366
+ <col width="16%" />
367
+ <col width="8%" />
368
+ </colgroup>
369
+ <tr>
370
+ <th>${i18next.t('field.tax invoice month')}</th>
371
+ <th required>${i18next.t('field.tax invoice day')}</th>
372
+ <th required>${i18next.t('field.tax invoice item name')}</th>
373
+ <th>${i18next.t('field.tax invoice ea')}</th>
374
+ <th required>${i18next.t('field.tax invoice quantity')}</th>
375
+ <th required>${i18next.t('field.tax invoice price')}</th>
376
+ <th>${i18next.t('field.supply amount')}</th>
377
+ <th>${i18next.t('field.tax amount')}</th>
378
+ <th>${i18next.t('field.remark0')}</th>
379
+ <th>${i18next.t('field.delete')}</th>
380
+ </tr>
381
+
382
+ ${this.taxInvoiceItems.map((item, idx) => html `
383
+ <tr>
384
+ <input type="hidden" name="sequence" value=${item.sequence} />
385
+ <td>${this.taxInvoice.issueDate.split('-')[1]}</td>
386
+ <td>
387
+ <input
388
+ type="text"
389
+ numeric
390
+ maxlength="2"
391
+ name="supplyDate"
392
+ @input=${e => this._onInputItem(e, idx)}
393
+ />
394
+ </td>
395
+ <td>
396
+ <input
397
+ type="text"
398
+ name="itemName"
399
+ .value=${item.itemName}
400
+ @input=${e => this._onInputItem(e, idx)}
401
+ />
402
+ </td>
403
+ <td>
404
+ <input
405
+ type="text"
406
+ name="specification"
407
+ .value=${item.specification}
408
+ @input=${e => this._onInputItem(e, idx)}
409
+ />
410
+ </td>
411
+ <td>
412
+ <input
413
+ type="text"
414
+ numeric
415
+ name="quantity"
416
+ .value=${this._numberFormat(item.quantity)}
417
+ @input=${e => this._onInputItem(e, idx)}
418
+ />
419
+ </td>
420
+ <td>
421
+ <input
422
+ type="text"
423
+ numeric
424
+ name="unitPrice"
425
+ .value=${this._numberFormat(item.unitPrice)}
426
+ @input=${e => this._onInputItem(e, idx)}
427
+ />
428
+ </td>
429
+ <td>
430
+ <input
431
+ type="text"
432
+ numeric
433
+ name="supplyPrice"
434
+ .value=${this._numberFormat(item.supplyPrice)}
435
+ @input=${e => this._onInputItem(e, idx)}
436
+ />
437
+ </td>
438
+ <td>
439
+ <input
440
+ type="text"
441
+ numeric
442
+ name="taxPrice"
443
+ .value=${this._numberFormat(item.taxPrice)}
444
+ @input=${e => this._onInputItem(e, idx)}
445
+ .disabled=${this.isTaxFree}
446
+ />
447
+ </td>
448
+ <td>
449
+ <input
450
+ type="text"
451
+ name="remark"
452
+ .value=${item.remark || ''}
453
+ @input=${e => this._onInputItem(e, idx)}
454
+ />
455
+ </td>
456
+ <td>
457
+ <button class="btn-delete" @click=${e => this._onRemoveInvoiceItem(e, item.sequence)}>삭제</button>
458
+ </td>
459
+ </tr>
460
+ `)}
461
+ </table>
462
+ </div>
463
+
464
+ <div class="summary">
465
+ <table>
466
+ <colgroup>
467
+ <col width="25%" />
468
+ <col width="25%" />
469
+ <col width="25%" />
470
+ <col width="25%" />
471
+ </colgroup>
472
+ <tr>
473
+ <th>${i18next.t('field.tax invoice payment cash')}</th>
474
+ <th>${i18next.t('field.tax invoice payment check')}</th>
475
+ <th>${i18next.t('field.tax invoice payment promissory note')}</th>
476
+ <th>${i18next.t('field.tax invoice payment accounts receivable')}</th>
477
+ </tr>
478
+ <tr>
479
+ <td>
480
+ <input
481
+ type="text"
482
+ numeric
483
+ name="paymentAmountCash"
484
+ .value=${((_z = this.taxInvoice) === null || _z === void 0 ? void 0 : _z.paymentAmountCash) || ''}
485
+ @input=${this._onInputTaxInvoice}
486
+ />
487
+ </td>
488
+ <td>
489
+ <input
490
+ type="text"
491
+ numeric
492
+ name="paymentAmountCheck"
493
+ .value=${((_0 = this.taxInvoice) === null || _0 === void 0 ? void 0 : _0.paymentAmountCheck) || ''}
494
+ @input=${this._onInputTaxInvoice}
495
+ />
496
+ </td>
497
+ <td>
498
+ <input
499
+ type="text"
500
+ numeric
501
+ name="paymentAmountPromissoryNote"
502
+ .value=${((_1 = this.taxInvoice) === null || _1 === void 0 ? void 0 : _1.paymentAmountPromissoryNote) || ''}
503
+ @input=${this._onInputTaxInvoice}
504
+ />
505
+ </td>
506
+ <td>
507
+ <input
508
+ type="text"
509
+ numeric
510
+ name="paymentAmountAccountsReceivable"
511
+ .value=${((_2 = this.taxInvoice) === null || _2 === void 0 ? void 0 : _2.paymentAmountAccountsReceivable) || ''}
512
+ @input=${this._onInputTaxInvoice}
513
+ />
514
+ </td>
515
+ </tr>
516
+ </table>
517
+ <div>
518
+ ${i18next.t('text.prev tax invoice description payment') + ' ('}
519
+ <span class="type-wrapper">
520
+ <div>
521
+ <input
522
+ type="radio"
523
+ id="purpose_20"
524
+ name="purpose"
525
+ .value=${Purpose.INVOICE}
526
+ @change=${this._onInputTaxInvoice}
527
+ checked
528
+ />
529
+ <label for="purpose_20">${PURPOSE[Purpose.INVOICE]}</label>
530
+ </div>
531
+ <div>
532
+ <input
533
+ type="radio"
534
+ id="purpose_10"
535
+ name="purpose"
536
+ .value=${Purpose.RECEIPT}
537
+ @change=${this._onInputTaxInvoice}
538
+ />
539
+ <label for="purpose_10">${PURPOSE[Purpose.RECEIPT]}</label>
540
+ </div>
541
+ </span>
542
+ ${') ' + i18next.t('text.next tax invoice description payment')}
543
+ </div>
544
+ </div>
545
+ </div>
546
+ `;
547
+ }
548
+ async firstUpdated() {
549
+ this._fetchSupplier();
550
+ }
551
+ async _fetchSupplier() {
552
+ const response = await client.query({
553
+ query: gql `
554
+ query taxInvoiceDefaultCompany {
555
+ response: taxInvoiceDefaultCompany {
556
+ businessRegistrationNumber
557
+ branchIdentification
558
+ businessName
559
+ representativeName
560
+ address
561
+ businessType
562
+ industryType
563
+ department
564
+ contactName
565
+ contactPhone
566
+ contactEmail
567
+ contactCellPhone
568
+ }
569
+ }
570
+ `
571
+ });
572
+ const supplier = response.data.response;
573
+ this.supplier = {
574
+ supplierBusinessRegistrationCategory: supplier.businessRegistrationCategory,
575
+ supplierBusinessRegistrationNumber: supplier.businessRegistrationNumber,
576
+ supplierBranchIdentification: supplier.branchIdentification,
577
+ supplierBusinessName: supplier.businessName,
578
+ supplierRepresentativeName: supplier.representativeName,
579
+ supplierAddress: supplier.address,
580
+ supplierBusinessType: supplier.businessType,
581
+ supplierIndustryType: supplier.industryType,
582
+ supplierDepartment: supplier.department,
583
+ supplierContactName: supplier.contactName,
584
+ supplierContactPhone: supplier.contactPhone,
585
+ supplierContactEmail: supplier.contactEmail,
586
+ supplierContactCellPhone: supplier.contactCellPhone
587
+ };
588
+ }
589
+ _numberFormat(value) {
590
+ return !value ? '' : new Intl.NumberFormat('en-US').format(value) || '';
591
+ }
592
+ // Input 요소의 값이 변경될 때 호출되는 콜백 함수
593
+ async _onInputTaxInvoice(event) {
594
+ const target = event.target;
595
+ // 숫자 타입은 다른 문자 입력 제거
596
+ if (target.hasAttribute('numeric')) {
597
+ target.value = target.value.replace(/\D/g, '');
598
+ }
599
+ if (target.name.startsWith('supplier')) {
600
+ this.supplier[target.name] = target.value;
601
+ }
602
+ else if (target.name.startsWith('buyer')) {
603
+ this.buyer[target.name] = target.value;
604
+ }
605
+ else {
606
+ // 날짜 체크가 오늘 날짜를 넘어가면 값 변경 되면 안됨
607
+ if (target.name === 'issueDate' && target.value > this.today) {
608
+ target.value = this.taxInvoice['issueDate'];
609
+ await CustomAlert({
610
+ type: 'warning',
611
+ title: '작성일자는 현재일까지 입력하시기 바랍니다.',
612
+ text: '작성일자는 현재일까지 입력하시기 바랍니다.',
613
+ confirmButton: { text: i18next.t('button.confirm') }
614
+ });
615
+ return;
616
+ }
617
+ // 세금이 없는 영세율이 선택 시 모든 아이템의 세금 0원으로 초기화
618
+ if (target.name === 'invoiceType' && target.value === InvoiceType.SMALL_BUSINESS_TAX_INVOICE) {
619
+ this.isTaxFree = true;
620
+ this.taxInvoice = Object.assign(Object.assign({}, this.taxInvoice), { taxAmount: 0 });
621
+ this.taxInvoiceItems = this.taxInvoiceItems.map(item => (Object.assign(Object.assign({}, item), { taxPrice: 0 })));
622
+ }
623
+ // 변경시에는 아이템 변경도 리 렌더가 필요해서 데이터 갱신
624
+ this.taxInvoice[target.name] = target.value;
625
+ this.taxInvoice = Object.assign({}, this.taxInvoice);
626
+ }
627
+ }
628
+ // Input 요소의 값이 변경될 때 호출되는 콜백 함수
629
+ async _onInputItem(e, idx) {
630
+ const target = e.target;
631
+ let inputVal = target.value;
632
+ // 숫자 타입은 다른 문자 입력 제거
633
+ if (target.hasAttribute('numeric')) {
634
+ inputVal = Number(inputVal.replace(/\D/g, ''));
635
+ target.value = inputVal;
636
+ }
637
+ // 공급일자 케이스 시 => 세금계산서의 작성일자의 YYYY-MM + 아이템의 입력된 DD
638
+ if (target.name === 'supplyDate') {
639
+ const itemDate = this.taxInvoice.issueDate.substring(0, 8) + inputVal.toString().padStart(2, '0');
640
+ if (itemDate > this.taxInvoice.issueDate) {
641
+ await CustomAlert({
642
+ type: 'warning',
643
+ title: '품목의 일자는 작성일자보다 클 수 없습니다.',
644
+ text: '품목의 일자는 작성일자보다 클 수 없습니다.',
645
+ confirmButton: { text: i18next.t('button.confirm') }
646
+ });
647
+ target.value = '';
648
+ }
649
+ inputVal = itemDate;
650
+ }
651
+ // 수량, 단가 수정시 공급가액/세액 자동 계산
652
+ if (target.name == 'quantity' || target.name == 'unitPrice') {
653
+ const supplyPrice = target.name == 'quantity'
654
+ ? Number(inputVal) * this.taxInvoiceItems[idx]['unitPrice']
655
+ : Number(inputVal) * this.taxInvoiceItems[idx]['quantity'];
656
+ this.taxInvoiceItems[idx]['supplyPrice'] = supplyPrice;
657
+ this.taxInvoiceItems[idx]['taxPrice'] = this.isTaxFree ? 0 : Math.floor(supplyPrice / 10);
658
+ }
659
+ // 인풋에 값 넣기
660
+ this.taxInvoiceItems[idx][target.name] = inputVal;
661
+ // 아이템 금액에 관련된 필드 수정시 합계 계산
662
+ if (['quantity', 'unitPrice', 'supplyPrice', 'taxPrice'].includes(target.name)) {
663
+ this.taxInvoiceItems = [...this.taxInvoiceItems];
664
+ this._setTaxInvoiceSummaryCalc();
665
+ }
666
+ }
667
+ async _openSupplierPopup() {
668
+ const response = await client.query({
669
+ query: gql `
670
+ query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
671
+ responses: taxInvoiceApis(filters: $filters, pagination: $pagination, sortings: $sortings) {
672
+ items {
673
+ id
674
+ name: provider
675
+ businessRegistrationNumber
676
+ branchIdentification
677
+ businessName
678
+ representativeName
679
+ address
680
+ businessType
681
+ industryType
682
+ department
683
+ contactName
684
+ contactPhone
685
+ contactEmail
686
+ contactCellPhone
687
+ }
688
+ }
689
+ }
690
+ `
691
+ });
692
+ const items = response.data.responses.items || [];
693
+ openPopup(html `
694
+ <company-list-popup
695
+ .companyList=${items}
696
+ @selected=${e => {
697
+ this.supplier = {
698
+ supplierBusinessRegistrationCategory: BusinessRegistrationCategory.BUSINESS_REGISTRATION_NUMBER,
699
+ supplierBusinessRegistrationNumber: e.detail.businessRegistrationNumber || '',
700
+ supplierBranchIdentification: e.detail.branchIdentification || '',
701
+ supplierBusinessName: e.detail.businessName || '',
702
+ supplierRepresentativeName: e.detail.representativeName || '',
703
+ supplierAddress: e.detail.address || '',
704
+ supplierBusinessType: e.detail.businessType || '',
705
+ supplierIndustryType: e.detail.industryType || '',
706
+ supplierDepartment: e.detail.department || '',
707
+ supplierContactName: e.detail.contactName || '',
708
+ supplierContactPhone: e.detail.contactPhone || '',
709
+ supplierContactEmail: e.detail.contactEmail || '',
710
+ supplierContactCellPhone: e.detail.contactCellPhone || ''
711
+ };
712
+ history.back();
713
+ }}
714
+ >
715
+ </company-list-popup>
716
+ `, {
717
+ backdrop: true,
718
+ size: 'large',
719
+ title: i18next.t('title.company list popup')
720
+ });
721
+ }
722
+ async _openBuyerPopup() {
723
+ const response = await client.query({
724
+ query: gql `
725
+ query TaxInvoiceBuyerList {
726
+ responses: taxInvoiceBuyerList {
727
+ id
728
+ name
729
+ businessRegistrationNumber
730
+ branchIdentification
731
+ businessName
732
+ representativeName
733
+ address
734
+ businessType
735
+ industryType
736
+ department
737
+ contactName
738
+ contactPhone
739
+ contactEmail
740
+ contactCellPhone
741
+ }
742
+ }
743
+ `
744
+ });
745
+ const items = response.data.responses || [];
746
+ openPopup(html `
747
+ <company-list-popup
748
+ .companyList=${items}
749
+ @selected=${e => {
750
+ this.buyer = {
751
+ buyerBusinessRegistrationCategory: BusinessRegistrationCategory.BUSINESS_REGISTRATION_NUMBER,
752
+ buyerBusinessRegistrationNumber: e.detail.businessRegistrationNumber || '',
753
+ buyerBranchIdentification: e.detail.branchIdentification || '',
754
+ buyerBusinessName: e.detail.businessName || '',
755
+ buyerRepresentativeName: e.detail.representativeName || '',
756
+ buyerAddress: e.detail.address || '',
757
+ buyerBusinessType: e.detail.businessType || '',
758
+ buyerIndustryType: e.detail.industryType || '',
759
+ buyer1stDepartment: e.detail.department || '',
760
+ buyer1stContactName: e.detail.contactName || '',
761
+ buyer1stContactPhone: e.detail.contactPhone || '',
762
+ buyer1stContactEmail: e.detail.contactEmail || '',
763
+ buyer1stContactCellPhone: e.detail.contactCellPhone || ''
764
+ };
765
+ history.back();
766
+ }}
767
+ >
768
+ </company-list-popup>
769
+ `, {
770
+ backdrop: true,
771
+ size: 'large',
772
+ title: i18next.t('title.company list popup')
773
+ });
774
+ }
775
+ async _onAddInvoiceItem(e) {
776
+ e.preventDefault();
777
+ if (this.taxInvoiceItems.length >= 16) {
778
+ await CustomAlert({
779
+ type: 'warning',
780
+ title: '품목은 최대 16개까지 추가 가능합니다.',
781
+ text: '품목은 최대 16개까지 추가 가능합니다.',
782
+ confirmButton: { text: i18next.t('button.confirm') }
783
+ });
784
+ return;
785
+ }
786
+ this.taxInvoiceItems = [...this.taxInvoiceItems, Object.assign(Object.assign({}, this.defaultTaxInvoiceItem), { sequence: new Date().getTime() })];
787
+ }
788
+ _onRemoveInvoiceItem(e, sequence) {
789
+ e.preventDefault();
790
+ this.taxInvoiceItems = [...this.taxInvoiceItems.filter(item => item.sequence != sequence)];
791
+ this._setTaxInvoiceSummaryCalc();
792
+ }
793
+ _setTaxInvoiceSummaryCalc() {
794
+ const supplyPrice = this.taxInvoiceItems.reduce((prev, item) => prev + Number(item.supplyPrice), 0) || 0;
795
+ const taxPrice = this.isTaxFree
796
+ ? 0
797
+ : this.taxInvoiceItems.reduce((prev, item) => prev + Number(item.taxPrice), 0) || 0;
798
+ const totalAmount = supplyPrice + taxPrice;
799
+ this.taxInvoice = Object.assign(Object.assign({}, this.taxInvoice), { supplyAmount: supplyPrice, taxAmount: taxPrice, totalAmount: totalAmount });
800
+ }
801
+ };
802
+ TaxInvoiceSend.styles = [
803
+ ScrollbarStyles,
804
+ CommonGristStyles,
805
+ css `
806
+ :host {
807
+ display: flex;
808
+ flex-direction: column;
809
+ overflow-y: auto;
810
+ overflow-x: hidden;
811
+
812
+ width: 100%;
813
+ min-width: 850px;
814
+ padding: 0 40px 40px 40px;
815
+
816
+ --grid-record-emphasized-background-color: red;
817
+ --grid-record-emphasized-color: yellow;
818
+ }
819
+
820
+ .flex-row {
821
+ display: flex;
822
+ flex-direction: row;
823
+ }
824
+ .flex-column {
825
+ display: flex;
826
+ flex-direction: column;
827
+ }
828
+
829
+ input[type='text'],
830
+ input[type='date'],
831
+ input[type='number'] {
832
+ width: 85%;
833
+ max-width: calc(100% - 12px);
834
+ height: 14px;
835
+ margin: 0;
836
+ padding: 4px 5px 5px;
837
+ line-height: 14px;
838
+ border: 1px solid #bbb;
839
+ background: #fff;
840
+ letter-spacing: 0.5px;
841
+ }
842
+ input[type='date'] {
843
+ width: auto;
844
+ }
845
+ input[readonly],
846
+ input:disabled {
847
+ background-color: #eee;
848
+ }
849
+
850
+ div.invoice-type {
851
+ font-size: 18px;
852
+ margin-top: 15px;
853
+ }
854
+
855
+ table {
856
+ border: solid;
857
+ border-width: 2px 0;
858
+ border-collapse: collapse;
859
+ border-spacing: 0;
860
+ }
861
+
862
+ .title table {
863
+ border-color: #d3dbe5;
864
+ width: 100%;
865
+ height: 33px;
866
+ margin-top: 10px;
867
+ font-size: 12px;
868
+
869
+ th {
870
+ font-size: 13px;
871
+ background-color: #e9edf6;
872
+ min-width: 140px;
873
+ }
874
+ td {
875
+ width: 50%;
876
+ padding-left: 10px;
877
+
878
+ & > * {
879
+ vertical-align: middle;
880
+ }
881
+ & > input {
882
+ margin: 0 5px 0 1px;
883
+ }
884
+ }
885
+ }
886
+
887
+ div.body {
888
+ margin-top: 15px;
889
+ font-size: 14px;
890
+
891
+ div.data {
892
+ display: flex;
893
+ margin-top: 5px;
894
+
895
+ table {
896
+ flex: 1;
897
+
898
+ td,
899
+ th {
900
+ padding: 5px;
901
+ min-width: 60px;
902
+ }
903
+ td {
904
+ padding-left: 8px;
905
+ }
906
+ th.target {
907
+ width: 25px;
908
+ writing-mode: vertical-rl;
909
+ min-width: unset;
910
+ }
911
+
912
+ &.supplier {
913
+ border-color: #f64843;
914
+
915
+ td,
916
+ th {
917
+ background-color: #fef5f7;
918
+ border: solid 1.5px #f5b1b1;
919
+ }
920
+ th.target {
921
+ background-color: #fedbde;
922
+ }
923
+ }
924
+ &.buyer {
925
+ border-color: #007ed9;
926
+
927
+ td,
928
+ th {
929
+ background-color: #f7f7ff;
930
+ border: solid 1.5px #a7bcff;
931
+ }
932
+ th.target {
933
+ background-color: #c6daf6;
934
+ }
935
+ }
936
+ }
937
+ }
938
+
939
+ div.header {
940
+ display: flex;
941
+
942
+ span {
943
+ flex: 1;
944
+ }
945
+ }
946
+
947
+ div.info {
948
+ margin-top: 15px;
949
+ border: solid;
950
+ border-color: #000;
951
+ border-width: 2px 0px 0px 0px;
952
+
953
+ div.flex-row div {
954
+ border: solid #c4d2ff;
955
+ border-width: 0px 1.5px 1.5px 1.5px;
956
+ margin-right: -1px;
957
+ padding: 5px;
958
+ text-align: center;
959
+
960
+ &.title {
961
+ background-color: #e9edf5;
962
+ font-weight: bold;
963
+ flex: 1;
964
+ }
965
+ &.value {
966
+ flex: 3;
967
+ text-align: left;
968
+
969
+ .desc {
970
+ font-size: 11px;
971
+ color: #c90000;
972
+ }
973
+ }
974
+ }
975
+ }
976
+
977
+ div.items,
978
+ div.summary {
979
+ margin-top: 20px;
980
+
981
+ table {
982
+ width: 100%;
983
+ border-color: #000;
984
+ border-width: 2px 0px 0px 0px;
985
+
986
+ th {
987
+ background-color: #e9edf5;
988
+ }
989
+ th,
990
+ td {
991
+ border: solid 1.5px #c4d2ff;
992
+ padding: 5px;
993
+ text-align: center;
994
+ }
995
+ }
996
+ }
997
+
998
+ div.summary {
999
+ display: flex;
1000
+
1001
+ & > table {
1002
+ flex: 6.7;
1003
+ }
1004
+ & > div {
1005
+ flex: 3.2;
1006
+ display: flex;
1007
+ justify-content: center;
1008
+ align-items: center;
1009
+ border: 1.5px solid #c4d2ff;
1010
+ border-top: 2px solid #000;
1011
+ }
1012
+
1013
+ span.type-wrapper {
1014
+ margin: 0 10px;
1015
+
1016
+ & > div {
1017
+ display: flex;
1018
+ justify-content: center;
1019
+ align-items: center;
1020
+ gap: 4px;
1021
+
1022
+ input[type='radio' i] {
1023
+ margin: 0px;
1024
+ }
1025
+ }
1026
+ }
1027
+ }
1028
+
1029
+ div.items {
1030
+ div.desc {
1031
+ font-weight: 400;
1032
+ font-size: 12px;
1033
+ margin-bottom: 5px;
1034
+ }
1035
+ div.desc-date {
1036
+ color: #005d98;
1037
+ }
1038
+ button {
1039
+ font-size: 13px;
1040
+ height: 25px;
1041
+ cursor: pointer;
1042
+ text-align: center;
1043
+ font-weight: 600;
1044
+ border-radius: 2px;
1045
+ border-color: #ccc;
1046
+ }
1047
+ .btn-add {
1048
+ color: #333;
1049
+ background-color: #f9f9f9;
1050
+ }
1051
+ .btn-delete {
1052
+ color: #fff;
1053
+ background-color: #5c636e;
1054
+ border: none;
1055
+ }
1056
+ }
1057
+
1058
+ *[required]::before {
1059
+ content: '*';
1060
+ color: red;
1061
+ margin-right: 2px;
1062
+ }
1063
+ }
1064
+ `
1065
+ ];
1066
+ __decorate([
1067
+ property({ type: Object }),
1068
+ __metadata("design:type", Object)
1069
+ ], TaxInvoiceSend.prototype, "supplier", void 0);
1070
+ __decorate([
1071
+ property({ type: Object }),
1072
+ __metadata("design:type", Object)
1073
+ ], TaxInvoiceSend.prototype, "buyer", void 0);
1074
+ __decorate([
1075
+ property({ type: Object }),
1076
+ __metadata("design:type", Object)
1077
+ ], TaxInvoiceSend.prototype, "taxInvoice", void 0);
1078
+ __decorate([
1079
+ property({ type: Array }),
1080
+ __metadata("design:type", Array)
1081
+ ], TaxInvoiceSend.prototype, "taxInvoiceItems", void 0);
1082
+ TaxInvoiceSend = __decorate([
1083
+ customElement('tax-invoice-send')
1084
+ ], TaxInvoiceSend);
1085
+ export { TaxInvoiceSend };
1086
+ //# sourceMappingURL=tax-invoice-send.js.map