diff --git a/services/loopback/common/methods/ticket/new.js b/services/loopback/common/methods/ticket/new.js index 76f20145d..22b7a86a0 100644 --- a/services/loopback/common/methods/ticket/new.js +++ b/services/loopback/common/methods/ticket/new.js @@ -34,13 +34,13 @@ module.exports = Self => { throw new UserError(`This address doesn't exist`); if (address.client().isFreezed) - throw new UserError(`You can't create an order for a frozen client`); + throw new UserError(`You can't create a ticket for a frozen client`); if (!address.client().isActive) - throw new UserError(`You can't create an order for a inactive client`); + throw new UserError(`You can't create a ticket for a inactive client`); if (!address.client().isTaxDataChecked) - throw new UserError(`You can't create an order for a client that doesn't has tax data verified`); + throw new UserError(`You can't create a ticket for a client that doesn't has tax data verified`); let clientFk = address.clientFk; let agency; @@ -54,7 +54,7 @@ module.exports = Self => { let clientDebt = await Self.rawSql(query, [clientFk]); if (address.client().credit - clientDebt[0].debt <= 0) - throw new UserError(`You can't create an order for a client that has a debt`); + throw new UserError(`You can't create a ticket for a client that has a debt`); } if (!params.userId && ctx.req && ctx.req.accessToken.userId)