alsmanager_lib 3.0.54 → 3.0.55
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 +34 -0
- package/package.json +1 -1
package/lib/modules.js
CHANGED
|
@@ -6913,6 +6913,38 @@ function createConsegnaMessage(nominativo, email, rif_consegna, bene, data_limit
|
|
|
6913
6913
|
return msgObj;
|
|
6914
6914
|
}
|
|
6915
6915
|
|
|
6916
|
+
function getInviiEmailConsegna(id_consegna) {
|
|
6917
|
+
var query = "select STRFTIME('%d/%m/%Y', cie.data_invio) as Data_Invio, cie.esito as Esito_Invio, cie.email_destinatario as Email, ";
|
|
6918
|
+
query += "cb.tipo_bene as Tipo, ";
|
|
6919
|
+
query += "case ";
|
|
6920
|
+
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) ";
|
|
6921
|
+
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) ";
|
|
6922
|
+
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) ";
|
|
6923
|
+
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) ";
|
|
6924
|
+
query += "else '' ";
|
|
6925
|
+
query += "end as Bene ";
|
|
6926
|
+
query += "from consegna_invio_email cie ";
|
|
6927
|
+
query += "left join consegna_beni cb on cie.id_bene = cb.id_bene ";
|
|
6928
|
+
query += "join consegne c on c.id = cie.id_consegna ";
|
|
6929
|
+
query += "left join devices d on cie.id_bene = d.id ";
|
|
6930
|
+
query += "left join softwares s on cie.id_bene = s.id ";
|
|
6931
|
+
query += "where cie.id_consegna = " + id_consegna + " ";
|
|
6932
|
+
query += "order by cie.data_invio desc";
|
|
6933
|
+
return query;
|
|
6934
|
+
}
|
|
6935
|
+
|
|
6936
|
+
function insertInvioEmailConsegna(id_consegna, id_bene, data_invio, email_invio, esito_invio) {
|
|
6937
|
+
var query = "insert into consegna_invio_email (id_consegna, id_bene, data_invio, email_destinatario, esito) values ";
|
|
6938
|
+
query += "(" + id_consegna + ", ";
|
|
6939
|
+
query += id_bene + ", ";
|
|
6940
|
+
query += "'" + data_invio + "', ";
|
|
6941
|
+
query += "'" + email_invio + "', ";
|
|
6942
|
+
query += "'" + esito_invio + "' ";
|
|
6943
|
+
query += ")";
|
|
6944
|
+
return query;
|
|
6945
|
+
}
|
|
6946
|
+
|
|
6947
|
+
|
|
6916
6948
|
|
|
6917
6949
|
//End Creazione email sollecito consegna
|
|
6918
6950
|
|
|
@@ -14268,6 +14300,8 @@ module.exports = {
|
|
|
14268
14300
|
queryConsegnaById,
|
|
14269
14301
|
getDatiConsegneAttive,
|
|
14270
14302
|
createConsegnaMessage,
|
|
14303
|
+
getInviiEmailConsegna,
|
|
14304
|
+
insertInvioEmailConsegna,
|
|
14271
14305
|
createConsegnaMySQLObj,
|
|
14272
14306
|
insertConsegna,
|
|
14273
14307
|
updateConsegna,
|