alsmanager_lib 3.0.130 → 3.0.132
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.
- package/lib/modules.js +16 -10
- package/package.json +1 -1
package/lib/modules.js
CHANGED
|
@@ -5946,10 +5946,10 @@ function getDevicesNotAllocatedComboSQLite(id_site, id_place, sel_type, sel_make
|
|
|
5946
5946
|
query += "from devices d ";
|
|
5947
5947
|
query += "left join device_site ds on d.id = ds.id_device ";
|
|
5948
5948
|
query += "left join site_destinations sd on ds.id_site = sd.id_site ";
|
|
5949
|
-
query += "left join device_consegne dc on d.id = dc.id_device ";
|
|
5949
|
+
//query += "left join device_consegne dc on d.id = dc.id_device ";
|
|
5950
5950
|
query += "left join consegna_beni cb on d.id = cb.id_bene "
|
|
5951
5951
|
query += "where (d.is_removed is null or d.is_removed = 0) "
|
|
5952
|
-
query += "and ((
|
|
5952
|
+
query += "and ((cb.id_consegna is null) or (cb.id is null or (cb.tipo_bene = 'DEVICE' and cb.stato_restituzione = 2))) ";
|
|
5953
5953
|
query += "and (ds.id_place is null ";
|
|
5954
5954
|
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 + ")) ";
|
|
5955
5955
|
if (sel_type_str.trim() != '') {
|
|
@@ -5988,10 +5988,10 @@ function getDevicesNotAllocatedComboMySQL(id_site, id_place, sel_type, sel_maker
|
|
|
5988
5988
|
query += "from devices d ";
|
|
5989
5989
|
query += "left join device_site ds on d.id = ds.id_device ";
|
|
5990
5990
|
query += "left join site_destinations sd on ds.id_site = sd.id_site ";
|
|
5991
|
-
query += "left join device_consegne dc on d.id = dc.id_device ";
|
|
5991
|
+
//query += "left join device_consegne dc on d.id = dc.id_device ";
|
|
5992
5992
|
query += "left join consegna_beni cb on d.id = cb.id_bene "
|
|
5993
5993
|
query += "where (d.is_removed is null or d.is_removed = 0) "
|
|
5994
|
-
query += "and ((
|
|
5994
|
+
query += "and ((cb.id_consegna is null) or (cb.id is null or (cb.tipo_bene = 'DEVICE' and cb.stato_restituzione = 2))) ";
|
|
5995
5995
|
query += "and (ds.id_place is null ";
|
|
5996
5996
|
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)) ";
|
|
5997
5997
|
if (sel_type_str.trim() != '') {
|
|
@@ -6030,7 +6030,7 @@ function getDevicesNotAllocatedComboMySQL2(id_site, id_place, sel_type, sel_make
|
|
|
6030
6030
|
query += "from devices d ";
|
|
6031
6031
|
query += "left join device_site ds on d.id = ds.id_device ";
|
|
6032
6032
|
query += "left join site_destinations sd on ds.id_site = sd.id_site ";
|
|
6033
|
-
query += "left join device_consegne dc on d.id = dc.id_device ";
|
|
6033
|
+
//query += "left join device_consegne dc on d.id = dc.id_device ";
|
|
6034
6034
|
query += "left join consegna_beni cb on d.id = cb.id_bene "
|
|
6035
6035
|
query += "where (d.is_removed is null or d.is_removed = 0) "
|
|
6036
6036
|
query += "and ((dc.id_consegna is null) or (cb.id is null or (cb.tipo_bene = 'DEVICE' and cb.stato_restituzione = 2))) ";
|
|
@@ -7259,7 +7259,8 @@ function queryConsegneByIdDeviceSQLite(id_device) {
|
|
|
7259
7259
|
query += "when c.stato_restituzione = 4 then 'Parti mancanti' ";
|
|
7260
7260
|
query += "else '' ";
|
|
7261
7261
|
query += "end as Stato, ";
|
|
7262
|
-
query += "c.note as Note from device_consegne dc ";
|
|
7262
|
+
//query += "c.note as Note from device_consegne dc ";
|
|
7263
|
+
query += "c.note as Note from consegna_beni dc ";
|
|
7263
7264
|
query += "inner join consegne c on c.id = dc.id_consegna ";
|
|
7264
7265
|
query += "where dc.id_device = " + id_device;
|
|
7265
7266
|
return query;
|
|
@@ -7275,7 +7276,8 @@ function queryConsegneByIdDeviceMySQL(id_device) {
|
|
|
7275
7276
|
query += "when c.stato_restituzione = 4 then 'Parti mancanti' ";
|
|
7276
7277
|
query += "else '' ";
|
|
7277
7278
|
query += "end as Stato, ";
|
|
7278
|
-
query += "c.note as Note from device_consegne dc ";
|
|
7279
|
+
//query += "c.note as Note from device_consegne dc ";
|
|
7280
|
+
query += "c.note as Note from consegna_beni dc ";
|
|
7279
7281
|
query += "inner join consegne c on c.id = dc.id_consegna ";
|
|
7280
7282
|
query += "where dc.id_device = :id_device";
|
|
7281
7283
|
return query;
|
|
@@ -8082,7 +8084,7 @@ function insertConsegnaDeviceMySQL(id_consegna, id_device, note){
|
|
|
8082
8084
|
query += ")";
|
|
8083
8085
|
return query;
|
|
8084
8086
|
}
|
|
8085
|
-
|
|
8087
|
+
// NOT YET USED
|
|
8086
8088
|
function insertConsegnaDevice(db_used, id_consegna, id_device, note) {
|
|
8087
8089
|
var query = "";
|
|
8088
8090
|
if (db_used) {
|
|
@@ -8118,7 +8120,7 @@ function updateConsegnaDeviceMySQL(id_devcons, id_consegna, id_device, note){
|
|
|
8118
8120
|
query += "where id = :id_devcons";
|
|
8119
8121
|
return query;
|
|
8120
8122
|
}
|
|
8121
|
-
|
|
8123
|
+
// NOT YET USED
|
|
8122
8124
|
function updateConsegnaDevice(db_used, id_devcons, id_consegna, id_device, note) {
|
|
8123
8125
|
var query = "";
|
|
8124
8126
|
if (db_used) {
|
|
@@ -8149,6 +8151,7 @@ function removeConsegnaDeviceMySQL(id_devcons){
|
|
|
8149
8151
|
query += "and id_device = :id_device";
|
|
8150
8152
|
return query;
|
|
8151
8153
|
}
|
|
8154
|
+
// NOT YET USED
|
|
8152
8155
|
function removeConsegnaDevice(db_used, id_consegna, id_device) {
|
|
8153
8156
|
var query = "";
|
|
8154
8157
|
if (db_used) {
|
|
@@ -8533,6 +8536,8 @@ function selectDevicePerConsegnaMySQL(id_consegna) {
|
|
|
8533
8536
|
query += " where dc.id_consegna = :id_consegna";
|
|
8534
8537
|
return query;
|
|
8535
8538
|
}
|
|
8539
|
+
|
|
8540
|
+
// NOT YET USED
|
|
8536
8541
|
function selectDevicePerConsegna(db_used, id_consegna) {
|
|
8537
8542
|
var query = "";
|
|
8538
8543
|
if (db_used) {
|
|
@@ -8583,7 +8588,7 @@ function selectDeviceConsegnaMySQL(id_consegna, id_device) {
|
|
|
8583
8588
|
return query;
|
|
8584
8589
|
}
|
|
8585
8590
|
|
|
8586
|
-
|
|
8591
|
+
// NOT YET USED
|
|
8587
8592
|
function selectDeviceConsegna(db_used, id_consegna, id_device) {
|
|
8588
8593
|
var query = "";
|
|
8589
8594
|
if (db_used) {
|
|
@@ -8747,6 +8752,7 @@ function selectSoftwareConsegnaMySQL(id_consegna, id_software) {
|
|
|
8747
8752
|
}
|
|
8748
8753
|
|
|
8749
8754
|
|
|
8755
|
+
// NOT YET USED
|
|
8750
8756
|
function selectSoftwareConsegna(db_used, id_consegna, id_software) {
|
|
8751
8757
|
var query = "";
|
|
8752
8758
|
if (db_used) {
|