@zauru-sdk/services 2.27.0 → 2.29.0

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.
@@ -41,7 +41,10 @@ export async function createInvoice(headers, body, sujetaAImpuestos = true) {
41
41
  const sendBody = {
42
42
  ...body,
43
43
  invoice_details_attributes: arrayToObject(body.invoice_details),
44
- tag_ids: ["", ...(body.tagging_invoices?.map((x) => x.tag_id) ?? [])],
44
+ tag_ids: [
45
+ "",
46
+ ...(body.tagging_invoices?.map((x) => `${x.tag_id}`) ?? []),
47
+ ],
45
48
  taxable: sujetaAImpuestos,
46
49
  };
47
50
  if (sendBody.deleted_invoice_details)
@@ -68,7 +71,10 @@ export async function createInvoiceOrder(headers, body, esFactura = false) {
68
71
  ...body,
69
72
  issued: esFactura, //(false) - Esto lo hace una órden y no una factura
70
73
  invoice_details_attributes: arrayToObject(body.invoice_details),
71
- tag_ids: ["", ...(body.tagging_invoices?.map((x) => x.tag_id) ?? [])],
74
+ tag_ids: [
75
+ "",
76
+ ...(body.tagging_invoices?.map((x) => `${x.tag_id}`) ?? []),
77
+ ],
72
78
  taxable: esFactura ? 1 : 0,
73
79
  };
74
80
  if (sendBody.deleted_invoice_details)
@@ -135,7 +141,10 @@ export async function createInvoicePOS(headers, body, sujetaAImpuestos = true) {
135
141
  issued: true,
136
142
  pos: true,
137
143
  invoice_details_attributes: arrayToObject(body.invoice_details),
138
- tag_ids: ["", ...(body.tagging_invoices?.map((x) => x.tag_id) ?? [])],
144
+ tag_ids: [
145
+ "",
146
+ ...(body.tagging_invoices?.map((x) => `${x.tag_id}`) ?? []),
147
+ ],
139
148
  };
140
149
  if (sendBody.deleted_invoice_details)
141
150
  delete sendBody.deleted_invoice_details;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zauru-sdk/services",
3
- "version": "2.27.0",
3
+ "version": "2.29.0",
4
4
  "description": "Servicios de consulta a Zauru",
5
5
  "main": "./dist/esm/index.js",
6
6
  "module": "./dist/esm/index.js",
@@ -32,5 +32,5 @@
32
32
  "axios": "^1.6.7",
33
33
  "chalk": "5.3.0"
34
34
  },
35
- "gitHead": "456be80923a38b590cf75923d88c9ae3c0d2e406"
35
+ "gitHead": "3fceacc62cf680864b901e50661a551ed4c18d88"
36
36
  }