cardus 0.0.73 → 0.0.75
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.
- package/dist/index.js +7 -9
- package/index.ts +7 -13
- package/package.json +1 -1
- package/types/index.ts +2 -0
package/dist/index.js
CHANGED
|
@@ -191,10 +191,10 @@ class IntegrationManager {
|
|
|
191
191
|
return __awaiter(this, arguments, void 0, function* ({ user, tempShimpmentIds, countryName }) {
|
|
192
192
|
const idUsuario = user.id_usuario;
|
|
193
193
|
const { configurationService, llmAPIService } = this.services;
|
|
194
|
-
const insert = (data
|
|
194
|
+
const insert = (data) => {
|
|
195
195
|
data.forEach((tempContent) => {
|
|
196
196
|
if (tempContent.contenido) {
|
|
197
|
-
this.dataToInsert.contents.push(Object.assign(
|
|
197
|
+
this.dataToInsert.contents.push(Object.assign({}, tempContent));
|
|
198
198
|
}
|
|
199
199
|
});
|
|
200
200
|
};
|
|
@@ -219,9 +219,11 @@ class IntegrationManager {
|
|
|
219
219
|
id_envio: detail.id_envio,
|
|
220
220
|
id_usuario: idUsuario,
|
|
221
221
|
contenido: detail.bulto.nombre_producto,
|
|
222
|
-
valor: detail.bulto.
|
|
222
|
+
valor: detail.bulto.precio_producto
|
|
223
|
+
? parseFloat(detail.bulto.precio_producto)
|
|
224
|
+
: getRandomContentValue(),
|
|
223
225
|
dni: user.dni,
|
|
224
|
-
taric,
|
|
226
|
+
taric: detail.bulto.hs_code || taric,
|
|
225
227
|
eori_importacion: user.eori_import,
|
|
226
228
|
eori_exportacion: user.eori_export,
|
|
227
229
|
peso_bruto: detail.bulto.peso,
|
|
@@ -242,11 +244,7 @@ class IntegrationManager {
|
|
|
242
244
|
}
|
|
243
245
|
if (shipmentContent) {
|
|
244
246
|
shipmentContent = cleanContentData(shipmentContent);
|
|
245
|
-
|
|
246
|
-
if (shipmentContent) {
|
|
247
|
-
insert(shipmentContent, tempShimpmentId);
|
|
248
|
-
}
|
|
249
|
-
});
|
|
247
|
+
insert(shipmentContent);
|
|
250
248
|
}
|
|
251
249
|
});
|
|
252
250
|
}
|
package/index.ts
CHANGED
|
@@ -263,15 +263,11 @@ export class IntegrationManager {
|
|
|
263
263
|
const idUsuario = user.id_usuario as number;
|
|
264
264
|
const { configurationService, llmAPIService } = this.services;
|
|
265
265
|
|
|
266
|
-
const insert = (
|
|
267
|
-
data: UserDefaultConfigurationContent[],
|
|
268
|
-
tempShimpmentId: number
|
|
269
|
-
) => {
|
|
266
|
+
const insert = (data: UserDefaultConfigurationContent[]) => {
|
|
270
267
|
data.forEach((tempContent) => {
|
|
271
268
|
if (tempContent.contenido) {
|
|
272
269
|
this.dataToInsert.contents.push({
|
|
273
|
-
...tempContent
|
|
274
|
-
id_envio: tempShimpmentId
|
|
270
|
+
...tempContent
|
|
275
271
|
});
|
|
276
272
|
}
|
|
277
273
|
});
|
|
@@ -313,9 +309,11 @@ export class IntegrationManager {
|
|
|
313
309
|
id_envio: detail.id_envio,
|
|
314
310
|
id_usuario: idUsuario,
|
|
315
311
|
contenido: detail.bulto.nombre_producto,
|
|
316
|
-
valor: detail.bulto.
|
|
312
|
+
valor: detail.bulto.precio_producto
|
|
313
|
+
? parseFloat(detail.bulto.precio_producto)
|
|
314
|
+
: getRandomContentValue(),
|
|
317
315
|
dni: user.dni,
|
|
318
|
-
taric,
|
|
316
|
+
taric: detail.bulto.hs_code || taric,
|
|
319
317
|
eori_importacion: user.eori_import,
|
|
320
318
|
eori_exportacion: user.eori_export,
|
|
321
319
|
peso_bruto: detail.bulto.peso,
|
|
@@ -341,11 +339,7 @@ export class IntegrationManager {
|
|
|
341
339
|
|
|
342
340
|
if (shipmentContent) {
|
|
343
341
|
shipmentContent = cleanContentData(shipmentContent);
|
|
344
|
-
|
|
345
|
-
if (shipmentContent) {
|
|
346
|
-
insert(shipmentContent, tempShimpmentId);
|
|
347
|
-
}
|
|
348
|
-
});
|
|
342
|
+
insert(shipmentContent);
|
|
349
343
|
}
|
|
350
344
|
}
|
|
351
345
|
|
package/package.json
CHANGED
package/types/index.ts
CHANGED