- corretto saldi pendenti sulla lista circuiti e anche il calcolo

This commit is contained in:
Surya Paolo
2024-02-17 15:07:21 +01:00
parent 8c471c0e81
commit 1268c961cf
2 changed files with 24 additions and 6 deletions

View File

@@ -153,3 +153,15 @@ Sab 17/02 ORE 14:11: [<b>Circuito RIS Bologna</b>]: Inviate Monete da paoloar77
Saldi:
paoloar77: 29 RIS]
SuryaArena: 7 RIS]
Sab 17/02 ORE 14:50: [<b>Circuito RIS Bologna</b>]: Inviate Monete da paoloar77 a SuryaArena 3 RIS [causale: BBBBAAA]
Saldi:
paoloar77: 26 RIS]
SuryaArena: 10 RIS]
Sab 17/02 ORE 14:53: [<b>Circuito RIS Bologna</b>]: Inviate Monete da paoloar77 a SuryaArena 4 RIS [causale: GGGG]
Saldi:
paoloar77: 22 RIS]
SuryaArena: 14 RIS]
Sab 17/02 ORE 15:03: [<b>Circuito RIS Bologna</b>]: Inviate Monete da paoloar77 a SuryaArena 2 RIS [causale: ]
Saldi:
paoloar77: 20 RIS]
SuryaArena: 16 RIS]

View File

@@ -1149,16 +1149,19 @@ sendNotifSchema.statics.getSumPendingTransactionsMittente = async function (idap
const SendNotif = this;
try {
const query = {
let query = {
idapp,
sender: username,
sendergroup: groupname,
typedir: shared_consts.TypeNotifs.TYPEDIR_CIRCUITS,
typeid: shared_consts.TypeNotifs.ID_CIRCUIT_SENDCOINSREQ,
status: 0,
'extrarec.circuitname': circuitname,
};
if (groupname) {
query.sendergroup = groupname;
}
return await SendNotif.find(query).lean();
} catch (e) {
@@ -1171,18 +1174,21 @@ sendNotifSchema.statics.getSumPendingTransactionsDest = async function (idapp, u
const SendNotif = this;
try {
const query = {
let query = {
idapp,
sender: username,
sendergroup: groupname,
typedir: shared_consts.TypeNotifs.TYPEDIR_CIRCUITS,
typeid: shared_consts.TypeNotifs.ID_CIRCUIT_SENDCOINSREQ,
status: 0,
'extrarec.circuitname': circuitname,
'extrarec.dest': username,
'extrarec.groupdest': groupname,
};
if (groupname) {
query.sendergroup = groupname;
query.extrarec.groupdest = groupname;
}
return await SendNotif.find(query).lean();
} catch (e) {