@zauru-sdk/utils 1.0.96 → 1.0.97

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/cjs/index.js CHANGED
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./zauru/4pinos-receptions-form-history.utils.js"), exports);
18
+ __exportStar(require("./zauru/4pinos-reception-register.utils.js"), exports);
18
19
  __exportStar(require("./zauru/automatic-number.utils.js"), exports);
19
20
  __exportStar(require("./zauru/bitacora-edicion-masiva.utils.js"), exports);
20
21
  __exportStar(require("./zauru/bundles.utils.js"), exports);
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createNewLabItemRequest = exports.deleteTask = exports.commitEndTask = exports.commitTask = exports.deletePurchaseOrderProcess = exports.getOrderIDS = exports.updateOchAndDis = exports.updatePurchaseItemPrice = exports.getPurchaseOrderDataTables = exports.getPurchasesDataTableListFormated = void 0;
3
+ exports.createNewLabItemRequest = exports.deleteTask = exports.commitEndTask = exports.commitTask = exports.updatePurchaseOrderReception = exports.deletePurchaseOrderProcess = exports.getOrderIDS = exports.updateOchAndDis = exports.updatePurchaseItemPrice = exports.getPurchaseOrderDataTables = exports.getPurchasesDataTableListFormated = void 0;
4
4
  const common_1 = require("@zauru-sdk/common");
5
5
  const services_1 = require("@zauru-sdk/services");
6
6
  /**
@@ -266,6 +266,26 @@ const deletePurchaseOrderProcess = async (headers, session, id) => {
266
266
  });
267
267
  };
268
268
  exports.deletePurchaseOrderProcess = deletePurchaseOrderProcess;
269
+ /**
270
+ * updatePurchaseOrderReception
271
+ * @param headers
272
+ * @param data
273
+ * @param purchase_id
274
+ * @returns
275
+ */
276
+ const updatePurchaseOrderReception = async (headers, data, purchase_id) => {
277
+ return (0, common_1.handlePossibleAxiosErrors)(async () => {
278
+ const body = {
279
+ purchase_order: {
280
+ payee_id: data.payee_id,
281
+ purchase_order_details_attributes: data.purchase_order_details_attributes,
282
+ },
283
+ };
284
+ await (0, services_1.updateReceivedPurchaseOrder)(headers, body, purchase_id);
285
+ return true;
286
+ });
287
+ };
288
+ exports.updatePurchaseOrderReception = updatePurchaseOrderReception;
269
289
  /**
270
290
  * Commitea una task iniciada para la pantalla de edición masiva de órdenes de compra
271
291
  * @param session
package/dist/esm/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  export * from "./zauru/4pinos-receptions-form-history.utils.js";
2
+ export * from "./zauru/4pinos-reception-register.utils.js";
2
3
  export * from "./zauru/automatic-number.utils.js";
3
4
  export * from "./zauru/bitacora-edicion-masiva.utils.js";
4
5
  export * from "./zauru/bundles.utils.js";
@@ -257,6 +257,25 @@ export const deletePurchaseOrderProcess = async (headers, session, id) => {
257
257
  return true;
258
258
  });
259
259
  };
260
+ /**
261
+ * updatePurchaseOrderReception
262
+ * @param headers
263
+ * @param data
264
+ * @param purchase_id
265
+ * @returns
266
+ */
267
+ export const updatePurchaseOrderReception = async (headers, data, purchase_id) => {
268
+ return handlePossibleAxiosErrors(async () => {
269
+ const body = {
270
+ purchase_order: {
271
+ payee_id: data.payee_id,
272
+ purchase_order_details_attributes: data.purchase_order_details_attributes,
273
+ },
274
+ };
275
+ await updateReceivedPurchaseOrder(headers, body, purchase_id);
276
+ return true;
277
+ });
278
+ };
260
279
  /**
261
280
  * Commitea una task iniciada para la pantalla de edición masiva de órdenes de compra
262
281
  * @param session
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export * from "./zauru/4pinos-receptions-form-history.utils.js";
2
+ export * from "./zauru/4pinos-reception-register.utils.js";
2
3
  export * from "./zauru/automatic-number.utils.js";
3
4
  export * from "./zauru/bitacora-edicion-masiva.utils.js";
4
5
  export * from "./zauru/bundles.utils.js";
@@ -63,6 +63,20 @@ export declare const getOrderIDS: (headers: any, session: Session, extraParams:
63
63
  * @returns
64
64
  */
65
65
  export declare const deletePurchaseOrderProcess: (headers: any, session: Session, id: string | number) => Promise<AxiosUtilsResponse<boolean>>;
66
+ /**
67
+ * updatePurchaseOrderReception
68
+ * @param headers
69
+ * @param data
70
+ * @param purchase_id
71
+ * @returns
72
+ */
73
+ export declare const updatePurchaseOrderReception: (headers: any, data: {
74
+ payee_id?: string;
75
+ purchase_order_details_attributes: Record<string, {
76
+ item_id: number;
77
+ id: number;
78
+ }>;
79
+ }, purchase_id: number) => Promise<AxiosUtilsResponse<boolean>>;
66
80
  export type TaskSchema = {
67
81
  timeStamp: number;
68
82
  iniciada: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zauru-sdk/utils",
3
- "version": "1.0.96",
3
+ "version": "1.0.97",
4
4
  "description": "Utilidades, parseo de request y demás para desarrollo de webapps de Zauru",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.js",
@@ -28,8 +28,8 @@
28
28
  "@zauru-sdk/common": "^1.0.95",
29
29
  "@zauru-sdk/config": "^1.0.60",
30
30
  "@zauru-sdk/graphql": "^1.0.94",
31
- "@zauru-sdk/services": "^1.0.95",
31
+ "@zauru-sdk/services": "^1.0.97",
32
32
  "@zauru-sdk/types": "^1.0.95"
33
33
  },
34
- "gitHead": "b9dd5fa5b06614555107aec698c46a997702bf11"
34
+ "gitHead": "1726ba2804f8e2304a85ca8186387ee4545464d3"
35
35
  }