- transazioni pendenti errore fixed (Elena)
This commit is contained in:
@@ -398,7 +398,7 @@ AccountSchema.statics.getUserAccounts = async function (idapp, username) {
|
||||
if (ris) {
|
||||
for (const account of ris) {
|
||||
const pendingtransactions = await SendNotif.getSumPendingTransactions(idapp, username, account.circuit.name);
|
||||
const saldopending = pendingtransactions.reduce((sum, rec) => sum + rec.result.extrarec.qty, 0);
|
||||
const saldopending = pendingtransactions.reduce((sum, rec) => sum + rec.extrarec.qty, 0);
|
||||
account.saldo -= saldopending;
|
||||
account.totTransato = account.totTransato || 0;
|
||||
}
|
||||
|
||||
@@ -1049,6 +1049,12 @@ sendNotifSchema.statics.sendToTheDestinations = async function (myrecnotifpass,
|
||||
send = true;
|
||||
}
|
||||
}
|
||||
} else if (myrecnotifpass.typedir === shared_consts.TypeNotifs.TYPEDIR_CIRCUITS) {
|
||||
if (shared_consts.TABLES_CIRCUITS_NOTIFICATION.includes(myrecnotifpass.tablerec)) {
|
||||
if (usernotifprofile && tools.isBitActive(usernotifprofile.value, shared_consts.CircuitsNotif.STATUS_NEW)) {
|
||||
send = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (send) {
|
||||
|
||||
Reference in New Issue
Block a user