fix Saldo when press refuse coins.
fix Risolvere problema del ritardo quando si fa il primo login...
This commit is contained in:
@@ -485,16 +485,18 @@ CircuitSchema.statics.sendCoins = async function(onlycheck, idapp, usernameOrig,
|
||||
// Check if Sender has enough money
|
||||
if (accountorigTable.saldo - myqty < -accountorigTable.fidoConcesso) {
|
||||
ris.cansend = false;
|
||||
ris.errormsg = i18n.__('CIRCUIT_AMOUNT_EXCEED_FIDO');
|
||||
ris.errormsg = i18n.__('CIRCUIT_AMOUNT_EXCEED_FIDO', usernameOrig);
|
||||
}
|
||||
if (accountdestTable.saldo + myqty > accountorigTable.qta_maxConcessa) {
|
||||
ris.cansend = false;
|
||||
ris.errormsg = i18n.__('CIRCUIT_AMOUNT_EXCEED_QTAMAX');
|
||||
ris.errormsg = i18n.__('CIRCUIT_AMOUNT_EXCEED_QTAMAX', extrarec.dest);
|
||||
}
|
||||
|
||||
if (!onlycheck) {
|
||||
// Add a Transaction !
|
||||
ris.rec = await Movement.addMov(idapp, accountorigTable, accountdestTable, myqty, extrarec.causal);
|
||||
if (ris.cansend) {
|
||||
ris.rec = await Movement.addMov(idapp, accountorigTable, accountdestTable, myqty, extrarec.causal);
|
||||
}
|
||||
|
||||
if (ris.cansend && ris.rec) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user