@things-factory/tax-invoice 6.2.126 → 6.2.131

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 (57) hide show
  1. package/client/pages/tax-invoice-api/tax-invoice-api-page.ts +99 -61
  2. package/client/pages/tax-invoice-company/tax-invoice-company-list-page.ts +2 -67
  3. package/client/pages/{tax-invoice-company/tax-invoice-company-importer.ts → tax-invoice-send/company-list-popup.ts} +60 -46
  4. package/client/pages/tax-invoice-send/tax-invoice-send-page.ts +144 -3
  5. package/config/config.development.js +13 -0
  6. package/config/config.production.js +13 -0
  7. package/dist-client/pages/tax-invoice-api/tax-invoice-api-page.d.ts +3 -2
  8. package/dist-client/pages/tax-invoice-api/tax-invoice-api-page.js +91 -61
  9. package/dist-client/pages/tax-invoice-api/tax-invoice-api-page.js.map +1 -1
  10. package/dist-client/pages/tax-invoice-company/tax-invoice-company-importer.d.ts +2 -11
  11. package/dist-client/pages/tax-invoice-company/tax-invoice-company-importer.js +0 -10
  12. package/dist-client/pages/tax-invoice-company/tax-invoice-company-importer.js.map +1 -1
  13. package/dist-client/pages/tax-invoice-company/tax-invoice-company-list-page.d.ts +0 -16
  14. package/dist-client/pages/tax-invoice-company/tax-invoice-company-list-page.js +3 -62
  15. package/dist-client/pages/tax-invoice-company/tax-invoice-company-list-page.js.map +1 -1
  16. package/dist-client/pages/tax-invoice-send/company-list-popup.d.ts +65 -0
  17. package/dist-client/pages/tax-invoice-send/company-list-popup.js +199 -0
  18. package/dist-client/pages/tax-invoice-send/company-list-popup.js.map +1 -0
  19. package/dist-client/pages/tax-invoice-send/supplier-list-popup.d.ts +77 -0
  20. package/dist-client/pages/tax-invoice-send/supplier-list-popup.js +209 -0
  21. package/dist-client/pages/tax-invoice-send/supplier-list-popup.js.map +1 -0
  22. package/dist-client/pages/tax-invoice-send/tax-invoice-send-page.d.ts +7 -1
  23. package/dist-client/pages/tax-invoice-send/tax-invoice-send-page.js +130 -2
  24. package/dist-client/pages/tax-invoice-send/tax-invoice-send-page.js.map +1 -1
  25. package/dist-client/tsconfig.tsbuildinfo +1 -1
  26. package/dist-server/service/tax-invoice-api/tax-invoice-api-mutation.js +20 -12
  27. package/dist-server/service/tax-invoice-api/tax-invoice-api-mutation.js.map +1 -1
  28. package/dist-server/service/tax-invoice-api/tax-invoice-api-query.js +13 -7
  29. package/dist-server/service/tax-invoice-api/tax-invoice-api-query.js.map +1 -1
  30. package/dist-server/service/tax-invoice-api/tax-invoice-api-type.js +3 -7
  31. package/dist-server/service/tax-invoice-api/tax-invoice-api-type.js.map +1 -1
  32. package/dist-server/service/tax-invoice-api/tax-invoice-api.js +9 -21
  33. package/dist-server/service/tax-invoice-api/tax-invoice-api.js.map +1 -1
  34. package/dist-server/service/tax-invoice-company/tax-invoice-company-query.js +41 -6
  35. package/dist-server/service/tax-invoice-company/tax-invoice-company-query.js.map +1 -1
  36. package/dist-server/service/tax-invoice-company/tax-invoice-company-type.js +55 -5
  37. package/dist-server/service/tax-invoice-company/tax-invoice-company-type.js.map +1 -1
  38. package/dist-server/service/tax-invoice-company/tax-invoice-company.js +1 -19
  39. package/dist-server/service/tax-invoice-company/tax-invoice-company.js.map +1 -1
  40. package/dist-server/service/unipost-api/tax-invoice-inquiry.js +6 -10
  41. package/dist-server/service/unipost-api/tax-invoice-inquiry.js.map +1 -1
  42. package/dist-server/service/unipost-api/tax-invoice-send.js +4 -5
  43. package/dist-server/service/unipost-api/tax-invoice-send.js.map +1 -1
  44. package/dist-server/service/unipost-api/test-data.js +3812 -0
  45. package/dist-server/service/unipost-api/test-data.js.map +1 -0
  46. package/dist-server/tsconfig.tsbuildinfo +1 -1
  47. package/package.json +3 -2
  48. package/server/service/tax-invoice-api/tax-invoice-api-mutation.ts +34 -20
  49. package/server/service/tax-invoice-api/tax-invoice-api-query.ts +12 -6
  50. package/server/service/tax-invoice-api/tax-invoice-api-type.ts +2 -5
  51. package/server/service/tax-invoice-api/tax-invoice-api.ts +9 -19
  52. package/server/service/tax-invoice-company/tax-invoice-company-query.ts +35 -5
  53. package/server/service/tax-invoice-company/tax-invoice-company-type.ts +40 -4
  54. package/server/service/tax-invoice-company/tax-invoice-company.ts +0 -18
  55. package/server/service/unipost-api/tax-invoice-inquiry.ts +6 -10
  56. package/server/service/unipost-api/tax-invoice-send.ts +5 -5
  57. package/translations/ko.json +3 -0
@@ -0,0 +1,209 @@
1
+ import { __decorate, __metadata } from "tslib";
2
+ import '@operato/data-grist';
3
+ import { css, html, LitElement } from 'lit';
4
+ import { property, query } from 'lit/decorators.js';
5
+ import { DataGrist } from '@operato/data-grist';
6
+ import { i18next } from '@operato/i18n';
7
+ export class SupplierListPopup extends LitElement {
8
+ constructor() {
9
+ super(...arguments);
10
+ this.supplierList = [];
11
+ this.columns = {
12
+ pagination: { infinite: true },
13
+ columns: [
14
+ { type: 'gutter', gutterName: 'sequence' },
15
+ { type: 'gutter', gutterName: 'row-selector', multiple: false },
16
+ {
17
+ type: 'string',
18
+ name: 'name',
19
+ header: i18next.t('field.name'),
20
+ record: {
21
+ editable: false
22
+ },
23
+ filter: 'search',
24
+ sortable: true,
25
+ width: 150
26
+ },
27
+ {
28
+ type: 'string',
29
+ name: 'description',
30
+ header: i18next.t('field.description'),
31
+ record: {
32
+ editable: false
33
+ },
34
+ filter: 'search',
35
+ width: 200
36
+ },
37
+ {
38
+ type: 'string',
39
+ name: 'businessRegistrationNumber',
40
+ header: i18next.t('field.business registration number'),
41
+ record: {
42
+ editable: false
43
+ },
44
+ width: 150
45
+ },
46
+ {
47
+ type: 'string',
48
+ name: 'branchIdentification',
49
+ header: i18next.t('field.branch identification'),
50
+ record: {
51
+ editable: false
52
+ },
53
+ width: 150
54
+ },
55
+ {
56
+ type: 'string',
57
+ name: 'businessName',
58
+ header: i18next.t('field.tax invoice business name'),
59
+ record: {
60
+ editable: false
61
+ },
62
+ width: 150
63
+ },
64
+ {
65
+ type: 'string',
66
+ name: 'representativeName',
67
+ header: i18next.t('field.tax invoice representative name'),
68
+ record: {
69
+ editable: false
70
+ },
71
+ width: 150
72
+ },
73
+ {
74
+ type: 'string',
75
+ name: 'address',
76
+ header: i18next.t('field.address'),
77
+ record: {
78
+ editable: false
79
+ },
80
+ width: 200
81
+ },
82
+ {
83
+ type: 'string',
84
+ name: 'businessType',
85
+ header: i18next.t('field.business type'),
86
+ record: {
87
+ editable: false
88
+ },
89
+ width: 100
90
+ },
91
+ {
92
+ type: 'string',
93
+ name: 'industryType',
94
+ header: i18next.t('field.industry type'),
95
+ record: {
96
+ editable: false
97
+ },
98
+ width: 100
99
+ },
100
+ {
101
+ type: 'string',
102
+ name: 'department',
103
+ header: i18next.t('field.department'),
104
+ record: {
105
+ editable: false
106
+ },
107
+ width: 150
108
+ },
109
+ {
110
+ type: 'string',
111
+ name: 'contactName',
112
+ header: i18next.t('field.contact name'),
113
+ record: {
114
+ editable: false
115
+ },
116
+ width: 150
117
+ },
118
+ {
119
+ type: 'string',
120
+ name: 'contactPhone',
121
+ header: i18next.t('field.contact phone'),
122
+ record: {
123
+ editable: false
124
+ },
125
+ width: 150
126
+ },
127
+ {
128
+ type: 'string',
129
+ name: 'contactEmail',
130
+ header: i18next.t('field.contact email'),
131
+ record: {
132
+ editable: false
133
+ },
134
+ width: 150
135
+ },
136
+ {
137
+ type: 'string',
138
+ name: 'contactCellPhone',
139
+ header: i18next.t('field.contact cell phone'),
140
+ record: {
141
+ editable: false
142
+ },
143
+ width: 150
144
+ }
145
+ ],
146
+ rows: {
147
+ selectable: {
148
+ multiple: false
149
+ },
150
+ appendable: false
151
+ }
152
+ };
153
+ }
154
+ render() {
155
+ return html `
156
+ <ox-grist
157
+ .mode=${'GRID'}
158
+ .config=${this.columns}
159
+ .data=${{
160
+ records: this.supplierList
161
+ }}
162
+ ></ox-grist>
163
+
164
+ <div class="button-container">
165
+ <mwc-button raised @click="${this.select.bind(this)}">${i18next.t('button.select')}</mwc-button>
166
+ </div>
167
+ `;
168
+ }
169
+ async select() {
170
+ this.dispatchEvent(new CustomEvent('selected', { detail: this.grist.selected[0] }));
171
+ }
172
+ }
173
+ SupplierListPopup.styles = [
174
+ css `
175
+ :host {
176
+ display: flex;
177
+ flex-direction: column;
178
+
179
+ background-color: #fff;
180
+ }
181
+
182
+ ox-grist {
183
+ flex: 1;
184
+ }
185
+
186
+ .button-container {
187
+ display: flex;
188
+ margin-left: auto;
189
+ padding: var(--padding-default);
190
+ }
191
+
192
+ mwc-button {
193
+ margin-left: var(--margin-default);
194
+ }
195
+ `
196
+ ];
197
+ __decorate([
198
+ query('ox-grist'),
199
+ __metadata("design:type", DataGrist)
200
+ ], SupplierListPopup.prototype, "grist", void 0);
201
+ __decorate([
202
+ property({ type: Array }),
203
+ __metadata("design:type", Array)
204
+ ], SupplierListPopup.prototype, "supplierList", void 0);
205
+ __decorate([
206
+ property({ type: Object }),
207
+ __metadata("design:type", Object)
208
+ ], SupplierListPopup.prototype, "columns", void 0);
209
+ //# sourceMappingURL=supplier-list-popup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"supplier-list-popup.js","sourceRoot":"","sources":["../../../client/pages/tax-invoice-send/supplier-list-popup.ts"],"names":[],"mappings":";AAAA,OAAO,qBAAqB,CAAA;AAG5B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,QAAQ,EAAS,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAC1D,OAAO,EAAE,SAAS,EAAe,MAAM,qBAAqB,CAAA;AAG5D,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAGvC,MAAM,OAAO,iBAAkB,SAAQ,UAAU;IAAjD;;QA4B6B,iBAAY,GAAU,EAAE,CAAA;QACvB,YAAO,GAAG;YACpC,UAAU,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;YAC9B,OAAO,EAAE;gBACP,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE;gBAC1C,EAAE,IA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IAAI,EAAE,MAAM,EAAE,CAAC;;kDA6I1B","sourcesContent":["import '@operato/data-grist'\n\nimport gql from 'graphql-tag'\nimport { css, html, LitElement } from 'lit'\nimport { property, state, query } from 'lit/decorators.js'\nimport { DataGrist, FetchOption } from '@operato/data-grist'\n\nimport { client } from '@operato/graphql'\nimport { i18next } from '@operato/i18n'\nimport { Supplier } from './tax-invoice-send-page'\n\nexport class SupplierListPopup extends LitElement {\n static styles = [\n css`\n :host {\n display: flex;\n flex-direction: column;\n\n background-color: #fff;\n }\n\n ox-grist {\n flex: 1;\n }\n\n .button-container {\n display: flex;\n margin-left: auto;\n padding: var(--padding-default);\n }\n\n mwc-button {\n margin-left: var(--margin-default);\n }\n `\n ]\n\n @query('ox-grist') private grist!: DataGrist\n\n @property({ type: Array }) supplierList: any[] = []\n @property({ type: Object }) columns = {\n pagination: { infinite: true },\n columns: [\n { type: 'gutter', gutterName: 'sequence' },\n { type: 'gutter', gutterName: 'row-selector', multiple: false },\n {\n type: 'string',\n name: 'name',\n header: i18next.t('field.name'),\n record: {\n editable: false\n },\n filter: 'search',\n sortable: true,\n width: 150\n },\n {\n type: 'string',\n name: 'description',\n header: i18next.t('field.description'),\n record: {\n editable: false\n },\n filter: 'search',\n width: 200\n },\n {\n type: 'string',\n name: 'businessRegistrationNumber',\n header: i18next.t('field.business registration number'),\n record: {\n editable: false\n },\n width: 150\n },\n {\n type: 'string',\n name: 'branchIdentification',\n header: i18next.t('field.branch identification'),\n record: {\n editable: false\n },\n width: 150\n },\n {\n type: 'string',\n name: 'businessName',\n header: i18next.t('field.tax invoice business name'),\n record: {\n editable: false\n },\n width: 150\n },\n {\n type: 'string',\n name: 'representativeName',\n header: i18next.t('field.tax invoice representative name'),\n record: {\n editable: false\n },\n width: 150\n },\n {\n type: 'string',\n name: 'address',\n header: i18next.t('field.address'),\n record: {\n editable: false\n },\n width: 200\n },\n {\n type: 'string',\n name: 'businessType',\n header: i18next.t('field.business type'),\n record: {\n editable: false\n },\n width: 100\n },\n {\n type: 'string',\n name: 'industryType',\n header: i18next.t('field.industry type'),\n record: {\n editable: false\n },\n width: 100\n },\n {\n type: 'string',\n name: 'department',\n header: i18next.t('field.department'),\n record: {\n editable: false\n },\n width: 150\n },\n {\n type: 'string',\n name: 'contactName',\n header: i18next.t('field.contact name'),\n record: {\n editable: false\n },\n width: 150\n },\n {\n type: 'string',\n name: 'contactPhone',\n header: i18next.t('field.contact phone'),\n record: {\n editable: false\n },\n width: 150\n },\n {\n type: 'string',\n name: 'contactEmail',\n header: i18next.t('field.contact email'),\n record: {\n editable: false\n },\n width: 150\n },\n {\n type: 'string',\n name: 'contactCellPhone',\n header: i18next.t('field.contact cell phone'),\n record: {\n editable: false\n },\n width: 150\n }\n ],\n rows: {\n selectable: {\n multiple: false\n },\n appendable: false\n }\n }\n\n render() {\n return html`\n <ox-grist\n .mode=${'GRID'}\n .config=${this.columns}\n .data=${{\n records: this.supplierList\n }}\n ></ox-grist>\n\n <div class=\"button-container\">\n <mwc-button raised @click=\"${this.select.bind(this)}\">${i18next.t('button.select')}</mwc-button>\n </div>\n `\n }\n\n async select() {\n this.dispatchEvent(new CustomEvent('selected', { detail: this.grist.selected[0] }))\n }\n}\n"]}
@@ -1,7 +1,8 @@
1
1
  import '@operato/data-grist';
2
2
  import { PageView } from '@operato/shell';
3
3
  import { BusinessRegistrationCategory, Category, InvoiceType, Purpose } from '../tax-invoice/tax-invoice-list-page';
4
- interface Supplier {
4
+ import { CompanyListPopup } from './company-list-popup';
5
+ export interface Supplier {
5
6
  supplierBusinessRegistrationCategory: string;
6
7
  supplierBusinessRegistrationNumber: string;
7
8
  supplierBranchIdentification?: string;
@@ -70,6 +71,9 @@ interface TaxInvoiceItem {
70
71
  declare const TaxInvoiceSendPage_base: (new (...args: any[]) => import("lit").LitElement) & typeof PageView & import("@open-wc/dedupe-mixin").Constructor<import("@open-wc/scoped-elements/types/src/types").ScopedElementsHost>;
71
72
  export declare class TaxInvoiceSendPage extends TaxInvoiceSendPage_base {
72
73
  static styles: import("lit").CSSResult[];
74
+ static get scopedElements(): {
75
+ 'company-list-popup': typeof CompanyListPopup;
76
+ };
73
77
  private today;
74
78
  supplier: Supplier;
75
79
  buyer: Buyer;
@@ -99,6 +103,8 @@ export declare class TaxInvoiceSendPage extends TaxInvoiceSendPage_base {
99
103
  private _numberFormat;
100
104
  private _onInputTaxInvoice;
101
105
  private _onInputItem;
106
+ private _openSupplierPopup;
107
+ private _openBuyerPopup;
102
108
  private _onAddInvoiceItem;
103
109
  private _onRemoveInvoiceItem;
104
110
  private _setTaxInvoiceSummaryCalc;
@@ -10,6 +10,8 @@ import { i18next, localize } from '@operato/i18n';
10
10
  import { notify } from '@operato/layout';
11
11
  import gql from 'graphql-tag';
12
12
  import { BUSINESS_REGISTRATION_CATEGORY, BusinessRegistrationCategory, Category, INVOICE_TYPE, InvoiceType, PURPOSE, Purpose } from '../tax-invoice/tax-invoice-list-page';
13
+ import { openPopup } from '@operato/layout';
14
+ import { CompanyListPopup } from './company-list-popup';
13
15
  const SHORT_INVOICE_TYPE = {
14
16
  TAX_INVOICE: {
15
17
  [InvoiceType.TAX_INVOICE]: '일반',
@@ -67,6 +69,11 @@ let TaxInvoiceSendPage = class TaxInvoiceSendPage extends localize(i18next)(Scop
67
69
  };
68
70
  this.taxInvoiceItems = [Object.assign({}, this.defaultTaxInvoiceItem)];
69
71
  }
72
+ static get scopedElements() {
73
+ return {
74
+ 'company-list-popup': CompanyListPopup
75
+ };
76
+ }
70
77
  get context() {
71
78
  return {
72
79
  title: i18next.t('title.tax invoice send'),
@@ -113,6 +120,11 @@ let TaxInvoiceSendPage = class TaxInvoiceSendPage extends localize(i18next)(Scop
113
120
  </div>
114
121
 
115
122
  <div class="body">
123
+ <div class="header">
124
+ <span><button @click=${this._openSupplierPopup}>공급처 선택</button></span>
125
+ <span><button @click=${this._openBuyerPopup}>공급받는자 선택</button></span>
126
+ </div>
127
+
116
128
  <div class="data">
117
129
  <table class="supplier">
118
130
  <colgroup>
@@ -338,8 +350,8 @@ let TaxInvoiceSendPage = class TaxInvoiceSendPage extends localize(i18next)(Scop
338
350
  async _fetchSupplier() {
339
351
  const response = await client.query({
340
352
  query: gql `
341
- query TaxInvoiceApi {
342
- response: taxInvoiceApi {
353
+ query taxInvoiceDefaultCompany {
354
+ response: taxInvoiceDefaultCompany {
343
355
  businessRegistrationNumber
344
356
  branchIdentification
345
357
  businessName
@@ -479,6 +491,114 @@ let TaxInvoiceSendPage = class TaxInvoiceSendPage extends localize(i18next)(Scop
479
491
  }
480
492
  this.taxInvoiceItems[idx][target.name] = inputVal;
481
493
  }
494
+ async _openSupplierPopup() {
495
+ const response = await client.query({
496
+ query: gql `
497
+ query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
498
+ responses: taxInvoiceApis(filters: $filters, pagination: $pagination, sortings: $sortings) {
499
+ items {
500
+ id
501
+ name: provider
502
+ businessRegistrationNumber
503
+ branchIdentification
504
+ businessName
505
+ representativeName
506
+ address
507
+ businessType
508
+ industryType
509
+ department
510
+ contactName
511
+ contactPhone
512
+ contactEmail
513
+ contactCellPhone
514
+ }
515
+ }
516
+ }
517
+ `
518
+ });
519
+ const items = response.data.responses.items || [];
520
+ openPopup(html `
521
+ <company-list-popup
522
+ .companyList=${items}
523
+ @selected=${e => {
524
+ this.supplier = {
525
+ supplierBusinessRegistrationCategory: BusinessRegistrationCategory.BUSINESS_REGISTRATION_NUMBER,
526
+ supplierBusinessRegistrationNumber: e.detail.businessRegistrationNumber || '',
527
+ supplierBranchIdentification: e.detail.branchIdentification || '',
528
+ supplierBusinessName: e.detail.businessName || '',
529
+ supplierRepresentativeName: e.detail.representativeName || '',
530
+ supplierAddress: e.detail.address || '',
531
+ supplierBusinessType: e.detail.businessType || '',
532
+ supplierIndustryType: e.detail.industryType || '',
533
+ supplierDepartment: e.detail.department || '',
534
+ supplierContactName: e.detail.contactName || '',
535
+ supplierContactPhone: e.detail.contactPhone || '',
536
+ supplierContactEmail: e.detail.contactEmail || '',
537
+ supplierContactCellPhone: e.detail.contactCellPhone || ''
538
+ };
539
+ history.back();
540
+ }}
541
+ >
542
+ </company-list-popup>
543
+ `, {
544
+ backdrop: true,
545
+ size: 'large',
546
+ title: i18next.t('title.company list popup')
547
+ });
548
+ }
549
+ async _openBuyerPopup() {
550
+ const response = await client.query({
551
+ query: gql `
552
+ query TaxInvoiceBuyerList {
553
+ responses: taxInvoiceBuyerList {
554
+ id
555
+ name
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 items = response.data.responses || [];
573
+ openPopup(html `
574
+ <company-list-popup
575
+ .companyList=${items}
576
+ @selected=${e => {
577
+ this.buyer = {
578
+ buyerBusinessRegistrationCategory: BusinessRegistrationCategory.BUSINESS_REGISTRATION_NUMBER,
579
+ buyerBusinessRegistrationNumber: e.detail.businessRegistrationNumber || '',
580
+ buyerBranchIdentification: e.detail.branchIdentification || '',
581
+ buyerBusinessName: e.detail.businessName || '',
582
+ buyerRepresentativeName: e.detail.representativeName || '',
583
+ buyerAddress: e.detail.address || '',
584
+ buyerBusinessType: e.detail.businessType || '',
585
+ buyerIndustryType: e.detail.industryType || '',
586
+ buyer1stDepartment: e.detail.department || '',
587
+ buyer1stContactName: e.detail.contactName || '',
588
+ buyer1stContactPhone: e.detail.contactPhone || '',
589
+ buyer1stContactEmail: e.detail.contactEmail || '',
590
+ buyer1stContactCellPhone: e.detail.contactCellPhone || ''
591
+ };
592
+ history.back();
593
+ }}
594
+ >
595
+ </company-list-popup>
596
+ `, {
597
+ backdrop: true,
598
+ size: 'large',
599
+ title: i18next.t('title.company list popup')
600
+ });
601
+ }
482
602
  _onAddInvoiceItem(e) {
483
603
  e.preventDefault();
484
604
  if (this.taxInvoiceItems.length >= 16) {
@@ -634,6 +754,14 @@ TaxInvoiceSendPage.styles = [
634
754
  }
635
755
  }
636
756
 
757
+ div.header {
758
+ display: flex;
759
+
760
+ span {
761
+ flex: 1;
762
+ }
763
+ }
764
+
637
765
  div.info {
638
766
  margin-top: 15px;
639
767
  border: solid;