@openbox/shared-types 0.5.30 → 0.5.32

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.
@@ -1,3 +1,4 @@
1
+ import { InvoicesDiscountsTypesKeys } from '../../invoices.enums';
1
2
  export type InvoicesCreateSingleHeader = {
2
3
  document?: string;
3
4
  documentType: number;
@@ -16,12 +17,17 @@ export type InvoicesCreateSingleTotals = {
16
17
  totalIva: number;
17
18
  subTotal: number;
18
19
  ivaRete1: number;
19
- ivaPercibido: number;
20
- renta5: number;
21
- renta10: number;
20
+ ivaPercibido?: number;
21
+ renta5?: number;
22
+ renta10?: number;
22
23
  totalExenta: number;
23
24
  totalNoSuj: number;
24
25
  totalPagar: number;
26
+ descuExenta?: number;
27
+ descuGravada?: number;
28
+ descuNoSuj?: number;
29
+ totalDescu?: number;
30
+ porcentajeDescuento?: number;
25
31
  };
26
32
  export type InvoicesCreateSingleDetail = {
27
33
  service: string;
@@ -42,8 +48,15 @@ export type InvoicesCreateSingleDetail = {
42
48
  rentaPrice10?: number;
43
49
  sellingType: number;
44
50
  };
51
+ export type InvoicesCreateSingleDiscounts = {
52
+ id?: string;
53
+ type: InvoicesDiscountsTypesKeys;
54
+ quantity: number;
55
+ description: string;
56
+ };
45
57
  export type InvoicesCreateSingleRequest = {
46
58
  header: InvoicesCreateSingleHeader;
47
59
  totals: InvoicesCreateSingleTotals;
48
60
  details: InvoicesCreateSingleDetail[];
61
+ discounts: InvoicesCreateSingleDiscounts[] | null;
49
62
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openbox/shared-types",
3
- "version": "0.5.30",
3
+ "version": "0.5.32",
4
4
  "description": "Shared Types for Openbox Cloud. ",
5
5
  "types": "lib/index.d.js",
6
6
  "main": "lib/index.js",
@@ -22,7 +22,7 @@
22
22
  "format:write": "yarn format --write"
23
23
  },
24
24
  "devDependencies": {
25
- "@openbox/shared-types": "^0.4.7",
25
+ "@openbox/shared-types": "^0.5.30",
26
26
  "@types/node": "^20.1.5",
27
27
  "@typescript-eslint/eslint-plugin": "^5.46.1",
28
28
  "@typescript-eslint/parser": "^5.46.1",
@@ -1,3 +1,5 @@
1
+ import { InvoicesDiscountsTypesKeys } from '../../invoices.enums'
2
+
1
3
  export type InvoicesCreateSingleHeader = {
2
4
  document?: string
3
5
  documentType: number
@@ -17,12 +19,17 @@ export type InvoicesCreateSingleTotals = {
17
19
  totalIva: number // previously iva
18
20
  subTotal: number // previously subtotal
19
21
  ivaRete1: number // previously ivaRetenido
20
- ivaPercibido: number
21
- renta5: number
22
- renta10: number
22
+ ivaPercibido?: number
23
+ renta5?: number
24
+ renta10?: number
23
25
  totalExenta: number // previously ventasExentas
24
26
  totalNoSuj: number // previously ventasNoSujetas
25
27
  totalPagar: number // previously ventaTotal
28
+ descuExenta?: number
29
+ descuGravada?: number
30
+ descuNoSuj?: number
31
+ totalDescu?: number
32
+ porcentajeDescuento?: number
26
33
  }
27
34
 
28
35
  export type InvoicesCreateSingleDetail = {
@@ -48,8 +55,16 @@ export type InvoicesCreateSingleDetail = {
48
55
  sellingType: number
49
56
  }
50
57
 
58
+ export type InvoicesCreateSingleDiscounts = {
59
+ id?: string
60
+ type: InvoicesDiscountsTypesKeys
61
+ quantity: number
62
+ description: string
63
+ }
64
+
51
65
  export type InvoicesCreateSingleRequest = {
52
66
  header: InvoicesCreateSingleHeader
53
67
  totals: InvoicesCreateSingleTotals
54
68
  details: InvoicesCreateSingleDetail[]
69
+ discounts: InvoicesCreateSingleDiscounts[] | null
55
70
  }