alsmanager_lib 3.0.49 → 3.0.50
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 +19 -0
- package/package.json +1 -1
package/lib/modules.js
CHANGED
|
@@ -6882,6 +6882,24 @@ function queryConsegnaById(db_used,id_consegna) {
|
|
|
6882
6882
|
}
|
|
6883
6883
|
|
|
6884
6884
|
//Creazione email sollecito consegna
|
|
6885
|
+
function getDatiConsegneAttive() {
|
|
6886
|
+
var query = "select c.richiedente_adulto as Nominativo, c.email_adulto as Email, concat('Consegna n.', c.id, ' del ', STRFTIME('%d/%m/%Y', c.data_consegna)) as Consegna, ";
|
|
6887
|
+
query += "case ";
|
|
6888
|
+
query += "when d.id is not null and d.inv_ict3_number is not null and trim(d.inv_ict3_number) <> '' then concat(d.manifacturer, ' - ', d.model, ' - Inv.', d.inv_ict3_number) ";
|
|
6889
|
+
query += "when d.id is not null and d.serial_no is not null and trim(d.serial_no) <> '' then concat(d.manifacturer, ' - ', d.model, ' - S/N:', d.serial_no) ";
|
|
6890
|
+
query += "when s.id is not null and s.inv_ict3_number is not null and trim(s.inv_ict3_number) <> '' then concat(s.maker, ' - ', s.model, ' - Inv.', s.inv_ict3_number) ";
|
|
6891
|
+
query += "when s.id is not null and s.serial_no is not null and trim(s.serial_no) <> '' then concat(s.maker, ' - ', s.model, ' - S/N:', s.serial_no) ";
|
|
6892
|
+
query += "else '' ";
|
|
6893
|
+
query += "end as bene_consegnato ";
|
|
6894
|
+
query += "from consegna_beni cb ";
|
|
6895
|
+
query += "join consegne c on c.id = cb.id_consegna ";
|
|
6896
|
+
query += "left join devices d on cb.id_bene = d.id ";
|
|
6897
|
+
query += "left join softwares s on cb.id_bene = s.id ";
|
|
6898
|
+
query += "where cb.stato_restituzione = 0 ";
|
|
6899
|
+
return query;
|
|
6900
|
+
}
|
|
6901
|
+
|
|
6902
|
+
|
|
6885
6903
|
function createConsegnaMessage(consegna, listBeni, data_limite) {
|
|
6886
6904
|
var msgObj = {};
|
|
6887
6905
|
if (consegna) {
|
|
@@ -14252,6 +14270,7 @@ module.exports = {
|
|
|
14252
14270
|
getLastGestioneDeviceByIdDevice,
|
|
14253
14271
|
queryConsegne,
|
|
14254
14272
|
queryConsegnaById,
|
|
14273
|
+
getDatiConsegneAttive,
|
|
14255
14274
|
createConsegnaMessage,
|
|
14256
14275
|
createConsegnaMySQLObj,
|
|
14257
14276
|
insertConsegna,
|