alsmanager_lib 3.0.133 → 3.0.134
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 +26 -13
- package/package.json +1 -1
package/lib/modules.js
CHANGED
|
@@ -7247,18 +7247,26 @@ function deleteBeneInLimbo(id_limbo) {
|
|
|
7247
7247
|
return query;
|
|
7248
7248
|
}
|
|
7249
7249
|
|
|
7250
|
+
|
|
7251
|
+
|
|
7252
|
+
|
|
7250
7253
|
//End Beni in Limbo
|
|
7251
7254
|
// Beni in consegna
|
|
7252
7255
|
function queryConsegneByIdDeviceSQLite(id_device) {
|
|
7253
|
-
var query = "select
|
|
7256
|
+
var query = "select dc.data_consegna as Consegna, ";
|
|
7254
7257
|
query += "case ";
|
|
7255
|
-
query += "when
|
|
7256
|
-
query += "when
|
|
7257
|
-
query += "when
|
|
7258
|
-
query += "when
|
|
7259
|
-
query += "when
|
|
7258
|
+
query += "when dc.stato_restituzione = 0 then 'Prestito in corso' ";
|
|
7259
|
+
query += "when dc.stato_restituzione = 1 then 'Non restituito' ";
|
|
7260
|
+
query += "when dc.stato_restituzione = 2 then 'Restituito' ";
|
|
7261
|
+
query += "when dc.stato_restituzione = 3 then 'Danneggiato' ";
|
|
7262
|
+
query += "when dc.stato_restituzione = 4 then 'Parti mancanti' ";
|
|
7260
7263
|
query += "else '' ";
|
|
7261
7264
|
query += "end as Stato, ";
|
|
7265
|
+
query += "case ";
|
|
7266
|
+
query += "when dc.data_restituzione is not null then dc.data_restituzione ";
|
|
7267
|
+
query += "when trim(dc.data_restituzione) <> '' then dc.data_restituzione ";
|
|
7268
|
+
query += "else '' ";
|
|
7269
|
+
query += "end as Restituzione, ";
|
|
7262
7270
|
//query += "c.note as Note from device_consegne dc ";
|
|
7263
7271
|
query += "c.note as Note from consegna_beni dc ";
|
|
7264
7272
|
query += "inner join consegne c on c.id = dc.id_consegna ";
|
|
@@ -7267,17 +7275,22 @@ function queryConsegneByIdDeviceSQLite(id_device) {
|
|
|
7267
7275
|
}
|
|
7268
7276
|
|
|
7269
7277
|
function queryConsegneByIdDeviceMySQL(id_device) {
|
|
7270
|
-
var query = "select
|
|
7278
|
+
var query = "select dc.data_consegna as Consegna, ";
|
|
7271
7279
|
query += "case ";
|
|
7272
|
-
query += "when
|
|
7273
|
-
query += "when
|
|
7274
|
-
query += "when
|
|
7275
|
-
query += "when
|
|
7276
|
-
query += "when
|
|
7280
|
+
query += "when dc.stato_restituzione = 0 then 'Prestito in corso' ";
|
|
7281
|
+
query += "when dc.stato_restituzione = 1 then 'Non restituito' ";
|
|
7282
|
+
query += "when dc.stato_restituzione = 2 then 'Restituito' ";
|
|
7283
|
+
query += "when dc.stato_restituzione = 3 then 'Danneggiato' ";
|
|
7284
|
+
query += "when dc.stato_restituzione = 4 then 'Parti mancanti' ";
|
|
7277
7285
|
query += "else '' ";
|
|
7278
7286
|
query += "end as Stato, ";
|
|
7287
|
+
query += "case ";
|
|
7288
|
+
query += "when dc.data_restituzione is not null then dc.data_restituzione ";
|
|
7289
|
+
query += "when trim(dc.data_restituzione) <> '' then dc.data_restituzione ";
|
|
7290
|
+
query += "else '' ";
|
|
7291
|
+
query += "end as Restituzione, ";
|
|
7279
7292
|
//query += "c.note as Note from device_consegne dc ";
|
|
7280
|
-
query += "
|
|
7293
|
+
query += "dc.note as Note from consegna_beni dc ";
|
|
7281
7294
|
query += "inner join consegne c on c.id = dc.id_consegna ";
|
|
7282
7295
|
query += "where dc.id_bene = :id_device";
|
|
7283
7296
|
return query;
|