Corretto il pagato
- fix Group Add link
This commit is contained in:
10
logtrans.txt
10
logtrans.txt
@@ -120,4 +120,12 @@ paoloar77: 13 RIS]
|
|||||||
Gio 04/01 ORE 14:00: [<b>Euro</b>]: Inviate Monete da PaoloRiso a piuchebuono 44.4 € [causale: Pagato Ordine n.101]
|
Gio 04/01 ORE 14:00: [<b>Euro</b>]: Inviate Monete da PaoloRiso a piuchebuono 44.4 € [causale: Pagato Ordine n.101]
|
||||||
Saldi:
|
Saldi:
|
||||||
PaoloRiso: -44.4 €]
|
PaoloRiso: -44.4 €]
|
||||||
piuchebuono: 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: {
|
totCircolante: {
|
||||||
type: Number,
|
type: Number,
|
||||||
},
|
},
|
||||||
showAlways: {
|
|
||||||
type: Boolean,
|
|
||||||
},
|
|
||||||
totTransato: {
|
totTransato: {
|
||||||
type: Number,
|
type: Number,
|
||||||
},
|
},
|
||||||
@@ -227,6 +224,10 @@ const CircuitSchema = new Schema({
|
|||||||
type: Number,
|
type: Number,
|
||||||
default: 0,
|
default: 0,
|
||||||
},
|
},
|
||||||
|
ignoreLimits: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
CircuitSchema.pre('save', async function (next) {
|
CircuitSchema.pre('save', async function (next) {
|
||||||
@@ -695,15 +696,17 @@ CircuitSchema.statics.sendCoins = async function (onlycheck, idapp, usernameOrig
|
|||||||
|
|
||||||
const circolantePrec = this.getCircolanteSingolaTransaz(accountorigTable, accountdestTable);
|
const circolantePrec = this.getCircolanteSingolaTransaz(accountorigTable, accountdestTable);
|
||||||
|
|
||||||
// Check if Sender has enough money
|
if (!circuittable.ignoreLimits) {
|
||||||
if (accountorigTable.saldo - myqty < -accountorigTable.fidoConcesso) {
|
// Check if Sender has enough money
|
||||||
ris.cansend = false;
|
if (accountorigTable.saldo - myqty < -accountorigTable.fidoConcesso) {
|
||||||
ris.errormsg = i18n.__('CIRCUIT_AMOUNT_EXCEED_FIDO', usernameOrig);
|
ris.cansend = false;
|
||||||
}
|
ris.errormsg = i18n.__('CIRCUIT_AMOUNT_EXCEED_FIDO', usernameOrig);
|
||||||
|
}
|
||||||
|
|
||||||
if (accountdestTable.saldo + myqty > accountdestTable.qta_maxConcessa) {
|
if (accountdestTable.saldo + myqty > accountdestTable.qta_maxConcessa) {
|
||||||
ris.cansend = false;
|
ris.cansend = false;
|
||||||
ris.errormsg = i18n.__('CIRCUIT_AMOUNT_EXCEED_QTAMAX', extrarec.dest);
|
ris.errormsg = i18n.__('CIRCUIT_AMOUNT_EXCEED_QTAMAX', extrarec.dest);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!onlycheck) {
|
if (!onlycheck) {
|
||||||
|
|||||||
@@ -716,10 +716,14 @@ module.exports.updateCmd = async function (ordersCart, status, value, req, optio
|
|||||||
} else if (status === shared_consts.OrderStatus.PAYED) {
|
} else if (status === shared_consts.OrderStatus.PAYED) {
|
||||||
|
|
||||||
if (value) {
|
if (value) {
|
||||||
await OrdersCart.addOrderToMovement(myOrderCart, usernameStore, groupnameStore, req);
|
// myOrderCart.pagato = false;
|
||||||
|
if (!myOrderCart.pagato) { // Se ancora non è stato confermato:
|
||||||
|
await OrdersCart.addOrderToMovement(myOrderCart, usernameStore, groupnameStore, req);
|
||||||
|
|
||||||
|
ris = await OrdersCart.setPagatoById(value, myOrderCart);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ris = await OrdersCart.setPagatoById(value, myOrderCart);
|
|
||||||
|
|
||||||
} else if (status === shared_consts.OrderStatus.DELIVERED) { // Consegnato
|
} else if (status === shared_consts.OrderStatus.DELIVERED) { // Consegnato
|
||||||
if (value) {
|
if (value) {
|
||||||
|
|||||||
@@ -776,6 +776,7 @@ module.exports = {
|
|||||||
fido_scoperto_default: 1,
|
fido_scoperto_default: 1,
|
||||||
deperimento: 1,
|
deperimento: 1,
|
||||||
showAlways: 1,
|
showAlways: 1,
|
||||||
|
ignoreLimits: 1,
|
||||||
status: 1,
|
status: 1,
|
||||||
transactionsEnabled: 1,
|
transactionsEnabled: 1,
|
||||||
qta_max_default: 1,
|
qta_max_default: 1,
|
||||||
|
|||||||
Reference in New Issue
Block a user