@zauru-sdk/graphql 2.0.64 → 2.0.69

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.
@@ -298,7 +298,12 @@ const getPurchaseOrdersBetweenDatesStringQuery = (startDate, endDate, config) =>
298
298
  conditions.push(`payee: { ${payeeConditions.join(", ")} }`);
299
299
  }
300
300
  if (config.itemId) {
301
- conditions.push(`purchase_order_details: { item_id: { _eq: ${config.itemId} } }`);
301
+ if (config.itemId.toString().includes(",")) {
302
+ conditions.push(`purchase_order_details: { item_id: { _in: [${config.itemId}] } }`);
303
+ }
304
+ else {
305
+ conditions.push(`purchase_order_details: { item_id: { _eq: ${config.itemId} } }`);
306
+ }
302
307
  }
303
308
  if (config.lotItemIdExclusion) {
304
309
  conditions.push(`lots: { item_id: { _neq: ${config.lotItemIdExclusion} } }`);
@@ -1024,8 +1029,10 @@ query getInvoiceFormSubmissionsByAgencyId {
1024
1029
  : ""}
1025
1030
  voided: {_eq: false}
1026
1031
  },
1027
- ${filters?.startDate?.length && filters?.endDate?.length
1028
- ? `created_at: { _gte: "${filters?.startDate}T00:00:00", _lte: "${filters?.endDate}T00:00:00" },`
1032
+ ${
1033
+ // We need to add 6 hours to the start and end date because the invoice date is in UTC and the database is in UTC+6
1034
+ filters?.startDate?.length && filters?.endDate?.length
1035
+ ? `created_at: { _gte: "${filters?.startDate}T06:00:00", _lte: "${filters?.endDate}T06:00:00" },`
1029
1036
  : ""}
1030
1037
  invoice: {
1031
1038
  agency_id: {_eq: ${agency_id}},
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zauru-sdk/graphql",
3
- "version": "2.0.64",
3
+ "version": "2.0.69",
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": "bc674a76dc43a806132167b53287e02ca3d5a8fc"
24
+ "gitHead": "31cfa9c9573dbc294d5aae1d2a52da883c596cf8"
25
25
  }