@openbox/shared-types 0.5.29 → 0.5.31

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,9 +17,9 @@ 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;
@@ -42,8 +43,15 @@ export type InvoicesCreateSingleDetail = {
42
43
  rentaPrice10?: number;
43
44
  sellingType: number;
44
45
  };
46
+ export type InvoicesCreateSingleDiscounts = {
47
+ id?: string;
48
+ type: InvoicesDiscountsTypesKeys;
49
+ quantity: number;
50
+ description: string;
51
+ };
45
52
  export type InvoicesCreateSingleRequest = {
46
53
  header: InvoicesCreateSingleHeader;
47
54
  totals: InvoicesCreateSingleTotals;
48
55
  details: InvoicesCreateSingleDetail[];
56
+ discounts: InvoicesCreateSingleDiscounts[] | null;
49
57
  };
@@ -34,7 +34,7 @@ export type Invoices = {
34
34
  totalExenta: number;
35
35
  totalNoSuj: number;
36
36
  totalPagar: number;
37
- ventaTotalText: string;
37
+ totalPagarText: string;
38
38
  origin: string;
39
39
  invoiceDate: Date;
40
40
  paymentConditionName: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openbox/shared-types",
3
- "version": "0.5.29",
3
+ "version": "0.5.31",
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,9 +19,9 @@ 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
@@ -48,8 +50,16 @@ export type InvoicesCreateSingleDetail = {
48
50
  sellingType: number
49
51
  }
50
52
 
53
+ export type InvoicesCreateSingleDiscounts = {
54
+ id?: string
55
+ type: InvoicesDiscountsTypesKeys
56
+ quantity: number
57
+ description: string
58
+ }
59
+
51
60
  export type InvoicesCreateSingleRequest = {
52
61
  header: InvoicesCreateSingleHeader
53
62
  totals: InvoicesCreateSingleTotals
54
63
  details: InvoicesCreateSingleDetail[]
64
+ discounts: InvoicesCreateSingleDiscounts[] | null
55
65
  }
@@ -35,7 +35,7 @@ export type Invoices = {
35
35
  totalExenta: number // previously ventasExentas
36
36
  totalNoSuj: number // previously ventasNoSujetas
37
37
  totalPagar: number // previously ventaTotal
38
- ventaTotalText: string
38
+ totalPagarText: string // previously ventaTotalText
39
39
  origin: string
40
40
  invoiceDate: Date
41
41
  paymentConditionName: string