#256 TIN validation only when isTaxDataChecked is set to true

This commit is contained in:
Juan 2018-05-22 12:09:53 +02:00
parent 518a82bf26
commit ab60e78d1c
1 changed files with 3 additions and 0 deletions

View File

@ -52,6 +52,9 @@ module.exports = Self => {
}); });
let validateTin = require('../validations/validateTin'); let validateTin = require('../validations/validateTin');
async function tinIsValid(err, done) { async function tinIsValid(err, done) {
if (!this.isTaxDataChecked)
return done();
let filter = { let filter = {
fields: ['code'], fields: ['code'],
where: {id: this.countryFk} where: {id: this.countryFk}