alsmanager_lib 3.0.47 → 3.0.49

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 +4 -4
  2. package/package.json +1 -1
package/lib/modules.js CHANGED
@@ -1398,7 +1398,7 @@ function getDocentiCombo(db_used, id_place, ordine_scuola, ruolo) {
1398
1398
  query += "and (ordine = '" + ordine_scuola + "' or ruolo <> 'DOCENTE') ";
1399
1399
  }
1400
1400
  if (id_place && id_place.trim() != '') {
1401
- query += "and id_place = '" + id_place + "' ";
1401
+ query += "and (id_place = '" + id_place + "' or id_place is null) ";
1402
1402
  }
1403
1403
  if (ruolo && ruolo.trim() != '') {
1404
1404
  query += "and ruolo = '" + ruolo + "' ";
@@ -5813,7 +5813,7 @@ function getDevicesNotAllocatedComboSQLite(id_site, id_place, sel_type, sel_make
5813
5813
  query += "and (dc.id_consegna is null) ";
5814
5814
  query += "and (cb.id is null or (cb.tipo_bene = 'DEVICE' and cb.stato_restituzione = 2)) ";
5815
5815
  query += "and (ds.id_place is null ";
5816
- 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 + ")) ";
5816
+ query += "or ((ds.date_in <= date('now') and ds.date_out >= date('now') and sd.type in ('MAGAZZINO', 'CARRELLO DISPOSITIVI'))) and (ds.id_place <> '" + id_place + "' and ds.id_site <> " + id_site + ")) ";
5817
5817
  if (sel_type_str.trim() != '') {
5818
5818
  query += "and d.type = '" + sel_type_str.trim() + "' ";
5819
5819
  }
@@ -5856,7 +5856,7 @@ function getDevicesNotAllocatedComboMySQL(id_site, id_place, sel_type, sel_maker
5856
5856
  query += "and (dc.id_consegna is null) ";
5857
5857
  query += "and (cb.id is null or (cb.tipo_bene = 'DEVICE' and cb.stato_restituzione = 2)) ";
5858
5858
  query += "and (ds.id_place is null ";
5859
- query += "or ((ds.date_in <= CURDATE() and ds.date_out >= CURDATE() and sd.type = 'MAGAZZINO')) and (ds.id_place <> :id_place and ds.id_site <> :id_site)) ";
5859
+ query += "or ((ds.date_in <= CURDATE() and ds.date_out >= CURDATE() and sd.type in ('MAGAZZINO', 'CARRELLO DISPOSITIVI'))) and (ds.id_place <> :id_place and ds.id_site <> :id_site)) ";
5860
5860
  if (sel_type_str.trim() != '') {
5861
5861
  query += "and d.type = :dev_type ";
5862
5862
  }
@@ -5899,7 +5899,7 @@ function getDevicesNotAllocatedComboMySQL2(id_site, id_place, sel_type, sel_make
5899
5899
  query += "and (dc.id_consegna is null) ";
5900
5900
  query += "and (cb.id is null or (cb.tipo_bene = 'DEVICE' and cb.stato_restituzione = 2)) ";
5901
5901
  query += "and (ds.id_place is null ";
5902
- query += "or ((ds.date_in <= CURDATE() and ds.date_out >= CURDATE() and sd.type = 'MAGAZZINO')) and (ds.id_place <> '" + id_place + "' and ds.id_site <> " + id_site + ")) ";
5902
+ query += "or ((ds.date_in <= CURDATE() and ds.date_out >= CURDATE() and sd.type in ('MAGAZZINO', 'CARRELLO DISPOSITIVI'))) and (ds.id_place <> '" + id_place + "' and ds.id_site <> " + id_site + ")) ";
5903
5903
  if (sel_type_str.trim() != '') {
5904
5904
  query += "and d.type = '" + sel_type_str.trim() + "' ";
5905
5905
  }
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  ".": "./lib/modules.js",
5
5
  "./dbconn": "./lib/dbconn.js"
6
6
  },
7
- "version": "3.0.47",
7
+ "version": "3.0.49",
8
8
  "description": "Funzioni per ALSManager",
9
9
  "license": "ISC",
10
10
  "author": "Luca Cattani",