@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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tax-invoice-item.js","sourceRoot":"","sources":["../../../server/service/tax-invoice-item/tax-invoice-item.ts"],"names":[],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"file":"tax-invoice-item.js","sourceRoot":"","sources":["../../../server/service/tax-invoice-item/tax-invoice-item.ts"],"names":[],"mappings":";;;;AAAA,qCAUgB;AAChB,+CAAoD;AAEpD,iDAAgE;AAChE,yDAAgD;AAChD,4DAAuD;AAUhD,IAAM,cAAc,GAApB,MAAM,cAAc;CAqE1B,CAAA;AArEY,wCAAc;AAGhB;IAFR,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,CAAC;;0CACE;AAIpB;IAFC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;IACzB,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;sCACb,cAAM;8CAAA;AAGf;IADC,IAAA,oBAAU,EAAC,CAAC,cAA8B,EAAE,EAAE,CAAC,cAAc,CAAC,MAAM,CAAC;;gDACrD;AAIjB;IAFC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,wBAAU,EAAE,UAAU,CAAC,EAAE,CAAC,UAAU,CAAC,eAAe,CAAC;IACvE,I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,oBAAU,EAAC,CAAC,cAA8B,EAAE,EAAE,CAAC,cAAc,CAAC,OAAO,CAAC;;iDACrD;yBApEP,cAAc;IAR1B,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EACJ,uBAAuB,EACvB,CAAC,cAA8B,EAAE,EAAE,CAAC,CAAC,cAAc,CAAC,MAAM,EAAE,cAAc,CAAC,EAAE,EAAE,cAAc,CAAC,SAAS,CAAC,EACxG,EAAE,MAAM,EAAE,IAAI,EAAE,CACjB;IACA,IAAA,eAAK,EAAC,uBAAuB,EAAE,CAAC,cAA8B,EAAE,EAAE,CAAC,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC;IAC/F,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,2BAA2B,EAAE,CAAC;GAC5C,cAAc,CAqE1B","sourcesContent":["import {\n CreateDateColumn,\n DeleteDateColumn,\n Entity,\n Index,\n Column,\n JoinColumn,\n RelationId,\n ManyToOne,\n PrimaryGeneratedColumn\n} from 'typeorm'\nimport { ObjectType, Field, ID } from 'type-graphql'\n\nimport { Domain, roundTransformer } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\nimport { TaxInvoice } from '../tax-invoice/tax-invoice'\n\n@Entity()\n@Index(\n 'ix_tax_invoice_item_0',\n (taxInvoiceItem: TaxInvoiceItem) => [taxInvoiceItem.domain, taxInvoiceItem.id, taxInvoiceItem.deletedAt],\n { unique: true }\n)\n@Index('ix_tax_invoice_item_1', (taxInvoiceItem: TaxInvoiceItem) => [taxInvoiceItem.taxInvoice])\n@ObjectType({ description: 'Entity for TaxInvoiceItem' })\nexport class TaxInvoiceItem {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id!: string\n\n @ManyToOne(type => Domain)\n @Field(type => Domain)\n domain?: Domain\n\n @RelationId((taxInvoiceItem: TaxInvoiceItem) => taxInvoiceItem.domain)\n domainId?: string\n\n @ManyToOne(type => TaxInvoice, taxInvoice => taxInvoice.taxInvoiceItems)\n @Field({ nullable: false })\n taxInvoice!: TaxInvoice\n\n @RelationId((taxInvoiceItem: TaxInvoiceItem) => taxInvoiceItem.taxInvoice)\n taxInvoiceId!: string\n\n @Column({ nullable: true, comment: '아이템 일련번호' })\n @Field({ nullable: true, description: '아이템 일련번호' })\n sequence?: number\n\n @Column({ nullable: true, comment: '공급년월일(YYYY-MM-DD)' })\n @Field({ nullable: true, description: '공급년월일(YYYY-MM-DD)' })\n supplyDate!: Date\n\n @Column({ nullable: false, comment: '품목명' })\n @Field({ nullable: false, description: '품목명' })\n itemName!: string\n\n @Column({ nullable: false, comment: '규격' })\n @Field({ nullable: false, description: '규격' })\n specification!: string\n\n @Column('float', { nullable: false, comment: '수량 (소수점 2자리까지 허용)', transformer: roundTransformer })\n @Field({ nullable: false, description: '수량 (소수점 2자리까지 허용)' })\n quantity!: number\n\n @Column('float', { nullable: false, comment: '단가 (소수점 2자리까지 허용)', transformer: roundTransformer })\n @Field({ nullable: false, description: '단가 (소수점 2자리까지 허용)' })\n unitPrice!: number\n\n @Column({ nullable: false, comment: '공급 가액' })\n @Field({ nullable: false, description: '공급 가액' })\n supplyPrice!: number\n\n @Column({ nullable: false, comment: '세액' })\n @Field({ nullable: false, description: '세액' })\n taxPrice!: number\n\n @Column({ nullable: true, comment: '비고' })\n @Field({ nullable: true, description: '비고' })\n remark?: string\n\n @CreateDateColumn()\n @Field({ nullable: true })\n createdAt?: Date\n\n @DeleteDateColumn()\n @Field({ nullable: true })\n deletedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n creator?: User\n\n @RelationId((taxInvoiceItem: TaxInvoiceItem) => taxInvoiceItem.creator)\n creatorId?: string\n}\n"]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare enum UnipostTaxType {
|
|
2
|
+
EXPORT = "AR",// 매출
|
|
3
|
+
IMPORT = "AP"
|
|
4
|
+
}
|
|
5
|
+
export interface ConfirmData {
|
|
6
|
+
aid: string;
|
|
7
|
+
tax_type: UnipostTaxType;
|
|
8
|
+
tid_issueid: string;
|
|
9
|
+
success: boolean;
|
|
10
|
+
message: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function getTaxInvoiceByUniposApi(businessRegistrationNumber: string, aid: string, bearer: string): Promise<{
|
|
13
|
+
issueNoList: string[];
|
|
14
|
+
taxList: any[];
|
|
15
|
+
}>;
|
|
16
|
+
export declare function callTaxInvoiceConfirm(businessRegistrationNumber: string, aid: string, bearer: string, confirmData: ConfirmData[]): Promise<Response>;
|
|
@@ -1,23 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.UnipostTaxType = void 0;
|
|
4
|
+
exports.getTaxInvoiceByUniposApi = getTaxInvoiceByUniposApi;
|
|
5
|
+
exports.callTaxInvoiceConfirm = callTaxInvoiceConfirm;
|
|
4
6
|
const tax_invoice_1 = require("../tax-invoice/tax-invoice");
|
|
7
|
+
const env_1 = require("@things-factory/env");
|
|
5
8
|
// import getTestTaxInvoiceData from './test-data'
|
|
9
|
+
const UNITAX_CONFIG = env_1.config.get('unitax', {});
|
|
6
10
|
// 세금계산서 조회 API
|
|
7
|
-
const INQUIRY_URL =
|
|
8
|
-
dev: 'https://inf1dev.unipost.co.kr:47523/unitax/rest/v3/hometax/searchbills',
|
|
9
|
-
prod: 'https://inf1.unipost.co.kr/unitax/rest/v3/hometax/searchbills'
|
|
10
|
-
};
|
|
11
|
+
const INQUIRY_URL = UNITAX_CONFIG.INQUIRY_URL || '';
|
|
11
12
|
// 세금계산서 조회 후 처리 결과 갱신
|
|
12
|
-
const CONFIRM_URL =
|
|
13
|
-
dev: 'https://inf1dev.unipost.co.kr:47523/unitax/rest/v3/hometax/updateBills',
|
|
14
|
-
prod: 'https://inf1.unipost.co.kr/unitax/rest/v3/hometax/updateBills'
|
|
15
|
-
};
|
|
13
|
+
const CONFIRM_URL = UNITAX_CONFIG.CONFIRM_URL || '';
|
|
16
14
|
var UnipostTaxType;
|
|
17
15
|
(function (UnipostTaxType) {
|
|
18
16
|
UnipostTaxType["EXPORT"] = "AR";
|
|
19
17
|
UnipostTaxType["IMPORT"] = "AP"; // 매입
|
|
20
|
-
})(UnipostTaxType
|
|
18
|
+
})(UnipostTaxType || (exports.UnipostTaxType = UnipostTaxType = {}));
|
|
21
19
|
async function getTaxInvoiceByUniposApi(businessRegistrationNumber, aid, bearer) {
|
|
22
20
|
if (!businessRegistrationNumber || !aid || !bearer) {
|
|
23
21
|
throw new Error('no parameter in unipos api');
|
|
@@ -54,9 +52,8 @@ async function getTaxInvoiceByUniposApi(businessRegistrationNumber, aid, bearer)
|
|
|
54
52
|
taxList
|
|
55
53
|
};
|
|
56
54
|
}
|
|
57
|
-
exports.getTaxInvoiceByUniposApi = getTaxInvoiceByUniposApi;
|
|
58
55
|
async function _callTaxInvoiceInquiry(businessRegistrationNumber, aid, bearer, taxType) {
|
|
59
|
-
const response = await fetch(INQUIRY_URL
|
|
56
|
+
const response = await fetch(INQUIRY_URL, {
|
|
60
57
|
method: 'POST',
|
|
61
58
|
headers: {
|
|
62
59
|
'Content-Type': 'application/json',
|
|
@@ -74,7 +71,7 @@ async function _callTaxInvoiceInquiry(businessRegistrationNumber, aid, bearer, t
|
|
|
74
71
|
return response;
|
|
75
72
|
}
|
|
76
73
|
async function callTaxInvoiceConfirm(businessRegistrationNumber, aid, bearer, confirmData) {
|
|
77
|
-
const response = await fetch(CONFIRM_URL
|
|
74
|
+
const response = await fetch(CONFIRM_URL, {
|
|
78
75
|
method: 'POST',
|
|
79
76
|
headers: {
|
|
80
77
|
'Content-Type': 'application/json',
|
|
@@ -86,5 +83,4 @@ async function callTaxInvoiceConfirm(businessRegistrationNumber, aid, bearer, co
|
|
|
86
83
|
});
|
|
87
84
|
return response;
|
|
88
85
|
}
|
|
89
|
-
exports.callTaxInvoiceConfirm = callTaxInvoiceConfirm;
|
|
90
86
|
//# sourceMappingURL=tax-invoice-inquiry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tax-invoice-inquiry.js","sourceRoot":"","sources":["../../../server/service/unipost-api/tax-invoice-inquiry.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"tax-invoice-inquiry.js","sourceRoot":"","sources":["../../../server/service/unipost-api/tax-invoice-inquiry.ts"],"names":[],"mappings":";;;AAuBA,4DAyCC;AAqBD,sDAaC;AAlGD,4DAAqD;AACrD,6CAA4C;AAC5C,kDAAkD;AAElD,MAAM,aAAa,GAAG,YAAM,CAAC,GAAG,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAA;AAC9C,eAAe;AACf,MAAM,WAAW,GAAG,aAAa,CAAC,WAAW,IAAI,EAAE,CAAA;AACnD,sBAAsB;AACtB,MAAM,WAAW,GAAG,aAAa,CAAC,WAAW,IAAI,EAAE,CAAA;AAEnD,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,+BAAa,CAAA;IACb,+BAAa,CAAA,CAAC,KAAK;AACrB,CAAC,EAHW,cAAc,8BAAd,cAAc,QAGzB;AAUM,KAAK,UAAU,wBAAwB,CAAC,0BAAkC,EAAE,GAAW,EAAE,MAAc;IAC5G,IAAI,CAAC,0BAA0B,IAAI,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;QACnD,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAA;IAC/C,CAAC;IAED,MAAM,WAAW,GAAkB,EAAE,CAAA;IACrC,MAAM,OAAO,GAAG,EAAE,CAAA;IAClB,MAAM,UAAU,GAAG,CAAC,cAAc,CAAC,MAAM,EAAE,cAAc,CAAC,MAAM,CAAC,CAAA;IAEjE,eAAe;IACf,KAAK,MAAM,OAAO,IAAI,UAAU,EAAE,CAAC;QACjC,MAAM,QAAQ,GAAG,MAAM,sBAAsB,CAAC,0BAA0B,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,CAAA;QAE/F,0BAA0B;QAC1B,IAAI,QA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EAAE,GAAW,EAAE,MAAc,EAAE,WAA0B;IACrI,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,WAAW,EAAE;QACxC,MAAM,EAAE,MAAM;QACd,OAAO,EAAE;YACP,cAAc,EAAE,kBAAkB;YAClC,aAAa,EAAE,QAAQ,GAAG,MAAM;YAChC,GAAG,EAAE,GAAG;YACR,SAAS,EAAE,0BAA0B;SACtC;QACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC;KAClC,CAAC,CAAA;IAEF,OAAO,QAAQ,CAAA;AACjB,CAAC","sourcesContent":["import { Category } from '../tax-invoice/tax-invoice'\nimport { config } from '@things-factory/env'\n// import getTestTaxInvoiceData from './test-data'\n\nconst UNITAX_CONFIG = config.get('unitax', {})\n// 세금계산서 조회 API\nconst INQUIRY_URL = UNITAX_CONFIG.INQUIRY_URL || ''\n// 세금계산서 조회 후 처리 결과 갱신\nconst CONFIRM_URL = UNITAX_CONFIG.CONFIRM_URL || ''\n\nexport enum UnipostTaxType {\n EXPORT = 'AR', // 매출\n IMPORT = 'AP' // 매입\n}\n\nexport interface ConfirmData {\n aid: string\n tax_type: UnipostTaxType\n tid_issueid: string\n success: boolean\n message: string\n}\n\nexport async function getTaxInvoiceByUniposApi(businessRegistrationNumber: string, aid: string, bearer: string) {\n if (!businessRegistrationNumber || !aid || !bearer) {\n throw new Error('no parameter in unipos api')\n }\n\n const issueNoList: Array<string> = []\n const taxList = []\n const taxTypeArr = [UnipostTaxType.EXPORT, UnipostTaxType.IMPORT]\n\n // 매입, 매출 각각 요청\n for (const taxType of taxTypeArr) {\n const response = await _callTaxInvoiceInquiry(businessRegistrationNumber, aid, bearer, taxType)\n\n // 성공 일시 세금 계산서 데이터 배열에 추가\n if (response.status === 200) {\n const category = taxType === 'AR' ? Category.EXPORT : Category.IMPORT // 유니포스트의 타입 => 우리 솔루션 형태로 변환\n const taxData = await response.json()\n\n if (taxData.success === true) {\n for (let tax of taxData.tAliceEntry) {\n issueNoList.push(tax.exd_id)\n taxList.push({ ...tax, category })\n }\n }\n }\n\n // 테스트 코드\n // const category = taxType === 'AR' ? Category.EXPORT : Category.IMPORT\n // const taxData = getTestTaxInvoiceData(category)\n // if (taxData.success === true) {\n // for (let tax of taxData.tAliceEntry) {\n // issueNoList.push(tax.exd_id)\n // taxList.push({ ...tax, category })\n // }\n // }\n }\n\n return {\n issueNoList,\n taxList\n }\n}\n\nasync function _callTaxInvoiceInquiry(businessRegistrationNumber: string, aid: string, bearer: string, taxType: UnipostTaxType) {\n const response = await fetch(INQUIRY_URL, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n Authorization: 'Basic ' + bearer,\n AID: aid,\n COM_REGNO: businessRegistrationNumber\n },\n body: JSON.stringify({\n aid,\n tax_type: taxType,\n biz_no: businessRegistrationNumber,\n period: 30\n })\n })\n\n return response\n}\nexport async function callTaxInvoiceConfirm(businessRegistrationNumber: string, aid: string, bearer: string, confirmData: ConfirmData[]) {\n const response = await fetch(CONFIRM_URL, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n Authorization: 'Basic ' + bearer,\n AID: aid,\n COM_REGNO: businessRegistrationNumber\n },\n body: JSON.stringify(confirmData)\n })\n\n return response\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function sendTaxInvoiceByUniposApi(businessRegistrationNumber: string, aid: string, bearer: string, taxInvoiceSendList: any): Promise<any>;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.sendTaxInvoiceByUniposApi =
|
|
3
|
+
exports.sendTaxInvoiceByUniposApi = sendTaxInvoiceByUniposApi;
|
|
4
|
+
const env_1 = require("@things-factory/env");
|
|
5
|
+
const UNITAX_CONFIG = env_1.config.get('unitax', {});
|
|
4
6
|
// 세금계산서 발행 API
|
|
5
|
-
const SEND_URL =
|
|
6
|
-
dev: 'https://inf2dev.unipost.co.kr:47543/mbill-etaxr-server/api/rest/v3/receivebill',
|
|
7
|
-
prod: 'https://inf1.unipost.co.kr/mbill-etaxr-server/api/rest/v3/receivebill'
|
|
8
|
-
};
|
|
7
|
+
const SEND_URL = UNITAX_CONFIG.SEND_URL || '';
|
|
9
8
|
async function sendTaxInvoiceByUniposApi(businessRegistrationNumber, aid, bearer, taxInvoiceSendList) {
|
|
10
9
|
if (!businessRegistrationNumber || !aid || !bearer || !taxInvoiceSendList) {
|
|
11
10
|
throw new Error('no parameter in unipos api');
|
|
@@ -13,10 +12,9 @@ async function sendTaxInvoiceByUniposApi(businessRegistrationNumber, aid, bearer
|
|
|
13
12
|
const response = await _callTaxInvoiceSend(businessRegistrationNumber, aid, bearer, taxInvoiceSendList);
|
|
14
13
|
return (response === null || response === void 0 ? void 0 : response.status) === 200 ? await response.json() : false;
|
|
15
14
|
}
|
|
16
|
-
exports.sendTaxInvoiceByUniposApi = sendTaxInvoiceByUniposApi;
|
|
17
15
|
async function _callTaxInvoiceSend(businessRegistrationNumber, aid, bearer, taxInvoiceSendList) {
|
|
18
16
|
try {
|
|
19
|
-
return await fetch(SEND_URL
|
|
17
|
+
return await fetch(SEND_URL, {
|
|
20
18
|
method: 'POST',
|
|
21
19
|
headers: {
|
|
22
20
|
'Content-Type': 'application/json',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tax-invoice-send.js","sourceRoot":"","sources":["../../../server/service/unipost-api/tax-invoice-send.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tax-invoice-send.js","sourceRoot":"","sources":["../../../server/service/unipost-api/tax-invoice-send.ts"],"names":[],"mappings":";;AAMA,8DAQC;AAdD,6CAA4C;AAE5C,MAAM,aAAa,GAAG,YAAM,CAAC,GAAG,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAA;AAC9C,eAAe;AACf,MAAM,QAAQ,GAAG,aAAa,CAAC,QAAQ,IAAI,EAAE,CAAA;AAEtC,KAAK,UAAU,yBAAyB,CAAC,0BAAkC,EAAE,GAAW,EAAE,MAAc,EAAE,kBAAkB;IACjI,IAAI,CAAC,0BAA0B,IAAI,CAAC,GAAG,IAAI,CAAC,MAAM,IAAI,CAAC,kBAAkB,EAAE,CAAC;QAC1E,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAA;IAC/C,CAAC;IAED,MAAM,QAAQ,GAAG,MAAM,mBAAmB,CAAC,0BAA0B,EAAE,GAAG,EAAE,MAAM,EAAE,kBAAkB,CAAC,CAAA;IAEvG,OAAO,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,MAAM,MAAK,GAAG,CAAC,CAAC,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,KAAK,CAAA;AACjE,CAAC;AAED,KAAK,UAAU,mBAAmB,CAAC,0BAAkC,EAAE,GAAW,EAAE,MAAc,EAAE,kBAAkB;IACpH,IAAI,CAAC;QACH,OAAO,MAAM,KAAK,CAAC,QAAQ,EAAE;YAC3B,MAAM,EAAE,MAAM;YACd,OAAO,EAAE;gBACP,cAAc,EAAE,kBAAkB;gBAClC,aAAa,EAAE,QAAQ,GAAG,MAAM;gBAChC,GAAG,EAAE,GAAG;gBACR,SAAS,EAAE,0BAA0B;aACtC;YACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,kBAAkB,CAAC;SACzC,CAAC,CAAA;IACJ,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC,CAAA;IACxB,CAAC;AACH,CAAC","sourcesContent":["import { config } from '@things-factory/env'\n\nconst UNITAX_CONFIG = config.get('unitax', {})\n// 세금계산서 발행 API\nconst SEND_URL = UNITAX_CONFIG.SEND_URL || ''\n\nexport async function sendTaxInvoiceByUniposApi(businessRegistrationNumber: string, aid: string, bearer: string, taxInvoiceSendList) {\n if (!businessRegistrationNumber || !aid || !bearer || !taxInvoiceSendList) {\n throw new Error('no parameter in unipos api')\n }\n\n const response = await _callTaxInvoiceSend(businessRegistrationNumber, aid, bearer, taxInvoiceSendList)\n\n return response?.status === 200 ? await response.json() : false\n}\n\nasync function _callTaxInvoiceSend(businessRegistrationNumber: string, aid: string, bearer: string, taxInvoiceSendList) {\n try {\n return await fetch(SEND_URL, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n Authorization: 'Basic ' + bearer,\n AID: aid,\n COM_REGNO: businessRegistrationNumber\n },\n body: JSON.stringify(taxInvoiceSendList)\n })\n } catch (e) {\n console.log('e : ', e)\n }\n}\n"]}
|