alsmanager_lib 3.0.96 → 3.0.97

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 +10 -7
  2. package/package.json +1 -1
package/lib/modules.js CHANGED
@@ -11708,7 +11708,7 @@ function getSitesSelectComboByPlace(db_used, id_place, floor, date_ref) {
11708
11708
 
11709
11709
  //End Site in Combo Parziale
11710
11710
  // Select Site in Combo Parziale
11711
- function getSitesSelectComboExcludeIdSQLite(id_site, date_ref) {
11711
+ function getSitesSelectComboExcludeIdSQLite(id_place, id_site, date_ref) {
11712
11712
  var query = "select s.id, concat(sd.name, ' - ', s.mark) as Descrizione from sites s ";
11713
11713
  query += "join site_destinations sd on sd.id_site = s.id ";
11714
11714
  if (date_ref) {
@@ -11718,11 +11718,12 @@ function getSitesSelectComboExcludeIdSQLite(id_site, date_ref) {
11718
11718
  query += "where date('now') >= sd.date_start and date('now') <= sd.date_end ";
11719
11719
  }
11720
11720
  query += "and s.id <> " + id_site + " ";
11721
+ query += "and s.id_place = '" + id_place +"' ";
11721
11722
  query += "order by sd.name ";
11722
11723
  return query;
11723
11724
  }
11724
11725
 
11725
- function getSitesSelectComboExcludeIdMySQL(id_site, date_ref) {
11726
+ function getSitesSelectComboExcludeIdMySQL(id_place, id_site, date_ref) {
11726
11727
  var query = "select s.id, concat(sd.name, ' - ', s.mark) as Descrizione from sites s ";
11727
11728
  query += "join site_destinations sd on sd.id_site = s.id ";
11728
11729
  if (date_ref) {
@@ -11732,11 +11733,12 @@ function getSitesSelectComboExcludeIdMySQL(id_site, date_ref) {
11732
11733
  query += "where CURDATE() >= sd.date_start and CURDATE() <= sd.date_end ";
11733
11734
  }
11734
11735
  query += "and s.id <> :id_site ";
11736
+ query += "and s.id_place = :id_place ";
11735
11737
  query += "order by sd.name ";
11736
11738
  return query;
11737
11739
  }
11738
11740
 
11739
- function getSitesSelectComboExcludeIdMySQL2(id_site, date_ref) {
11741
+ function getSitesSelectComboExcludeIdMySQL2(id_place, id_site, date_ref) {
11740
11742
  var query = "select s.id, concat(sd.name, ' - ', s.mark) as Descrizione from sites s ";
11741
11743
  query += "join site_destinations sd on sd.id_site = s.id ";
11742
11744
  if (date_ref) {
@@ -11746,22 +11748,23 @@ function getSitesSelectComboExcludeIdMySQL2(id_site, date_ref) {
11746
11748
  query += "where CURDATE() >= sd.date_start and CURDATE() <= sd.date_end ";
11747
11749
  }
11748
11750
  query += "and s.id <> " + id_site + " ";
11751
+ query += "and s.id_place = '" + id_place +"' ";
11749
11752
  query += "order by sd.name ";
11750
11753
  return query;
11751
11754
  }
11752
11755
 
11753
- function getSitesSelectComboExcludeId(db_used, id_site, date_ref) {
11756
+ function getSitesSelectComboExcludeId(db_used, id_place, id_site, date_ref) {
11754
11757
  var query = "";
11755
11758
  if (db_used) {
11756
11759
  switch (db_used) {
11757
11760
  case 'SQLITE':
11758
- query = getSitesSelectComboExcludeIdSQLite(id_site, date_ref);
11761
+ query = getSitesSelectComboExcludeIdSQLite(id_place, id_site, date_ref);
11759
11762
  break;
11760
11763
  case 'MYSQL':
11761
- query = getSitesSelectComboExcludeIdMySQL(id_site, date_ref);
11764
+ query = getSitesSelectComboExcludeIdMySQL(id_place, id_site, date_ref);
11762
11765
  break;
11763
11766
  case 'MYSQL2':
11764
- query = getSitesSelectComboExcludeIdMySQL2(id_site, date_ref);
11767
+ query = getSitesSelectComboExcludeIdMySQL2(id_place, id_site, date_ref);
11765
11768
  break;
11766
11769
  }
11767
11770
  }
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.96",
7
+ "version": "3.0.97",
8
8
  "description": "Funzioni per ALSManager",
9
9
  "license": "ISC",
10
10
  "author": "Luca Cattani",