2999-ticket_dms_import_from_existing + buyer to ticket.isEditable #678

Merged
joan merged 8 commits from 2999-ticket_dms_import_from_existing into dev 2021-06-29 10:13:24 +00:00
3 changed files with 11 additions and 2 deletions
Showing only changes of commit e2ff3ff17f - Show all commits

View File

@ -181,5 +181,6 @@
"This specie already exist": "Esta especie ya existe",
"Client assignment has changed": "He cambiado el comercial ~*\"<{{previousWorkerName}}>\"*~ por *\"<{{currentWorkerName}}>\"* del cliente [{{clientName}} ({{clientId}})]({{{url}}})",
"None": "Ninguno",
"The contract was not active during the selected date": "El contrato no estaba activo durante la fecha seleccionada"
"The contract was not active during the selected date": "El contrato no estaba activo durante la fecha seleccionada",
"This document already exists on this ticket": "Este documento ya existe en el ticket"
}

View File

@ -1,3 +1,11 @@
const UserError = require('vn-loopback/util/user-error');
module.exports = Self => {
require('../methods/ticket-dms/removeFile')(Self);
Self.rewriteDbError(function(err) {
if (err.code === 'ER_DUP_ENTRY')
return new UserError('This document already exists on this ticket');
return err;
});
};

View File

@ -12,7 +12,7 @@
},
"properties": {
"dmsFk": {
"type": "Number",
"type": "number",
"id": true,
"required": true
}