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) {
|
function maxCb(_, instances) {
|
||||||
if (!instances) {
|
if (!instances || instances.length !== 1 || instances[0].employeeFk == userId || instances[0].amount > 0) {
|
||||||
done(generateErrorCredit());
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (instances.length !== 1 || instances[0].employeeFk == userId || instances[0].amount > 0) {
|
|
||||||
done();
|
done();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
module.exports = fi => {
|
module.exports = fi => {
|
||||||
|
if (fi === undefined || fi === null) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
let dni = fi;
|
let dni = fi;
|
||||||
let getLetterDni = dni => {
|
let getLetterDni = dni => {
|
||||||
const regExpDni = 'TRWAGMYFPDXBNJZSQVHLCKE';
|
const regExpDni = 'TRWAGMYFPDXBNJZSQVHLCKE';
|
||||||
|
|
Loading…
Reference in New Issue