#7289 Sales already moved #3212
|
@ -244,5 +244,7 @@
|
||||||
"Invalid or expired verification code": "Invalid or expired verification code",
|
"Invalid or expired verification code": "Invalid or expired verification code",
|
||||||
"There are tickets for this area, delete them first": "There are tickets for this area, delete them first",
|
"There are tickets for this area, delete them first": "There are tickets for this area, delete them first",
|
||||||
"ticketLostExpedition": "The ticket [{{ticketId}}]({{{ticketUrl}}}) has the following lost expedition:{{ expeditionId }}",
|
"ticketLostExpedition": "The ticket [{{ticketId}}]({{{ticketUrl}}}) has the following lost expedition:{{ expeditionId }}",
|
||||||
"Payment method is required": "Payment method is required"
|
"Payment method is required": "Payment method is required",
|
||||||
|
"Sales already moved": "Sales already moved"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -387,5 +387,7 @@
|
||||||
"There are tickets for this area, delete them first": "Hay tickets para esta sección, borralos primero",
|
"There are tickets for this area, delete them first": "Hay tickets para esta sección, borralos primero",
|
||||||
"There is no company associated with that warehouse": "No hay ninguna empresa asociada a ese almacén",
|
"There is no company associated with that warehouse": "No hay ninguna empresa asociada a ese almacén",
|
||||||
"ticketLostExpedition": "El ticket [{{ticketId}}]({{{ticketUrl}}}) tiene la siguiente expedición perdida:{{ expeditionId }}",
|
"ticketLostExpedition": "El ticket [{{ticketId}}]({{{ticketUrl}}}) tiene la siguiente expedición perdida:{{ expeditionId }}",
|
||||||
"The web user's email already exists": "El correo del usuario web ya existe"
|
"The web user's email already exists": "El correo del usuario web ya existe",
|
||||||
|
"Sales already moved": "Ya han sido transferidas",
|
||||||
|
"Línea ya ha sido transferida": "Línea ya ha sido transferida"
|
||||||
|
|||||||
}
|
}
|
|
@ -80,6 +80,9 @@ module.exports = Self => {
|
||||||
const hasClaimedSales = await models.ClaimBeginning.findOne({where: {saleFk: {inq: saleIds}}});
|
const hasClaimedSales = await models.ClaimBeginning.findOne({where: {saleFk: {inq: saleIds}}});
|
||||||
if (ticketId != id && hasClaimedSales)
|
if (ticketId != id && hasClaimedSales)
|
||||||
throw new UserError(`Can't transfer claimed sales`);
|
throw new UserError(`Can't transfer claimed sales`);
|
||||||
|
const missingSales = sales.some(({id}) => !map.has(id));
|
||||||
|
if (missingSales)
|
||||||
|
throw new UserError($t('Sales already moved'));
|
||||||
|
|
||||||
for (const sale of sales) {
|
for (const sale of sales) {
|
||||||
const originalSale = map.get(sale.id);
|
const originalSale = map.get(sale.id);
|
||||||
|
|
Loading…
Reference in New Issue
clave en castella no pot ser