@zauru-sdk/graphql 2.0.45 → 2.0.47
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.
|
@@ -39,6 +39,7 @@ export declare const getPurchaseOrdersBetweenDatesStringQuery: (startDate: strin
|
|
|
39
39
|
withWebAppRows?: boolean;
|
|
40
40
|
payeeCategoryIds?: number[];
|
|
41
41
|
excludePayeeCategoryIds?: number[];
|
|
42
|
+
shipment_reference?: string;
|
|
42
43
|
discountComparisonOperator?: "_eq" | "_neq" | "_gte" | "_lte" | "_gt" | "_lt";
|
|
43
44
|
discount?: number;
|
|
44
45
|
}) => string;
|
|
@@ -154,7 +154,6 @@ query getPurchaseOrder($id: bigint) @cached {
|
|
|
154
154
|
exports.getPurchaseOrderStringQuery = getPurchaseOrderStringQuery;
|
|
155
155
|
const getShipmentsStringQuery = ({ agency_to_id, agency_from_id, suffix, voided, delivered, shipped, returned, id_number_not_null = false, id_number, id_number_not_empty = false, withMovementLots = false, limit = 1000, id, wheres, memoILike, }) => {
|
|
156
156
|
let conditions = [];
|
|
157
|
-
conditions.push(`voided: {_eq: ${voided}}`);
|
|
158
157
|
if (suffix) {
|
|
159
158
|
conditions.push(`id_number: {_ilike: "%${suffix}%"}`);
|
|
160
159
|
}
|
|
@@ -205,9 +204,11 @@ const getShipmentsStringQuery = ({ agency_to_id, agency_from_id, suffix, voided,
|
|
|
205
204
|
shipments(
|
|
206
205
|
limit: ${limit},
|
|
207
206
|
order_by: {id: desc},
|
|
208
|
-
|
|
207
|
+
${conditions.length > 0
|
|
208
|
+
? `where: {
|
|
209
209
|
${conditions.join(", ")}
|
|
210
|
-
}
|
|
210
|
+
}`
|
|
211
|
+
: ""}
|
|
211
212
|
) {
|
|
212
213
|
id
|
|
213
214
|
zid
|
|
@@ -283,6 +284,9 @@ const getPurchaseOrdersBetweenDatesStringQuery = (startDate, endDate, config) =>
|
|
|
283
284
|
if (config.id_number) {
|
|
284
285
|
conditions.push(`id_number: { _ilike: "%${config.id_number}%" }`);
|
|
285
286
|
}
|
|
287
|
+
if (config.shipment_reference) {
|
|
288
|
+
conditions.push(`shipment_reference: { _eq: "${config.shipment_reference}" }`);
|
|
289
|
+
}
|
|
286
290
|
if (config.payeeId || config.payeeCategoryId) {
|
|
287
291
|
const payeeConditions = [];
|
|
288
292
|
if (config.payeeId) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zauru-sdk/graphql",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.47",
|
|
4
4
|
"description": "Queries de uso común para las aplicación de Zauru.",
|
|
5
5
|
"main": "./dist/esm/index.js",
|
|
6
6
|
"module": "./dist/esm/index.js",
|
|
@@ -21,5 +21,5 @@
|
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"typescript": "^5.1.6"
|
|
23
23
|
},
|
|
24
|
-
"gitHead": "
|
|
24
|
+
"gitHead": "bfc97683641800ea0d35fe094e705054f4de5cef"
|
|
25
25
|
}
|