@zauru-sdk/services 2.0.50 → 2.0.52
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.
|
@@ -368,6 +368,17 @@ export const getGraphQLPurchaseOrderBetweenDates = (session, dates, config = {})
|
|
|
368
368
|
return x;
|
|
369
369
|
});
|
|
370
370
|
}
|
|
371
|
+
//Esto se aplica porque hay veces que hay mas de un lote,
|
|
372
|
+
//esto se debe a que en el momento que se hace una actualización sobre
|
|
373
|
+
//una orden de compra, se crea una recepción nueva lo que genera también un nuevo lote.
|
|
374
|
+
if (finalConfig.onlyLastLot) {
|
|
375
|
+
responseData = responseData.map((x) => {
|
|
376
|
+
if (x.lots.length > 0) {
|
|
377
|
+
x.lots = [x.lots[x.lots.length - 1]];
|
|
378
|
+
}
|
|
379
|
+
return x;
|
|
380
|
+
});
|
|
381
|
+
}
|
|
371
382
|
return responseData;
|
|
372
383
|
});
|
|
373
384
|
};
|
|
@@ -145,6 +145,7 @@ export declare const getGraphQLPurchaseOrderBetweenDates: (session: Session, dat
|
|
|
145
145
|
payeeCategoryIds?: number[];
|
|
146
146
|
excludePayeeCategoryIds?: number[];
|
|
147
147
|
withLotStocks?: boolean;
|
|
148
|
+
onlyLastLot?: boolean;
|
|
148
149
|
discountComparisonOperator?: "_eq" | "_neq" | "_gte" | "_lte" | "_gt" | "_lt";
|
|
149
150
|
discount?: number;
|
|
150
151
|
}) => Promise<AxiosUtilsResponse<PurchaseOrderGraphQL[]>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zauru-sdk/services",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.52",
|
|
4
4
|
"description": "Servicios de consulta a Zauru",
|
|
5
5
|
"main": "./dist/esm/index.js",
|
|
6
6
|
"module": "./dist/esm/index.js",
|
|
@@ -24,12 +24,12 @@
|
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@remix-run/node": "^2.8.1",
|
|
27
|
-
"@zauru-sdk/common": "^2.0.
|
|
27
|
+
"@zauru-sdk/common": "^2.0.51",
|
|
28
28
|
"@zauru-sdk/config": "^2.0.0",
|
|
29
|
-
"@zauru-sdk/graphql": "^2.0.
|
|
30
|
-
"@zauru-sdk/types": "^2.0.
|
|
29
|
+
"@zauru-sdk/graphql": "^2.0.52",
|
|
30
|
+
"@zauru-sdk/types": "^2.0.51",
|
|
31
31
|
"axios": "^1.6.7",
|
|
32
32
|
"chalk": "5.3.0"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "3176c02389ca24a162796ddba4c149a3500383dc"
|
|
35
35
|
}
|