Corretto il pagato
- fix Group Add link
This commit is contained in:
@@ -84,9 +84,6 @@ const CircuitSchema = new Schema({
|
||||
totCircolante: {
|
||||
type: Number,
|
||||
},
|
||||
showAlways: {
|
||||
type: Boolean,
|
||||
},
|
||||
totTransato: {
|
||||
type: Number,
|
||||
},
|
||||
@@ -227,6 +224,10 @@ const CircuitSchema = new Schema({
|
||||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
ignoreLimits: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
});
|
||||
|
||||
CircuitSchema.pre('save', async function (next) {
|
||||
@@ -695,15 +696,17 @@ CircuitSchema.statics.sendCoins = async function (onlycheck, idapp, usernameOrig
|
||||
|
||||
const circolantePrec = this.getCircolanteSingolaTransaz(accountorigTable, accountdestTable);
|
||||
|
||||
// Check if Sender has enough money
|
||||
if (accountorigTable.saldo - myqty < -accountorigTable.fidoConcesso) {
|
||||
ris.cansend = false;
|
||||
ris.errormsg = i18n.__('CIRCUIT_AMOUNT_EXCEED_FIDO', usernameOrig);
|
||||
}
|
||||
if (!circuittable.ignoreLimits) {
|
||||
// Check if Sender has enough money
|
||||
if (accountorigTable.saldo - myqty < -accountorigTable.fidoConcesso) {
|
||||
ris.cansend = false;
|
||||
ris.errormsg = i18n.__('CIRCUIT_AMOUNT_EXCEED_FIDO', usernameOrig);
|
||||
}
|
||||
|
||||
if (accountdestTable.saldo + myqty > accountdestTable.qta_maxConcessa) {
|
||||
ris.cansend = false;
|
||||
ris.errormsg = i18n.__('CIRCUIT_AMOUNT_EXCEED_QTAMAX', extrarec.dest);
|
||||
if (accountdestTable.saldo + myqty > accountdestTable.qta_maxConcessa) {
|
||||
ris.cansend = false;
|
||||
ris.errormsg = i18n.__('CIRCUIT_AMOUNT_EXCEED_QTAMAX', extrarec.dest);
|
||||
}
|
||||
}
|
||||
|
||||
if (!onlycheck) {
|
||||
|
||||
Reference in New Issue
Block a user