@zauru-sdk/graphql 6.13.0 → 6.14.0
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.
|
@@ -54,6 +54,10 @@ export declare const getPurchaseOrdersBetweenDatesStringQuery: (startDate: strin
|
|
|
54
54
|
payeeId?: number | string;
|
|
55
55
|
consolidateIdFilter?: boolean;
|
|
56
56
|
lotItemIdExclusion?: number;
|
|
57
|
+
lotStockAgencyId?: number | string;
|
|
58
|
+
lotStockAvailableGt?: number;
|
|
59
|
+
excludeAgencyId?: number | string;
|
|
60
|
+
skipDateFilter?: boolean;
|
|
57
61
|
withLotStocks?: boolean;
|
|
58
62
|
betweenIssueDate?: boolean;
|
|
59
63
|
id_number?: string;
|
|
@@ -444,6 +444,9 @@ const getPurchaseOrdersBetweenDatesStringQuery = (startDate, endDate, config) =>
|
|
|
444
444
|
if (config.agencyId) {
|
|
445
445
|
conditions.push(`agency_id: { _eq: ${config.agencyId} }`);
|
|
446
446
|
}
|
|
447
|
+
if (config.excludeAgencyId) {
|
|
448
|
+
conditions.push(`agency_id: { _neq: ${config.excludeAgencyId} }`);
|
|
449
|
+
}
|
|
447
450
|
if (config.consolidateIdFilter) {
|
|
448
451
|
conditions.push("consolidate_id: { _is_null: true }");
|
|
449
452
|
}
|
|
@@ -506,10 +509,24 @@ const getPurchaseOrdersBetweenDatesStringQuery = (startDate, endDate, config) =>
|
|
|
506
509
|
conditions.push(`reference: { _eq: "${config.reference}" }`);
|
|
507
510
|
}
|
|
508
511
|
}
|
|
512
|
+
const lotsWhereConditions = [];
|
|
509
513
|
if (config.lotItemIdExclusion) {
|
|
510
|
-
|
|
514
|
+
lotsWhereConditions.push(`item_id: { _neq: ${config.lotItemIdExclusion} }`);
|
|
515
|
+
}
|
|
516
|
+
const lotStockConditions = [];
|
|
517
|
+
if (config.lotStockAgencyId) {
|
|
518
|
+
lotStockConditions.push(`agency_id: { _eq: ${config.lotStockAgencyId} }`);
|
|
519
|
+
}
|
|
520
|
+
if (config.lotStockAvailableGt != null) {
|
|
521
|
+
lotStockConditions.push(`available: { _gt: ${config.lotStockAvailableGt} }`);
|
|
522
|
+
}
|
|
523
|
+
if (lotStockConditions.length > 0) {
|
|
524
|
+
lotsWhereConditions.push(`lot_stocks: { ${lotStockConditions.join(", ")} }`);
|
|
525
|
+
}
|
|
526
|
+
if (lotsWhereConditions.length > 0) {
|
|
527
|
+
conditions.push(`lots: { ${lotsWhereConditions.join(", ")} }`);
|
|
511
528
|
}
|
|
512
|
-
if (!config.id_number && !config.ids?.length) {
|
|
529
|
+
if (!config.id_number && !config.ids?.length && !config.skipDateFilter) {
|
|
513
530
|
conditions.push(config.betweenIssueDate
|
|
514
531
|
? `issue_date: { _gte: "${startDate}", _lte: "${endDate}" }`
|
|
515
532
|
: `created_at: { _gte: "${startDate}", _lte: "${endDate}"}`);
|
|
@@ -575,6 +592,12 @@ const getPurchaseOrdersBetweenDatesStringQuery = (startDate, endDate, config) =>
|
|
|
575
592
|
booker_id
|
|
576
593
|
agency_from_id
|
|
577
594
|
agency_to_id
|
|
595
|
+
memo
|
|
596
|
+
voided
|
|
597
|
+
shipped
|
|
598
|
+
delivered
|
|
599
|
+
returned
|
|
600
|
+
created_at
|
|
578
601
|
}
|
|
579
602
|
}`
|
|
580
603
|
: "";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zauru-sdk/graphql",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.14.0",
|
|
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",
|
|
@@ -23,5 +23,5 @@
|
|
|
23
23
|
"tsx": "^4.23.15",
|
|
24
24
|
"typescript": "^5.1.6"
|
|
25
25
|
},
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "dcb32bf5736b393e6164a49e3903909a4caf7363"
|
|
27
27
|
}
|