corregida logica al añadir credito
This commit is contained in:
parent
261d9408ee
commit
c217e5c27f
|
@ -116,12 +116,7 @@ module.exports = function(Client) {
|
|||
}
|
||||
|
||||
function maxCb(_, instances) {
|
||||
if (!instances) {
|
||||
done(generateErrorCredit());
|
||||
return;
|
||||
}
|
||||
|
||||
if (instances.length !== 1 || instances[0].employeeFk == userId || instances[0].amount > 0) {
|
||||
if (!instances || instances.length !== 1 || instances[0].employeeFk == userId || instances[0].amount > 0) {
|
||||
done();
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
module.exports = fi => {
|
||||
if (fi === undefined || fi === null) {
|
||||
return true;
|
||||
}
|
||||
let dni = fi;
|
||||
let getLetterDni = dni => {
|
||||
const regExpDni = 'TRWAGMYFPDXBNJZSQVHLCKE';
|
||||
|
|
Loading…
Reference in New Issue