cardus 0.0.93 → 0.0.95

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 CHANGED
@@ -310,7 +310,7 @@ class IntegrationManager {
310
310
  2 - si "forzarAgrupamientoDeLinea" es true, se crea una linea por cada linea
311
311
  3- si NO esta agrupado y "forzarAgrupamientoDeLinea" NO es true, se crea una linea por cada unidad de cada linea
312
312
  */
313
- const grouped = Number((group === null || group === void 0 ? void 0 : group.grouped) === 1);
313
+ let grouped = Number((group === null || group === void 0 ? void 0 : group.grouped) === 1);
314
314
  const createBultoFromLine = (_b) => __awaiter(this, [_b], void 0, function* ({ line, idEnvioTemporal }) {
315
315
  const result = yield crearBulto({
316
316
  lineItems: { idEnvioTemporal, line },
@@ -331,7 +331,13 @@ class IntegrationManager {
331
331
  orders.forEach(({ idEnvioTemporal, lineas }) => {
332
332
  if (!idEnvioTemporal)
333
333
  return;
334
- if (grouped && lineas.length > 1) {
334
+ if (lineas.length === 1) {
335
+ grouped = 0;
336
+ }
337
+ else {
338
+ grouped = 1;
339
+ }
340
+ if (grouped) {
335
341
  this.insertTempShipmentGroupLine({ idEnvioTemporal, group });
336
342
  }
337
343
  lineas.forEach((line) => {
package/index.ts CHANGED
@@ -526,7 +526,7 @@ export class IntegrationManager {
526
526
  3- si NO esta agrupado y "forzarAgrupamientoDeLinea" NO es true, se crea una linea por cada unidad de cada linea
527
527
  */
528
528
 
529
- const grouped = Number(group?.grouped === 1);
529
+ let grouped = Number(group?.grouped === 1);
530
530
 
531
531
  const createBultoFromLine = async ({
532
532
  line,
@@ -557,7 +557,13 @@ export class IntegrationManager {
557
557
  orders.forEach(({ idEnvioTemporal, lineas }) => {
558
558
  if (!idEnvioTemporal) return;
559
559
 
560
- if (grouped && lineas.length > 1) {
560
+ if (lineas.length === 1) {
561
+ grouped = 0;
562
+ } else {
563
+ grouped = 1;
564
+ }
565
+
566
+ if (grouped) {
561
567
  this.insertTempShipmentGroupLine({ idEnvioTemporal, group });
562
568
  }
563
569
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cardus",
3
- "version": "0.0.93",
3
+ "version": "0.0.95",
4
4
  "description": "an integration manager",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",