@openbox/shared-types 0.4.90 → 0.4.92

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,18 @@ 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
+ descuNoSuj: number;
32
+ descuExenta: number;
33
+ descuGravada: number;
34
+ descuNoSujToShow: number;
35
+ descuExentaToShow: number;
36
+ descuGravadaToShow: number;
37
+ };
25
38
  export type InvoicesCalculationsTotalsItem = {
26
39
  id: string;
27
40
  name: string;
@@ -45,10 +58,11 @@ export interface InvoicesCalculationsTotalsResponse {
45
58
  ivaRete1: InvoicesCalculationsTotalsItem;
46
59
  reteRenta: InvoicesCalculationsTotalsItem;
47
60
  montoTotalOperacion: InvoicesCalculationsTotalsItem;
48
- totalPagar: InvoicesCalculationsTotalsItem;
49
61
  totalIva: InvoicesCalculationsTotalsItem;
62
+ totalPagar: InvoicesCalculationsTotalsItem;
50
63
  }
51
64
  export type InvoicesCalculationsCalculateSingleResponse = {
52
65
  details: InvoicesCalculationsDetailsResponse[];
66
+ discounts: InvoicesCalculationsDiscountsResponse[];
53
67
  totals: InvoicesCalculationsTotalsResponse;
54
68
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openbox/shared-types",
3
- "version": "0.4.90",
3
+ "version": "0.4.92",
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,24 @@ 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
+ // returns the calculated information
41
+ descuNoSuj: number
42
+ descuExenta: number
43
+ descuGravada: number
44
+
45
+ // Returns values to show in discounts table
46
+ descuNoSujToShow: number
47
+ descuExentaToShow: number
48
+ descuGravadaToShow: number
49
+ }
50
+
31
51
  export type InvoicesCalculationsTotalsItem = {
32
52
  id: string
33
53
  name: string
@@ -66,15 +86,16 @@ export interface InvoicesCalculationsTotalsResponse {
66
86
  totalDescu: InvoicesCalculationsTotalsItem
67
87
 
68
88
  // Totales con impuestos
69
- subTotal: InvoicesCalculationsTotalsItem
70
- ivaRete1: InvoicesCalculationsTotalsItem
89
+ subTotal: InvoicesCalculationsTotalsItem // subtotal
90
+ ivaRete1: InvoicesCalculationsTotalsItem // ivaRetenido
71
91
  reteRenta: InvoicesCalculationsTotalsItem
72
92
  montoTotalOperacion: InvoicesCalculationsTotalsItem
73
- totalPagar: InvoicesCalculationsTotalsItem
74
93
  totalIva: InvoicesCalculationsTotalsItem // iva
94
+ totalPagar: InvoicesCalculationsTotalsItem // ventaTotal
75
95
  }
76
96
 
77
97
  export type InvoicesCalculationsCalculateSingleResponse = {
78
98
  details: InvoicesCalculationsDetailsResponse[]
99
+ discounts: InvoicesCalculationsDiscountsResponse[]
79
100
  totals: InvoicesCalculationsTotalsResponse
80
101
  }