@things-factory/tax-invoice 6.2.139 → 6.2.143
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-send/tax-invoice-send-page.ts +62 -31
- package/dist-client/pages/tax-invoice-send/tax-invoice-send-page.js +57 -26
- package/dist-client/pages/tax-invoice-send/tax-invoice-send-page.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/service/tax-invoice-api/tax-invoice-api-mutation.js +4 -1
- package/dist-server/service/tax-invoice-api/tax-invoice-api-mutation.js.map +1 -1
- package/dist-server/service/tax-invoice-item/tax-invoice-item.js +2 -2
- package/dist-server/service/tax-invoice-item/tax-invoice-item.js.map +1 -1
- package/dist-server/service/unipost-api/test-data.js +3812 -0
- package/dist-server/service/unipost-api/test-data.js.map +1 -0
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/server/service/tax-invoice-api/tax-invoice-api-mutation.ts +4 -1
- package/server/service/tax-invoice-item/tax-invoice-item.ts +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/tax-invoice",
|
|
3
|
-
"version": "6.2.
|
|
3
|
+
"version": "6.2.143",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "dist-client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -34,5 +34,5 @@
|
|
|
34
34
|
"@things-factory/export-ui-excel": "^6.2.139",
|
|
35
35
|
"@things-factory/shell": "^6.2.139"
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "4340ddef43e7d24993db0ea86914454d69b98d48"
|
|
38
38
|
}
|
|
@@ -82,7 +82,7 @@ export class TaxInvoiceApiMutation {
|
|
|
82
82
|
const taxInvoiceItemRepo = tx.getRepository(TaxInvoiceItem)
|
|
83
83
|
const taxInvoiceApiRepo = tx.getRepository(TaxInvoiceApi)
|
|
84
84
|
|
|
85
|
-
const apiInfo =
|
|
85
|
+
const apiInfo = await taxInvoiceApiRepo.findOneBy({ isDefault: true })
|
|
86
86
|
const businessRegistrationNumber = apiInfo.businessRegistrationNumber
|
|
87
87
|
const { aid = '', bearer = '', customer_no = '' } = apiInfo?.attributes
|
|
88
88
|
let failCount = 0
|
|
@@ -92,6 +92,9 @@ export class TaxInvoiceApiMutation {
|
|
|
92
92
|
|
|
93
93
|
// 2. 세금계산서 발행 API 호출
|
|
94
94
|
const apiResult = await sendTaxInvoiceByUniposApi(businessRegistrationNumber, aid, bearer, newTaxInvoiceSendList)
|
|
95
|
+
if (apiResult === false) {
|
|
96
|
+
throw new Error('tax invoice send exception: api error')
|
|
97
|
+
}
|
|
95
98
|
|
|
96
99
|
// 3. 성공하면 세금계산서 DB에 저장
|
|
97
100
|
for (let item of apiResult) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CreateDateColumn, DeleteDateColumn, Entity, Index, Column, JoinColumn, RelationId, ManyToOne, PrimaryGeneratedColumn } from 'typeorm'
|
|
2
2
|
import { ObjectType, Field, ID } from 'type-graphql'
|
|
3
3
|
|
|
4
|
-
import { Domain } from '@things-factory/shell'
|
|
4
|
+
import { Domain, roundTransformer } from '@things-factory/shell'
|
|
5
5
|
import { User } from '@things-factory/auth-base'
|
|
6
6
|
import { TaxInvoice } from '../tax-invoice/tax-invoice'
|
|
7
7
|
|
|
@@ -44,11 +44,11 @@ export class TaxInvoiceItem {
|
|
|
44
44
|
@Field({ nullable: false, description: '규격' })
|
|
45
45
|
specification!: string
|
|
46
46
|
|
|
47
|
-
@Column('float', { precision: 10, scale: 2, nullable: false, comment: '수량 (소수점 2자리까지 허용)' })
|
|
47
|
+
@Column('float', { precision: 10, scale: 2, nullable: false, comment: '수량 (소수점 2자리까지 허용)', transformer: roundTransformer })
|
|
48
48
|
@Field({ nullable: false, description: '수량 (소수점 2자리까지 허용)' })
|
|
49
49
|
quantity!: number
|
|
50
50
|
|
|
51
|
-
@Column('float', { precision: 10, scale: 2, nullable: false, comment: '단가 (소수점 2자리까지 허용)' })
|
|
51
|
+
@Column('float', { precision: 10, scale: 2, nullable: false, comment: '단가 (소수점 2자리까지 허용)', transformer: roundTransformer })
|
|
52
52
|
@Field({ nullable: false, description: '단가 (소수점 2자리까지 허용)' })
|
|
53
53
|
unitPrice!: number
|
|
54
54
|
|