Merge pull request 'fixes #5072 client.fiscal-data comprobar que tiene email' (!1278) from 5072-comprobar-email-clientFiscalData into dev
gitea/salix/pipeline/head This commit looks good Details

Reviewed-on: #1278
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
This commit is contained in:
Alexandre Riera 2023-02-01 08:55:33 +00:00
commit 96a3ae8912
4 changed files with 19 additions and 1 deletions

View File

@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed ### Fixed
- (Artículos -> Etiquetas) Permite intercambiar la relevancia entre dos etiquetas. - (Artículos -> Etiquetas) Permite intercambiar la relevancia entre dos etiquetas.
- (Cliente -> Datos Fiscales) No se permite seleccionar 'Notificar vía e-mail' a los clientes sin e-mail
- (Tickets -> Añadir pago) Eliminado "null" en las referencias - (Tickets -> Añadir pago) Eliminado "null" en las referencias
## [2302.01] - 2023-01-26 ## [2302.01] - 2023-01-26

View File

@ -0,0 +1,6 @@
UPDATE `vn`.`client`
SET isToBeMailed = FALSE
WHERE
mailAddress is NULL
AND email is NULL
AND isToBeMailed = TRUE;

View File

@ -261,5 +261,6 @@
"The DOCUWARE PDF document does not exists": "El documento PDF Docuware no existe", "The DOCUWARE PDF document does not exists": "El documento PDF Docuware no existe",
"It is not possible to modify tracked sales": "No es posible modificar líneas de pedido que se hayan empezado a preparar", "It is not possible to modify tracked sales": "No es posible modificar líneas de pedido que se hayan empezado a preparar",
"It is not possible to modify sales that their articles are from Floramondo": "No es posible modificar líneas de pedido cuyos artículos sean de Floramondo", "It is not possible to modify sales that their articles are from Floramondo": "No es posible modificar líneas de pedido cuyos artículos sean de Floramondo",
"It is not possible to modify cloned sales": "No es posible modificar líneas de pedido clonadas" "It is not possible to modify cloned sales": "No es posible modificar líneas de pedido clonadas",
"There is no assigned email for this client": "No hay correo asignado para este cliente"
} }

View File

@ -141,6 +141,16 @@ module.exports = Self => {
done(); 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, Self.validateAsync('defaultAddressFk', isActive,
{message: 'Unable to default a disabled consignee'} {message: 'Unable to default a disabled consignee'}
); );