alsmanager_lib 3.0.86 → 3.0.88

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 +9 -6
  2. package/package.json +1 -1
package/lib/modules.js CHANGED
@@ -5859,8 +5859,7 @@ function getDevicesNotAllocatedComboSQLite(id_site, id_place, sel_type, sel_make
5859
5859
  query += "left join device_consegne dc on d.id = dc.id_device ";
5860
5860
  query += "left join consegna_beni cb on d.id = cb.id_bene "
5861
5861
  query += "where (d.is_removed is null or d.is_removed = 0) "
5862
- query += "and (dc.id_consegna is null) ";
5863
- query += "and (cb.id is null or (cb.tipo_bene = 'DEVICE' and cb.stato_restituzione = 2)) ";
5862
+ query += "and ((dc.id_consegna is null) or (cb.id is null or (cb.tipo_bene = 'DEVICE' and cb.stato_restituzione = 2))) ";
5864
5863
  query += "and (ds.id_place is null ";
5865
5864
  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 + ")) ";
5866
5865
  if (sel_type_str.trim() != '') {
@@ -5902,8 +5901,7 @@ function getDevicesNotAllocatedComboMySQL(id_site, id_place, sel_type, sel_maker
5902
5901
  query += "left join device_consegne dc on d.id = dc.id_device ";
5903
5902
  query += "left join consegna_beni cb on d.id = cb.id_bene "
5904
5903
  query += "where (d.is_removed is null or d.is_removed = 0) "
5905
- query += "and (dc.id_consegna is null) ";
5906
- query += "and (cb.id is null or (cb.tipo_bene = 'DEVICE' and cb.stato_restituzione = 2)) ";
5904
+ query += "and ((dc.id_consegna is null) or (cb.id is null or (cb.tipo_bene = 'DEVICE' and cb.stato_restituzione = 2))) ";
5907
5905
  query += "and (ds.id_place is null ";
5908
5906
  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)) ";
5909
5907
  if (sel_type_str.trim() != '') {
@@ -5945,8 +5943,7 @@ function getDevicesNotAllocatedComboMySQL2(id_site, id_place, sel_type, sel_make
5945
5943
  query += "left join device_consegne dc on d.id = dc.id_device ";
5946
5944
  query += "left join consegna_beni cb on d.id = cb.id_bene "
5947
5945
  query += "where (d.is_removed is null or d.is_removed = 0) "
5948
- query += "and (dc.id_consegna is null) ";
5949
- query += "and (cb.id is null or (cb.tipo_bene = 'DEVICE' and cb.stato_restituzione = 2)) ";
5946
+ query += "and ((dc.id_consegna is null) or (cb.id is null or (cb.tipo_bene = 'DEVICE' and cb.stato_restituzione = 2))) ";
5950
5947
  query += "and (ds.id_place is null ";
5951
5948
  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 + ")) ";
5952
5949
  if (sel_type_str.trim() != '') {
@@ -12651,6 +12648,12 @@ function createConsegnaBckDoc(consegna_obj, scuola_obj, listaDispositivi) {
12651
12648
  curr_year++;
12652
12649
  }
12653
12650
  data_consegna_str = "01/06/" + curr_year;
12651
+ // Se specificata data limite consegna...
12652
+ if (consegna_obj.data_limite) {
12653
+ var dlim = new Date(onsegna_obj.data_limite);
12654
+ data_consegna_str = ("0" + dlim.getDate()).slice(-2) + '/' + ("0"+(dlim.getMonth()+1)).slice(-2) + '/' + dlim.getFullYear();
12655
+ }
12656
+
12654
12657
  var dc = new Date(consegna_obj.data_consegna);
12655
12658
  var dc_str = ("0" + dc.getDate()).slice(-2) + '/' + ("0"+(dc.getMonth()+1)).slice(-2) + '/' + dc.getFullYear();
12656
12659
  var consegnatoA_str = "";
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.86",
7
+ "version": "3.0.88",
8
8
  "description": "Funzioni per ALSManager",
9
9
  "license": "ISC",
10
10
  "author": "Luca Cattani",