cardus 0.0.97 → 0.0.99

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.
Files changed (3) hide show
  1. package/dist/index.js +11 -6
  2. package/index.ts +11 -7
  3. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -394,13 +394,18 @@ class IntegrationManager {
394
394
  });
395
395
  }
396
396
  if (!shouldGroup && !forzarAgrupamientoDeLinea) {
397
- const arrayFake = Array.from({ length: Number(cantidad) });
398
- arrayFake.forEach(() => {
399
- this.dataToInsert.lines.push({
400
- id_envio: idEnvioTemporal,
401
- bulto
397
+ if ((group === null || group === void 0 ? void 0 : group.grouped) === 1 && Number(cantidad) > 1) {
398
+ this.insertTempShipmentGroupLine({ idEnvioTemporal, group });
399
+ }
400
+ else {
401
+ const arrayFake = Array.from({ length: Number(cantidad) });
402
+ arrayFake.forEach(() => {
403
+ this.dataToInsert.lines.push({
404
+ id_envio: idEnvioTemporal,
405
+ bulto
406
+ });
402
407
  });
403
- });
408
+ }
404
409
  }
405
410
  }
406
411
  catch (e) {
package/index.ts CHANGED
@@ -647,14 +647,18 @@ export class IntegrationManager {
647
647
  }
648
648
 
649
649
  if (!shouldGroup && !forzarAgrupamientoDeLinea) {
650
- const arrayFake = Array.from({ length: Number(cantidad) });
651
-
652
- arrayFake.forEach(() => {
653
- this.dataToInsert.lines.push({
654
- id_envio: idEnvioTemporal,
655
- bulto
650
+ if (group?.grouped === 1 && Number(cantidad) > 1) {
651
+ this.insertTempShipmentGroupLine({ idEnvioTemporal, group });
652
+ } else {
653
+ const arrayFake = Array.from({ length: Number(cantidad) });
654
+
655
+ arrayFake.forEach(() => {
656
+ this.dataToInsert.lines.push({
657
+ id_envio: idEnvioTemporal,
658
+ bulto
659
+ });
656
660
  });
657
- });
661
+ }
658
662
  }
659
663
  } catch (e) {
660
664
  console.log(e);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cardus",
3
- "version": "0.0.97",
3
+ "version": "0.0.99",
4
4
  "description": "an integration manager",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",