@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
package/client/bootstrap.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function bootstrap() {}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import '@material/web/icon/icon.js'
|
|
1
2
|
import '@operato/data-grist'
|
|
2
3
|
|
|
3
4
|
import gql from 'graphql-tag'
|
|
@@ -7,30 +8,22 @@ import { property } from 'lit/decorators.js'
|
|
|
7
8
|
import { client } from '@operato/graphql'
|
|
8
9
|
import { i18next } from '@operato/i18n'
|
|
9
10
|
import { isMobileDevice } from '@operato/utils'
|
|
11
|
+
import { ButtonContainerStyles } from '@operato/styles'
|
|
10
12
|
|
|
11
13
|
export class TaxAuditResultImporter extends LitElement {
|
|
12
14
|
static styles = [
|
|
15
|
+
ButtonContainerStyles,
|
|
13
16
|
css`
|
|
14
17
|
:host {
|
|
15
18
|
display: flex;
|
|
16
19
|
flex-direction: column;
|
|
17
20
|
|
|
18
|
-
background-color:
|
|
21
|
+
background-color: var(--md-sys-color-surface);
|
|
19
22
|
}
|
|
20
23
|
|
|
21
24
|
ox-grist {
|
|
22
25
|
flex: 1;
|
|
23
26
|
}
|
|
24
|
-
|
|
25
|
-
.button-container {
|
|
26
|
-
display: flex;
|
|
27
|
-
margin-left: auto;
|
|
28
|
-
padding: var(--padding-default);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
mwc-button {
|
|
32
|
-
margin-left: var(--margin-default);
|
|
33
|
-
}
|
|
34
27
|
`
|
|
35
28
|
]
|
|
36
29
|
|
|
@@ -60,21 +53,18 @@ export class TaxAuditResultImporter extends LitElement {
|
|
|
60
53
|
]
|
|
61
54
|
}
|
|
62
55
|
|
|
63
|
-
|
|
64
56
|
render() {
|
|
65
57
|
return html`
|
|
66
58
|
<ox-grist
|
|
67
59
|
.mode=${isMobileDevice() ? 'LIST' : 'GRID'}
|
|
68
60
|
.config=${this.columns}
|
|
69
|
-
.data=${
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
}
|
|
73
|
-
}
|
|
61
|
+
.data=${{
|
|
62
|
+
records: this.taxAuditResults
|
|
63
|
+
}}
|
|
74
64
|
></ox-grist>
|
|
75
65
|
|
|
76
66
|
<div class="button-container">
|
|
77
|
-
<
|
|
67
|
+
<button @click="${this.save.bind(this)}"><md-icon>save</md-icon>${i18next.t('button.save')}</button>
|
|
78
68
|
</div>
|
|
79
69
|
`
|
|
80
70
|
}
|
|
@@ -94,4 +84,3 @@ export class TaxAuditResultImporter extends LitElement {
|
|
|
94
84
|
this.dispatchEvent(new CustomEvent('imported'))
|
|
95
85
|
}
|
|
96
86
|
}
|
|
97
|
-
|
|
@@ -5,12 +5,7 @@ import { PageView, store } from '@operato/shell'
|
|
|
5
5
|
import { css, html } from 'lit'
|
|
6
6
|
import { customElement, property, query } from 'lit/decorators.js'
|
|
7
7
|
import { ScopedElementsMixin } from '@open-wc/scoped-elements'
|
|
8
|
-
import {
|
|
9
|
-
ColumnConfig,
|
|
10
|
-
DataGrist,
|
|
11
|
-
FetchOption,
|
|
12
|
-
SortersControl
|
|
13
|
-
} from '@operato/data-grist'
|
|
8
|
+
import { ColumnConfig, DataGrist, FetchOption, SortersControl } from '@operato/data-grist'
|
|
14
9
|
import { client } from '@operato/graphql'
|
|
15
10
|
import { i18next, localize } from '@operato/i18n'
|
|
16
11
|
import { notify, openPopup } from '@operato/layout'
|
|
@@ -24,7 +19,6 @@ import { TaxAuditResultImporter } from './tax-audit-result-importer'
|
|
|
24
19
|
|
|
25
20
|
@customElement('tax-audit-result-list-page')
|
|
26
21
|
export class TaxAuditResultListPage extends connect(store)(localize(i18next)(ScopedElementsMixin(PageView))) {
|
|
27
|
-
|
|
28
22
|
static styles = [
|
|
29
23
|
ScrollbarStyles,
|
|
30
24
|
CommonGristStyles,
|
|
@@ -93,11 +87,7 @@ export class TaxAuditResultListPage extends connect(store)(localize(i18next)(Sco
|
|
|
93
87
|
const mode = this.mode || (isMobileDevice() ? 'CARD' : 'GRID')
|
|
94
88
|
|
|
95
89
|
return html`
|
|
96
|
-
<ox-grist
|
|
97
|
-
.mode=${mode}
|
|
98
|
-
.config=${this.gristConfig}
|
|
99
|
-
.fetchHandler=${this.fetchHandler.bind(this)}
|
|
100
|
-
>
|
|
90
|
+
<ox-grist .mode=${mode} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}>
|
|
101
91
|
<div slot="headroom">
|
|
102
92
|
<div id="filters">
|
|
103
93
|
<ox-filters-form autofocus></ox-filters-form>
|
|
@@ -105,7 +95,7 @@ export class TaxAuditResultListPage extends connect(store)(localize(i18next)(Sco
|
|
|
105
95
|
|
|
106
96
|
<div id="sorters">
|
|
107
97
|
Sort
|
|
108
|
-
<
|
|
98
|
+
<md-icon
|
|
109
99
|
@click=${e => {
|
|
110
100
|
const target = e.currentTarget
|
|
111
101
|
this.sortersControl.open({
|
|
@@ -113,7 +103,7 @@ export class TaxAuditResultListPage extends connect(store)(localize(i18next)(Sco
|
|
|
113
103
|
top: target.offsetTop + target.offsetHeight
|
|
114
104
|
})
|
|
115
105
|
}}
|
|
116
|
-
>expand_more</
|
|
106
|
+
>expand_more</md-icon
|
|
117
107
|
>
|
|
118
108
|
<ox-popup id="sorter-control">
|
|
119
109
|
<ox-sorters-control> </ox-sorters-control>
|
|
@@ -121,9 +111,10 @@ export class TaxAuditResultListPage extends connect(store)(localize(i18next)(Sco
|
|
|
121
111
|
</div>
|
|
122
112
|
|
|
123
113
|
<div id="modes">
|
|
124
|
-
<
|
|
125
|
-
<
|
|
126
|
-
<
|
|
114
|
+
<md-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>grid_on</md-icon>
|
|
115
|
+
<md-icon @click=${() => (this.mode = 'LIST')} ?active=${mode == 'LIST'}>format_list_bulleted</md-icon>
|
|
116
|
+
<md-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</md-icon>
|
|
117
|
+
</div>
|
|
127
118
|
</div>
|
|
128
119
|
</div>
|
|
129
120
|
</ox-grist>
|
|
@@ -312,12 +303,7 @@ export class TaxAuditResultListPage extends connect(store)(localize(i18next)(Sco
|
|
|
312
303
|
|
|
313
304
|
async exportHandler() {
|
|
314
305
|
const exportTargets = this.grist.selected.length ? this.grist.selected : this.grist.dirtyData.records
|
|
315
|
-
const targetFieldSet = new Set([
|
|
316
|
-
'id',
|
|
317
|
-
'name',
|
|
318
|
-
'description',
|
|
319
|
-
'active'
|
|
320
|
-
])
|
|
306
|
+
const targetFieldSet = new Set(['id', 'name', 'description', 'active'])
|
|
321
307
|
|
|
322
308
|
return exportTargets.map(taxAuditResult => {
|
|
323
309
|
let tempObj = {}
|
|
@@ -346,10 +332,9 @@ export class TaxAuditResultListPage extends connect(store)(localize(i18next)(Sco
|
|
|
346
332
|
title: i18next.t('title.import tax-audit-result')
|
|
347
333
|
}
|
|
348
334
|
)
|
|
349
|
-
|
|
335
|
+
|
|
350
336
|
popup.onclosed = () => {
|
|
351
337
|
this.grist.fetch()
|
|
352
338
|
}
|
|
353
339
|
}
|
|
354
340
|
}
|
|
355
|
-
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import '@material/mwc-icon'
|
|
2
1
|
import '@operato/data-grist'
|
|
3
2
|
|
|
4
3
|
import { CommonHeaderStyles, ScrollbarStyles } from '@operato/styles'
|
|
@@ -18,7 +17,7 @@ export class TaxInvoiceDetailPopup extends localize(i18next)(LitElement) {
|
|
|
18
17
|
:host {
|
|
19
18
|
display: flex;
|
|
20
19
|
flex-direction: column;
|
|
21
|
-
background-color: var(--
|
|
20
|
+
background-color: var(--md-sys-color-background);
|
|
22
21
|
width: 100%;
|
|
23
22
|
padding: 15px;
|
|
24
23
|
font-size: 14px;
|
|
@@ -26,8 +25,8 @@ export class TaxInvoiceDetailPopup extends localize(i18next)(LitElement) {
|
|
|
26
25
|
}
|
|
27
26
|
|
|
28
27
|
input {
|
|
29
|
-
border: var(--border-
|
|
30
|
-
padding: var(--
|
|
28
|
+
border: var(--border-dim-color);
|
|
29
|
+
padding: var(--spacing-small) var(--spacing-medium);
|
|
31
30
|
max-width: 100px;
|
|
32
31
|
font: var(--input-font);
|
|
33
32
|
}
|
|
@@ -294,20 +293,19 @@ export class TaxInvoiceDetailPopup extends localize(i18next)(LitElement) {
|
|
|
294
293
|
</tr>
|
|
295
294
|
|
|
296
295
|
${this.detail.taxInvoiceItems?.map(
|
|
297
|
-
item =>
|
|
298
|
-
|
|
299
|
-
<
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
`
|
|
296
|
+
item => html`
|
|
297
|
+
<tr>
|
|
298
|
+
<td>${item.supplyDate.split('-')[1]}</td>
|
|
299
|
+
<td>${item.supplyDate.split('-')[2]?.split('T')[0]}</td>
|
|
300
|
+
<td>${item.itemName}</td>
|
|
301
|
+
<td>${item.specification}</td>
|
|
302
|
+
<td>${item.quantity}</td>
|
|
303
|
+
<td>${this._numberFormat(item.unitPrice)}</td>
|
|
304
|
+
<td>${this._numberFormat(item.supplyPrice)}</td>
|
|
305
|
+
<td>${this._numberFormat(item.taxPrice)}</td>
|
|
306
|
+
<td>${item.remark}</td>
|
|
307
|
+
</tr>
|
|
308
|
+
`
|
|
311
309
|
)}
|
|
312
310
|
</table>
|
|
313
311
|
</div>
|
|
@@ -336,7 +334,11 @@ export class TaxInvoiceDetailPopup extends localize(i18next)(LitElement) {
|
|
|
336
334
|
<td>${this._numberFormat(this.detail.paymentAmountAccountsReceivable)}</td>
|
|
337
335
|
</tr>
|
|
338
336
|
</table>
|
|
339
|
-
<div
|
|
337
|
+
<div>
|
|
338
|
+
${i18next.t('text.tax invoice description payment', {
|
|
339
|
+
value: i18next.t(`text.tax invoice description purpose ${this.detail.purpose}`)
|
|
340
|
+
})}
|
|
341
|
+
</div>
|
|
340
342
|
</div>
|
|
341
343
|
</div>
|
|
342
344
|
`
|
|
@@ -11,6 +11,7 @@ import { i18next, localize } from '@operato/i18n'
|
|
|
11
11
|
import { notify } from '@operato/layout'
|
|
12
12
|
import { isMobileDevice } from '@operato/utils'
|
|
13
13
|
import gql from 'graphql-tag'
|
|
14
|
+
import { OxPrompt } from '@operato/popup'
|
|
14
15
|
|
|
15
16
|
@customElement('tax-invoice-api-page')
|
|
16
17
|
export class TaxInvoiceApiPage extends localize(i18next)(ScopedElementsMixin(PageView)) {
|
|
@@ -47,6 +48,11 @@ export class TaxInvoiceApiPage extends localize(i18next)(ScopedElementsMixin(Pag
|
|
|
47
48
|
title: i18next.t('button.save'),
|
|
48
49
|
action: this._updateTaxInvoiceApi.bind(this),
|
|
49
50
|
...CommonButtonStyles.save
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
title: i18next.t('button.delete'),
|
|
54
|
+
action: this._deleteTaxAuditResult.bind(this),
|
|
55
|
+
...CommonButtonStyles.delete
|
|
50
56
|
}
|
|
51
57
|
]
|
|
52
58
|
}
|
|
@@ -68,25 +74,23 @@ export class TaxInvoiceApiPage extends localize(i18next)(ScopedElementsMixin(Pag
|
|
|
68
74
|
{ type: 'gutter', gutterName: 'sequence' },
|
|
69
75
|
{ type: 'gutter', gutterName: 'row-selector', multiple: true },
|
|
70
76
|
{
|
|
71
|
-
type: '
|
|
72
|
-
name: '
|
|
73
|
-
header: i18next.t('field.
|
|
77
|
+
type: 'boolean',
|
|
78
|
+
name: 'isDefault',
|
|
79
|
+
header: i18next.t('field.is_default'),
|
|
74
80
|
record: {
|
|
75
81
|
editable: true,
|
|
76
|
-
|
|
82
|
+
align: 'center'
|
|
77
83
|
},
|
|
78
|
-
|
|
79
|
-
width: 150
|
|
84
|
+
width: 70
|
|
80
85
|
},
|
|
81
86
|
{
|
|
82
87
|
type: 'string',
|
|
83
|
-
name: '
|
|
84
|
-
header: i18next.t('field.
|
|
88
|
+
name: 'provider',
|
|
89
|
+
header: i18next.t('field.provider'),
|
|
85
90
|
record: {
|
|
86
91
|
editable: true
|
|
87
92
|
},
|
|
88
|
-
|
|
89
|
-
width: 200
|
|
93
|
+
width: 150
|
|
90
94
|
},
|
|
91
95
|
{
|
|
92
96
|
type: 'string',
|
|
@@ -119,9 +123,7 @@ export class TaxInvoiceApiPage extends localize(i18next)(ScopedElementsMixin(Pag
|
|
|
119
123
|
type: 'string',
|
|
120
124
|
name: 'businessRegistrationNumber',
|
|
121
125
|
header: i18next.t('field.business registration number'),
|
|
122
|
-
record: {
|
|
123
|
-
editable: true
|
|
124
|
-
},
|
|
126
|
+
record: { editable: true },
|
|
125
127
|
width: 150
|
|
126
128
|
},
|
|
127
129
|
{
|
|
@@ -256,78 +258,82 @@ export class TaxInvoiceApiPage extends localize(i18next)(ScopedElementsMixin(Pag
|
|
|
256
258
|
},
|
|
257
259
|
width: 180
|
|
258
260
|
}
|
|
259
|
-
]
|
|
260
|
-
rows: {
|
|
261
|
-
selectable: {
|
|
262
|
-
multiple: true
|
|
263
|
-
},
|
|
264
|
-
appendable: false
|
|
265
|
-
}
|
|
261
|
+
]
|
|
266
262
|
}
|
|
267
263
|
}
|
|
268
264
|
|
|
269
265
|
async fetchHandler({ page = 1, limit = 100, sortings = [], filters = [] }: FetchOption) {
|
|
270
266
|
const response = await client.query({
|
|
271
267
|
query: gql`
|
|
272
|
-
query
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
name
|
|
276
|
-
description
|
|
277
|
-
apiKey
|
|
278
|
-
apiAccountId
|
|
279
|
-
apiAccountPassword
|
|
280
|
-
businessRegistrationNumber
|
|
281
|
-
branchIdentification
|
|
282
|
-
businessName
|
|
283
|
-
representativeName
|
|
284
|
-
address
|
|
285
|
-
businessType
|
|
286
|
-
industryType
|
|
287
|
-
department
|
|
288
|
-
contactName
|
|
289
|
-
contactPhone
|
|
290
|
-
contactEmail
|
|
291
|
-
contactCellPhone
|
|
292
|
-
attributes
|
|
293
|
-
updater {
|
|
268
|
+
query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
|
|
269
|
+
responses: taxInvoiceApis(filters: $filters, pagination: $pagination, sortings: $sortings) {
|
|
270
|
+
items {
|
|
294
271
|
id
|
|
295
|
-
|
|
272
|
+
isDefault
|
|
273
|
+
provider
|
|
274
|
+
apiKey
|
|
275
|
+
apiAccountId
|
|
276
|
+
apiAccountPassword
|
|
277
|
+
businessRegistrationNumber
|
|
278
|
+
branchIdentification
|
|
279
|
+
businessName
|
|
280
|
+
representativeName
|
|
281
|
+
address
|
|
282
|
+
businessType
|
|
283
|
+
industryType
|
|
284
|
+
department
|
|
285
|
+
contactName
|
|
286
|
+
contactPhone
|
|
287
|
+
contactEmail
|
|
288
|
+
contactCellPhone
|
|
289
|
+
attributes
|
|
290
|
+
updater {
|
|
291
|
+
id
|
|
292
|
+
name
|
|
293
|
+
}
|
|
294
|
+
updatedAt
|
|
296
295
|
}
|
|
297
|
-
|
|
296
|
+
total
|
|
298
297
|
}
|
|
299
298
|
}
|
|
300
|
-
|
|
299
|
+
`,
|
|
300
|
+
variables: {
|
|
301
|
+
filters,
|
|
302
|
+
pagination: { page, limit },
|
|
303
|
+
sortings
|
|
304
|
+
}
|
|
301
305
|
})
|
|
302
306
|
|
|
303
|
-
const records = response.data.response ? [response.data.response] : [{}]
|
|
304
|
-
|
|
305
307
|
return {
|
|
306
|
-
total:
|
|
307
|
-
records:
|
|
308
|
+
total: response.data.responses.total || 0,
|
|
309
|
+
records: response.data.responses.items || []
|
|
308
310
|
}
|
|
309
311
|
}
|
|
310
312
|
|
|
311
313
|
async _updateTaxInvoiceApi() {
|
|
312
|
-
let
|
|
313
|
-
if (
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
314
|
+
let patches = this.grist.dirtyRecords
|
|
315
|
+
if (patches && patches.length) {
|
|
316
|
+
patches = patches.map(patch => {
|
|
317
|
+
let patchField: any = patch.id ? { id: patch.id } : {}
|
|
318
|
+
const dirtyFields = patch.__dirtyfields__
|
|
319
|
+
for (let key in dirtyFields) {
|
|
320
|
+
patchField[key] = dirtyFields[key].after
|
|
321
|
+
}
|
|
322
|
+
patchField.cuFlag = patch.__dirty__
|
|
323
|
+
|
|
324
|
+
return patchField
|
|
325
|
+
})
|
|
320
326
|
|
|
321
327
|
const response = await client.mutate({
|
|
322
328
|
mutation: gql`
|
|
323
|
-
mutation ($
|
|
324
|
-
updateMultipleTaxInvoiceApi(
|
|
325
|
-
|
|
329
|
+
mutation ($patches: [TaxInvoiceApiPatch!]!) {
|
|
330
|
+
updateMultipleTaxInvoiceApi(patches: $patches) {
|
|
331
|
+
provider
|
|
326
332
|
}
|
|
327
333
|
}
|
|
328
334
|
`,
|
|
329
335
|
variables: {
|
|
330
|
-
|
|
336
|
+
patches
|
|
331
337
|
}
|
|
332
338
|
})
|
|
333
339
|
|
|
@@ -363,4 +369,36 @@ export class TaxInvoiceApiPage extends localize(i18next)(ScopedElementsMixin(Pag
|
|
|
363
369
|
|
|
364
370
|
return response.data?.attributeSet || {}
|
|
365
371
|
}
|
|
372
|
+
|
|
373
|
+
async _deleteTaxAuditResult() {
|
|
374
|
+
if (
|
|
375
|
+
await OxPrompt.open({
|
|
376
|
+
title: i18next.t('text.are_you_sure'),
|
|
377
|
+
text: i18next.t('text.sure_to_x', { x: i18next.t('text.delete') }),
|
|
378
|
+
confirmButton: { text: i18next.t('button.confirm') },
|
|
379
|
+
cancelButton: { text: i18next.t('button.cancel') }
|
|
380
|
+
})
|
|
381
|
+
) {
|
|
382
|
+
const ids = this.grist.selected.map(record => record.id)
|
|
383
|
+
if (ids && ids.length > 0) {
|
|
384
|
+
const response = await client.mutate({
|
|
385
|
+
mutation: gql`
|
|
386
|
+
mutation ($ids: [String!]!) {
|
|
387
|
+
deleteTaxInvoiceApis(ids: $ids)
|
|
388
|
+
}
|
|
389
|
+
`,
|
|
390
|
+
variables: {
|
|
391
|
+
ids
|
|
392
|
+
}
|
|
393
|
+
})
|
|
394
|
+
|
|
395
|
+
if (!response.errors) {
|
|
396
|
+
this.grist.fetch()
|
|
397
|
+
notify({
|
|
398
|
+
message: i18next.t('text.info_x_successfully', { x: i18next.t('text.delete') })
|
|
399
|
+
})
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
}
|
|
366
404
|
}
|
|
@@ -12,16 +12,6 @@ import { notify, openPopup } from '@operato/layout'
|
|
|
12
12
|
import { OxPrompt } from '@operato/popup'
|
|
13
13
|
import { isMobileDevice } from '@operato/utils'
|
|
14
14
|
import gql from 'graphql-tag'
|
|
15
|
-
import { TaxInvoiceCompanyImporter } from './tax-invoice-company-importer'
|
|
16
|
-
|
|
17
|
-
export enum CompanyType {
|
|
18
|
-
SUPPLIER = 10, // 공급자
|
|
19
|
-
BUYER = 20 // 거래처
|
|
20
|
-
}
|
|
21
|
-
export const COMPANY_TYPE_LABEL = {
|
|
22
|
-
[CompanyType.SUPPLIER]: '공급자',
|
|
23
|
-
[CompanyType.BUYER]: '거래처'
|
|
24
|
-
}
|
|
25
15
|
|
|
26
16
|
@customElement('tax-invoice-company-list-page')
|
|
27
17
|
export class TaxInvoiceCompanyListPage extends localize(i18next)(ScopedElementsMixin(PageView)) {
|
|
@@ -40,12 +30,6 @@ export class TaxInvoiceCompanyListPage extends localize(i18next)(ScopedElementsM
|
|
|
40
30
|
`
|
|
41
31
|
]
|
|
42
32
|
|
|
43
|
-
static get scopedElements() {
|
|
44
|
-
return {
|
|
45
|
-
'tax-invoice-company-importer': TaxInvoiceCompanyImporter
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
33
|
@property({ type: Object }) gristConfig: any
|
|
50
34
|
@property({ type: String }) mode: 'CARD' | 'GRID' | 'LIST' = isMobileDevice() ? 'CARD' : 'GRID'
|
|
51
35
|
|
|
@@ -70,9 +54,6 @@ export class TaxInvoiceCompanyListPage extends localize(i18next)(ScopedElementsM
|
|
|
70
54
|
exportable: {
|
|
71
55
|
name: i18next.t('title.tax invoice company list'),
|
|
72
56
|
data: this.exportHandler.bind(this)
|
|
73
|
-
},
|
|
74
|
-
importable: {
|
|
75
|
-
handler: this.importHandler.bind(this)
|
|
76
57
|
}
|
|
77
58
|
}
|
|
78
59
|
}
|
|
@@ -122,27 +103,6 @@ export class TaxInvoiceCompanyListPage extends localize(i18next)(ScopedElementsM
|
|
|
122
103
|
filter: 'search',
|
|
123
104
|
width: 200
|
|
124
105
|
},
|
|
125
|
-
{
|
|
126
|
-
type: 'select',
|
|
127
|
-
name: 'type',
|
|
128
|
-
header: i18next.t('field.type'),
|
|
129
|
-
record: {
|
|
130
|
-
editable: true,
|
|
131
|
-
classifier: () => ({ emphasized: ['#D1E8FF', '#000'] }),
|
|
132
|
-
options: [
|
|
133
|
-
{},
|
|
134
|
-
{
|
|
135
|
-
display: i18next.t('text.company supplier'),
|
|
136
|
-
value: CompanyType.SUPPLIER
|
|
137
|
-
},
|
|
138
|
-
{
|
|
139
|
-
display: i18next.t('text.company buyer'),
|
|
140
|
-
value: CompanyType.BUYER
|
|
141
|
-
}
|
|
142
|
-
]
|
|
143
|
-
},
|
|
144
|
-
width: 100
|
|
145
|
-
},
|
|
146
106
|
{
|
|
147
107
|
type: 'string',
|
|
148
108
|
name: 'businessRegistrationNumber',
|
|
@@ -164,7 +124,7 @@ export class TaxInvoiceCompanyListPage extends localize(i18next)(ScopedElementsM
|
|
|
164
124
|
{
|
|
165
125
|
type: 'string',
|
|
166
126
|
name: 'businessName',
|
|
167
|
-
header: i18next.t('field.business name'),
|
|
127
|
+
header: i18next.t('field.tax invoice business name'),
|
|
168
128
|
record: {
|
|
169
129
|
editable: true
|
|
170
130
|
},
|
|
@@ -173,7 +133,7 @@ export class TaxInvoiceCompanyListPage extends localize(i18next)(ScopedElementsM
|
|
|
173
133
|
{
|
|
174
134
|
type: 'string',
|
|
175
135
|
name: 'representativeName',
|
|
176
|
-
header: i18next.t('field.representative name'),
|
|
136
|
+
header: i18next.t('field.tax invoice representative name'),
|
|
177
137
|
record: {
|
|
178
138
|
editable: true
|
|
179
139
|
},
|
|
@@ -313,7 +273,6 @@ export class TaxInvoiceCompanyListPage extends localize(i18next)(ScopedElementsM
|
|
|
313
273
|
id
|
|
314
274
|
name
|
|
315
275
|
description
|
|
316
|
-
type
|
|
317
276
|
businessRegistrationNumber
|
|
318
277
|
branchIdentification
|
|
319
278
|
businessName
|
|
@@ -445,7 +404,6 @@ export class TaxInvoiceCompanyListPage extends localize(i18next)(ScopedElementsM
|
|
|
445
404
|
'id',
|
|
446
405
|
'name',
|
|
447
406
|
'description',
|
|
448
|
-
'type',
|
|
449
407
|
'businessRegistrationNumber',
|
|
450
408
|
'branchIdentification',
|
|
451
409
|
'businessName',
|
|
@@ -470,27 +428,4 @@ export class TaxInvoiceCompanyListPage extends localize(i18next)(ScopedElementsM
|
|
|
470
428
|
return tempObj
|
|
471
429
|
})
|
|
472
430
|
}
|
|
473
|
-
|
|
474
|
-
async importHandler(records) {
|
|
475
|
-
const popup = openPopup(
|
|
476
|
-
html`
|
|
477
|
-
<tax-invoice-company-importer
|
|
478
|
-
.taxInvoiceCompanies=${records}
|
|
479
|
-
@imported=${() => {
|
|
480
|
-
history.back()
|
|
481
|
-
this.grist.fetch()
|
|
482
|
-
}}
|
|
483
|
-
></tax-invoice-company-importer>
|
|
484
|
-
`,
|
|
485
|
-
{
|
|
486
|
-
backdrop: true,
|
|
487
|
-
size: 'large',
|
|
488
|
-
title: i18next.t('title.import tax invoice company')
|
|
489
|
-
}
|
|
490
|
-
)
|
|
491
|
-
|
|
492
|
-
popup.onclosed = () => {
|
|
493
|
-
this.grist.fetch()
|
|
494
|
-
}
|
|
495
|
-
}
|
|
496
431
|
}
|