alsmanager_lib 2.0.32 → 2.0.34

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.
Files changed (2) hide show
  1. package/lib/modules.js +6 -2
  2. package/package.json +1 -1
package/lib/modules.js CHANGED
@@ -4522,9 +4522,11 @@ function getDevicesNotAllocatedComboSQLite(id_site, id_place, sel_type, sel_make
4522
4522
  query += "from devices d ";
4523
4523
  query += "left join device_site ds on d.id = ds.id_device ";
4524
4524
  query += "left join site_destinations sd on ds.id_site = sd.id_site ";
4525
+ query += "left join device_consegne dc on d.id = dc.id_device ";
4525
4526
  query += "where (d.is_removed is null or d.is_removed = 0) "
4527
+ query += "and (dc.id_consegna is null) ";
4526
4528
  query += "and (ds.id_place is null ";
4527
- query += "or ((ds.date_in <= date('now') and ds.date_out >= date('now') and sd.type = 'MAGAZZINO')) and (ds.id_place <> '" + id_place + "' and ds.id_site <> " + id_site + "))) ";
4529
+ query += "or ((ds.date_in <= date('now') and ds.date_out >= date('now') and sd.type = 'MAGAZZINO')) and (ds.id_place <> '" + id_place + "' and ds.id_site <> " + id_site + ")) ";
4528
4530
  if (sel_type_str.trim() != '') {
4529
4531
  query += "and d.type = '" + sel_type_str.trim() + "' ";
4530
4532
  }
@@ -4560,9 +4562,11 @@ function getDevicesNotAllocatedComboMySQL(id_site, id_place, sel_type, sel_maker
4560
4562
  query += "from devices d ";
4561
4563
  query += "left join device_site ds on d.id = ds.id_device ";
4562
4564
  query += "left join site_destinations sd on ds.id_site = sd.id_site ";
4565
+ query += "left join device_consegne dc on d.id = dc.id_device ";
4563
4566
  query += "where (d.is_removed is null or d.is_removed = 0) "
4567
+ query += "and (dc.id_consegna is null) ";
4564
4568
  query += "and (ds.id_place is null ";
4565
- query += "or ((ds.date_in <= date('now') and ds.date_out >= date('now') and sd.type = 'MAGAZZINO')) and (ds.id_place <> :id_place and ds.id_site <> :id_site))) ";
4569
+ query += "or ((ds.date_in <= date('now') and ds.date_out >= date('now') and sd.type = 'MAGAZZINO')) and (ds.id_place <> :id_place and ds.id_site <> :id_site)) ";
4566
4570
  if (sel_type_str.trim() != '') {
4567
4571
  query += "and d.type = :dev_type ";
4568
4572
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "alsmanager_lib",
3
- "version": "2.0.32",
3
+ "version": "2.0.34",
4
4
  "description": "Funzioni per ALSManager",
5
5
  "license": "ISC",
6
6
  "author": "Luca Cattani",