@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.
- package/client/bootstrap.ts +1 -0
- package/client/pages/tax-audit-result/tax-audit-result-importer.ts +8 -19
- package/client/pages/tax-audit-result/tax-audit-result-list-page.ts +10 -25
- package/client/pages/tax-invoice/tax-invoice-detail-popup.ts +21 -19
- package/client/pages/tax-invoice-api/tax-invoice-api-page.ts +99 -61
- package/client/pages/tax-invoice-company/tax-invoice-company-list-page.ts +2 -67
- package/client/pages/{tax-invoice-company/tax-invoice-company-importer.ts → tax-invoice-send/company-list-popup.ts} +69 -57
- package/client/pages/tax-invoice-send/tax-invoice-send-page.ts +78 -742
- package/client/pages/tax-invoice-send/tax-invoice-send.ts +1181 -0
- package/config/config.development.js +13 -0
- package/config/config.production.js +13 -0
- package/dist-client/bootstrap.d.ts +1 -0
- package/dist-client/bootstrap.js +1 -1
- package/dist-client/bootstrap.js.map +1 -1
- package/dist-client/pages/main.js.map +1 -1
- package/dist-client/pages/tax-audit-result/tax-audit-result-importer.d.ts +1 -0
- package/dist-client/pages/tax-audit-result/tax-audit-result-importer.js +5 -12
- package/dist-client/pages/tax-audit-result/tax-audit-result-importer.js.map +1 -1
- package/dist-client/pages/tax-audit-result/tax-audit-result-list-page.js +8 -16
- package/dist-client/pages/tax-audit-result/tax-audit-result-list-page.js.map +1 -1
- package/dist-client/pages/tax-invoice/tax-invoice-detail-popup.d.ts +0 -1
- package/dist-client/pages/tax-invoice/tax-invoice-detail-popup.js +20 -17
- package/dist-client/pages/tax-invoice/tax-invoice-detail-popup.js.map +1 -1
- package/dist-client/pages/tax-invoice/tax-invoice-list-page.d.ts +5 -5
- package/dist-client/pages/tax-invoice/tax-invoice-list-page.js.map +1 -1
- package/dist-client/pages/tax-invoice-api/tax-invoice-api-page.d.ts +3 -2
- package/dist-client/pages/tax-invoice-api/tax-invoice-api-page.js +91 -61
- package/dist-client/pages/tax-invoice-api/tax-invoice-api-page.js.map +1 -1
- package/dist-client/pages/tax-invoice-company/tax-invoice-company-list-page.d.ts +0 -16
- package/dist-client/pages/tax-invoice-company/tax-invoice-company-list-page.js +3 -62
- package/dist-client/pages/tax-invoice-company/tax-invoice-company-list-page.js.map +1 -1
- package/dist-client/pages/tax-invoice-send/company-list-popup.d.ts +69 -0
- package/dist-client/pages/{tax-invoice-company/tax-invoice-company-importer.js → tax-invoice-send/company-list-popup.js} +75 -60
- package/dist-client/pages/tax-invoice-send/company-list-popup.js.map +1 -0
- package/dist-client/pages/tax-invoice-send/tax-invoice-send-page.d.ts +11 -78
- package/dist-client/pages/tax-invoice-send/tax-invoice-send-page.js +65 -654
- package/dist-client/pages/tax-invoice-send/tax-invoice-send-page.js.map +1 -1
- package/dist-client/pages/tax-invoice-send/tax-invoice-send.d.ts +112 -0
- package/dist-client/pages/tax-invoice-send/tax-invoice-send.js +1086 -0
- package/dist-client/pages/tax-invoice-send/tax-invoice-send.js.map +1 -0
- package/dist-client/route.d.ts +1 -1
- package/dist-client/route.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/index.d.ts +2 -0
- package/dist-server/routes.d.ts +1 -0
- package/dist-server/service/index.d.ts +9 -0
- package/dist-server/service/index.js +1 -0
- package/dist-server/service/index.js.map +1 -1
- package/dist-server/service/tax-audit-result/event-subscriber.d.ts +7 -0
- package/dist-server/service/tax-audit-result/event-subscriber.js +2 -2
- package/dist-server/service/tax-audit-result/event-subscriber.js.map +1 -1
- package/dist-server/service/tax-audit-result/index.d.ts +7 -0
- package/dist-server/service/tax-audit-result/tax-audit-result-history.d.ts +25 -0
- package/dist-server/service/tax-audit-result/tax-audit-result-history.js +10 -6
- package/dist-server/service/tax-audit-result/tax-audit-result-history.js.map +1 -1
- package/dist-server/service/tax-audit-result/tax-audit-result-mutation.d.ts +10 -0
- package/dist-server/service/tax-audit-result/tax-audit-result-mutation.js +2 -2
- package/dist-server/service/tax-audit-result/tax-audit-result-mutation.js.map +1 -1
- package/dist-server/service/tax-audit-result/tax-audit-result-query.d.ts +12 -0
- package/dist-server/service/tax-audit-result/tax-audit-result-query.js +3 -3
- package/dist-server/service/tax-audit-result/tax-audit-result-query.js.map +1 -1
- package/dist-server/service/tax-audit-result/tax-audit-result-type.d.ts +23 -0
- package/dist-server/service/tax-audit-result/tax-audit-result-type.js +6 -6
- package/dist-server/service/tax-audit-result/tax-audit-result-type.js.map +1 -1
- package/dist-server/service/tax-audit-result/tax-audit-result.d.ts +25 -0
- package/dist-server/service/tax-audit-result/tax-audit-result.js +4 -4
- package/dist-server/service/tax-audit-result/tax-audit-result.js.map +1 -1
- package/dist-server/service/tax-invoice/index.d.ts +5 -0
- package/dist-server/service/tax-invoice/tax-invoice-mutation.d.ts +10 -0
- package/dist-server/service/tax-invoice/tax-invoice-mutation.js +2 -6
- package/dist-server/service/tax-invoice/tax-invoice-mutation.js.map +1 -1
- package/dist-server/service/tax-invoice/tax-invoice-query.d.ts +14 -0
- package/dist-server/service/tax-invoice/tax-invoice-query.js +22 -10
- package/dist-server/service/tax-invoice/tax-invoice-query.js.map +1 -1
- package/dist-server/service/tax-invoice/tax-invoice-type.d.ts +86 -0
- package/dist-server/service/tax-invoice/tax-invoice-type.js +12 -8
- package/dist-server/service/tax-invoice/tax-invoice-type.js.map +1 -1
- package/dist-server/service/tax-invoice/tax-invoice-util.d.ts +133 -0
- package/dist-server/service/tax-invoice/tax-invoice-util.js +2 -2
- package/dist-server/service/tax-invoice/tax-invoice-util.js.map +1 -1
- package/dist-server/service/tax-invoice/tax-invoice.d.ts +120 -0
- package/dist-server/service/tax-invoice/tax-invoice.js +15 -10
- package/dist-server/service/tax-invoice/tax-invoice.js.map +1 -1
- package/dist-server/service/tax-invoice-api/index.d.ts +5 -0
- package/dist-server/service/tax-invoice-api/tax-invoice-api-mutation.d.ts +8 -0
- package/dist-server/service/tax-invoice-api/tax-invoice-api-mutation.js +46 -16
- package/dist-server/service/tax-invoice-api/tax-invoice-api-mutation.js.map +1 -1
- package/dist-server/service/tax-invoice-api/tax-invoice-api-query.d.ts +10 -0
- package/dist-server/service/tax-invoice-api/tax-invoice-api-query.js +15 -9
- package/dist-server/service/tax-invoice-api/tax-invoice-api-query.js.map +1 -1
- package/dist-server/service/tax-invoice-api/tax-invoice-api-type.d.ts +32 -0
- package/dist-server/service/tax-invoice-api/tax-invoice-api-type.js +9 -13
- package/dist-server/service/tax-invoice-api/tax-invoice-api-type.js.map +1 -1
- package/dist-server/service/tax-invoice-api/tax-invoice-api.d.ts +31 -0
- package/dist-server/service/tax-invoice-api/tax-invoice-api.js +12 -24
- package/dist-server/service/tax-invoice-api/tax-invoice-api.js.map +1 -1
- package/dist-server/service/tax-invoice-company/index.d.ts +5 -0
- package/dist-server/service/tax-invoice-company/tax-invoice-company-mutation.d.ts +7 -0
- package/dist-server/service/tax-invoice-company/tax-invoice-company-mutation.js +2 -2
- package/dist-server/service/tax-invoice-company/tax-invoice-company-mutation.js.map +1 -1
- package/dist-server/service/tax-invoice-company/tax-invoice-company-query.d.ts +14 -0
- package/dist-server/service/tax-invoice-company/tax-invoice-company-query.js +44 -9
- package/dist-server/service/tax-invoice-company/tax-invoice-company-query.js.map +1 -1
- package/dist-server/service/tax-invoice-company/tax-invoice-company-type.d.ts +38 -0
- package/dist-server/service/tax-invoice-company/tax-invoice-company-type.js +59 -9
- package/dist-server/service/tax-invoice-company/tax-invoice-company-type.js.map +1 -1
- package/dist-server/service/tax-invoice-company/tax-invoice-company.d.ts +29 -0
- package/dist-server/service/tax-invoice-company/tax-invoice-company.js +14 -24
- package/dist-server/service/tax-invoice-company/tax-invoice-company.js.map +1 -1
- package/dist-server/service/tax-invoice-item/index.d.ts +5 -0
- package/dist-server/service/tax-invoice-item/tax-invoice-item-mutation.d.ts +10 -0
- package/dist-server/service/tax-invoice-item/tax-invoice-item-mutation.js +2 -2
- package/dist-server/service/tax-invoice-item/tax-invoice-item-mutation.js.map +1 -1
- package/dist-server/service/tax-invoice-item/tax-invoice-item-query.d.ts +11 -0
- package/dist-server/service/tax-invoice-item/tax-invoice-item-query.js +3 -3
- package/dist-server/service/tax-invoice-item/tax-invoice-item-query.js.map +1 -1
- package/dist-server/service/tax-invoice-item/tax-invoice-item-type.d.ts +29 -0
- package/dist-server/service/tax-invoice-item/tax-invoice-item-type.js +6 -6
- package/dist-server/service/tax-invoice-item/tax-invoice-item-type.js.map +1 -1
- package/dist-server/service/tax-invoice-item/tax-invoice-item.d.ts +23 -0
- package/dist-server/service/tax-invoice-item/tax-invoice-item.js +7 -7
- package/dist-server/service/tax-invoice-item/tax-invoice-item.js.map +1 -1
- package/dist-server/service/unipost-api/tax-invoice-inquiry.d.ts +16 -0
- package/dist-server/service/unipost-api/tax-invoice-inquiry.js +10 -14
- package/dist-server/service/unipost-api/tax-invoice-inquiry.js.map +1 -1
- package/dist-server/service/unipost-api/tax-invoice-send.d.ts +1 -0
- package/dist-server/service/unipost-api/tax-invoice-send.js +5 -7
- package/dist-server/service/unipost-api/tax-invoice-send.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +8 -7
- package/server/service/index.ts +1 -0
- package/server/service/tax-audit-result/tax-audit-result-history.ts +10 -6
- package/server/service/tax-audit-result/tax-audit-result-query.ts +4 -1
- package/server/service/tax-audit-result/tax-audit-result.ts +6 -2
- package/server/service/tax-invoice/tax-invoice-mutation.ts +0 -3
- package/server/service/tax-invoice/tax-invoice-query.ts +36 -9
- package/server/service/tax-invoice/tax-invoice-type.ts +3 -0
- package/server/service/tax-invoice/tax-invoice-util.ts +1 -0
- package/server/service/tax-invoice/tax-invoice.ts +19 -4
- package/server/service/tax-invoice-api/tax-invoice-api-mutation.ts +63 -24
- package/server/service/tax-invoice-api/tax-invoice-api-query.ts +15 -6
- package/server/service/tax-invoice-api/tax-invoice-api-type.ts +2 -5
- package/server/service/tax-invoice-api/tax-invoice-api.ts +23 -20
- package/server/service/tax-invoice-company/tax-invoice-company-query.ts +39 -6
- package/server/service/tax-invoice-company/tax-invoice-company-type.ts +40 -4
- package/server/service/tax-invoice-company/tax-invoice-company.ts +11 -21
- package/server/service/tax-invoice-item/tax-invoice-item-query.ts +4 -1
- package/server/service/tax-invoice-item/tax-invoice-item.ts +22 -8
- package/server/service/unipost-api/tax-invoice-inquiry.ts +6 -10
- package/server/service/unipost-api/tax-invoice-send.ts +5 -5
- package/translations/ko.json +3 -0
- package/dist-client/pages/tax-invoice-company/tax-invoice-company-importer.d.ts +0 -31
- package/dist-client/pages/tax-invoice-company/tax-invoice-company-importer.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ObjectType, Field, InputType, Int, ID } from 'type-graphql'
|
|
2
2
|
import { ScalarObject } from '@things-factory/shell'
|
|
3
|
-
import {
|
|
3
|
+
import { TaxInvoiceCompany } from './tax-invoice-company'
|
|
4
4
|
|
|
5
5
|
@InputType()
|
|
6
6
|
export class TaxInvoiceCompanyPatch {
|
|
@@ -13,9 +13,6 @@ export class TaxInvoiceCompanyPatch {
|
|
|
13
13
|
@Field({ nullable: true })
|
|
14
14
|
description?: string
|
|
15
15
|
|
|
16
|
-
@Field({ nullable: true })
|
|
17
|
-
type?: CompanyType
|
|
18
|
-
|
|
19
16
|
@Field({ nullable: true })
|
|
20
17
|
businessRegistrationNumber?: string
|
|
21
18
|
|
|
@@ -59,6 +56,45 @@ export class TaxInvoiceCompanyPatch {
|
|
|
59
56
|
cuFlag?: string
|
|
60
57
|
}
|
|
61
58
|
|
|
59
|
+
@ObjectType()
|
|
60
|
+
export class TaxInvoiceMyCompany {
|
|
61
|
+
@Field({ nullable: true })
|
|
62
|
+
businessRegistrationNumber?: string
|
|
63
|
+
|
|
64
|
+
@Field({ nullable: true })
|
|
65
|
+
branchIdentification?: string
|
|
66
|
+
|
|
67
|
+
@Field({ nullable: true })
|
|
68
|
+
businessName?: string
|
|
69
|
+
|
|
70
|
+
@Field({ nullable: true })
|
|
71
|
+
representativeName?: string
|
|
72
|
+
|
|
73
|
+
@Field({ nullable: true })
|
|
74
|
+
address?: string
|
|
75
|
+
|
|
76
|
+
@Field({ nullable: true })
|
|
77
|
+
businessType?: string
|
|
78
|
+
|
|
79
|
+
@Field({ nullable: true })
|
|
80
|
+
industryType?: string
|
|
81
|
+
|
|
82
|
+
@Field({ nullable: true })
|
|
83
|
+
department?: string
|
|
84
|
+
|
|
85
|
+
@Field({ nullable: true })
|
|
86
|
+
contactName?: string
|
|
87
|
+
|
|
88
|
+
@Field({ nullable: true })
|
|
89
|
+
contactPhone?: string
|
|
90
|
+
|
|
91
|
+
@Field({ nullable: true })
|
|
92
|
+
contactEmail?: string
|
|
93
|
+
|
|
94
|
+
@Field({ nullable: true })
|
|
95
|
+
contactCellPhone?: string
|
|
96
|
+
}
|
|
97
|
+
|
|
62
98
|
@ObjectType()
|
|
63
99
|
export class TaxInvoiceCompanyList {
|
|
64
100
|
@Field(type => [TaxInvoiceCompany])
|
|
@@ -15,24 +15,18 @@ import { ObjectType, Field, ID, registerEnumType } from 'type-graphql'
|
|
|
15
15
|
|
|
16
16
|
import { Domain, ScalarObject, encryptTransformer } from '@things-factory/shell'
|
|
17
17
|
import { User } from '@things-factory/auth-base'
|
|
18
|
-
import { TaxInvoiceApi } from '../tax-invoice-api/tax-invoice-api'
|
|
19
|
-
|
|
20
|
-
export enum CompanyType {
|
|
21
|
-
SUPPLIER = 10, // 공급자
|
|
22
|
-
BUYER = 20 // 거래처
|
|
23
|
-
}
|
|
24
|
-
export const companyTypeLabel = {
|
|
25
|
-
[CompanyType.SUPPLIER]: '공급자',
|
|
26
|
-
[CompanyType.BUYER]: '거래처'
|
|
27
|
-
}
|
|
28
|
-
registerEnumType(CompanyType, {
|
|
29
|
-
name: 'CompanyType',
|
|
30
|
-
description: 'company type'
|
|
31
|
-
})
|
|
32
18
|
|
|
33
19
|
@Entity()
|
|
34
|
-
@Index('ix_tax_invoice_company_0', (taxInvoiceCompany: TaxInvoiceCompany) => [
|
|
35
|
-
|
|
20
|
+
@Index('ix_tax_invoice_company_0', (taxInvoiceCompany: TaxInvoiceCompany) => [
|
|
21
|
+
taxInvoiceCompany.domain,
|
|
22
|
+
taxInvoiceCompany.name,
|
|
23
|
+
taxInvoiceCompany.deletedAt
|
|
24
|
+
])
|
|
25
|
+
@Index('ix_tax_invoice_company_1', (taxInvoiceCompany: TaxInvoiceCompany) => [
|
|
26
|
+
taxInvoiceCompany.domain,
|
|
27
|
+
taxInvoiceCompany.description,
|
|
28
|
+
taxInvoiceCompany.deletedAt
|
|
29
|
+
])
|
|
36
30
|
@ObjectType({ description: 'Entity for TaxInvoice Company' })
|
|
37
31
|
export class TaxInvoiceCompany {
|
|
38
32
|
@PrimaryGeneratedColumn('uuid')
|
|
@@ -40,7 +34,7 @@ export class TaxInvoiceCompany {
|
|
|
40
34
|
readonly id!: string
|
|
41
35
|
|
|
42
36
|
@ManyToOne(type => Domain)
|
|
43
|
-
@Field(
|
|
37
|
+
@Field(type => Domain)
|
|
44
38
|
domain?: Domain
|
|
45
39
|
|
|
46
40
|
@RelationId((taxInvoiceCompany: TaxInvoiceCompany) => taxInvoiceCompany.domain)
|
|
@@ -54,10 +48,6 @@ export class TaxInvoiceCompany {
|
|
|
54
48
|
@Column({ nullable: true })
|
|
55
49
|
description?: string
|
|
56
50
|
|
|
57
|
-
@Field({ nullable: false })
|
|
58
|
-
@Column({ nullable: false })
|
|
59
|
-
type!: CompanyType
|
|
60
|
-
|
|
61
51
|
@Column({ nullable: true, comment: '사업자등록번호', transformer: encryptTransformer })
|
|
62
52
|
@Field({ nullable: true, description: '사업자등록번호' })
|
|
63
53
|
businessRegistrationNumber?: string
|
|
@@ -17,7 +17,10 @@ export class TaxInvoiceItemQuery {
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
@Query(returns => TaxInvoiceItemList, { description: 'To fetch multiple TaxInvoiceItems' })
|
|
20
|
-
async taxInvoiceItems(
|
|
20
|
+
async taxInvoiceItems(
|
|
21
|
+
@Args(type => ListParam) params: ListParam,
|
|
22
|
+
@Ctx() context: ResolverContext
|
|
23
|
+
): Promise<TaxInvoiceItemList> {
|
|
21
24
|
const { domain } = context.state
|
|
22
25
|
|
|
23
26
|
const queryBuilder = getQueryBuilderFromListParams({
|
|
@@ -1,12 +1,26 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
CreateDateColumn,
|
|
3
|
+
DeleteDateColumn,
|
|
4
|
+
Entity,
|
|
5
|
+
Index,
|
|
6
|
+
Column,
|
|
7
|
+
JoinColumn,
|
|
8
|
+
RelationId,
|
|
9
|
+
ManyToOne,
|
|
10
|
+
PrimaryGeneratedColumn
|
|
11
|
+
} from 'typeorm'
|
|
2
12
|
import { ObjectType, Field, ID } from 'type-graphql'
|
|
3
13
|
|
|
4
|
-
import { Domain } from '@things-factory/shell'
|
|
14
|
+
import { Domain, roundTransformer } from '@things-factory/shell'
|
|
5
15
|
import { User } from '@things-factory/auth-base'
|
|
6
16
|
import { TaxInvoice } from '../tax-invoice/tax-invoice'
|
|
7
17
|
|
|
8
18
|
@Entity()
|
|
9
|
-
@Index(
|
|
19
|
+
@Index(
|
|
20
|
+
'ix_tax_invoice_item_0',
|
|
21
|
+
(taxInvoiceItem: TaxInvoiceItem) => [taxInvoiceItem.domain, taxInvoiceItem.id, taxInvoiceItem.deletedAt],
|
|
22
|
+
{ unique: true }
|
|
23
|
+
)
|
|
10
24
|
@Index('ix_tax_invoice_item_1', (taxInvoiceItem: TaxInvoiceItem) => [taxInvoiceItem.taxInvoice])
|
|
11
25
|
@ObjectType({ description: 'Entity for TaxInvoiceItem' })
|
|
12
26
|
export class TaxInvoiceItem {
|
|
@@ -15,7 +29,7 @@ export class TaxInvoiceItem {
|
|
|
15
29
|
readonly id!: string
|
|
16
30
|
|
|
17
31
|
@ManyToOne(type => Domain)
|
|
18
|
-
@Field(
|
|
32
|
+
@Field(type => Domain)
|
|
19
33
|
domain?: Domain
|
|
20
34
|
|
|
21
35
|
@RelationId((taxInvoiceItem: TaxInvoiceItem) => taxInvoiceItem.domain)
|
|
@@ -32,8 +46,8 @@ export class TaxInvoiceItem {
|
|
|
32
46
|
@Field({ nullable: true, description: '아이템 일련번호' })
|
|
33
47
|
sequence?: number
|
|
34
48
|
|
|
35
|
-
@Column({ nullable:
|
|
36
|
-
@Field({ nullable:
|
|
49
|
+
@Column({ nullable: true, comment: '공급년월일(YYYY-MM-DD)' })
|
|
50
|
+
@Field({ nullable: true, description: '공급년월일(YYYY-MM-DD)' })
|
|
37
51
|
supplyDate!: Date
|
|
38
52
|
|
|
39
53
|
@Column({ nullable: false, comment: '품목명' })
|
|
@@ -44,11 +58,11 @@ export class TaxInvoiceItem {
|
|
|
44
58
|
@Field({ nullable: false, description: '규격' })
|
|
45
59
|
specification!: string
|
|
46
60
|
|
|
47
|
-
@Column('float', {
|
|
61
|
+
@Column('float', { nullable: false, comment: '수량 (소수점 2자리까지 허용)', transformer: roundTransformer })
|
|
48
62
|
@Field({ nullable: false, description: '수량 (소수점 2자리까지 허용)' })
|
|
49
63
|
quantity!: number
|
|
50
64
|
|
|
51
|
-
@Column('float', {
|
|
65
|
+
@Column('float', { nullable: false, comment: '단가 (소수점 2자리까지 허용)', transformer: roundTransformer })
|
|
52
66
|
@Field({ nullable: false, description: '단가 (소수점 2자리까지 허용)' })
|
|
53
67
|
unitPrice!: number
|
|
54
68
|
|
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
import { Category } from '../tax-invoice/tax-invoice'
|
|
2
|
+
import { config } from '@things-factory/env'
|
|
2
3
|
// import getTestTaxInvoiceData from './test-data'
|
|
3
4
|
|
|
5
|
+
const UNITAX_CONFIG = config.get('unitax', {})
|
|
4
6
|
// 세금계산서 조회 API
|
|
5
|
-
const INQUIRY_URL =
|
|
6
|
-
dev: 'https://inf1dev.unipost.co.kr:47523/unitax/rest/v3/hometax/searchbills',
|
|
7
|
-
prod: 'https://inf1.unipost.co.kr/unitax/rest/v3/hometax/searchbills'
|
|
8
|
-
}
|
|
7
|
+
const INQUIRY_URL = UNITAX_CONFIG.INQUIRY_URL || ''
|
|
9
8
|
// 세금계산서 조회 후 처리 결과 갱신
|
|
10
|
-
const CONFIRM_URL =
|
|
11
|
-
dev: 'https://inf1dev.unipost.co.kr:47523/unitax/rest/v3/hometax/updateBills',
|
|
12
|
-
prod: 'https://inf1.unipost.co.kr/unitax/rest/v3/hometax/updateBills'
|
|
13
|
-
}
|
|
9
|
+
const CONFIRM_URL = UNITAX_CONFIG.CONFIRM_URL || ''
|
|
14
10
|
|
|
15
11
|
export enum UnipostTaxType {
|
|
16
12
|
EXPORT = 'AR', // 매출
|
|
@@ -69,7 +65,7 @@ export async function getTaxInvoiceByUniposApi(businessRegistrationNumber: strin
|
|
|
69
65
|
}
|
|
70
66
|
|
|
71
67
|
async function _callTaxInvoiceInquiry(businessRegistrationNumber: string, aid: string, bearer: string, taxType: UnipostTaxType) {
|
|
72
|
-
const response = await fetch(INQUIRY_URL
|
|
68
|
+
const response = await fetch(INQUIRY_URL, {
|
|
73
69
|
method: 'POST',
|
|
74
70
|
headers: {
|
|
75
71
|
'Content-Type': 'application/json',
|
|
@@ -88,7 +84,7 @@ async function _callTaxInvoiceInquiry(businessRegistrationNumber: string, aid: s
|
|
|
88
84
|
return response
|
|
89
85
|
}
|
|
90
86
|
export async function callTaxInvoiceConfirm(businessRegistrationNumber: string, aid: string, bearer: string, confirmData: ConfirmData[]) {
|
|
91
|
-
const response = await fetch(CONFIRM_URL
|
|
87
|
+
const response = await fetch(CONFIRM_URL, {
|
|
92
88
|
method: 'POST',
|
|
93
89
|
headers: {
|
|
94
90
|
'Content-Type': 'application/json',
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { config } from '@things-factory/env'
|
|
2
|
+
|
|
3
|
+
const UNITAX_CONFIG = config.get('unitax', {})
|
|
1
4
|
// 세금계산서 발행 API
|
|
2
|
-
const SEND_URL =
|
|
3
|
-
dev: 'https://inf2dev.unipost.co.kr:47543/mbill-etaxr-server/api/rest/v3/receivebill',
|
|
4
|
-
prod: 'https://inf1.unipost.co.kr/mbill-etaxr-server/api/rest/v3/receivebill'
|
|
5
|
-
}
|
|
5
|
+
const SEND_URL = UNITAX_CONFIG.SEND_URL || ''
|
|
6
6
|
|
|
7
7
|
export async function sendTaxInvoiceByUniposApi(businessRegistrationNumber: string, aid: string, bearer: string, taxInvoiceSendList) {
|
|
8
8
|
if (!businessRegistrationNumber || !aid || !bearer || !taxInvoiceSendList) {
|
|
@@ -16,7 +16,7 @@ export async function sendTaxInvoiceByUniposApi(businessRegistrationNumber: stri
|
|
|
16
16
|
|
|
17
17
|
async function _callTaxInvoiceSend(businessRegistrationNumber: string, aid: string, bearer: string, taxInvoiceSendList) {
|
|
18
18
|
try {
|
|
19
|
-
return await fetch(SEND_URL
|
|
19
|
+
return await fetch(SEND_URL, {
|
|
20
20
|
method: 'POST',
|
|
21
21
|
headers: {
|
|
22
22
|
'Content-Type': 'application/json',
|
package/translations/ko.json
CHANGED
|
@@ -9,8 +9,10 @@
|
|
|
9
9
|
"title.tax invoice matching": "세금계산서 매칭",
|
|
10
10
|
"title.tax invoice api": "세금계산서 API 설정",
|
|
11
11
|
"title.tax invoice detail": "전자세금계산서 상세조회",
|
|
12
|
+
"title.company list popup": "회사 리스트 팝업",
|
|
12
13
|
"button.memo save": "메모 저장",
|
|
13
14
|
"button.tax invoice send": "발급하기",
|
|
15
|
+
"button.select": "선택하기",
|
|
14
16
|
|
|
15
17
|
"text.company supplier": "공급사",
|
|
16
18
|
"text.company buyer": "거래처",
|
|
@@ -21,6 +23,7 @@
|
|
|
21
23
|
"text.tax invoice description purpose 02": "청구",
|
|
22
24
|
"text.success tax send": "세금계산서가 발행되었습니다.",
|
|
23
25
|
|
|
26
|
+
"field.is_default": "기본 여부",
|
|
24
27
|
"field.memo": "메모",
|
|
25
28
|
"field.business registration number": "사업자등록번호",
|
|
26
29
|
"field.short business registration number": "등록번호",
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import '@operato/data-grist';
|
|
2
|
-
import { LitElement } from 'lit';
|
|
3
|
-
export declare class TaxInvoiceCompanyImporter extends LitElement {
|
|
4
|
-
static styles: import("lit").CSSResult[];
|
|
5
|
-
taxInvoiceCompanies: any[];
|
|
6
|
-
columns: {
|
|
7
|
-
list: {
|
|
8
|
-
fields: string[];
|
|
9
|
-
};
|
|
10
|
-
pagination: {
|
|
11
|
-
infinite: boolean;
|
|
12
|
-
};
|
|
13
|
-
columns: ({
|
|
14
|
-
type: string;
|
|
15
|
-
name: string;
|
|
16
|
-
header: string;
|
|
17
|
-
width: number;
|
|
18
|
-
record?: undefined;
|
|
19
|
-
} | {
|
|
20
|
-
type: string;
|
|
21
|
-
name: string;
|
|
22
|
-
header: string;
|
|
23
|
-
record: {
|
|
24
|
-
renderer: (value: any) => any;
|
|
25
|
-
};
|
|
26
|
-
width: number;
|
|
27
|
-
})[];
|
|
28
|
-
};
|
|
29
|
-
render(): import("lit-html").TemplateResult<1>;
|
|
30
|
-
save(): Promise<void>;
|
|
31
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tax-invoice-company-importer.js","sourceRoot":"","sources":["../../../client/pages/tax-invoice-company/tax-invoice-company-importer.ts"],"names":[],"mappings":";AAAA,OAAO,qBAAqB,CAAA;AAE5B,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE5C,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAA;AAEpE,MAAM,OAAO,yBAA0B,SAAQ,UAAU;IAAzD;;QA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BACD;oBACE,IAAI,EAAE,YAAY;oBAClB,IAAI,EAAE,YAAY;oBAClB,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,kBAAkB,CAAC;oBACrC,KAAK,EAAE,GAAG;iBACX;aACF;SACF,CAAA;IAgCH,CAAC;IA9BC,MAAM;QACJ,OAAO,IAAI,CAAA;;gBAEC,cAAc,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM;kBAChC,IAAI,CAAC,OAAO;gBACd;YACN,OAAO,EAAE,IAAI,CAAC,mBAAmB;SAClC;;;;qCAI4B,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,aAAa,CAAC;;KAEjF,CAAA;IACH,CAAC;IAED,KAAK,CAAC,IAAI;;QACR,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC;YACnC,QAAQ,EAAE,GAAG,CAAA;;;;OAIZ;YACD,SAAS,EAAE,EAAE,mBAAmB,EAAE,IAAI,CAAC,mBAAmB,EAAE;SAC7D,CAAC,CAAA;QAEF,IAAI,MAAA,QAAQ,CAAC,MAAM,0CAAE,MAAM;YAAE,OAAM;QAEnC,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,UAAU,CAAC,CAAC,CAAA;IACjD,CAAC;;AAjKM,gCAAM,GAAG;IACd,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;KAqBF;CACF,CAAA;AAED;IAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;;sEAAgC;AAC1D;IAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;0DAwG1B","sourcesContent":["import '@operato/data-grist'\n\nimport gql from 'graphql-tag'\nimport { css, html, LitElement } from 'lit'\nimport { property } from 'lit/decorators.js'\n\nimport { client } from '@operato/graphql'\nimport { i18next } from '@operato/i18n'\nimport { isMobileDevice } from '@operato/utils'\nimport { COMPANY_TYPE_LABEL } from './tax-invoice-company-list-page'\n\nexport class TaxInvoiceCompanyImporter 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 @property({ type: Array }) taxInvoiceCompanies: any[] = []\n @property({ type: Object }) columns = {\n list: { fields: ['name', 'description'] },\n pagination: { infinite: true },\n columns: [\n {\n type: 'string',\n name: 'name',\n header: i18next.t('field.name'),\n width: 150\n },\n {\n type: 'string',\n name: 'description',\n header: i18next.t('field.description'),\n width: 200\n },\n {\n type: 'select',\n name: 'type',\n header: i18next.t('field.type'),\n record: {\n renderer: value => COMPANY_TYPE_LABEL[value]\n },\n width: 100\n },\n {\n type: 'string',\n name: 'businessRegistrationNumber',\n header: i18next.t('field.business registration number'),\n width: 150\n },\n {\n type: 'string',\n name: 'branchIdentification',\n header: i18next.t('field.branch identification'),\n width: 150\n },\n {\n type: 'string',\n name: 'businessName',\n header: i18next.t('field.tax invoice business name'),\n width: 150\n },\n {\n type: 'string',\n name: 'representativeName',\n header: i18next.t('field.tax invoice representative name'),\n width: 150\n },\n {\n type: 'string',\n name: 'address',\n header: i18next.t('field.address'),\n width: 200\n },\n {\n type: 'string',\n name: 'businessType',\n header: i18next.t('field.business type'),\n width: 100\n },\n {\n type: 'string',\n name: 'industryType',\n header: i18next.t('field.industry type'),\n width: 100\n },\n {\n type: 'string',\n name: 'department',\n header: i18next.t('field.department'),\n width: 150\n },\n {\n type: 'string',\n name: 'contactName',\n header: i18next.t('field.contact name'),\n width: 150\n },\n {\n type: 'string',\n name: 'contactPhone',\n header: i18next.t('field.contact phone'),\n width: 150\n },\n {\n type: 'string',\n name: 'contactEmail',\n header: i18next.t('field.contact email'),\n width: 150\n },\n {\n type: 'string',\n name: 'contactCellPhone',\n header: i18next.t('field.contact cell phone'),\n width: 150\n },\n {\n type: 'attributes',\n name: 'attributes',\n header: i18next.t('field.attributes'),\n width: 150\n }\n ]\n }\n\n render() {\n return html`\n <ox-grist\n .mode=${isMobileDevice() ? 'LIST' : 'GRID'}\n .config=${this.columns}\n .data=${{\n records: this.taxInvoiceCompanies\n }}\n ></ox-grist>\n\n <div class=\"button-container\">\n <mwc-button raised @click=\"${this.save.bind(this)}\">${i18next.t('button.save')}</mwc-button>\n </div>\n `\n }\n\n async save() {\n const response = await client.mutate({\n mutation: gql`\n mutation importTaxInvoiceCompanies($taxInvoiceCompanies: [TaxInvoiceCompanyPatch!]!) {\n importTaxInvoiceCompanies(taxInvoiceCompanies: $taxInvoiceCompanies)\n }\n `,\n variables: { taxInvoiceCompanies: this.taxInvoiceCompanies }\n })\n\n if (response.errors?.length) return\n\n this.dispatchEvent(new CustomEvent('imported'))\n }\n}\n"]}
|