@atomsolution/invoice-sdk-api 1.26.0 → 1.27.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/dist/api.d.ts CHANGED
@@ -17,532 +17,392 @@ export interface CreateInvoiceError {
17
17
  /**
18
18
  *
19
19
  * @export
20
- * @interface mInvoiceCreateInvoiceRequest
20
+ * @interface CreateInvoiceRequest
21
21
  */
22
- export interface mInvoiceCreateInvoiceRequest {
22
+ export interface CreateInvoiceRequest {
23
23
  /**
24
24
  *
25
- * @type {mInvoiceCreateInvoiceRequestInv}
26
- * @memberof mInvoiceCreateInvoiceRequest
25
+ * @type {CreateInvoiceRequestInv}
26
+ * @memberof CreateInvoiceRequest
27
27
  */
28
- inv?: mInvoiceCreateInvoiceRequestInv;
28
+ inv?: CreateInvoiceRequestInv;
29
29
  }
30
30
  /**
31
31
  *
32
32
  * @export
33
- * @interface mInvoiceCreateInvoiceRequestInv
33
+ * @interface CreateInvoiceRequestInv
34
34
  */
35
- export interface mInvoiceCreateInvoiceRequestInv {
35
+ export interface CreateInvoiceRequestInv {
36
36
  /**
37
- * Ký hiệu hóa đơn đăng ký trên thông báo phát hành
37
+ * Ký hiệu hóa đơn
38
38
  * @type {string}
39
- * @memberof mInvoiceCreateInvoiceRequestInv
39
+ * @memberof CreateInvoiceRequestInv
40
40
  */
41
- itype: string;
41
+ serial: string;
42
42
  /**
43
- * Ngày tạo hóa đơn yyyy-MM-dd
43
+ * Ngày tạo hóa đơn: yyyy-MM-dd
44
44
  * @type {string}
45
- * @memberof mInvoiceCreateInvoiceRequestInv
45
+ * @memberof CreateInvoiceRequestInv
46
46
  */
47
47
  invoice_date: string;
48
48
  /**
49
- * Đơn vị tiền tệ \"VND\", \"USD\"
49
+ * Đơn vị tiền tệ: "VND", "USD"
50
50
  * @type {string}
51
- * @memberof mInvoiceCreateInvoiceRequestInv
51
+ * @memberof CreateInvoiceRequestInv
52
52
  */
53
53
  currency: string;
54
54
  /**
55
55
  * Tỷ giá
56
56
  * @type {number}
57
- * @memberof mInvoiceCreateInvoiceRequestInv
57
+ * @memberof CreateInvoiceRequestInv
58
58
  */
59
59
  ex_rate: number;
60
60
  /**
61
61
  * Tên người mua
62
62
  * @type {string}
63
- * @memberof mInvoiceCreateInvoiceRequestInv
63
+ * @memberof CreateInvoiceRequestInv
64
64
  */
65
65
  buyer_name: string;
66
66
  /**
67
67
  * Tên đơn vị mua
68
68
  * @type {string}
69
- * @memberof mInvoiceCreateInvoiceRequestInv
69
+ * @memberof CreateInvoiceRequestInv
70
70
  */
71
71
  buyer_legal_name: string;
72
72
  /**
73
73
  * Mã số thuế người mua
74
74
  * @type {string}
75
- * @memberof mInvoiceCreateInvoiceRequestInv
75
+ * @memberof CreateInvoiceRequestInv
76
76
  */
77
77
  buyer_tax?: string;
78
78
  /**
79
79
  * Địa chỉ người mua
80
80
  * @type {string}
81
- * @memberof mInvoiceCreateInvoiceRequestInv
81
+ * @memberof CreateInvoiceRequestInv
82
82
  */
83
83
  buyer_address: string;
84
84
  /**
85
85
  * Email người mua
86
86
  * @type {string}
87
- * @memberof mInvoiceCreateInvoiceRequestInv
87
+ * @memberof CreateInvoiceRequestInv
88
88
  */
89
89
  buyer_email?: string;
90
90
  /**
91
91
  * Số tài khoản người mua
92
92
  * @type {string}
93
- * @memberof mInvoiceCreateInvoiceRequestInv
93
+ * @memberof CreateInvoiceRequestInv
94
94
  */
95
95
  buyer_bank_account?: string;
96
96
  /**
97
97
  * Ngân hàng người mua
98
98
  * @type {string}
99
- * @memberof mInvoiceCreateInvoiceRequestInv
99
+ * @memberof CreateInvoiceRequestInv
100
100
  */
101
101
  buyer_bank_name?: string;
102
102
  /**
103
- * Hình thức thanh toán TM/CK
103
+ * Hình thức thanh toán: TM/CK
104
104
  * @type {string}
105
- * @memberof mInvoiceCreateInvoiceRequestInv
105
+ * @memberof CreateInvoiceRequestInv
106
106
  */
107
107
  payment_method?: string;
108
108
  /**
109
109
  * Tiền chiết khấu (đã gồm thuế)
110
110
  * @type {number}
111
- * @memberof mInvoiceCreateInvoiceRequestInv
111
+ * @memberof CreateInvoiceRequestInv
112
112
  */
113
113
  discount?: number;
114
114
  /**
115
115
  * Tổng tiền chưa thuế (đã quy đổi VNĐ)
116
116
  * @type {number}
117
- * @memberof mInvoiceCreateInvoiceRequestInv
117
+ * @memberof CreateInvoiceRequestInv
118
118
  */
119
119
  sum_v?: number;
120
120
  /**
121
121
  * Tổng tiền thuế (đã quy đổi VNĐ)
122
122
  * @type {number}
123
- * @memberof mInvoiceCreateInvoiceRequestInv
123
+ * @memberof CreateInvoiceRequestInv
124
124
  */
125
125
  vat_v?: number;
126
126
  /**
127
127
  * Thành tiền sau thuế bằng số (VNĐ)
128
128
  * @type {number}
129
- * @memberof mInvoiceCreateInvoiceRequestInv
129
+ * @memberof CreateInvoiceRequestInv
130
130
  */
131
131
  total_v?: number;
132
+ /**
133
+ * Thành tiền sau thuế bằng chữ (VNĐ)
134
+ * @type {string}
135
+ * @memberof CreateInvoiceRequestInv
136
+ */
137
+ total_v_in_words?: string;
132
138
  /**
133
139
  * Số đơn hàng
134
140
  * @type {string}
135
- * @memberof mInvoiceCreateInvoiceRequestInv
141
+ * @memberof CreateInvoiceRequestInv
136
142
  */
137
143
  seq?: string;
138
144
  /**
139
145
  * Mã đơn hàng. Không được phép trùng
140
146
  * @type {string}
141
- * @memberof mInvoiceCreateInvoiceRequestInv
147
+ * @memberof CreateInvoiceRequestInv
142
148
  */
143
149
  sid?: string;
144
150
  /**
145
- *
146
- * @type {Array<ItemObject>}
147
- * @memberof mInvoiceCreateInvoiceRequestInv
148
- */
149
- items: Array<ItemObject>;
150
- }
151
- /**
152
- *
153
- * @export
154
- * @interface CreateInvoiceSuccess
155
- */
156
- export interface CreateInvoiceSuccess {
157
- /**
158
- * Mã định danh của hóa đơn vừa tạo
159
- * @type {string}
160
- * @memberof CreateInvoiceSuccess
161
- */
162
- invoiceId?: string;
163
- /**
164
- * Trạng thái của yêu cầu tạo hóa đơn
165
- * @type {string}
166
- * @memberof CreateInvoiceSuccess
167
- */
168
- status?: string;
169
- }
170
- /**
171
- *
172
- * @export
173
- * @interface FptCreateInvoiceRequest
174
- */
175
- export interface FptCreateInvoiceRequest {
176
- /**
177
- *
178
- * @type {FptCreateInvoiceRequestInv}
179
- * @memberof FptCreateInvoiceRequest
180
- */
181
- inv?: FptCreateInvoiceRequestInv;
182
- }
183
- /**
184
- *
185
- * @export
186
- * @interface FptCreateInvoiceRequestInv
187
- */
188
- export interface FptCreateInvoiceRequestInv {
189
- /**
190
- * Ký hiệu hóa đơn đăng ký trên thông báo phát hành
191
- * @type {string}
192
- * @memberof FptCreateInvoiceRequestInv
193
- */
194
- itype: string;
195
- /**
196
- * Ngày tạo hóa đơn yyyy-MM-dd
197
- * @type {string}
198
- * @memberof FptCreateInvoiceRequestInv
199
- */
200
- invoice_date: string;
201
- /**
202
- * Đơn vị tiền tệ \"VND\", \"USD\"
203
- * @type {string}
204
- * @memberof FptCreateInvoiceRequestInv
205
- */
206
- currency: string;
207
- /**
208
- * Tỷ giá
209
- * @type {number}
210
- * @memberof FptCreateInvoiceRequestInv
211
- */
212
- ex_rate: number;
213
- /**
214
- * Tên người mua
215
- * @type {string}
216
- * @memberof FptCreateInvoiceRequestInv
217
- */
218
- buyer_name: string;
219
- /**
220
- * Tên đơn vị mua
221
- * @type {string}
222
- * @memberof FptCreateInvoiceRequestInv
223
- */
224
- buyer_legal_name: string;
225
- /**
226
- * Mã số thuế người mua
227
- * @type {string}
228
- * @memberof FptCreateInvoiceRequestInv
229
- */
230
- buyer_tax?: string;
231
- /**
232
- * Địa chỉ người mua
233
- * @type {string}
234
- * @memberof FptCreateInvoiceRequestInv
235
- */
236
- buyer_address: string;
237
- /**
238
- * Email người mua
239
- * @type {string}
240
- * @memberof FptCreateInvoiceRequestInv
241
- */
242
- buyer_email?: string;
243
- /**
244
- * Số tài khoản người mua
245
- * @type {string}
246
- * @memberof FptCreateInvoiceRequestInv
247
- */
248
- buyer_bank_account?: string;
249
- /**
250
- * Ngân hàng người mua
251
- * @type {string}
252
- * @memberof FptCreateInvoiceRequestInv
253
- */
254
- buyer_bank_name?: string;
255
- /**
256
- * Hình thức thanh toán TM/CK
257
- * @type {string}
258
- * @memberof FptCreateInvoiceRequestInv
259
- */
260
- payment_method?: string;
261
- /**
262
- * Tiền chiết khấu (đã gồm thuế)
263
- * @type {number}
264
- * @memberof FptCreateInvoiceRequestInv
265
- */
266
- discount?: number;
267
- /**
268
- * Tổng tiền chưa thuế (đã quy đổi VNĐ)
269
- * @type {number}
270
- * @memberof FptCreateInvoiceRequestInv
271
- */
272
- sum_v?: number;
273
- /**
274
- * Tổng tiền thuế (đã quy đổi VNĐ)
151
+ * Tổng tiền chưa thuế nguyên tệ
275
152
  * @type {number}
276
- * @memberof FptCreateInvoiceRequestInv
153
+ * @memberof CreateInvoiceRequestInv
277
154
  */
278
- vat_v?: number;
155
+ sum: number;
279
156
  /**
280
- * Thành tiền sau thuế bằng số (VNĐ)
157
+ * Tổng tiền thuế nguyên tệ
281
158
  * @type {number}
282
- * @memberof FptCreateInvoiceRequestInv
159
+ * @memberof CreateInvoiceRequestInv
283
160
  */
284
- total_v?: number;
161
+ vat: number;
285
162
  /**
286
- * Số đơn hàng
287
- * @type {string}
288
- * @memberof FptCreateInvoiceRequestInv
289
- */
290
- seq?: string;
291
- /**
292
- * Mã đơn hàng. Không được phép trùng
293
- * @type {string}
294
- * @memberof FptCreateInvoiceRequestInv
295
- */
296
- sid?: string;
297
- /**
298
- * Tổng tiền chưa thuế nguyên tệ
163
+ * Tổng tiền thanh toán bao gồm tiền thuế, nguyên tệ
299
164
  * @type {number}
300
- * @memberof FptCreateInvoiceRequestInv
165
+ * @memberof CreateInvoiceRequestInv
301
166
  */
302
- sum?: number;
167
+ total: number;
303
168
  /**
304
169
  * Mẫu hóa đơn đăng ký sử dụng trên hệ thống
305
170
  * @type {string}
306
- * @memberof FptCreateInvoiceRequestInv
171
+ * @memberof CreateInvoiceRequestInv
307
172
  */
308
- form?: string;
173
+ form: string;
309
174
  /**
310
- * Sử dụng trường `aun` để xác định phương thức quản lý số hóa đơn do hệ thống nào cấp số: * `aun`: 1 - Trường hợp doanh nghiệp (DN) muốn tự quản lý việc cấp số trên hệ thống DN - Bắt buộc phải có số hóa đơn tại trường `seq`. * `aun`: 2 - Trường hợp chọn eInvoice tự động cấp số khi nhận dữ liệu từ hệ thống quản lý của DN.
175
+ * Sử dụng xác định phương thức quản lý số hóa đơn sẽ do hệ thống nào cấp số:
176
+ * + Trường hợp DN muốn tự quản lý việc cấp số trên hệ thống DN: "aun": 1, bắt buộc phải có số hóa đơn tại thẻ "seq"
177
+ * + Trường hợp chọn eInvoice tự động cấp số khi nhận dữ liệu từ hệ thống quản lý của DN: "aun": 2
311
178
  * @type {number}
312
- * @memberof FptCreateInvoiceRequestInv
179
+ * @memberof CreateInvoiceRequestInv
313
180
  */
314
181
  aun?: number;
315
182
  /**
316
- * Sử dụng đối với hóa đơn `xuất hoàn trả`: - `sign`: -1 - Đánh dấu hóa đơn là hóa đơn xuất hoàn trả - `sign`: 1 hoặc không có thẻ - Đánh dấu hóa đơn thông thường
183
+ * Sử dụng đối với hóa đơn Xuất hoàn trả:
184
+ * + "sign": -1: Đánh dấu hóa đơn là hóa đơn xuất hoàn trả
185
+ * + "sign": 1 hoặc không có thẻ: Hóa đơn thông thường
317
186
  * @type {string}
318
- * @memberof FptCreateInvoiceRequestInv
187
+ * @memberof CreateInvoiceRequestInv
319
188
  */
320
189
  sign?: string;
321
190
  /**
322
- * Thẻ xác định loại hóa đơn đang sử dụng: - `type_ref`: 1 - Hóa đơn theo TT78 - `type_ref`: bỏ trống - Hóa đơn theo TT32
323
- * @type {string}
324
- * @memberof FptCreateInvoiceRequestInv
191
+ * Thẻ xác định loại hóa đơn đang sử dụng:
192
+ * - 1: Hóa đơn theo TT78
193
+ * - Bỏ trống: Hóa đơn theo TT32
194
+ * @type {number}
195
+ * @memberof CreateInvoiceRequestInv
325
196
  */
326
- type_ref?: string;
197
+ type_ref?: number;
327
198
  /**
328
199
  * Số bảng kê (Sử dụng đối với các hóa đơn bán theo lần phát sinh, sử dụng bảng kê)
329
200
  * @type {string}
330
- * @memberof FptCreateInvoiceRequestInv
201
+ * @memberof CreateInvoiceRequestInv
331
202
  */
332
203
  listnum?: string;
333
204
  /**
334
- * Ngày bảng kê theo định dạng yyyy-mm-dd hh:mm:ss (Sử dụng đối với các hóa đơn bán theo lần phát sinh, sử dụng bảng kê)
205
+ * Ngày bảng kê theo định dạng "yyyy-mm-dd hh:mm:ss" (Sử dụng đối với các hóa đơn bán theo lần phát sinh, sử dụng bảng kê)
335
206
  * @type {string}
336
- * @memberof FptCreateInvoiceRequestInv
207
+ * @memberof CreateInvoiceRequestInv
337
208
  */
338
209
  listdt?: string;
339
210
  /**
340
- * Phương thức chuyển dữ liệu hóa đơn điện tử đến quan thuế: - `sendtype`: 1 - Chuyển đầy đủ nội dung từng hóa đơn - `sendtype`: 2 - Chuyển bảng tổng hợp. Bắt buộc nếu hóa đơn gom bảng tổng hợp - `sendtype`: để trống - Hệ thống tự sinh theo hình thức gửi hóa đơn của dải ký hiệu hóa đơn (itype)
211
+ * Phương thức chuyển dữ liệu hóa đơn điện tử đến quan thuế:
212
+ * - 1 : Chuyển đầy đủ nội dung từng hóa đơn
213
+ * - 2: Chuyển bảng tổng hợp. Bắt buộc nếu hóa đơn gom bảng tổng hợp
214
+ * - Để trống: Hệ thống tự sinh theo hình thức gửi hóa đơn của dải ký hiệu hóa đơn (serial)
341
215
  * @type {string}
342
- * @memberof FptCreateInvoiceRequestInv
216
+ * @memberof CreateInvoiceRequestInv
343
217
  */
344
218
  sendtype?: string;
345
219
  /**
346
- * Thẻ xác định KHÔNG gửi email: - `notsendmail`: 1 - KHÔNG tự động gửi email khi hóa đơn phát hành có hiệu lực - `notsendmail`: để trống - tự động gửi email khi hóa đơn phát hành có hiệu lực
347
- * @type {string}
348
- * @memberof FptCreateInvoiceRequestInv
220
+ * Thẻ xác định KHÔNG gửi email:
221
+ * - 1: KHÔNG tự động gửi email khi hóa đơn phát hành có hiệu lực
222
+ * - Để trống: tự động gửi email khi hóa đơn phát hành có hiệu lực
223
+ * @type {number}
224
+ * @memberof CreateInvoiceRequestInv
349
225
  */
350
- notsendmail?: string;
226
+ notsendmail?: number;
351
227
  /**
352
- * Xác định đính kèm file (PDF, XML) khi gửi mail: - `sendfile`: 1 - Gửi mail có đính kèm file - `sendfile`: KHÔNG có thẻ sendfile - mặc định gửi mail không đính kèm file
353
- * @type {string}
354
- * @memberof FptCreateInvoiceRequestInv
228
+ * Xác định đính kèm file (PDF, XML) khi gửi mail:
229
+ * - 1: Gửi mail có đính kèm file
230
+ * - Không có thẻ sendfile: mặc định gửi mail không đính kèm file
231
+ * @type {number}
232
+ * @memberof CreateInvoiceRequestInv
355
233
  */
356
- sendfile?: string;
234
+ sendfile?: number;
357
235
  /**
358
- * Mã tra cứu hóa đơn: - `sec`: có thông tin - hệ thống nhận và không tự động sinh - `sec`: KHÔNG có thông tin - hệ thống tự sinh mã theo nguyên tắc của hệ thống
236
+ * Mã tra cứu hóa đơn:
237
+ * - Nếu truyền thông tin Mã tra cứu, hệ thống nhận và không tự động sinh
238
+ * - Nếu không truyền sec, hệ thống tự động sinh mã theo nguyên tắc của hệ thống
359
239
  * @type {string}
360
- * @memberof FptCreateInvoiceRequestInv
240
+ * @memberof CreateInvoiceRequestInv
361
241
  */
362
242
  sec?: string;
363
243
  /**
364
244
  * Mã số thuế người bán
365
245
  * @type {string}
366
- * @memberof FptCreateInvoiceRequestInv
246
+ * @memberof CreateInvoiceRequestInv
367
247
  */
368
- stax?: string;
248
+ stax: string;
249
+ /**
250
+ * Loại hóa đơn
251
+ * @type {string}
252
+ * @memberof CreateInvoiceRequestInv
253
+ */
254
+ type?: string;
369
255
  /**
370
256
  *
371
- * @type {Array<FptCreateInvoiceRequestInvAllOfItemsInner>}
372
- * @memberof FptCreateInvoiceRequestInv
257
+ * @type {Array<CreateInvoiceItem>}
258
+ * @memberof CreateInvoiceRequestInv
373
259
  */
374
- items: Array<FptCreateInvoiceRequestInvAllOfItemsInner>;
260
+ items: Array<CreateInvoiceItem>;
375
261
  }
376
262
  /**
377
263
  *
378
264
  * @export
379
- * @interface FptCreateInvoiceRequestInvAllOfItemsInner
265
+ * @interface CreateInvoiceItem
380
266
  */
381
- export interface FptCreateInvoiceRequestInvAllOfItemsInner {
267
+ export interface CreateInvoiceItem {
382
268
  /**
383
269
  * Số thứ tự dòng hàng hóa
384
270
  * @type {number}
385
- * @memberof FptCreateInvoiceRequestInvAllOfItemsInner
271
+ * @memberof CreateInvoiceItem
386
272
  */
387
273
  line: number;
388
274
  /**
389
- * Tính chất hàng hóa: - `type`: 1 - Hàng hóa dịch vụ - `type`: 2 - Khuyến mãi - `type`: 3 - Chiết khấu thương mại - `type`: 4 - Ghi chú diễn giải
275
+ * Tính chất hàng hóa:
276
+ * - 1: Hàng hóa dịch vụ ( giá trị tchat là 1)
277
+ * - 2: Khuyến mại (giá trị tchat là 2)
278
+ * - 3: Chiết khấu thương mại (giá trị tchat là 3)
279
+ * - 4: Ghi chú/ diễn giải (giá trị tchat là 4)
390
280
  * @type {number}
391
- * @memberof FptCreateInvoiceRequestInvAllOfItemsInner
281
+ * @memberof CreateInvoiceItem
392
282
  */
393
283
  type: number;
394
284
  /**
395
285
  * Mã hàng hóa
396
286
  * @type {string}
397
- * @memberof FptCreateInvoiceRequestInvAllOfItemsInner
287
+ * @memberof CreateInvoiceItem
398
288
  */
399
289
  code: string;
400
290
  /**
401
- * tả hàng hóa, dịch vụ
291
+ * Tên hàng hóa
402
292
  * @type {string}
403
- * @memberof FptCreateInvoiceRequestInvAllOfItemsInner
293
+ * @memberof CreateInvoiceItem
404
294
  */
405
295
  name: string;
406
296
  /**
407
297
  * Đơn vị tính hàng hóa
408
298
  * @type {string}
409
- * @memberof FptCreateInvoiceRequestInvAllOfItemsInner
299
+ * @memberof CreateInvoiceItem
410
300
  */
411
301
  unit: string;
412
302
  /**
413
303
  * Số lượng
414
304
  * @type {number}
415
- * @memberof FptCreateInvoiceRequestInvAllOfItemsInner
305
+ * @memberof CreateInvoiceItem
416
306
  */
417
307
  quantity: number;
418
308
  /**
419
309
  * Đơn giá hàng hóa
420
310
  * @type {number}
421
- * @memberof FptCreateInvoiceRequestInvAllOfItemsInner
311
+ * @memberof CreateInvoiceItem
422
312
  */
423
313
  price: number;
424
314
  /**
425
315
  * Tỷ lệ % chiết khấu
426
316
  * @type {number}
427
- * @memberof FptCreateInvoiceRequestInvAllOfItemsInner
317
+ * @memberof CreateInvoiceItem
428
318
  */
429
319
  perdiscount: number;
430
320
  /**
431
321
  * Số tiền chiết khấu
432
322
  * @type {number}
433
- * @memberof FptCreateInvoiceRequestInvAllOfItemsInner
323
+ * @memberof CreateInvoiceItem
434
324
  */
435
325
  amtdiscount: number;
436
326
  /**
437
327
  * Thành tiền từng dòng hàng hóa dịch vụ
438
328
  * @type {number}
439
- * @memberof FptCreateInvoiceRequestInvAllOfItemsInner
329
+ * @memberof CreateInvoiceItem
440
330
  */
441
331
  amount: number;
442
332
  /**
443
- * Loại thuế suất: (0, 5, 8, 10, -1, -2) - `0`: thuế xuất 0% - `5`: thuế xuất 5% - `8`: thuế xuất 8% - `10`: thuế xuất 10% - `-1`: không chịu thuế - `-2`: không kê khai nộp thuế Khác 6 loại thuế suất trên: thuế xuất khác
333
+ * Thành tiền sau chiết khấu (= amount - amtdiscount)
334
+ * @type {number}
335
+ * @memberof CreateInvoiceItem
336
+ */
337
+ amountn?: number;
338
+ /**
339
+ * Loại thuế suất : ( 0, 5, 8, 10, -1, -2)
340
+ * + 0: thuế suất 0%
341
+ * + 5: thuế suất 5%
342
+ * + 8: thuế suất 8%
343
+ * + 10: thuế suất 10%
344
+ * + -1: Không chịu thuế
345
+ * + -2: Không kê khai nộp thuế
346
+ * Khác 6 loại thuế suất trên: thuế suất Khác
444
347
  * @type {string}
445
- * @memberof FptCreateInvoiceRequestInvAllOfItemsInner
348
+ * @memberof CreateInvoiceItem
446
349
  */
447
350
  vrt: string;
448
351
  /**
449
352
  * Số tiền VAT từng hàng hóa
450
353
  * @type {number}
451
- * @memberof FptCreateInvoiceRequestInvAllOfItemsInner
354
+ * @memberof CreateInvoiceItem
452
355
  */
453
356
  vat?: number;
454
357
  /**
455
358
  * Tổng tiền bao gồm VAT từng hàng hóa
456
359
  * @type {number}
457
- * @memberof FptCreateInvoiceRequestInvAllOfItemsInner
360
+ * @memberof CreateInvoiceItem
458
361
  */
459
362
  total?: number;
460
363
  /**
461
364
  * Đơn giá hàng hóa quy đổi VND
462
365
  * @type {number}
463
- * @memberof FptCreateInvoiceRequestInvAllOfItemsInner
366
+ * @memberof CreateInvoiceItem
464
367
  */
465
368
  pricev?: number;
466
369
  /**
467
370
  * Thành tiền từng dòng hàng hóa quy đổi VND
468
371
  * @type {number}
469
- * @memberof FptCreateInvoiceRequestInvAllOfItemsInner
372
+ * @memberof CreateInvoiceItem
470
373
  */
471
374
  amountv?: number;
472
375
  /**
473
376
  * Số tiền VAT từng dòng hàng hóa quy đổi VND
474
377
  * @type {number}
475
- * @memberof FptCreateInvoiceRequestInvAllOfItemsInner
378
+ * @memberof CreateInvoiceItem
476
379
  */
477
380
  vatv?: number;
478
381
  /**
479
382
  * Tổng tiền bao gồm VAT từng dòng hàng hóa quy đổi
480
383
  * @type {number}
481
- * @memberof FptCreateInvoiceRequestInvAllOfItemsInner
384
+ * @memberof CreateInvoiceItem
482
385
  */
483
386
  totalv?: number;
484
387
  }
485
388
  /**
486
389
  *
487
390
  * @export
488
- * @interface FptSignContractRequest
489
- */
490
- export interface FptSignContractRequest {
491
- /**
492
- * Mã hóa đơn (lấy từ field id lúc create invoice)
493
- * @type {string}
494
- * @memberof FptSignContractRequest
495
- */
496
- id: string;
497
- /**
498
- *
499
- * @type {FptSignContractRequestInv}
500
- * @memberof FptSignContractRequest
501
- */
502
- inv: FptSignContractRequestInv;
503
- }
504
- /**
505
- *
506
- * @export
507
- * @interface FptSignContractRequestInv
391
+ * @interface CreateInvoiceSuccess
508
392
  */
509
- export interface FptSignContractRequestInv {
510
- /**
511
- * Sid hóa đơn. Bắt buộc nếu không truyền form-serial-seq
512
- * @type {string}
513
- * @memberof FptSignContractRequestInv
514
- */
515
- sid?: string;
393
+ export interface CreateInvoiceSuccess {
516
394
  /**
517
- * hiệu hóa đơn. Bắt buộc nếu không truyền sid
395
+ * định danh của hóa đơn vừa tạo
518
396
  * @type {string}
519
- * @memberof FptSignContractRequestInv
520
- */
521
- serial?: string;
522
- /**
523
- * Số thứ tự hóa đơn. Bắt buộc nếu không truyền sid
524
- * @type {number}
525
- * @memberof FptSignContractRequestInv
397
+ * @memberof CreateInvoiceSuccess
526
398
  */
527
- seq?: number;
399
+ invoiceId?: string;
528
400
  /**
529
- * số thuế bên bán
401
+ * Trạng thái của yêu cầu tạo hóa đơn
530
402
  * @type {string}
531
- * @memberof FptSignContractRequestInv
532
- */
533
- stax: string;
534
- /**
535
- * Thẻ xác định KHÔNG gửi email khi phát hành có hiệu lực
536
- * @type {number}
537
- * @memberof FptSignContractRequestInv
538
- */
539
- notsendmail?: number;
540
- /**
541
- * Xác định đính kèm file khi gửi mail
542
- * @type {number}
543
- * @memberof FptSignContractRequestInv
403
+ * @memberof CreateInvoiceSuccess
544
404
  */
545
- sendfile?: number;
405
+ status?: string;
546
406
  }
547
407
  /**
548
408
  *
@@ -685,228 +545,86 @@ export interface GetInvoicesSuccess {
685
545
  /**
686
546
  *
687
547
  * @export
688
- * @interface InvObject
548
+ * @interface SignContractError
689
549
  */
690
- export interface InvObject {
691
- /**
692
- * Ký hiệu hóa đơn đăng ký trên thông báo phát hành
693
- * @type {string}
694
- * @memberof InvObject
695
- */
696
- itype: string;
697
- /**
698
- * Ngày tạo hóa đơn yyyy-MM-dd
699
- * @type {string}
700
- * @memberof InvObject
701
- */
702
- invoice_date: string;
703
- /**
704
- * Đơn vị tiền tệ \"VND\", \"USD\"
705
- * @type {string}
706
- * @memberof InvObject
707
- */
708
- currency: string;
709
- /**
710
- * Tỷ giá
711
- * @type {number}
712
- * @memberof InvObject
713
- */
714
- ex_rate: number;
715
- /**
716
- * Tên người mua
717
- * @type {string}
718
- * @memberof InvObject
719
- */
720
- buyer_name: string;
721
- /**
722
- * Tên đơn vị mua
723
- * @type {string}
724
- * @memberof InvObject
725
- */
726
- buyer_legal_name: string;
727
- /**
728
- * Mã số thuế người mua
729
- * @type {string}
730
- * @memberof InvObject
731
- */
732
- buyer_tax?: string;
733
- /**
734
- * Địa chỉ người mua
735
- * @type {string}
736
- * @memberof InvObject
737
- */
738
- buyer_address: string;
739
- /**
740
- * Email người mua
741
- * @type {string}
742
- * @memberof InvObject
743
- */
744
- buyer_email?: string;
745
- /**
746
- * Số tài khoản người mua
747
- * @type {string}
748
- * @memberof InvObject
749
- */
750
- buyer_bank_account?: string;
751
- /**
752
- * Ngân hàng người mua
753
- * @type {string}
754
- * @memberof InvObject
755
- */
756
- buyer_bank_name?: string;
550
+ export interface SignContractError {
757
551
  /**
758
- * Hình thức thanh toán TM/CK
552
+ * Thông báo lỗi khi ký hợp đồng
759
553
  * @type {string}
760
- * @memberof InvObject
761
- */
762
- payment_method?: string;
763
- /**
764
- * Tiền chiết khấu (đã gồm thuế)
765
- * @type {number}
766
- * @memberof InvObject
767
- */
768
- discount?: number;
769
- /**
770
- * Tổng tiền chưa thuế (đã quy đổi VNĐ)
771
- * @type {number}
772
- * @memberof InvObject
773
- */
774
- sum_v?: number;
775
- /**
776
- * Tổng tiền thuế (đã quy đổi VNĐ)
777
- * @type {number}
778
- * @memberof InvObject
779
- */
780
- vat_v?: number;
781
- /**
782
- * Thành tiền sau thuế bằng số (VNĐ)
783
- * @type {number}
784
- * @memberof InvObject
554
+ * @memberof SignContractError
785
555
  */
786
- total_v?: number;
556
+ error?: string;
557
+ }
558
+ /**
559
+ *
560
+ * @export
561
+ * @interface SignContractRequest
562
+ */
563
+ export interface SignContractRequest {
787
564
  /**
788
- * Số đơn hàng
565
+ * hóa đơn (lấy từ field id lúc create invoice)
566
+ * - M-Invoice: Mã hóa đơn (lấy từ field hoadon68_id lúc create invoice)
567
+ * - sid hóa đơn, bắt buộc nếu không truyền form-serial-seq
789
568
  * @type {string}
790
- * @memberof InvObject
569
+ * @memberof SignContractRequest
791
570
  */
792
- seq?: string;
571
+ id: string;
793
572
  /**
794
- * Mã đơn hàng. Không được phép trùng
795
- * @type {string}
796
- * @memberof InvObject
573
+ *
574
+ * @type {SignContractRequestInv}
575
+ * @memberof SignContractRequest
797
576
  */
798
- sid?: string;
577
+ inv?: SignContractRequestInv;
799
578
  }
800
579
  /**
801
580
  *
802
581
  * @export
803
- * @interface ItemObject
582
+ * @interface SignContractRequestInv
804
583
  */
805
- export interface ItemObject {
806
- /**
807
- * Số thứ tự dòng hàng hóa
808
- * @type {number}
809
- * @memberof ItemObject
810
- */
811
- line: number;
584
+ export interface SignContractRequestInv {
812
585
  /**
813
- * Tính chất hàng hóa: - `type`: 1 - Hàng hóa dịch vụ - `type`: 2 - Khuyến mãi - `type`: 3 - Chiết khấu thương mại - `type`: 4 - Ghi chú diễn giải
814
- * @type {number}
815
- * @memberof ItemObject
816
- */
817
- type: number;
818
- /**
819
- * Mã hàng hóa
820
- * @type {string}
821
- * @memberof ItemObject
822
- */
823
- code: string;
824
- /**
825
- * Mô tả hàng hóa, dịch vụ
586
+ * Sid hóa đơn. Bắt buộc nếu không truyền form-serial-seq
587
+ * - M-Invoice -> hoadon68_id
588
+ * - FPT -> inv.sid
826
589
  * @type {string}
827
- * @memberof ItemObject
590
+ * @memberof SignContractRequestInv
828
591
  */
829
- name: string;
592
+ sid?: string;
830
593
  /**
831
- * Đơn vị tính hàng hóa
594
+ * hiệu hóa đơn. Bắt buộc nếu không truyền sid
595
+ * FPT Only
832
596
  * @type {string}
833
- * @memberof ItemObject
597
+ * @memberof SignContractRequestInv
834
598
  */
835
- unit: string;
836
- /**
837
- * Số lượng
838
- * @type {number}
839
- * @memberof ItemObject
840
- */
841
- quantity: number;
842
- /**
843
- * Đơn giá hàng hóa
844
- * @type {number}
845
- * @memberof ItemObject
846
- */
847
- price: number;
599
+ serial?: string;
848
600
  /**
849
- * Tỷ lệ % chiết khấu
601
+ * Số hóa đơn. Bắt buộc nếu không truyền sid
850
602
  * @type {number}
851
- * @memberof ItemObject
603
+ * @memberof SignContractRequestInv
852
604
  */
853
- perdiscount: number;
854
- /**
855
- * Số tiền chiết khấu
856
- * @type {number}
857
- * @memberof ItemObject
858
- */
859
- amtdiscount: number;
860
- /**
861
- * Thành tiền từng dòng hàng hóa dịch vụ
862
- * @type {number}
863
- * @memberof ItemObject
864
- */
865
- amount: number;
605
+ seq?: number;
866
606
  /**
867
- * Loại thuế suất: (0, 5, 8, 10, -1, -2) - `0`: thuế xuất 0% - `5`: thuế xuất 5% - `8`: thuế xuất 8% - `10`: thuế xuất 10% - `-1`: không chịu thuế - `-2`: không kê khai nộp thuế Khác 6 loại thuế suất trên: thuế xuất khác
607
+ * số thuế bên bán
868
608
  * @type {string}
869
- * @memberof ItemObject
609
+ * @memberof SignContractRequestInv
870
610
  */
871
- vrt: string;
611
+ stax: string;
872
612
  /**
873
- * Tổng tiền thuế nguyên tệ
613
+ * Thẻ xác định KHÔNG gửi email:
614
+ * - 1: KHÔNG tự động gửi email khi hóa đơn phát hành có hiệu lực
615
+ * - Để trống: tự động gửi email khi hóa đơn phát hành có hiệu lực
874
616
  * @type {number}
875
- * @memberof ItemObject
617
+ * @memberof SignContractRequestInv
876
618
  */
877
- vat?: number;
619
+ notsendmail?: number;
878
620
  /**
879
- * Tổng tiền thanh toán bao gồm tiền thuế, nguyên tệ
621
+ * Xác định đính kèm file (PDF, XML) khi gửi mail:
622
+ * - 1: Gửi mail có đính kèm file
623
+ * - Không có thẻ sendfile: mặc định gửi mail không đính kèm file
880
624
  * @type {number}
881
- * @memberof ItemObject
882
- */
883
- total?: number;
884
- }
885
- /**
886
- *
887
- * @export
888
- * @interface SignContractError
889
- */
890
- export interface SignContractError {
891
- /**
892
- * Thông báo lỗi khi ký hợp đồng
893
- * @type {string}
894
- * @memberof SignContractError
895
- */
896
- error?: string;
897
- }
898
- /**
899
- *
900
- * @export
901
- * @interface SignContractRequest
902
- */
903
- export interface SignContractRequest {
904
- /**
905
- * Mã hóa đơn (lấy từ field id lúc create invoice)
906
- * @type {string}
907
- * @memberof SignContractRequest
625
+ * @memberof SignContractRequestInv
908
626
  */
909
- id: string;
627
+ sendfile?: number;
910
628
  }
911
629
  /**
912
630
  *
@@ -1305,7 +1023,7 @@ export declare const DefaultApiAxiosParamCreator: (configuration?: Configuration
1305
1023
  * @param {*} [options] Override http request option.
1306
1024
  * @throws {RequiredError}
1307
1025
  */
1308
- createInvoice: (createInvoiceRequest: FptCreateInvoiceRequest | mInvoiceCreateInvoiceRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
1026
+ createInvoice: (createInvoiceRequest: CreateInvoiceRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
1309
1027
  /**
1310
1028
  * Lấy thông tin chi tiết của một hóa đơn dựa trên ID hóa đơn.
1311
1029
  * @summary API lấy thông tin hóa đơn
@@ -1331,11 +1049,11 @@ export declare const DefaultApiAxiosParamCreator: (configuration?: Configuration
1331
1049
  /**
1332
1050
  * Ký hợp đồng điện tử với thông tin hợp đồng được cung cấp.
1333
1051
  * @summary API ký hóa đơn
1334
- * @param {FptSignContractRequest} fptSignContractRequest
1052
+ * @param {SignContractRequest} signContractRequest
1335
1053
  * @param {*} [options] Override http request option.
1336
1054
  * @throws {RequiredError}
1337
1055
  */
1338
- signContract: (signContractRequest: FptSignContractRequest | SignContractRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
1056
+ signContract: (signContractRequest: SignContractRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
1339
1057
  /**
1340
1058
  * Đăng nhập vào hệ thống với thông tin tài khoản người dùng.
1341
1059
  * @summary API đăng nhập
@@ -1413,13 +1131,13 @@ export declare const DefaultApiAxiosParamCreator: (configuration?: Configuration
1413
1131
  */
1414
1132
  export declare const DefaultApiFp: (configuration?: Configuration) => {
1415
1133
  /**
1416
- * Tạo một hóa đơn mới theo định dạng FPT dựa trên thông tin được cung cấp.
1417
- * @summary FPT
1134
+ * Tạo một hóa đơn mới theo định dạng dựa trên thông tin được cung cấp.
1135
+ * @summary Create invoice
1418
1136
  * @param {CreateInvoiceRequest} createInvoiceRequest
1419
1137
  * @param {*} [options] Override http request option.
1420
1138
  * @throws {RequiredError}
1421
1139
  */
1422
- createInvoice(createInvoiceRequest: FptCreateInvoiceRequest | mInvoiceCreateInvoiceRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateInvoiceSuccess>>;
1140
+ createInvoice(createInvoiceRequest: CreateInvoiceRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateInvoiceSuccess>>;
1423
1141
  /**
1424
1142
  * Lấy thông tin chi tiết của một hóa đơn dựa trên ID hóa đơn.
1425
1143
  * @summary API lấy thông tin hóa đơn
@@ -1445,11 +1163,11 @@ export declare const DefaultApiFp: (configuration?: Configuration) => {
1445
1163
  /**
1446
1164
  * Ký hợp đồng điện tử với thông tin hợp đồng được cung cấp.
1447
1165
  * @summary API ký hóa đơn
1448
- * @param {FptSignContractRequest} fptSignContractRequest
1166
+ * @param {SignContractRequest} signContractRequest
1449
1167
  * @param {*} [options] Override http request option.
1450
1168
  * @throws {RequiredError}
1451
1169
  */
1452
- signContract(signContractRequest: FptSignContractRequest | SignContractRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SignContractResponse>>;
1170
+ signContract(signContractRequest: SignContractRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SignContractResponse>>;
1453
1171
  /**
1454
1172
  * Đăng nhập vào hệ thống với thông tin tài khoản người dùng.
1455
1173
  * @summary API đăng nhập
@@ -1515,7 +1233,7 @@ export declare const DefaultApiFp: (configuration?: Configuration) => {
1515
1233
  /**
1516
1234
  * Check customer declaration status with filtering options.
1517
1235
  * @summary API check customer declaration status
1518
- * @param {number} [invType]
1236
+ * @param {number} invType
1519
1237
  * @param {*} [options] Override http request option.
1520
1238
  * @throws {RequiredError}
1521
1239
  */
@@ -1529,14 +1247,14 @@ export declare const DefaultApiFp: (configuration?: Configuration) => {
1529
1247
  */
1530
1248
  export declare class DefaultApi extends BaseAPI {
1531
1249
  /**
1532
- * Tạo một hóa đơn mới theo định dạng FPT dựa trên thông tin được cung cấp.
1533
- * @summary FPT
1250
+ * Tạo một hóa đơn mới theo định dạng dựa trên thông tin được cung cấp.
1251
+ * @summary Create invoice
1534
1252
  * @param {CreateInvoiceRequest} createInvoiceRequest
1535
1253
  * @param {*} [options] Override http request option.
1536
1254
  * @throws {RequiredError}
1537
1255
  * @memberof DefaultApi
1538
1256
  */
1539
- createInvoice(createInvoiceRequest: FptCreateInvoiceRequest | mInvoiceCreateInvoiceRequest, options?: RawAxiosRequestConfig): Promise<import('axios').AxiosResponse<CreateInvoiceSuccess, any>>;
1257
+ createInvoice(createInvoiceRequest: CreateInvoiceRequest, options?: RawAxiosRequestConfig): Promise<import('axios').AxiosResponse<CreateInvoiceSuccess, any>>;
1540
1258
  /**
1541
1259
  * Lấy thông tin chi tiết của một hóa đơn dựa trên ID hóa đơn.
1542
1260
  * @summary API lấy thông tin hóa đơn
@@ -1569,7 +1287,7 @@ export declare class DefaultApi extends BaseAPI {
1569
1287
  * @throws {RequiredError}
1570
1288
  * @memberof DefaultApi
1571
1289
  */
1572
- signContract(signContractRequest: FptSignContractRequest | SignContractRequest, options?: RawAxiosRequestConfig): Promise<import('axios').AxiosResponse<SignContractResponse, any>>;
1290
+ signContract(signContractRequest: SignContractRequest, options?: RawAxiosRequestConfig): Promise<import('axios').AxiosResponse<SignContractResponse, any>>;
1573
1291
  /**
1574
1292
  * Đăng nhập vào hệ thống với thông tin tài khoản người dùng.
1575
1293
  * @summary API đăng nhập
@@ -1659,7 +1377,7 @@ export declare const InvoiceApi: (configuration?: Configuration, basePath?: stri
1659
1377
  * @param {any} data - Invoice request data
1660
1378
  * @param {*} [options] - Override http request option.
1661
1379
  */
1662
- createInvoice(data: mInvoiceCreateInvoiceRequest | FptCreateInvoiceRequest, options?: RawAxiosRequestConfig): Promise<import('axios').AxiosResponse<CreateInvoiceSuccess, any>>;
1380
+ createInvoice(data: CreateInvoiceRequest, options?: RawAxiosRequestConfig): Promise<import('axios').AxiosResponse<CreateInvoiceSuccess, any>>;
1663
1381
  /**
1664
1382
  * Get Invoice (Unified)
1665
1383
  */
@@ -1681,7 +1399,7 @@ export declare const InvoiceApi: (configuration?: Configuration, basePath?: stri
1681
1399
  /**
1682
1400
  * Sign Contract (Unified)
1683
1401
  */
1684
- signContract(data: SignContractRequest | FptSignContractRequest, options?: RawAxiosRequestConfig): Promise<import('axios').AxiosResponse<SignContractResponse, any>>;
1402
+ signContract(data: SignContractRequest, options?: RawAxiosRequestConfig): Promise<import('axios').AxiosResponse<SignContractResponse, any>>;
1685
1403
  /**
1686
1404
  * Sign In (Unified)
1687
1405
  */