alsmanager_lib 3.0.133 → 3.0.135
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 +33 -17
- package/package.json +1 -1
package/lib/modules.js
CHANGED
|
@@ -2822,14 +2822,15 @@ function queryOSByFilter(tipo, date_ref) {
|
|
|
2822
2822
|
var query = "select distinct dt.os as os from devices d ";
|
|
2823
2823
|
query += "left join device_pc dt on d.id = dt.id_device ";
|
|
2824
2824
|
query += "where d.type = '" + tipo + "' ";
|
|
2825
|
-
query += "
|
|
2825
|
+
query += "and dt.os is not null ";
|
|
2826
|
+
query += "order by dt.os";
|
|
2826
2827
|
return query;
|
|
2827
2828
|
}
|
|
2828
2829
|
|
|
2829
2830
|
function queryOSVersionByFilter(os) {
|
|
2830
2831
|
var query = "select distinct dt.os_version as version from device_pc dt ";
|
|
2831
2832
|
query += "where dt.os = '" + os + "' ";
|
|
2832
|
-
query += "order dt.os_version";
|
|
2833
|
+
query += "order by dt.os_version";
|
|
2833
2834
|
return query;
|
|
2834
2835
|
}
|
|
2835
2836
|
|
|
@@ -6514,8 +6515,9 @@ function checkEsistenzaInInventario(db_used,codice) {
|
|
|
6514
6515
|
|
|
6515
6516
|
function selectTabelleInventariComboSQLite(only_dismiss, only_pnrr) {
|
|
6516
6517
|
var query = "select name, description from table_inventari "
|
|
6518
|
+
query += "where is_active = 1 ";
|
|
6517
6519
|
if ((only_dismiss && only_dismiss == 1)|| (only_pnrr && only_pnrr == 1)) {
|
|
6518
|
-
query += "
|
|
6520
|
+
query += "and ";
|
|
6519
6521
|
if (only_dismiss && only_dismiss == 1) {
|
|
6520
6522
|
query += "is_dismissione = 1";
|
|
6521
6523
|
if (only_pnrr && only_pnrr == 1)
|
|
@@ -6530,8 +6532,9 @@ function selectTabelleInventariComboSQLite(only_dismiss, only_pnrr) {
|
|
|
6530
6532
|
|
|
6531
6533
|
function selectTabelleInventariComboMySQL(only_dismiss, only_pnrr) {
|
|
6532
6534
|
var query = "select name, description from table_inventari "
|
|
6535
|
+
query += "where is_active = 1 ";
|
|
6533
6536
|
if ((only_dismiss && only_dismiss == 1)|| (only_pnrr && only_pnrr == 1)) {
|
|
6534
|
-
query += "
|
|
6537
|
+
query += "and ";
|
|
6535
6538
|
if (only_dismiss && only_dismiss == 1) {
|
|
6536
6539
|
query += "is_dismissione = 1";
|
|
6537
6540
|
if (only_pnrr && only_pnrr == 1)
|
|
@@ -7247,18 +7250,26 @@ function deleteBeneInLimbo(id_limbo) {
|
|
|
7247
7250
|
return query;
|
|
7248
7251
|
}
|
|
7249
7252
|
|
|
7253
|
+
|
|
7254
|
+
|
|
7255
|
+
|
|
7250
7256
|
//End Beni in Limbo
|
|
7251
7257
|
// Beni in consegna
|
|
7252
7258
|
function queryConsegneByIdDeviceSQLite(id_device) {
|
|
7253
|
-
var query = "select
|
|
7259
|
+
var query = "select dc.data_consegna as Consegna, ";
|
|
7254
7260
|
query += "case ";
|
|
7255
|
-
query += "when
|
|
7256
|
-
query += "when
|
|
7257
|
-
query += "when
|
|
7258
|
-
query += "when
|
|
7259
|
-
query += "when
|
|
7261
|
+
query += "when dc.stato_restituzione = 0 then 'Prestito in corso' ";
|
|
7262
|
+
query += "when dc.stato_restituzione = 1 then 'Non restituito' ";
|
|
7263
|
+
query += "when dc.stato_restituzione = 2 then 'Restituito' ";
|
|
7264
|
+
query += "when dc.stato_restituzione = 3 then 'Danneggiato' ";
|
|
7265
|
+
query += "when dc.stato_restituzione = 4 then 'Parti mancanti' ";
|
|
7260
7266
|
query += "else '' ";
|
|
7261
7267
|
query += "end as Stato, ";
|
|
7268
|
+
query += "case ";
|
|
7269
|
+
query += "when dc.data_restituzione is not null then dc.data_restituzione ";
|
|
7270
|
+
query += "when trim(dc.data_restituzione) <> '' then dc.data_restituzione ";
|
|
7271
|
+
query += "else '' ";
|
|
7272
|
+
query += "end as Restituzione, ";
|
|
7262
7273
|
//query += "c.note as Note from device_consegne dc ";
|
|
7263
7274
|
query += "c.note as Note from consegna_beni dc ";
|
|
7264
7275
|
query += "inner join consegne c on c.id = dc.id_consegna ";
|
|
@@ -7267,17 +7278,22 @@ function queryConsegneByIdDeviceSQLite(id_device) {
|
|
|
7267
7278
|
}
|
|
7268
7279
|
|
|
7269
7280
|
function queryConsegneByIdDeviceMySQL(id_device) {
|
|
7270
|
-
var query = "select
|
|
7281
|
+
var query = "select dc.data_consegna as Consegna, ";
|
|
7271
7282
|
query += "case ";
|
|
7272
|
-
query += "when
|
|
7273
|
-
query += "when
|
|
7274
|
-
query += "when
|
|
7275
|
-
query += "when
|
|
7276
|
-
query += "when
|
|
7283
|
+
query += "when dc.stato_restituzione = 0 then 'Prestito in corso' ";
|
|
7284
|
+
query += "when dc.stato_restituzione = 1 then 'Non restituito' ";
|
|
7285
|
+
query += "when dc.stato_restituzione = 2 then 'Restituito' ";
|
|
7286
|
+
query += "when dc.stato_restituzione = 3 then 'Danneggiato' ";
|
|
7287
|
+
query += "when dc.stato_restituzione = 4 then 'Parti mancanti' ";
|
|
7277
7288
|
query += "else '' ";
|
|
7278
7289
|
query += "end as Stato, ";
|
|
7290
|
+
query += "case ";
|
|
7291
|
+
query += "when dc.data_restituzione is not null then dc.data_restituzione ";
|
|
7292
|
+
query += "when trim(dc.data_restituzione) <> '' then dc.data_restituzione ";
|
|
7293
|
+
query += "else '' ";
|
|
7294
|
+
query += "end as Restituzione, ";
|
|
7279
7295
|
//query += "c.note as Note from device_consegne dc ";
|
|
7280
|
-
query += "
|
|
7296
|
+
query += "dc.note as Note from consegna_beni dc ";
|
|
7281
7297
|
query += "inner join consegne c on c.id = dc.id_consegna ";
|
|
7282
7298
|
query += "where dc.id_bene = :id_device";
|
|
7283
7299
|
return query;
|