añadido if para los clientes que no tienen dni
This commit is contained in:
parent
7a368f3dd0
commit
cfefc980f6
|
@ -17,8 +17,13 @@ module.exports = Self => {
|
|||
|
||||
async function cannotHaveET(err, done) {
|
||||
let client = await Self.app.models.Client.findById(this.clientFk);
|
||||
let cannotHaveET;
|
||||
if (client && client.fi) {
|
||||
let tin = client.fi.toUpperCase();
|
||||
let cannotHaveET = /^[A-B]/.test(tin);
|
||||
cannotHaveET = /^[A-B]/.test(tin);
|
||||
} else
|
||||
cannotHaveET = false;
|
||||
|
||||
|
||||
if (cannotHaveET && this.isEqualizated)
|
||||
err();
|
||||
|
|
Loading…
Reference in New Issue