2999-ticket_dms_import_from_existing + buyer to ticket.isEditable #678
|
@ -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"
|
||||
}
|
|
@ -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;
|
||||
});
|
||||
};
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
},
|
||||
"properties": {
|
||||
"dmsFk": {
|
||||
"type": "Number",
|
||||
"type": "number",
|
||||
"id": true,
|
||||
"required": true
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue