Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into dev
gitea/salix/dev This commit looks good
Details
gitea/salix/dev This commit looks good
Details
This commit is contained in:
commit
1cc8b5512e
|
@ -3,7 +3,7 @@ View item: Ver artículo
|
|||
Category: Reino
|
||||
Description: Descripción
|
||||
Size: Medida
|
||||
Type: Familia
|
||||
Item family: Familia
|
||||
Name: Nombre
|
||||
Full name: Nombre completo
|
||||
Relevancy: Relevancia
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
<vn-label-value label="Full name"
|
||||
value="{{$ctrl.summary.item.longName}}">
|
||||
</vn-label-value>
|
||||
<vn-label-value label="Type"
|
||||
<vn-label-value label="Item family"
|
||||
value="{{$ctrl.summary.item.itemType.name}}">
|
||||
</vn-label-value>
|
||||
<vn-label-value label="Size"
|
||||
|
|
|
@ -162,6 +162,7 @@ module.exports = Self => {
|
|||
|
||||
if (sale.quantity > originalSale.quantity)
|
||||
throw new UserError('Invalid quantity');
|
||||
|
||||
// Update original sale
|
||||
const rest = originalSale.quantity - sale.quantity;
|
||||
const updatedSale = await models.Sale.updateAll({
|
||||
|
@ -173,7 +174,7 @@ module.exports = Self => {
|
|||
newSale.ticketFk = ticketId;
|
||||
newSale.quantity = sale.quantity;
|
||||
|
||||
await models.Sale.create(newSale, options);
|
||||
const createdSale = await models.Sale.create(newSale, options);
|
||||
|
||||
// Clone sale components
|
||||
const saleComponents = await models.SaleComponent.find({
|
||||
|
@ -187,6 +188,6 @@ module.exports = Self => {
|
|||
|
||||
await models.SaleComponent.create(newComponents, options);
|
||||
|
||||
return [updatedSale, createdSale];
|
||||
return updatedSale;
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue