@openbox/shared-types 0.4.89 → 0.4.91

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 InvoicesCalculationsDetailsResponse = {
2
3
  id?: string;
3
4
  service: string;
@@ -22,6 +23,12 @@ export type InvoicesCalculationsDetailsResponse = {
22
23
  vNoSujetaToShow: number;
23
24
  vGravadaToShow: number;
24
25
  };
26
+ export type InvoicesCalculationsDiscountsResponse = {
27
+ id?: string;
28
+ type: InvoicesDiscountsTypesKeys;
29
+ quantity: number;
30
+ description: string;
31
+ };
25
32
  export type InvoicesCalculationsTotalsItem = {
26
33
  id: string;
27
34
  name: string;
@@ -29,6 +36,7 @@ export type InvoicesCalculationsTotalsItem = {
29
36
  amount: number;
30
37
  style?: string[];
31
38
  show: true | false;
39
+ type?: 'currency' | 'percentage';
32
40
  };
33
41
  export interface InvoicesCalculationsTotalsResponse {
34
42
  totalNoSuj: InvoicesCalculationsTotalsItem;
@@ -44,10 +52,11 @@ export interface InvoicesCalculationsTotalsResponse {
44
52
  ivaRete1: InvoicesCalculationsTotalsItem;
45
53
  reteRenta: InvoicesCalculationsTotalsItem;
46
54
  montoTotalOperacion: InvoicesCalculationsTotalsItem;
47
- totalPagar: InvoicesCalculationsTotalsItem;
48
55
  totalIva: InvoicesCalculationsTotalsItem;
56
+ totalPagar: InvoicesCalculationsTotalsItem;
49
57
  }
50
58
  export type InvoicesCalculationsCalculateSingleResponse = {
51
59
  details: InvoicesCalculationsDetailsResponse[];
60
+ discounts: InvoicesCalculationsDiscountsResponse[];
52
61
  totals: InvoicesCalculationsTotalsResponse;
53
62
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openbox/shared-types",
3
- "version": "0.4.89",
3
+ "version": "0.4.91",
4
4
  "description": "Shared Types for Openbox Cloud. ",
5
5
  "types": "lib/index.d.js",
6
6
  "main": "lib/index.js",
@@ -1,3 +1,5 @@
1
+ import { InvoicesDiscountsTypesKeys } from '../../invoices.enums'
2
+
1
3
  export type InvoicesCalculationsDetailsResponse = {
2
4
  // Returns the same information received
3
5
  id?: string
@@ -28,6 +30,14 @@ export type InvoicesCalculationsDetailsResponse = {
28
30
  vGravadaToShow: number
29
31
  }
30
32
 
33
+ export type InvoicesCalculationsDiscountsResponse = {
34
+ // Returns the same information received
35
+ id?: string
36
+ type: InvoicesDiscountsTypesKeys
37
+ quantity: number
38
+ description: string
39
+ }
40
+
31
41
  export type InvoicesCalculationsTotalsItem = {
32
42
  id: string
33
43
  name: string
@@ -35,6 +45,7 @@ export type InvoicesCalculationsTotalsItem = {
35
45
  amount: number
36
46
  style?: string[]
37
47
  show: true | false
48
+ type?: 'currency' | 'percentage'
38
49
  }
39
50
 
40
51
  // export type InvoicesCalculationsTotalsResponse = {
@@ -65,15 +76,16 @@ export interface InvoicesCalculationsTotalsResponse {
65
76
  totalDescu: InvoicesCalculationsTotalsItem
66
77
 
67
78
  // Totales con impuestos
68
- subTotal: InvoicesCalculationsTotalsItem
69
- ivaRete1: InvoicesCalculationsTotalsItem
79
+ subTotal: InvoicesCalculationsTotalsItem // subtotal
80
+ ivaRete1: InvoicesCalculationsTotalsItem // ivaRetenido
70
81
  reteRenta: InvoicesCalculationsTotalsItem
71
82
  montoTotalOperacion: InvoicesCalculationsTotalsItem
72
- totalPagar: InvoicesCalculationsTotalsItem
73
83
  totalIva: InvoicesCalculationsTotalsItem // iva
84
+ totalPagar: InvoicesCalculationsTotalsItem // ventaTotal
74
85
  }
75
86
 
76
87
  export type InvoicesCalculationsCalculateSingleResponse = {
77
88
  details: InvoicesCalculationsDetailsResponse[]
89
+ discounts: InvoicesCalculationsDiscountsResponse[]
78
90
  totals: InvoicesCalculationsTotalsResponse
79
91
  }