Corretto il pagato
- fix Group Add link
This commit is contained in:
@@ -121,3 +121,11 @@ Gio 04/01 ORE 14:00: [<b>Euro</b>]: Inviate Monete da PaoloRiso a piuchebuono 44
|
||||
Saldi:
|
||||
PaoloRiso: -44.4 €]
|
||||
piuchebuono: 44.4 €]
|
||||
Dom 07/01 ORE 16:22: [<b>Euro</b>]: Inviate Monete da PaoloRiso a 44.4 € [causale: Pagato Ordine n.101]
|
||||
Saldi:
|
||||
PaoloRiso: -44.4 €]
|
||||
: 44.4 €]
|
||||
Dom 07/01 ORE 16:24: [<b>Euro</b>]: Inviate Monete da PaoloRiso a 44.4 € [causale: Pagato Ordine n.101]
|
||||
Saldi:
|
||||
PaoloRiso: -88.8 €]
|
||||
: 88.8 €]
|
||||
@@ -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,6 +696,7 @@ CircuitSchema.statics.sendCoins = async function (onlycheck, idapp, usernameOrig
|
||||
|
||||
const circolantePrec = this.getCircolanteSingolaTransaz(accountorigTable, accountdestTable);
|
||||
|
||||
if (!circuittable.ignoreLimits) {
|
||||
// Check if Sender has enough money
|
||||
if (accountorigTable.saldo - myqty < -accountorigTable.fidoConcesso) {
|
||||
ris.cansend = false;
|
||||
@@ -705,6 +707,7 @@ CircuitSchema.statics.sendCoins = async function (onlycheck, idapp, usernameOrig
|
||||
ris.cansend = false;
|
||||
ris.errormsg = i18n.__('CIRCUIT_AMOUNT_EXCEED_QTAMAX', extrarec.dest);
|
||||
}
|
||||
}
|
||||
|
||||
if (!onlycheck) {
|
||||
// Add a Transaction !
|
||||
|
||||
@@ -716,10 +716,14 @@ module.exports.updateCmd = async function (ordersCart, status, value, req, optio
|
||||
} else if (status === shared_consts.OrderStatus.PAYED) {
|
||||
|
||||
if (value) {
|
||||
// myOrderCart.pagato = false;
|
||||
if (!myOrderCart.pagato) { // Se ancora non è stato confermato:
|
||||
await OrdersCart.addOrderToMovement(myOrderCart, usernameStore, groupnameStore, req);
|
||||
}
|
||||
|
||||
ris = await OrdersCart.setPagatoById(value, myOrderCart);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} else if (status === shared_consts.OrderStatus.DELIVERED) { // Consegnato
|
||||
if (value) {
|
||||
|
||||
@@ -776,6 +776,7 @@ module.exports = {
|
||||
fido_scoperto_default: 1,
|
||||
deperimento: 1,
|
||||
showAlways: 1,
|
||||
ignoreLimits: 1,
|
||||
status: 1,
|
||||
transactionsEnabled: 1,
|
||||
qta_max_default: 1,
|
||||
|
||||
Reference in New Issue
Block a user