sigo-package 1.2.95 → 1.2.96

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.d.mts CHANGED
@@ -620,7 +620,7 @@ declare class ValorizacionHelper {
620
620
  }
621
621
 
622
622
  declare function getPriceMaterial(CodigoItem: string, dataPriceMaterial: Pick<PrecioMaterialENTITY, 'Item' | 'Precio'>[]): {
623
- Valor: number | undefined;
623
+ Valor: number;
624
624
  };
625
625
 
626
626
  declare enum Position {
package/dist/index.d.ts CHANGED
@@ -620,7 +620,7 @@ declare class ValorizacionHelper {
620
620
  }
621
621
 
622
622
  declare function getPriceMaterial(CodigoItem: string, dataPriceMaterial: Pick<PrecioMaterialENTITY, 'Item' | 'Precio'>[]): {
623
- Valor: number | undefined;
623
+ Valor: number;
624
624
  };
625
625
 
626
626
  declare enum Position {
package/dist/index.js CHANGED
@@ -15664,10 +15664,11 @@ function getPriceMaterial(CodigoItem, dataPriceMaterial) {
15664
15664
  priceMaterial[0].Precio
15665
15665
  ]
15666
15666
  ]);
15667
- if (!mapa.has(priceMaterial[0].Item.Tipo)) {
15668
- throw new Error(`Tipo de precio material no reconocido ${priceMaterial[0].Item.Tipo}`);
15667
+ const tipo = priceMaterial[0].Item.Tipo;
15668
+ const Valor = mapa.get(tipo);
15669
+ if (!Valor) {
15670
+ throw new Error(`Tipo de precio material no reconocido ${tipo}`);
15669
15671
  }
15670
- const Valor = mapa.get(priceMaterial[0].Item.Tipo);
15671
15672
  return {
15672
15673
  Valor
15673
15674
  };
package/dist/index.mjs CHANGED
@@ -15510,10 +15510,11 @@ function getPriceMaterial(CodigoItem, dataPriceMaterial) {
15510
15510
  priceMaterial[0].Precio
15511
15511
  ]
15512
15512
  ]);
15513
- if (!mapa.has(priceMaterial[0].Item.Tipo)) {
15514
- throw new Error(`Tipo de precio material no reconocido ${priceMaterial[0].Item.Tipo}`);
15513
+ const tipo = priceMaterial[0].Item.Tipo;
15514
+ const Valor = mapa.get(tipo);
15515
+ if (!Valor) {
15516
+ throw new Error(`Tipo de precio material no reconocido ${tipo}`);
15515
15517
  }
15516
- const Valor = mapa.get(priceMaterial[0].Item.Tipo);
15517
15518
  return {
15518
15519
  Valor
15519
15520
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sigo-package",
3
- "version": "1.2.95",
3
+ "version": "1.2.96",
4
4
  "description": "Funciones compartidas sigo",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",