alsmanager_lib 3.0.238 → 3.0.239

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 +3 -3
  2. package/package.json +1 -1
package/lib/modules.js CHANGED
@@ -13963,7 +13963,7 @@ function removeDeviceFromAllSites(db_used, id_device) {
13963
13963
  //Get Sites for Combo
13964
13964
  function getSitesSelectComboSQLite(id_place, tipo_aula) {
13965
13965
  var query = "select s.id, concat(p.name, ' - ', sd.name, ' - ', s.mark) as Descrizione from sites s ";
13966
- query += "join site_destinations sd on sd.id_site = s.id ";
13966
+ query += "join site_destinations sd on sd.id_site = s.id and sd.id_place = s.id_place ";
13967
13967
  query += "join places p on p.mark = s.id_place ";
13968
13968
  query += "where date('now') >= sd.date_start and date('now') <= sd.date_end ";
13969
13969
  if (id_place || tipo_aula) {
@@ -13984,7 +13984,7 @@ function getSitesSelectComboSQLite(id_place, tipo_aula) {
13984
13984
 
13985
13985
  function getSitesSelectComboMySQL(id_place, tipo_aula) {
13986
13986
  var query = "select s.id, concat(p.name, ' - ', sd.name, ' - ', s.mark) as Descrizione from sites s ";
13987
- query += "join site_destinations sd on sd.id_site = s.id ";
13987
+ query += "join site_destinations sd on sd.id_site = s.id and sd.id_place = s.id_place ";
13988
13988
  query += "join places p on p.mark = s.id_place ";
13989
13989
  query += "where CURDATE() >= sd.date_start and CURDATE() <= sd.date_end ";
13990
13990
  if (id_place || tipo_aula) {
@@ -14005,7 +14005,7 @@ function getSitesSelectComboMySQL(id_place, tipo_aula) {
14005
14005
 
14006
14006
  function getSitesSelectComboMySQL2(id_place, tipo_aula) {
14007
14007
  var query = "select s.id, concat(p.name, ' - ', sd.name, ' - ', s.mark) as Descrizione from sites s ";
14008
- query += "join site_destinations sd on sd.id_site = s.id ";
14008
+ query += "join site_destinations sd on sd.id_site = s.id and sd.id_place = s.id_place ";
14009
14009
  query += "join places p on p.mark = s.id_place ";
14010
14010
  query += "where CURDATE() >= sd.date_start and CURDATE() <= sd.date_end ";
14011
14011
  if (id_place || tipo_aula) {
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.238",
7
+ "version": "3.0.239",
8
8
  "description": "Funzioni per ALSManager",
9
9
  "license": "ISC",
10
10
  "author": "Luca Cattani",