@things-factory/tax-invoice 6.2.86 → 7.0.0-alpha.1
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/pages/tax-invoice/tax-invoice-detail-popup.ts +5 -6
- package/client/pages/tax-invoice/tax-invoice-list-page.ts +119 -169
- package/client/pages/tax-invoice-api/tax-invoice-api-page.ts +6 -5
- package/client/pages/tax-invoice-company/tax-invoice-company-importer.ts +2 -2
- package/client/route.ts +4 -4
- package/dist-client/pages/tax-invoice/tax-invoice-detail-popup.js +11 -9
- 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 +47 -21
- package/dist-client/pages/tax-invoice/tax-invoice-list-page.js +121 -161
- 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 +1 -1
- package/dist-client/pages/tax-invoice-api/tax-invoice-api-page.js +6 -5
- 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-importer.js +2 -2
- package/dist-client/pages/tax-invoice-company/tax-invoice-company-importer.js.map +1 -1
- package/dist-client/route.d.ts +1 -1
- package/dist-client/route.js +3 -3
- package/dist-client/route.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/service/tax-invoice/tax-invoice-mutation.js +132 -27
- package/dist-server/service/tax-invoice/tax-invoice-mutation.js.map +1 -1
- package/dist-server/service/tax-invoice/tax-invoice-query.js +1 -1
- package/dist-server/service/tax-invoice/tax-invoice-query.js.map +1 -1
- package/dist-server/service/tax-invoice/tax-invoice-type.js +10 -258
- package/dist-server/service/tax-invoice/tax-invoice-type.js.map +1 -1
- package/dist-server/service/tax-invoice/tax-invoice.js +21 -15
- package/dist-server/service/tax-invoice/tax-invoice.js.map +1 -1
- package/dist-server/service/tax-invoice-api/tax-invoice-api-type.js +5 -0
- package/dist-server/service/tax-invoice-api/tax-invoice-api-type.js.map +1 -1
- 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.js +4 -4
- 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.js +3 -3
- package/dist-server/service/tax-invoice-item/tax-invoice-item.js.map +1 -1
- package/dist-server/service/unipost-api/tax-invoice-inquiry.js +90 -0
- package/dist-server/service/unipost-api/tax-invoice-inquiry.js.map +1 -0
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +7 -7
- package/server/service/tax-invoice/tax-invoice-mutation.ts +137 -36
- package/server/service/tax-invoice/tax-invoice-query.ts +1 -1
- package/server/service/tax-invoice/tax-invoice-type.ts +9 -199
- package/server/service/tax-invoice/tax-invoice.ts +23 -30
- package/server/service/tax-invoice-api/tax-invoice-api-type.ts +4 -0
- package/server/service/tax-invoice-item/tax-invoice-item-query.ts +1 -1
- package/server/service/tax-invoice-item/tax-invoice-item-type.ts +4 -7
- package/server/service/tax-invoice-item/tax-invoice-item.ts +3 -3
- package/server/service/unipost-api/tax-invoice-inquiry.ts +103 -0
- package/translations/ko.json +9 -1
|
@@ -8,7 +8,13 @@ const tax_invoice_1 = require("./tax-invoice");
|
|
|
8
8
|
const tax_invoice_type_1 = require("./tax-invoice-type");
|
|
9
9
|
const tax_invoice_item_type_1 = require("../tax-invoice-item/tax-invoice-item-type");
|
|
10
10
|
const tax_invoice_item_1 = require("../tax-invoice-item/tax-invoice-item");
|
|
11
|
+
const tax_invoice_api_1 = require("../tax-invoice-api/tax-invoice-api");
|
|
12
|
+
const tax_invoice_inquiry_1 = require("../unipost-api/tax-invoice-inquiry");
|
|
11
13
|
let TaxInvoiceMutation = class TaxInvoiceMutation {
|
|
14
|
+
constructor() {
|
|
15
|
+
// YYYYMMDD => YYYY-MM-DD
|
|
16
|
+
this._dateFormat = date => date.replace(/(\d{4})(\d{2})(\d{2})/g, '$1-$2-$3');
|
|
17
|
+
}
|
|
12
18
|
async createTaxInvoice(taxInvoice, taxInvoiceItems, context) {
|
|
13
19
|
const { domain, user, tx } = context.state;
|
|
14
20
|
const newTaxInvoice = await tx.getRepository(tax_invoice_1.TaxInvoice).save(Object.assign(Object.assign({}, taxInvoice), { domain, creator: user, updater: user }));
|
|
@@ -18,28 +24,12 @@ let TaxInvoiceMutation = class TaxInvoiceMutation {
|
|
|
18
24
|
}
|
|
19
25
|
return newTaxInvoice;
|
|
20
26
|
}
|
|
21
|
-
|
|
22
|
-
const { domain, user, tx } = context.state;
|
|
23
|
-
const repository = tx.getRepository(tax_invoice_1.TaxInvoice);
|
|
24
|
-
const taxInvoice = await repository.findOne({
|
|
25
|
-
where: { domain: { id: domain.id }, id }
|
|
26
|
-
});
|
|
27
|
-
const result = await repository.save(Object.assign(Object.assign(Object.assign({}, taxInvoice), patch), { updater: user }));
|
|
28
|
-
return result;
|
|
29
|
-
}
|
|
27
|
+
// 그리드에서 메모 수정용 으로만
|
|
30
28
|
async updateMultipleTaxInvoice(patches, context) {
|
|
31
29
|
const { domain, user, tx } = context.state;
|
|
32
30
|
let results = [];
|
|
33
|
-
const _createRecords = patches.filter((patch) => patch.cuFlag.toUpperCase() === '+');
|
|
34
31
|
const _updateRecords = patches.filter((patch) => patch.cuFlag.toUpperCase() === 'M');
|
|
35
32
|
const taxInvoiceRepo = tx.getRepository(tax_invoice_1.TaxInvoice);
|
|
36
|
-
if (_createRecords.length > 0) {
|
|
37
|
-
for (let i = 0; i < _createRecords.length; i++) {
|
|
38
|
-
const newRecord = _createRecords[i];
|
|
39
|
-
const result = await taxInvoiceRepo.save(Object.assign(Object.assign({}, newRecord), { domain, creator: user, updater: user }));
|
|
40
|
-
results.push(Object.assign(Object.assign({}, result), { cuFlag: '+' }));
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
33
|
if (_updateRecords.length > 0) {
|
|
44
34
|
for (let i = 0; i < _updateRecords.length; i++) {
|
|
45
35
|
const updateRecord = _updateRecords[i];
|
|
@@ -63,6 +53,123 @@ let TaxInvoiceMutation = class TaxInvoiceMutation {
|
|
|
63
53
|
});
|
|
64
54
|
return true;
|
|
65
55
|
}
|
|
56
|
+
async fetchTaxInvoiceByApi(context) {
|
|
57
|
+
const { domain, user, tx } = context.state;
|
|
58
|
+
const taxInvoiceApiRepo = tx.getRepository(tax_invoice_api_1.TaxInvoiceApi);
|
|
59
|
+
const taxInvoiceRepo = tx.getRepository(tax_invoice_1.TaxInvoice);
|
|
60
|
+
const insertedData = []; // API 호출 후 결과 회신용
|
|
61
|
+
const apiInfo = (await taxInvoiceApiRepo.find()).at(0);
|
|
62
|
+
const businessRegistrationNumber = apiInfo.businessRegistrationNumber;
|
|
63
|
+
const { aid = '', bearer = '' } = apiInfo === null || apiInfo === void 0 ? void 0 : apiInfo.attributes;
|
|
64
|
+
// API 호출하여 세금계산서 데이터 가져옴
|
|
65
|
+
const { approvalNoList, taxList } = await (0, tax_invoice_inquiry_1.getTaxInvoiceByUniposApi)(businessRegistrationNumber, aid, bearer);
|
|
66
|
+
// 이미 있는 데이터 아이디 검색
|
|
67
|
+
const existingTaxInvoice = await taxInvoiceRepo.find({
|
|
68
|
+
select: ['approvalNo'],
|
|
69
|
+
where: { approvalNo: (0, typeorm_1.In)(approvalNoList) }
|
|
70
|
+
});
|
|
71
|
+
const existingIds = existingTaxInvoice.map(taxInvoice => taxInvoice.approvalNo);
|
|
72
|
+
// 매입, 매출 for문
|
|
73
|
+
for (let tax of taxList) {
|
|
74
|
+
// 있는지 없는지 확인
|
|
75
|
+
if (existingIds.includes(tax.tid_issueid))
|
|
76
|
+
continue;
|
|
77
|
+
// 세금계산서 데이터 객체 생성
|
|
78
|
+
const newTaxInvoice = {
|
|
79
|
+
issueNo: tax.exd_id,
|
|
80
|
+
approvalNo: tax.tid_issueid,
|
|
81
|
+
originalApprovalNo: tax.tid_originalissueid,
|
|
82
|
+
issueDate: this._dateFormat(tax.tid_issuedatetime),
|
|
83
|
+
signatureDate: this._dateFormat(tax.exd_issuedatetime),
|
|
84
|
+
invoiceType: tax.tid_typecode,
|
|
85
|
+
purpose: tax.tid_purposecode,
|
|
86
|
+
revisedReason: tax.tid_amendcode,
|
|
87
|
+
remark0: tax.tid_desc0,
|
|
88
|
+
remark1: tax.tid_desc1,
|
|
89
|
+
remark2: tax.tid_desc2,
|
|
90
|
+
category: tax.category,
|
|
91
|
+
supplierBusinessRegistrationCategory: tax.tit_alice_specorg_biztypecode,
|
|
92
|
+
supplierBusinessRegistrationNumber: tax.tit_alice_id,
|
|
93
|
+
supplierBranchIdentification: tax.tit_alice_specorg_taxregid,
|
|
94
|
+
supplierBusinessName: tax.tit_alice_name,
|
|
95
|
+
supplierRepresentativeName: tax.tit_alice_specperson_name,
|
|
96
|
+
supplierAddress: tax.tit_alice_specaddr_lineone,
|
|
97
|
+
supplierBusinessType: tax.tit_alice_typecode,
|
|
98
|
+
supplierIndustryType: tax.tit_alice_classcode,
|
|
99
|
+
supplierDepartment: tax.tit_alice_defcont_deptname,
|
|
100
|
+
supplierContactName: tax.tit_alice_defcont_personname,
|
|
101
|
+
supplierContactPhone: tax.tit_alice_defcont_telcomm,
|
|
102
|
+
supplierContactEmail: tax.tit_alice_defcont_uricomm,
|
|
103
|
+
supplierContactCellPhone: tax.tit_alice_defcont_cellphone,
|
|
104
|
+
buyerBusinessRegistrationCategory: tax.tit_bob_specorg_biztypecode,
|
|
105
|
+
buyerBusinessRegistrationNumber: tax.tit_bob_id,
|
|
106
|
+
buyerBranchIdentification: tax.tit_bob_specorg_taxregid,
|
|
107
|
+
buyerBusinessName: tax.tit_bob_name,
|
|
108
|
+
buyerRepresentativeName: tax.tit_bob_specperson_name,
|
|
109
|
+
buyerAddress: tax.tit_bob_specaddr_lineone,
|
|
110
|
+
buyerBusinessType: tax.tit_bob_typecode,
|
|
111
|
+
buyerIndustryType: tax.tit_bob_classcode,
|
|
112
|
+
buyer1stDepartment: tax.tit_bob_1stdefcont_deptname,
|
|
113
|
+
buyer1stContactName: tax.tit_bob_1stdefcont_personname,
|
|
114
|
+
buyer1stContactPhone: tax.tit_bob_1stdefcont_telcomm,
|
|
115
|
+
buyer1stContactEmail: tax.tit_bob_1stdefcont_uricomm,
|
|
116
|
+
buyer1stContactCellPhone: tax.tit_bob_1stdefcont_cellphone,
|
|
117
|
+
buyer2ndDepartment: tax.tit_bob_2nddefcont_deptname,
|
|
118
|
+
buyer2ndContactName: tax.tit_bob_2nddefcont_personname,
|
|
119
|
+
buyer2ndContactPhone: tax.tit_bob_2nddefcont_telcomm,
|
|
120
|
+
buyer2ndContactEmail: tax.tit_bob_2nddefcont_uricomm,
|
|
121
|
+
buyer2ndContactCellPhone: tax.tit_bob_2nddefcont_cellphone,
|
|
122
|
+
agentBusinessRegistrationCategory: tax.tit_broker_specorg_biztypecode,
|
|
123
|
+
agentBusinessRegistrationNumber: tax.tit_broker_id,
|
|
124
|
+
agentBranchIdentification: tax.tit_broker_specorg_taxregid,
|
|
125
|
+
agentBusinessName: tax.tit_broker_name,
|
|
126
|
+
agentRepresentativeName: tax.tit_broker_specperson_name,
|
|
127
|
+
agentAddress: tax.tit_broker_specaddr_lineone,
|
|
128
|
+
agentBusinessType: tax.tit_broker_typecode,
|
|
129
|
+
agentIndustryType: tax.tit_broker_classcode,
|
|
130
|
+
agentDepartment: tax.tit_broker_defcont_deptname,
|
|
131
|
+
agentContactName: tax.tit_broker_defcont_personname,
|
|
132
|
+
agentContactPhone: tax.tit_broker_defcont_telcomm,
|
|
133
|
+
agentContactEmail: tax.tit_broker_defcont_uricomm,
|
|
134
|
+
agentContactCellPhone: tax.tit_broker_defcont_cellphone,
|
|
135
|
+
paymentAmountCash: tax.tit_specpay_paidamount10,
|
|
136
|
+
paymentAmountCheck: tax.tit_specpay_paidamount20,
|
|
137
|
+
paymentAmountPromissoryNote: tax.tit_specpay_paidamount30,
|
|
138
|
+
paymentAmountAccountsReceivable: tax.tit_specpay_paidamount40,
|
|
139
|
+
supplyAmount: tax.tit_specsum_chargeamount,
|
|
140
|
+
taxAmount: tax.tit_specsum_taxamount,
|
|
141
|
+
totalAmount: tax.tit_specsum_grandamount
|
|
142
|
+
};
|
|
143
|
+
// 세금계산서 아이템 데이터 객체 생성
|
|
144
|
+
const newTaxInvoiceItem = [];
|
|
145
|
+
for (let item of tax.tAliceItemList) {
|
|
146
|
+
newTaxInvoiceItem.push({
|
|
147
|
+
sequence: item.tii_seqnumeric,
|
|
148
|
+
supplyDate: this._dateFormat(item.tii_purchaseexpirydatetime),
|
|
149
|
+
itemName: item.tii_nametext,
|
|
150
|
+
specification: item.tii_informationtext,
|
|
151
|
+
quantity: item.tii_chargeableunitquantity,
|
|
152
|
+
unitPrice: item.tii_unitprice_unitamount,
|
|
153
|
+
supplyPrice: item.tii_invoiceamount,
|
|
154
|
+
taxPrice: item.tii_totaltax_calcamount,
|
|
155
|
+
remark: item.tii_descriptiontext
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
// Insert
|
|
159
|
+
this.createTaxInvoice(newTaxInvoice, newTaxInvoiceItem, context);
|
|
160
|
+
// API 결과 회신 데이터 생성
|
|
161
|
+
insertedData.push({
|
|
162
|
+
aid: aid,
|
|
163
|
+
tax_type: tax.category == tax_invoice_1.Category.EXPORT ? tax_invoice_inquiry_1.UnipostTaxType.EXPORT : tax_invoice_inquiry_1.UnipostTaxType.IMPORT,
|
|
164
|
+
tid_issueid: tax.tid_issueid,
|
|
165
|
+
success: true,
|
|
166
|
+
message: ''
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
// 유니 포스트에 조회 후 결과 회신 API 호출
|
|
170
|
+
(0, tax_invoice_inquiry_1.callTaxInvoiceConfirm)(businessRegistrationNumber, aid, bearer, insertedData);
|
|
171
|
+
return true;
|
|
172
|
+
}
|
|
66
173
|
};
|
|
67
174
|
tslib_1.__decorate([
|
|
68
175
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
@@ -74,16 +181,6 @@ tslib_1.__decorate([
|
|
|
74
181
|
tslib_1.__metadata("design:paramtypes", [tax_invoice_type_1.NewTaxInvoice, Array, Object]),
|
|
75
182
|
tslib_1.__metadata("design:returntype", Promise)
|
|
76
183
|
], TaxInvoiceMutation.prototype, "createTaxInvoice", null);
|
|
77
|
-
tslib_1.__decorate([
|
|
78
|
-
(0, type_graphql_1.Directive)('@transaction'),
|
|
79
|
-
(0, type_graphql_1.Mutation)(returns => tax_invoice_1.TaxInvoice, { description: 'To modify TaxInvoice information' }),
|
|
80
|
-
tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
|
|
81
|
-
tslib_1.__param(1, (0, type_graphql_1.Arg)('patch')),
|
|
82
|
-
tslib_1.__param(2, (0, type_graphql_1.Ctx)()),
|
|
83
|
-
tslib_1.__metadata("design:type", Function),
|
|
84
|
-
tslib_1.__metadata("design:paramtypes", [String, tax_invoice_type_1.TaxInvoicePatch, Object]),
|
|
85
|
-
tslib_1.__metadata("design:returntype", Promise)
|
|
86
|
-
], TaxInvoiceMutation.prototype, "updateTaxInvoice", null);
|
|
87
184
|
tslib_1.__decorate([
|
|
88
185
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
89
186
|
(0, type_graphql_1.Mutation)(returns => [tax_invoice_1.TaxInvoice], { description: "To modify multiple TaxInvoices' information" }),
|
|
@@ -111,6 +208,14 @@ tslib_1.__decorate([
|
|
|
111
208
|
tslib_1.__metadata("design:paramtypes", [Array, Object]),
|
|
112
209
|
tslib_1.__metadata("design:returntype", Promise)
|
|
113
210
|
], TaxInvoiceMutation.prototype, "deleteTaxInvoices", null);
|
|
211
|
+
tslib_1.__decorate([
|
|
212
|
+
(0, type_graphql_1.Directive)('@transaction'),
|
|
213
|
+
(0, type_graphql_1.Mutation)(returns => Boolean, { description: 'create tax invoice data by API' }),
|
|
214
|
+
tslib_1.__param(0, (0, type_graphql_1.Ctx)()),
|
|
215
|
+
tslib_1.__metadata("design:type", Function),
|
|
216
|
+
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
217
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
218
|
+
], TaxInvoiceMutation.prototype, "fetchTaxInvoiceByApi", null);
|
|
114
219
|
TaxInvoiceMutation = tslib_1.__decorate([
|
|
115
220
|
(0, type_graphql_1.Resolver)(tax_invoice_1.TaxInvoice)
|
|
116
221
|
], TaxInvoiceMutation);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tax-invoice-mutation.js","sourceRoot":"","sources":["../../../server/service/tax-invoice/tax-invoice-mutation.ts"],"names":[],"mappings":";;;;AAAA,+CAAsE;AACtE,qCAA4B;AAE5B,+CAA0C;AAC1C,yDAAmE;AACnE,qFAA6E;AAC7E,2EAAqE;AAG9D,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAGvB,AAAN,KAAK,CAAC,gBAAgB,CACD,UAAyB,EACO,eAAoC,EAChF,OAAwB;QAE/B,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAE1C,MAAM,aAAa,GAAG,MAAM,EAAE,CAAC,aAAa,CAAC,wBAAU,CAAC,CAAC,IAAI,iCACxD,UAAU,KACb,MAAM,EACN,OAAO,EAAE,IAAI,EACb,OAAO,EAAE,IAAI,IACb,CAAA;QAEF,SAAS;QACT,KAAK,MAAM,IAAI,IAAI,eAAe,EAAE;YAClC,MAAM,EAAE,CAAC,aAAa,CAAC,iCAAc,CAAC,CAAC,IAAI,iCAAM,IAAI,KAAE,UAAU,EAAE,aAAa,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,IAAG,CAAA;SAC3G;QAED,OAAO,aAAa,CAAA;IACtB,CAAC;IAIK,AAAN,KAAK,CAAC,gBAAgB,CAAY,EAAU,EAAgB,KAAsB,EAAS,OAAwB;QACjH,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KA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E,CAAC;IAC9C,mBAAA,IAAA,kBAAG,EAAC,IAAI,CAAC,CAAA;IAAc,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;0DAMnD;AAIK;IAFL,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,gCAAgC,EAAE,CAAC;IACvD,mBAAA,IAAA,kBAAG,EAAC,KAAK,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA;IAAiB,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;2DAS1E;AA5GU,kBAAkB;IAD9B,IAAA,uBAAQ,EAAC,wBAAU,CAAC;GACR,kBAAkB,CA6G9B;AA7GY,gDAAkB","sourcesContent":["import { Resolver, Mutation, Arg, Ctx, Directive } from 'type-graphql'\nimport { In } from 'typeorm'\n\nimport { TaxInvoice } from './tax-invoice'\nimport { NewTaxInvoice, TaxInvoicePatch } from './tax-invoice-type'\nimport { NewTaxInvoiceItem } from '../tax-invoice-item/tax-invoice-item-type'\nimport { TaxInvoiceItem } from '../tax-invoice-item/tax-invoice-item'\n\n@Resolver(TaxInvoice)\nexport class TaxInvoiceMutation {\n @Directive('@transaction')\n @Mutation(returns => TaxInvoice, { description: 'To create new TaxInvoice' })\n async createTaxInvoice(\n @Arg('taxInvoice') taxInvoice: NewTaxInvoice,\n @Arg('taxInvoiceItems', () => [NewTaxInvoiceItem]) taxInvoiceItems: NewTaxInvoiceItem[],\n @Ctx() context: ResolverContext\n ): Promise<TaxInvoice> {\n const { domain, user, tx } = context.state\n\n const newTaxInvoice = await tx.getRepository(TaxInvoice).save({\n ...taxInvoice,\n domain,\n creator: user,\n updater: user\n })\n\n // 아이템 저장\n for (const item of taxInvoiceItems) {\n await tx.getRepository(TaxInvoiceItem).save({ ...item, taxInvoice: newTaxInvoice, domain, creator: user })\n }\n\n return newTaxInvoice\n }\n\n @Directive('@transaction')\n @Mutation(returns => TaxInvoice, { description: 'To modify TaxInvoice information' })\n async updateTaxInvoice(@Arg('id') id: string, @Arg('patch') patch: TaxInvoicePatch, @Ctx() context: ResolverContext): Promise<TaxInvoice> {\n const { domain, user, tx } = context.state\n\n const repository = tx.getRepository(TaxInvoice)\n const taxInvoice = await repository.findOne({\n where: { domain: { id: domain.id }, id }\n })\n\n const result = await repository.save({\n ...taxInvoice,\n ...patch,\n updater: user\n })\n\n return result\n }\n\n @Directive('@transaction')\n @Mutation(returns => [TaxInvoice], { description: \"To modify multiple TaxInvoices' information\" })\n async updateMultipleTaxInvoice(@Arg('patches', type => [TaxInvoicePatch]) patches: TaxInvoicePatch[], @Ctx() context: ResolverContext): Promise<TaxInvoice[]> {\n const { domain, user, tx } = context.state\n\n let results = []\n const _createRecords = patches.filter((patch: any) => patch.cuFlag.toUpperCase() === '+')\n const _updateRecords = patches.filter((patch: any) => patch.cuFlag.toUpperCase() === 'M')\n const taxInvoiceRepo = tx.getRepository(TaxInvoice)\n\n if (_createRecords.length > 0) {\n for (let i = 0; i < _createRecords.length; i++) {\n const newRecord = _createRecords[i]\n\n const result = await taxInvoiceRepo.save({\n ...newRecord,\n domain,\n creator: user,\n updater: user\n })\n\n results.push({ ...result, cuFlag: '+' })\n }\n }\n\n if (_updateRecords.length > 0) {\n for (let i = 0; i < _updateRecords.length; i++) {\n const updateRecord = _updateRecords[i]\n const taxInvoice = await taxInvoiceRepo.findOneBy({ id: updateRecord.id })\n\n const result = await taxInvoiceRepo.save({\n ...taxInvoice,\n ...updateRecord,\n updater: user\n })\n\n results.push({ ...result, cuFlag: 'M' })\n }\n }\n\n return results\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To delete TaxInvoice' })\n async deleteTaxInvoice(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<boolean> {\n const { domain, tx } = context.state\n\n await tx.getRepository(TaxInvoice).delete({ domain: { id: domain.id }, id })\n\n return true\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To delete multiple TaxInvoices' })\n async deleteTaxInvoices(@Arg('ids', type => [String]) ids: string[], @Ctx() context: ResolverContext): Promise<boolean> {\n const { domain, tx } = context.state\n\n await tx.getRepository(TaxInvoice).delete({\n domain: { id: domain.id },\n id: In(ids)\n })\n\n return true\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"tax-invoice-mutation.js","sourceRoot":"","sources":["../../../server/service/tax-invoice/tax-invoice-mutation.ts"],"names":[],"mappings":";;;;AAAA,+CAAsE;AACtE,qCAA4B;AAE5B,+CAAoD;AACpD,yDAAmE;AACnE,qFAA6E;AAC7E,2EAAqE;AACrE,wEAAkE;AAElE,4EAAiI;AAG1H,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAAxB;QA6ML,yBAAyB;QACjB,gBAAW,GAAG,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,wBAAwB,EAAE,UAAU,CAAC,CAAA;IAClF,CAAC;IA5MO,AAAN,KAAK,CAAC,gBAAgB,CACD,UAAyB,EACO,eAAoC,EAChF,OAAwB;QAE/B,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAE1C,MAAM,aAAa,GAAG,MAAM,EAAE,CAAC,aAAa,CAAC,wBAAU,CAAC,CAAC,IAAI,iCACxD,UAAU,KACb,MAAM,EACN,OAAO,EAAE,IAAI,EACb,OAAO,EAAE,IAAI,IACb,CAAA;QAEF,SAAS;QACT,KAAK,MAAM,IAAI,IAAI,eAAe,EAAE;YAClC,MAAM,EAAE,CAAC,aAAa,CAAC,iCAAc,CAAC,CAAC,IAAI,iCAAM,IAAI,KAAE,UAAU,EAAE,aAAa,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,IAAG,CAAA;SAC3G;QAED,OAAO,aAAa,CAAA;IACtB,CAAC;IAED,mBAAmB;IAGb,AAAN,KAAK,CAAC,wBAAwB,CAA4C,OAA0B,E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mBAAA,IAAA,kBAAG,EAAC,IAAI,CAAC,CAAA;IAAc,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;0DAMnD;AAIK;IAFL,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,gCAAgC,EAAE,CAAC;IACvD,mBAAA,IAAA,kBAAG,EAAC,KAAK,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA;IAAiB,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;2DAS1E;AAIK;IAFL,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,gCAAgC,EAAE,CAAC;IACpD,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;8DA6HhC;AA3MU,kBAAkB;IAD9B,IAAA,uBAAQ,EAAC,wBAAU,CAAC;GACR,kBAAkB,CA+M9B;AA/MY,gDAAkB","sourcesContent":["import { Resolver, Mutation, Arg, Ctx, Directive } from 'type-graphql'\nimport { In } from 'typeorm'\n\nimport { Category, TaxInvoice } from './tax-invoice'\nimport { NewTaxInvoice, TaxInvoicePatch } from './tax-invoice-type'\nimport { NewTaxInvoiceItem } from '../tax-invoice-item/tax-invoice-item-type'\nimport { TaxInvoiceItem } from '../tax-invoice-item/tax-invoice-item'\nimport { TaxInvoiceApi } from '../tax-invoice-api/tax-invoice-api'\nimport { AttributeSet } from '@things-factory/shell/dist-server/service/attribute-set/attribute-set'\nimport { ConfirmData, UnipostTaxType, callTaxInvoiceConfirm, getTaxInvoiceByUniposApi } from '../unipost-api/tax-invoice-inquiry'\n\n@Resolver(TaxInvoice)\nexport class TaxInvoiceMutation {\n @Directive('@transaction')\n @Mutation(returns => TaxInvoice, { description: 'To create new TaxInvoice' })\n async createTaxInvoice(\n @Arg('taxInvoice') taxInvoice: NewTaxInvoice,\n @Arg('taxInvoiceItems', () => [NewTaxInvoiceItem]) taxInvoiceItems: NewTaxInvoiceItem[],\n @Ctx() context: ResolverContext\n ): Promise<TaxInvoice> {\n const { domain, user, tx } = context.state\n\n const newTaxInvoice = await tx.getRepository(TaxInvoice).save({\n ...taxInvoice,\n domain,\n creator: user,\n updater: user\n })\n\n // 아이템 저장\n for (const item of taxInvoiceItems) {\n await tx.getRepository(TaxInvoiceItem).save({ ...item, taxInvoice: newTaxInvoice, domain, creator: user })\n }\n\n return newTaxInvoice\n }\n\n // 그리드에서 메모 수정용 으로만\n @Directive('@transaction')\n @Mutation(returns => [TaxInvoice], { description: \"To modify multiple TaxInvoices' information\" })\n async updateMultipleTaxInvoice(@Arg('patches', type => [TaxInvoicePatch]) patches: TaxInvoicePatch[], @Ctx() context: ResolverContext): Promise<TaxInvoice[]> {\n const { domain, user, tx } = context.state\n\n let results = []\n const _updateRecords = patches.filter((patch: any) => patch.cuFlag.toUpperCase() === 'M')\n const taxInvoiceRepo = tx.getRepository(TaxInvoice)\n\n if (_updateRecords.length > 0) {\n for (let i = 0; i < _updateRecords.length; i++) {\n const updateRecord = _updateRecords[i]\n const taxInvoice = await taxInvoiceRepo.findOneBy({ id: updateRecord.id })\n\n const result = await taxInvoiceRepo.save({\n ...taxInvoice,\n ...updateRecord,\n updater: user\n })\n\n results.push({ ...result, cuFlag: 'M' })\n }\n }\n\n return results\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To delete TaxInvoice' })\n async deleteTaxInvoice(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<boolean> {\n const { domain, tx } = context.state\n\n await tx.getRepository(TaxInvoice).delete({ domain: { id: domain.id }, id })\n\n return true\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To delete multiple TaxInvoices' })\n async deleteTaxInvoices(@Arg('ids', type => [String]) ids: string[], @Ctx() context: ResolverContext): Promise<boolean> {\n const { domain, tx } = context.state\n\n await tx.getRepository(TaxInvoice).delete({\n domain: { id: domain.id },\n id: In(ids)\n })\n\n return true\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'create tax invoice data by API' })\n async fetchTaxInvoiceByApi(@Ctx() context: ResolverContext): Promise<boolean> {\n const { domain, user, tx } = context.state\n const taxInvoiceApiRepo = tx.getRepository(TaxInvoiceApi)\n const taxInvoiceRepo = tx.getRepository(TaxInvoice)\n const insertedData: ConfirmData[] = [] // API 호출 후 결과 회신용\n\n const apiInfo = (await taxInvoiceApiRepo.find()).at(0)\n const businessRegistrationNumber = apiInfo.businessRegistrationNumber\n const { aid = '', bearer = '' } = apiInfo?.attributes\n\n // API 호출하여 세금계산서 데이터 가져옴\n const { approvalNoList, taxList } = await getTaxInvoiceByUniposApi(businessRegistrationNumber, aid, bearer)\n\n // 이미 있는 데이터 아이디 검색\n const existingTaxInvoice = await taxInvoiceRepo.find({\n select: ['approvalNo'],\n where: { approvalNo: In(approvalNoList) }\n })\n const existingIds = existingTaxInvoice.map(taxInvoice => taxInvoice.approvalNo)\n\n // 매입, 매출 for문\n for (let tax of taxList) {\n // 있는지 없는지 확인\n if (existingIds.includes(tax.tid_issueid)) continue\n\n // 세금계산서 데이터 객체 생성\n const newTaxInvoice: NewTaxInvoice = {\n issueNo: tax.exd_id,\n approvalNo: tax.tid_issueid,\n originalApprovalNo: tax.tid_originalissueid,\n issueDate: this._dateFormat(tax.tid_issuedatetime),\n signatureDate: this._dateFormat(tax.exd_issuedatetime),\n invoiceType: tax.tid_typecode,\n purpose: tax.tid_purposecode,\n revisedReason: tax.tid_amendcode,\n remark0: tax.tid_desc0,\n remark1: tax.tid_desc1,\n remark2: tax.tid_desc2,\n category: tax.category,\n supplierBusinessRegistrationCategory: tax.tit_alice_specorg_biztypecode,\n supplierBusinessRegistrationNumber: tax.tit_alice_id,\n supplierBranchIdentification: tax.tit_alice_specorg_taxregid,\n supplierBusinessName: tax.tit_alice_name,\n supplierRepresentativeName: tax.tit_alice_specperson_name,\n supplierAddress: tax.tit_alice_specaddr_lineone,\n supplierBusinessType: tax.tit_alice_typecode,\n supplierIndustryType: tax.tit_alice_classcode,\n supplierDepartment: tax.tit_alice_defcont_deptname,\n supplierContactName: tax.tit_alice_defcont_personname,\n supplierContactPhone: tax.tit_alice_defcont_telcomm,\n supplierContactEmail: tax.tit_alice_defcont_uricomm,\n supplierContactCellPhone: tax.tit_alice_defcont_cellphone,\n buyerBusinessRegistrationCategory: tax.tit_bob_specorg_biztypecode,\n buyerBusinessRegistrationNumber: tax.tit_bob_id,\n buyerBranchIdentification: tax.tit_bob_specorg_taxregid,\n buyerBusinessName: tax.tit_bob_name,\n buyerRepresentativeName: tax.tit_bob_specperson_name,\n buyerAddress: tax.tit_bob_specaddr_lineone,\n buyerBusinessType: tax.tit_bob_typecode,\n buyerIndustryType: tax.tit_bob_classcode,\n buyer1stDepartment: tax.tit_bob_1stdefcont_deptname,\n buyer1stContactName: tax.tit_bob_1stdefcont_personname,\n buyer1stContactPhone: tax.tit_bob_1stdefcont_telcomm,\n buyer1stContactEmail: tax.tit_bob_1stdefcont_uricomm,\n buyer1stContactCellPhone: tax.tit_bob_1stdefcont_cellphone,\n buyer2ndDepartment: tax.tit_bob_2nddefcont_deptname,\n buyer2ndContactName: tax.tit_bob_2nddefcont_personname,\n buyer2ndContactPhone: tax.tit_bob_2nddefcont_telcomm,\n buyer2ndContactEmail: tax.tit_bob_2nddefcont_uricomm,\n buyer2ndContactCellPhone: tax.tit_bob_2nddefcont_cellphone,\n agentBusinessRegistrationCategory: tax.tit_broker_specorg_biztypecode,\n agentBusinessRegistrationNumber: tax.tit_broker_id,\n agentBranchIdentification: tax.tit_broker_specorg_taxregid,\n agentBusinessName: tax.tit_broker_name,\n agentRepresentativeName: tax.tit_broker_specperson_name,\n agentAddress: tax.tit_broker_specaddr_lineone,\n agentBusinessType: tax.tit_broker_typecode,\n agentIndustryType: tax.tit_broker_classcode,\n agentDepartment: tax.tit_broker_defcont_deptname,\n agentContactName: tax.tit_broker_defcont_personname,\n agentContactPhone: tax.tit_broker_defcont_telcomm,\n agentContactEmail: tax.tit_broker_defcont_uricomm,\n agentContactCellPhone: tax.tit_broker_defcont_cellphone,\n paymentAmountCash: tax.tit_specpay_paidamount10,\n paymentAmountCheck: tax.tit_specpay_paidamount20,\n paymentAmountPromissoryNote: tax.tit_specpay_paidamount30,\n paymentAmountAccountsReceivable: tax.tit_specpay_paidamount40,\n supplyAmount: tax.tit_specsum_chargeamount,\n taxAmount: tax.tit_specsum_taxamount,\n totalAmount: tax.tit_specsum_grandamount\n }\n\n // 세금계산서 아이템 데이터 객체 생성\n const newTaxInvoiceItem: NewTaxInvoiceItem[] = []\n for (let item of tax.tAliceItemList) {\n newTaxInvoiceItem.push({\n sequence: item.tii_seqnumeric,\n supplyDate: this._dateFormat(item.tii_purchaseexpirydatetime),\n itemName: item.tii_nametext,\n specification: item.tii_informationtext,\n quantity: item.tii_chargeableunitquantity,\n unitPrice: item.tii_unitprice_unitamount,\n supplyPrice: item.tii_invoiceamount,\n taxPrice: item.tii_totaltax_calcamount,\n remark: item.tii_descriptiontext\n })\n }\n\n // Insert\n this.createTaxInvoice(newTaxInvoice, newTaxInvoiceItem, context)\n\n // API 결과 회신 데이터 생성\n insertedData.push({\n aid: aid,\n tax_type: tax.category == Category.EXPORT ? UnipostTaxType.EXPORT : UnipostTaxType.IMPORT,\n tid_issueid: tax.tid_issueid,\n success: true,\n message: ''\n })\n }\n\n // 유니 포스트에 조회 후 결과 회신 API 호출\n callTaxInvoiceConfirm(businessRegistrationNumber, aid, bearer, insertedData)\n\n return true\n }\n\n // YYYYMMDD => YYYY-MM-DD\n private _dateFormat = date => date.replace(/(\\d{4})(\\d{2})(\\d{2})/g, '$1-$2-$3')\n}\n"]}
|
|
@@ -21,7 +21,7 @@ let TaxInvoiceQuery = class TaxInvoiceQuery {
|
|
|
21
21
|
domain,
|
|
22
22
|
params,
|
|
23
23
|
repository: await (0, shell_1.getRepository)(tax_invoice_1.TaxInvoice),
|
|
24
|
-
searchables: ['
|
|
24
|
+
searchables: ['memo']
|
|
25
25
|
});
|
|
26
26
|
const [items, total] = await queryBuilder.getManyAndCount();
|
|
27
27
|
return { items, total };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tax-invoice-query.js","sourceRoot":"","sources":["../../../server/service/tax-invoice/tax-invoice-query.ts"],"names":[],"mappings":";;;;AAAA,+CAAmF;AACnF,iDAAuG;AACvG,yDAAgD;AAChD,+CAA0C;AAC1C,yDAAmD;AACnD,2EAAqE;AAG9D,IAAM,eAAe,GAArB,MAAM,eAAe;IAEpB,AAAN,KAAK,CAAC,UAAU,CAAY,EAAU,EAAS,OAAwB;QACrE,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAEhC,OAAO,MAAM,IAAA,qBAAa,EAAC,wBAAU,CAAC,CAAC,OAAO,CAAC;YAC7C,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE;SACzC,CAAC,CAAA;IACJ,CAAC;IAGK,AAAN,KAAK,CAAC,WAAW,CAAS,MAAiB,EAAS,OAAwB;QAC1E,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAEhC,MAAM,YAAY,GAAG,IAAA,qCAA6B,EAAC;YACjD,MAAM;YACN,MAAM;YACN,UAAU,EAAE,MAAM,IAAA,qBAAa,EAAC,wBAAU,CAAC;YAC3C,WAAW,EAAE,CAAC,MAAM,CAAC;SACtB,CAAC,CAAA;QAEF,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,MAAM,YAAY,CAAC,eAAe,EAAE,CAAA;QAE3D,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAA;IACzB,CAAC;IAGK,AAAN,KAAK,CAAC,eAAe,CAAS,UAAsB;QAClD,OAAO,UAAU,CAAC,EAAE,IAAI,CAAC,MAAM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,iBAAS;;kDAa1C;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,iCAAc,CAAC,CAAC;IACjB,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAa,wBAAU;;sDAEnD;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;IAChB,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAa,wBAAU;;6CAE1C;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAa,wBAAU;;8CAE3C;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAa,wBAAU;;8CAE3C;AA5CU,eAAe;IAD3B,IAAA,uBAAQ,EAAC,wBAAU,CAAC;GACR,eAAe,CA6C3B;AA7CY,0CAAe","sourcesContent":["import { Resolver, Query, FieldResolver, Root, Args, Arg, Ctx } from 'type-graphql'\nimport { Domain, getQueryBuilderFromListParams, getRepository, ListParam } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\nimport { TaxInvoice } from './tax-invoice'\nimport { TaxInvoiceList } from './tax-invoice-type'\nimport { TaxInvoiceItem } from '../tax-invoice-item/tax-invoice-item'\n\n@Resolver(TaxInvoice)\nexport class TaxInvoiceQuery {\n @Query(returns => TaxInvoice!, { nullable: true, description: 'To fetch a TaxInvoice' })\n async taxInvoice(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<TaxInvoice> {\n const { domain } = context.state\n\n return await getRepository(TaxInvoice).findOne({\n where: { domain: { id: domain.id }, id }\n })\n }\n\n @Query(returns => TaxInvoiceList, { description: 'To fetch multiple TaxInvoices' })\n async taxInvoices(@Args() params: ListParam, @Ctx() context: ResolverContext): Promise<TaxInvoiceList> {\n const { domain } = context.state\n\n const queryBuilder = getQueryBuilderFromListParams({\n domain,\n params,\n repository: await getRepository(TaxInvoice),\n searchables: ['
|
|
1
|
+
{"version":3,"file":"tax-invoice-query.js","sourceRoot":"","sources":["../../../server/service/tax-invoice/tax-invoice-query.ts"],"names":[],"mappings":";;;;AAAA,+CAAmF;AACnF,iDAAuG;AACvG,yDAAgD;AAChD,+CAA0C;AAC1C,yDAAmD;AACnD,2EAAqE;AAG9D,IAAM,eAAe,GAArB,MAAM,eAAe;IAEpB,AAAN,KAAK,CAAC,UAAU,CAAY,EAAU,EAAS,OAAwB;QACrE,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAEhC,OAAO,MAAM,IAAA,qBAAa,EAAC,wBAAU,CAAC,CAAC,OAAO,CAAC;YAC7C,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE;SACzC,CAAC,CAAA;IACJ,CAAC;IAGK,AAAN,KAAK,CAAC,WAAW,CAAS,MAAiB,EAAS,OAAwB;QAC1E,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAEhC,MAAM,YAAY,GAAG,IAAA,qCAA6B,EAAC;YACjD,MAAM;YACN,MAAM;YACN,UAAU,EAAE,MAAM,IAAA,qBAAa,EAAC,wBAAU,CAAC;YAC3C,WAAW,EAAE,CAAC,MAAM,CAAC;SACtB,CAAC,CAAA;QAEF,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,MAAM,YAAY,CAAC,eAAe,EAAE,CAAA;QAE3D,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAA;IACzB,CAAC;IAGK,AAAN,KAAK,CAAC,eAAe,CAAS,UAAsB;QAClD,OAAO,UAAU,CAAC,EAAE,IAAI,CAAC,MAAM,IAAA,qBAAa,EAAC,iCAAc,CAAC,CAAC,MAAM,CAAC,EAAE,UAAU,EAAE,EAAE,EAAE,EAAE,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AC,CAAC;IACjB,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAa,wBAAU;;sDAEnD;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;IAChB,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAa,wBAAU;;6CAE1C;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAa,wBAAU;;8CAE3C;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAa,wBAAU;;8CAE3C;AA5CU,eAAe;IAD3B,IAAA,uBAAQ,EAAC,wBAAU,CAAC;GACR,eAAe,CA6C3B;AA7CY,0CAAe","sourcesContent":["import { Resolver, Query, FieldResolver, Root, Args, Arg, Ctx } from 'type-graphql'\nimport { Domain, getQueryBuilderFromListParams, getRepository, ListParam } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\nimport { TaxInvoice } from './tax-invoice'\nimport { TaxInvoiceList } from './tax-invoice-type'\nimport { TaxInvoiceItem } from '../tax-invoice-item/tax-invoice-item'\n\n@Resolver(TaxInvoice)\nexport class TaxInvoiceQuery {\n @Query(returns => TaxInvoice!, { nullable: true, description: 'To fetch a TaxInvoice' })\n async taxInvoice(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<TaxInvoice> {\n const { domain } = context.state\n\n return await getRepository(TaxInvoice).findOne({\n where: { domain: { id: domain.id }, id }\n })\n }\n\n @Query(returns => TaxInvoiceList, { description: 'To fetch multiple TaxInvoices' })\n async taxInvoices(@Args() params: ListParam, @Ctx() context: ResolverContext): Promise<TaxInvoiceList> {\n const { domain } = context.state\n\n const queryBuilder = getQueryBuilderFromListParams({\n domain,\n params,\n repository: await getRepository(TaxInvoice),\n searchables: ['memo']\n })\n\n const [items, total] = await queryBuilder.getManyAndCount()\n\n return { items, total }\n }\n\n @FieldResolver(type => [TaxInvoiceItem])\n async taxInvoiceItems(@Root() taxInvoice: TaxInvoice): Promise<TaxInvoiceItem[]> {\n return taxInvoice.id && (await getRepository(TaxInvoiceItem).findBy({ taxInvoice: { id: taxInvoice.id } }))\n }\n\n @FieldResolver(type => Domain)\n async domain(@Root() taxInvoice: TaxInvoice): Promise<Domain> {\n return taxInvoice.domainId && (await getRepository(Domain).findOneBy({ id: taxInvoice.domainId }))\n }\n\n @FieldResolver(type => User)\n async updater(@Root() taxInvoice: TaxInvoice): Promise<User> {\n return taxInvoice.updaterId && (await getRepository(User).findOneBy({ id: taxInvoice.updaterId }))\n }\n\n @FieldResolver(type => User)\n async creator(@Root() taxInvoice: TaxInvoice): Promise<User> {\n return taxInvoice.creatorId && (await getRepository(User).findOneBy({ id: taxInvoice.creatorId }))\n }\n}\n"]}
|
|
@@ -9,7 +9,7 @@ let NewTaxInvoice = class NewTaxInvoice {
|
|
|
9
9
|
tslib_1.__decorate([
|
|
10
10
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
11
11
|
tslib_1.__metadata("design:type", String)
|
|
12
|
-
], NewTaxInvoice.prototype, "
|
|
12
|
+
], NewTaxInvoice.prototype, "memo", void 0);
|
|
13
13
|
tslib_1.__decorate([
|
|
14
14
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
15
15
|
tslib_1.__metadata("design:type", String)
|
|
@@ -18,6 +18,10 @@ tslib_1.__decorate([
|
|
|
18
18
|
(0, type_graphql_1.Field)({ nullable: false }),
|
|
19
19
|
tslib_1.__metadata("design:type", String)
|
|
20
20
|
], NewTaxInvoice.prototype, "category", void 0);
|
|
21
|
+
tslib_1.__decorate([
|
|
22
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
23
|
+
tslib_1.__metadata("design:type", String)
|
|
24
|
+
], NewTaxInvoice.prototype, "issueNo", void 0);
|
|
21
25
|
tslib_1.__decorate([
|
|
22
26
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
23
27
|
tslib_1.__metadata("design:type", String)
|
|
@@ -28,11 +32,11 @@ tslib_1.__decorate([
|
|
|
28
32
|
], NewTaxInvoice.prototype, "originalApprovalNo", void 0);
|
|
29
33
|
tslib_1.__decorate([
|
|
30
34
|
(0, type_graphql_1.Field)({ nullable: false }),
|
|
31
|
-
tslib_1.__metadata("design:type",
|
|
35
|
+
tslib_1.__metadata("design:type", Date)
|
|
32
36
|
], NewTaxInvoice.prototype, "issueDate", void 0);
|
|
33
37
|
tslib_1.__decorate([
|
|
34
38
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
35
|
-
tslib_1.__metadata("design:type",
|
|
39
|
+
tslib_1.__metadata("design:type", Date)
|
|
36
40
|
], NewTaxInvoice.prototype, "signatureDate", void 0);
|
|
37
41
|
tslib_1.__decorate([
|
|
38
42
|
(0, type_graphql_1.Field)({ nullable: false }),
|
|
@@ -59,7 +63,7 @@ tslib_1.__decorate([
|
|
|
59
63
|
tslib_1.__metadata("design:type", String)
|
|
60
64
|
], NewTaxInvoice.prototype, "remark2", void 0);
|
|
61
65
|
tslib_1.__decorate([
|
|
62
|
-
(0, type_graphql_1.Field)({ nullable:
|
|
66
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
63
67
|
tslib_1.__metadata("design:type", String)
|
|
64
68
|
], NewTaxInvoice.prototype, "supplierBusinessRegistrationCategory", void 0);
|
|
65
69
|
tslib_1.__decorate([
|
|
@@ -111,7 +115,7 @@ tslib_1.__decorate([
|
|
|
111
115
|
tslib_1.__metadata("design:type", String)
|
|
112
116
|
], NewTaxInvoice.prototype, "supplierContactCellPhone", void 0);
|
|
113
117
|
tslib_1.__decorate([
|
|
114
|
-
(0, type_graphql_1.Field)({ nullable:
|
|
118
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
115
119
|
tslib_1.__metadata("design:type", String)
|
|
116
120
|
], NewTaxInvoice.prototype, "buyerBusinessRegistrationCategory", void 0);
|
|
117
121
|
tslib_1.__decorate([
|
|
@@ -275,259 +279,7 @@ tslib_1.__decorate([
|
|
|
275
279
|
tslib_1.__decorate([
|
|
276
280
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
277
281
|
tslib_1.__metadata("design:type", String)
|
|
278
|
-
], TaxInvoicePatch.prototype, "
|
|
279
|
-
tslib_1.__decorate([
|
|
280
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
281
|
-
tslib_1.__metadata("design:type", String)
|
|
282
|
-
], TaxInvoicePatch.prototype, "apiRefId", void 0);
|
|
283
|
-
tslib_1.__decorate([
|
|
284
|
-
(0, type_graphql_1.Field)({ nullable: false }),
|
|
285
|
-
tslib_1.__metadata("design:type", String)
|
|
286
|
-
], TaxInvoicePatch.prototype, "category", void 0);
|
|
287
|
-
tslib_1.__decorate([
|
|
288
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
289
|
-
tslib_1.__metadata("design:type", String)
|
|
290
|
-
], TaxInvoicePatch.prototype, "approvalNo", void 0);
|
|
291
|
-
tslib_1.__decorate([
|
|
292
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
293
|
-
tslib_1.__metadata("design:type", String)
|
|
294
|
-
], TaxInvoicePatch.prototype, "originalApprovalNo", void 0);
|
|
295
|
-
tslib_1.__decorate([
|
|
296
|
-
(0, type_graphql_1.Field)({ nullable: false }),
|
|
297
|
-
tslib_1.__metadata("design:type", String)
|
|
298
|
-
], TaxInvoicePatch.prototype, "issueDate", void 0);
|
|
299
|
-
tslib_1.__decorate([
|
|
300
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
301
|
-
tslib_1.__metadata("design:type", String)
|
|
302
|
-
], TaxInvoicePatch.prototype, "signatureDate", void 0);
|
|
303
|
-
tslib_1.__decorate([
|
|
304
|
-
(0, type_graphql_1.Field)({ nullable: false }),
|
|
305
|
-
tslib_1.__metadata("design:type", String)
|
|
306
|
-
], TaxInvoicePatch.prototype, "invoiceType", void 0);
|
|
307
|
-
tslib_1.__decorate([
|
|
308
|
-
(0, type_graphql_1.Field)({ nullable: false }),
|
|
309
|
-
tslib_1.__metadata("design:type", String)
|
|
310
|
-
], TaxInvoicePatch.prototype, "purpose", void 0);
|
|
311
|
-
tslib_1.__decorate([
|
|
312
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
313
|
-
tslib_1.__metadata("design:type", String)
|
|
314
|
-
], TaxInvoicePatch.prototype, "revisedReason", void 0);
|
|
315
|
-
tslib_1.__decorate([
|
|
316
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
317
|
-
tslib_1.__metadata("design:type", String)
|
|
318
|
-
], TaxInvoicePatch.prototype, "remark0", void 0);
|
|
319
|
-
tslib_1.__decorate([
|
|
320
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
321
|
-
tslib_1.__metadata("design:type", String)
|
|
322
|
-
], TaxInvoicePatch.prototype, "remark1", void 0);
|
|
323
|
-
tslib_1.__decorate([
|
|
324
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
325
|
-
tslib_1.__metadata("design:type", String)
|
|
326
|
-
], TaxInvoicePatch.prototype, "remark2", void 0);
|
|
327
|
-
tslib_1.__decorate([
|
|
328
|
-
(0, type_graphql_1.Field)({ nullable: false }),
|
|
329
|
-
tslib_1.__metadata("design:type", String)
|
|
330
|
-
], TaxInvoicePatch.prototype, "supplierBusinessRegistrationCategory", void 0);
|
|
331
|
-
tslib_1.__decorate([
|
|
332
|
-
(0, type_graphql_1.Field)({ nullable: false }),
|
|
333
|
-
tslib_1.__metadata("design:type", String)
|
|
334
|
-
], TaxInvoicePatch.prototype, "supplierBusinessRegistrationNumber", void 0);
|
|
335
|
-
tslib_1.__decorate([
|
|
336
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
337
|
-
tslib_1.__metadata("design:type", String)
|
|
338
|
-
], TaxInvoicePatch.prototype, "supplierBranchIdentification", void 0);
|
|
339
|
-
tslib_1.__decorate([
|
|
340
|
-
(0, type_graphql_1.Field)({ nullable: false }),
|
|
341
|
-
tslib_1.__metadata("design:type", String)
|
|
342
|
-
], TaxInvoicePatch.prototype, "supplierBusinessName", void 0);
|
|
343
|
-
tslib_1.__decorate([
|
|
344
|
-
(0, type_graphql_1.Field)({ nullable: false }),
|
|
345
|
-
tslib_1.__metadata("design:type", String)
|
|
346
|
-
], TaxInvoicePatch.prototype, "supplierRepresentativeName", void 0);
|
|
347
|
-
tslib_1.__decorate([
|
|
348
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
349
|
-
tslib_1.__metadata("design:type", String)
|
|
350
|
-
], TaxInvoicePatch.prototype, "supplierAddress", void 0);
|
|
351
|
-
tslib_1.__decorate([
|
|
352
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
353
|
-
tslib_1.__metadata("design:type", String)
|
|
354
|
-
], TaxInvoicePatch.prototype, "supplierBusinessType", void 0);
|
|
355
|
-
tslib_1.__decorate([
|
|
356
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
357
|
-
tslib_1.__metadata("design:type", String)
|
|
358
|
-
], TaxInvoicePatch.prototype, "supplierIndustryType", void 0);
|
|
359
|
-
tslib_1.__decorate([
|
|
360
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
361
|
-
tslib_1.__metadata("design:type", String)
|
|
362
|
-
], TaxInvoicePatch.prototype, "supplierDepartment", void 0);
|
|
363
|
-
tslib_1.__decorate([
|
|
364
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
365
|
-
tslib_1.__metadata("design:type", String)
|
|
366
|
-
], TaxInvoicePatch.prototype, "supplierContactName", void 0);
|
|
367
|
-
tslib_1.__decorate([
|
|
368
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
369
|
-
tslib_1.__metadata("design:type", String)
|
|
370
|
-
], TaxInvoicePatch.prototype, "supplierContactPhone", void 0);
|
|
371
|
-
tslib_1.__decorate([
|
|
372
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
373
|
-
tslib_1.__metadata("design:type", String)
|
|
374
|
-
], TaxInvoicePatch.prototype, "supplierContactEmail", void 0);
|
|
375
|
-
tslib_1.__decorate([
|
|
376
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
377
|
-
tslib_1.__metadata("design:type", String)
|
|
378
|
-
], TaxInvoicePatch.prototype, "supplierContactCellPhone", void 0);
|
|
379
|
-
tslib_1.__decorate([
|
|
380
|
-
(0, type_graphql_1.Field)({ nullable: false }),
|
|
381
|
-
tslib_1.__metadata("design:type", String)
|
|
382
|
-
], TaxInvoicePatch.prototype, "buyerBusinessRegistrationCategory", void 0);
|
|
383
|
-
tslib_1.__decorate([
|
|
384
|
-
(0, type_graphql_1.Field)({ nullable: false }),
|
|
385
|
-
tslib_1.__metadata("design:type", String)
|
|
386
|
-
], TaxInvoicePatch.prototype, "buyerBusinessRegistrationNumber", void 0);
|
|
387
|
-
tslib_1.__decorate([
|
|
388
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
389
|
-
tslib_1.__metadata("design:type", String)
|
|
390
|
-
], TaxInvoicePatch.prototype, "buyerBranchIdentification", void 0);
|
|
391
|
-
tslib_1.__decorate([
|
|
392
|
-
(0, type_graphql_1.Field)({ nullable: false }),
|
|
393
|
-
tslib_1.__metadata("design:type", String)
|
|
394
|
-
], TaxInvoicePatch.prototype, "buyerBusinessName", void 0);
|
|
395
|
-
tslib_1.__decorate([
|
|
396
|
-
(0, type_graphql_1.Field)({ nullable: false }),
|
|
397
|
-
tslib_1.__metadata("design:type", String)
|
|
398
|
-
], TaxInvoicePatch.prototype, "buyerRepresentativeName", void 0);
|
|
399
|
-
tslib_1.__decorate([
|
|
400
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
401
|
-
tslib_1.__metadata("design:type", String)
|
|
402
|
-
], TaxInvoicePatch.prototype, "buyerAddress", void 0);
|
|
403
|
-
tslib_1.__decorate([
|
|
404
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
405
|
-
tslib_1.__metadata("design:type", String)
|
|
406
|
-
], TaxInvoicePatch.prototype, "buyerBusinessType", void 0);
|
|
407
|
-
tslib_1.__decorate([
|
|
408
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
409
|
-
tslib_1.__metadata("design:type", String)
|
|
410
|
-
], TaxInvoicePatch.prototype, "buyerIndustryType", void 0);
|
|
411
|
-
tslib_1.__decorate([
|
|
412
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
413
|
-
tslib_1.__metadata("design:type", String)
|
|
414
|
-
], TaxInvoicePatch.prototype, "buyer1stDepartment", void 0);
|
|
415
|
-
tslib_1.__decorate([
|
|
416
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
417
|
-
tslib_1.__metadata("design:type", String)
|
|
418
|
-
], TaxInvoicePatch.prototype, "buyer1stContactName", void 0);
|
|
419
|
-
tslib_1.__decorate([
|
|
420
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
421
|
-
tslib_1.__metadata("design:type", String)
|
|
422
|
-
], TaxInvoicePatch.prototype, "buyer1stContactPhone", void 0);
|
|
423
|
-
tslib_1.__decorate([
|
|
424
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
425
|
-
tslib_1.__metadata("design:type", String)
|
|
426
|
-
], TaxInvoicePatch.prototype, "buyer1stContactEmail", void 0);
|
|
427
|
-
tslib_1.__decorate([
|
|
428
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
429
|
-
tslib_1.__metadata("design:type", String)
|
|
430
|
-
], TaxInvoicePatch.prototype, "buyer1stContactCellPhone", void 0);
|
|
431
|
-
tslib_1.__decorate([
|
|
432
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
433
|
-
tslib_1.__metadata("design:type", String)
|
|
434
|
-
], TaxInvoicePatch.prototype, "buyer2ndDepartment", void 0);
|
|
435
|
-
tslib_1.__decorate([
|
|
436
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
437
|
-
tslib_1.__metadata("design:type", String)
|
|
438
|
-
], TaxInvoicePatch.prototype, "buyer2ndContactName", void 0);
|
|
439
|
-
tslib_1.__decorate([
|
|
440
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
441
|
-
tslib_1.__metadata("design:type", String)
|
|
442
|
-
], TaxInvoicePatch.prototype, "buyer2ndContactPhone", void 0);
|
|
443
|
-
tslib_1.__decorate([
|
|
444
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
445
|
-
tslib_1.__metadata("design:type", String)
|
|
446
|
-
], TaxInvoicePatch.prototype, "buyer2ndContactEmail", void 0);
|
|
447
|
-
tslib_1.__decorate([
|
|
448
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
449
|
-
tslib_1.__metadata("design:type", String)
|
|
450
|
-
], TaxInvoicePatch.prototype, "buyer2ndContactCellPhone", void 0);
|
|
451
|
-
tslib_1.__decorate([
|
|
452
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
453
|
-
tslib_1.__metadata("design:type", String)
|
|
454
|
-
], TaxInvoicePatch.prototype, "agentBusinessRegistrationCategory", void 0);
|
|
455
|
-
tslib_1.__decorate([
|
|
456
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
457
|
-
tslib_1.__metadata("design:type", String)
|
|
458
|
-
], TaxInvoicePatch.prototype, "agentBusinessRegistrationNumber", void 0);
|
|
459
|
-
tslib_1.__decorate([
|
|
460
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
461
|
-
tslib_1.__metadata("design:type", String)
|
|
462
|
-
], TaxInvoicePatch.prototype, "agentBranchIdentification", void 0);
|
|
463
|
-
tslib_1.__decorate([
|
|
464
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
465
|
-
tslib_1.__metadata("design:type", String)
|
|
466
|
-
], TaxInvoicePatch.prototype, "agentBusinessName", void 0);
|
|
467
|
-
tslib_1.__decorate([
|
|
468
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
469
|
-
tslib_1.__metadata("design:type", String)
|
|
470
|
-
], TaxInvoicePatch.prototype, "agentRepresentativeName", void 0);
|
|
471
|
-
tslib_1.__decorate([
|
|
472
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
473
|
-
tslib_1.__metadata("design:type", String)
|
|
474
|
-
], TaxInvoicePatch.prototype, "agentAddress", void 0);
|
|
475
|
-
tslib_1.__decorate([
|
|
476
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
477
|
-
tslib_1.__metadata("design:type", String)
|
|
478
|
-
], TaxInvoicePatch.prototype, "agentBusinessType", void 0);
|
|
479
|
-
tslib_1.__decorate([
|
|
480
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
481
|
-
tslib_1.__metadata("design:type", String)
|
|
482
|
-
], TaxInvoicePatch.prototype, "agentIndustryType", void 0);
|
|
483
|
-
tslib_1.__decorate([
|
|
484
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
485
|
-
tslib_1.__metadata("design:type", String)
|
|
486
|
-
], TaxInvoicePatch.prototype, "agentDepartment", void 0);
|
|
487
|
-
tslib_1.__decorate([
|
|
488
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
489
|
-
tslib_1.__metadata("design:type", String)
|
|
490
|
-
], TaxInvoicePatch.prototype, "agentContactName", void 0);
|
|
491
|
-
tslib_1.__decorate([
|
|
492
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
493
|
-
tslib_1.__metadata("design:type", String)
|
|
494
|
-
], TaxInvoicePatch.prototype, "agentContactPhone", void 0);
|
|
495
|
-
tslib_1.__decorate([
|
|
496
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
497
|
-
tslib_1.__metadata("design:type", String)
|
|
498
|
-
], TaxInvoicePatch.prototype, "agentContactEmail", void 0);
|
|
499
|
-
tslib_1.__decorate([
|
|
500
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
501
|
-
tslib_1.__metadata("design:type", String)
|
|
502
|
-
], TaxInvoicePatch.prototype, "agentContactCellPhone", void 0);
|
|
503
|
-
tslib_1.__decorate([
|
|
504
|
-
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true }),
|
|
505
|
-
tslib_1.__metadata("design:type", Number)
|
|
506
|
-
], TaxInvoicePatch.prototype, "paymentAmountCash", void 0);
|
|
507
|
-
tslib_1.__decorate([
|
|
508
|
-
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true }),
|
|
509
|
-
tslib_1.__metadata("design:type", Number)
|
|
510
|
-
], TaxInvoicePatch.prototype, "paymentAmountCheck", void 0);
|
|
511
|
-
tslib_1.__decorate([
|
|
512
|
-
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true }),
|
|
513
|
-
tslib_1.__metadata("design:type", Number)
|
|
514
|
-
], TaxInvoicePatch.prototype, "paymentAmountPromissoryNote", void 0);
|
|
515
|
-
tslib_1.__decorate([
|
|
516
|
-
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true }),
|
|
517
|
-
tslib_1.__metadata("design:type", Number)
|
|
518
|
-
], TaxInvoicePatch.prototype, "paymentAmountAccountsReceivable", void 0);
|
|
519
|
-
tslib_1.__decorate([
|
|
520
|
-
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: false }),
|
|
521
|
-
tslib_1.__metadata("design:type", Number)
|
|
522
|
-
], TaxInvoicePatch.prototype, "supplyAmount", void 0);
|
|
523
|
-
tslib_1.__decorate([
|
|
524
|
-
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true }),
|
|
525
|
-
tslib_1.__metadata("design:type", Number)
|
|
526
|
-
], TaxInvoicePatch.prototype, "taxAmount", void 0);
|
|
527
|
-
tslib_1.__decorate([
|
|
528
|
-
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: false }),
|
|
529
|
-
tslib_1.__metadata("design:type", Number)
|
|
530
|
-
], TaxInvoicePatch.prototype, "totalAmount", void 0);
|
|
282
|
+
], TaxInvoicePatch.prototype, "memo", void 0);
|
|
531
283
|
tslib_1.__decorate([
|
|
532
284
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
533
285
|
tslib_1.__metadata("design:type", String)
|