fix: refs #8612 handled duplicate code error in shelving & parking
This commit is contained in:
parent
728e6e921a
commit
ff3268b6e9
|
@ -258,5 +258,6 @@
|
|||
"clonedFromTicketWeekly": ", that is a cloned sale from ticket {{ ticketWeekly }}",
|
||||
"negativeReplaced": "Replaced item [#{{oldItemId}}]({{{oldItemUrl}}}) {{oldItem}} with [#{{newItemId}}]({{{newItemUrl}}}) {{newItem}} from ticket [{{ticketId}}]({{{ticketUrl}}})",
|
||||
"The tag and priority can't be repeated": "The tag and priority can't be repeated",
|
||||
"duplicateWarehouse": "The introduced warehouse already exists"
|
||||
"duplicateWarehouse": "The introduced warehouse already exists",
|
||||
"duplicateCode": "The code already exists"
|
||||
}
|
||||
|
|
|
@ -399,5 +399,6 @@
|
|||
"Price cannot be blank": "El precio no puede estar en blanco",
|
||||
"clonedFromTicketWeekly": ", que es una linea clonada del ticket {{ticketWeekly}}",
|
||||
"negativeReplaced": "Sustituido el articulo [#{{oldItemId}}]({{{oldItemUrl}}}) {{oldItem}} por [#{{newItemId}}]({{{newItemUrl}}}) {{newItem}} del ticket [{{ticketId}}]({{{ticketUrl}}})",
|
||||
"duplicateWarehouse": "El almacén seleccionado ya existe en la zona"
|
||||
"duplicateWarehouse": "El almacén seleccionado ya existe en la zona",
|
||||
"duplicateCode": "El código ya existe"
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
module.exports = Self => {
|
||||
Self.validatesUniquenessOf('code', {
|
||||
message: `duplicateCode`
|
||||
});
|
||||
};
|
|
@ -1,4 +1,8 @@
|
|||
module.exports = Self => {
|
||||
require('../methods/shelving/getSummary')(Self);
|
||||
require('../methods/shelving/addLog')(Self);
|
||||
|
||||
Self.validatesUniquenessOf('code', {
|
||||
message: `duplicateCode`
|
||||
});
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue