fixes #5072 client.fiscal-data comprobar que tiene email #1278
|
@ -0,0 +1,6 @@
|
|||
UPDATE vn.client
|
||||
SET isToBeMailed = FALSE
|
||||
WHERE
|
||||
mailAddress is NULL
|
||||
AND email is NULL
|
||||
AND isToBeMailed = TRUE;
|
|
@ -259,5 +259,6 @@
|
|||
"Try again": "Vuelve a intentarlo",
|
||||
"Aplicación bloqueada por el usuario 9": "Aplicación bloqueada por el usuario 9",
|
||||
"Failed to upload file": "Error al subir archivo",
|
||||
"The DOCUWARE PDF document does not exists": "The DOCUWARE PDF document does not exists"
|
||||
"The DOCUWARE PDF document does not exists": "The DOCUWARE PDF document does not exists",
|
||||
"There is no assigned email for this client": "No hay correo asignado para este cliente"
|
||||
}
|
||||
|
|
|
@ -141,6 +141,16 @@ module.exports = Self => {
|
|||
done();
|
||||
}
|
||||
|
||||
Self.validateAsync('isToBeMailed', isToBeMailed, {
|
||||
message: 'There is no assigned email for this client'
|
||||
});
|
||||
|
||||
function isToBeMailed(err, done) {
|
||||
if (this.isToBeMailed == true && !this.email)
|
||||
err();
|
||||
done();
|
||||
}
|
||||
|
||||
Self.validateAsync('defaultAddressFk', isActive,
|
||||
{message: 'Unable to default a disabled consignee'}
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue