#1364 bug create ticket

This commit is contained in:
Bernat 2019-04-24 11:02:31 +02:00
parent 6747a80943
commit 37293ad695
2 changed files with 0 additions and 8 deletions

View File

@ -67,7 +67,6 @@
"Tag value cannot be blank": "El valor del tag no puede quedar en blanco",
"ORDER_EMPTY": "Cesta vacía",
"You don't have enough privileges to do that": "No tienes permisos para cambiar esto",
"You can't create a ticket for a client that has a debt": "No puedes crear un ticket para un client con deuda",
"NO SE PUEDE DESACTIVAR EL CONSIGNAT": "NO SE PUEDE DESACTIVAR EL CONSIGNAT",
"Error. El NIF/CIF está repetido": "Error. El NIF/CIF está repetido",
"Street cannot be empty": "Dirección no puede estar en blanco",

View File

@ -49,13 +49,6 @@ module.exports = Self => {
if (!address.client().isActive)
throw new UserError(`You can't create a ticket for a inactive client`);
let clientFk = address.clientFk;
let query = `SELECT vn.clientGetDebt(?, CURDATE()) AS debt`;
let clientDebt = await Self.rawSql(query, [clientFk]);
if (address.client().credit - clientDebt[0].debt <= 0)
throw new UserError(`You can't create a ticket for a client that has a debt`);
}
if (!transaction || !transaction.commit)