@openbox/shared-types 0.3.12 → 0.3.14

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.
@@ -21,14 +21,27 @@ export type InvoicesCalculationsDetailsResponse = {
21
21
  vNoSujetaToShow: number;
22
22
  vGravadaToShow: number;
23
23
  };
24
- export type InvoicesCalculationsTotalsResponse = {
24
+ export type InvoicesCalculationsTotalsItem = {
25
25
  id: string;
26
26
  name: string;
27
27
  value: number;
28
28
  amount: number;
29
29
  style?: string[];
30
+ show: true | false;
31
+ };
32
+ export type InvoicesCalculationsTotalsResponse = {
33
+ sum: InvoicesCalculationsTotalsItem;
34
+ iva: InvoicesCalculationsTotalsItem;
35
+ subtotal: InvoicesCalculationsTotalsItem;
36
+ ivaRetenido: InvoicesCalculationsTotalsItem;
37
+ ivaPercibido: InvoicesCalculationsTotalsItem;
38
+ renta5: InvoicesCalculationsTotalsItem;
39
+ renta10: InvoicesCalculationsTotalsItem;
40
+ ventasExentas: InvoicesCalculationsTotalsItem;
41
+ ventasNoSujetas: InvoicesCalculationsTotalsItem;
42
+ ventaTotal: InvoicesCalculationsTotalsItem;
30
43
  };
31
- export type InvoicesCalculationCalculateSingleResponse = {
44
+ export type InvoicesCalculationsCalculateSingleResponse = {
32
45
  details: InvoicesCalculationsDetailsResponse[];
33
- totals: InvoicesCalculationsTotalsResponse[];
46
+ totals: InvoicesCalculationsTotalsResponse;
34
47
  };
@@ -1,5 +1,5 @@
1
- import { InvoiceHeaderSection } from '../CreateSingle/Request';
2
- export type InvoicesCreateSingleReservedRequest = Pick<InvoiceHeaderSection, 'document' | 'authorization'> & {
1
+ import { InvoicesCreateSingleHeader } from '../CreateSingle/Request';
2
+ export type InvoicesCreateSingleReservedRequest = Pick<InvoicesCreateSingleHeader, 'document' | 'authorization'> & {
3
3
  sequenceFrom: number;
4
4
  sequenceTo: number;
5
5
  };
@@ -1,44 +1,46 @@
1
- export type InvoiceHeaderSection = {
1
+ export type InvoicesCreateSingleHeader = {
2
+ document: string;
3
+ authorization: string;
4
+ sequence: number;
5
+ invoiceDate: string;
2
6
  customer: string;
3
7
  customerBranch: string;
4
- invoicesSeller: string;
5
8
  invoicesPaymentsCondition: string;
6
- invoiceDate: string;
7
- sequence: number;
8
- document: string;
9
- authorization: string;
9
+ invoicesSeller: string;
10
10
  };
11
- export type InvoiceTotalsSection = {
11
+ export type InvoicesCreateSingleTotals = {
12
12
  sum: number;
13
13
  iva: number;
14
14
  subtotal: number;
15
15
  ivaRetenido: number;
16
+ ivaPercibido: number;
16
17
  renta5: number;
17
18
  renta10: number;
18
- ivaPercibido: number;
19
19
  ventasExentas: number;
20
20
  ventasNoSujetas: number;
21
21
  ventaTotal: number;
22
- ventaTotalText: string;
23
22
  };
24
- export type InvoiceDetailsSection = {
23
+ export type InvoicesCreateSingleDetail = {
24
+ service: string;
25
25
  quantity: number;
26
- unitPrice: number;
27
26
  chargeDescription: string;
27
+ price: number;
28
28
  incIva: boolean;
29
29
  incRenta5: boolean;
30
30
  incRenta10: boolean;
31
- ventaPrice: number;
31
+ unitPrice: number;
32
32
  ivaPrice: number;
33
- renta5Price: number;
34
- renta10Price: number;
33
+ ventaPrice: number;
35
34
  vNoSujeta: number;
36
35
  vExenta: number;
37
36
  vGravada: number;
38
- service: string;
37
+ totalIvaPrice: number;
38
+ rentaPrice5: number;
39
+ rentaPrice10?: number;
40
+ sellingType: number;
39
41
  };
40
42
  export type InvoicesCreateSingleRequest = {
41
- header: InvoiceHeaderSection;
42
- totals: InvoiceTotalsSection;
43
- details: InvoiceDetailsSection[];
43
+ header: InvoicesCreateSingleHeader;
44
+ totals: InvoicesCreateSingleTotals;
45
+ details: InvoicesCreateSingleDetail[];
44
46
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openbox/shared-types",
3
- "version": "0.3.12",
3
+ "version": "0.3.14",
4
4
  "description": "Shared Types for Openbox Cloud. ",
5
5
  "types": "lib/index.d.js",
6
6
  "main": "lib/index.js",
@@ -27,15 +27,29 @@ export type InvoicesCalculationsDetailsResponse = {
27
27
  vGravadaToShow: number
28
28
  }
29
29
 
30
- export type InvoicesCalculationsTotalsResponse = {
30
+ export type InvoicesCalculationsTotalsItem = {
31
31
  id: string
32
32
  name: string
33
33
  value: number
34
34
  amount: number
35
35
  style?: string[]
36
+ show: true | false
37
+ }
38
+
39
+ export type InvoicesCalculationsTotalsResponse = {
40
+ sum: InvoicesCalculationsTotalsItem
41
+ iva: InvoicesCalculationsTotalsItem
42
+ subtotal: InvoicesCalculationsTotalsItem
43
+ ivaRetenido: InvoicesCalculationsTotalsItem
44
+ ivaPercibido: InvoicesCalculationsTotalsItem
45
+ renta5: InvoicesCalculationsTotalsItem
46
+ renta10: InvoicesCalculationsTotalsItem
47
+ ventasExentas: InvoicesCalculationsTotalsItem
48
+ ventasNoSujetas: InvoicesCalculationsTotalsItem
49
+ ventaTotal: InvoicesCalculationsTotalsItem
36
50
  }
37
51
 
38
- export type InvoicesCalculationCalculateSingleResponse = {
52
+ export type InvoicesCalculationsCalculateSingleResponse = {
39
53
  details: InvoicesCalculationsDetailsResponse[]
40
- totals: InvoicesCalculationsTotalsResponse[]
54
+ totals: InvoicesCalculationsTotalsResponse
41
55
  }
@@ -1,7 +1,7 @@
1
- import { InvoiceHeaderSection } from '../CreateSingle/Request'
1
+ import { InvoicesCreateSingleHeader } from '../CreateSingle/Request'
2
2
 
3
3
  export type InvoicesCreateSingleReservedRequest = Pick<
4
- InvoiceHeaderSection,
4
+ InvoicesCreateSingleHeader,
5
5
  'document' | 'authorization'
6
6
  > & {
7
7
  sequenceFrom: number
@@ -1,47 +1,52 @@
1
- export type InvoiceHeaderSection = {
1
+ export type InvoicesCreateSingleHeader = {
2
+ document: string
3
+ authorization: string
4
+ sequence: number
5
+ invoiceDate: string
2
6
  customer: string
3
7
  customerBranch: string
4
- invoicesSeller: string
5
8
  invoicesPaymentsCondition: string
6
- invoiceDate: string
7
- sequence: number
8
- document: string
9
- authorization: string
9
+ invoicesSeller: string
10
10
  }
11
11
 
12
- export type InvoiceTotalsSection = {
12
+ export type InvoicesCreateSingleTotals = {
13
13
  sum: number
14
14
  iva: number
15
15
  subtotal: number
16
16
  ivaRetenido: number
17
+ ivaPercibido: number
17
18
  renta5: number
18
19
  renta10: number
19
- ivaPercibido: number
20
20
  ventasExentas: number
21
21
  ventasNoSujetas: number
22
22
  ventaTotal: number
23
- ventaTotalText: string
24
23
  }
25
24
 
26
- export type InvoiceDetailsSection = {
25
+ export type InvoicesCreateSingleDetail = {
26
+ // Basic values
27
+ service: string
27
28
  quantity: number
28
- unitPrice: number
29
29
  chargeDescription: string
30
+ price: number
30
31
  incIva: boolean
31
32
  incRenta5: boolean
32
33
  incRenta10: boolean
33
- ventaPrice: number
34
+
35
+ // Calculated values
36
+ unitPrice: number
34
37
  ivaPrice: number
35
- renta5Price: number
36
- renta10Price: number
38
+ ventaPrice: number
37
39
  vNoSujeta: number
38
40
  vExenta: number
39
41
  vGravada: number
40
- service: string
42
+ totalIvaPrice: number
43
+ rentaPrice5: number
44
+ rentaPrice10?: number
45
+ sellingType: number
41
46
  }
42
47
 
43
48
  export type InvoicesCreateSingleRequest = {
44
- header: InvoiceHeaderSection
45
- totals: InvoiceTotalsSection
46
- details: InvoiceDetailsSection[]
49
+ header: InvoicesCreateSingleHeader
50
+ totals: InvoicesCreateSingleTotals
51
+ details: InvoicesCreateSingleDetail[]
47
52
  }