diff --git a/back/models/vn-user.json b/back/models/vn-user.json index 9e3f8df89..f5eb3ae0f 100644 --- a/back/models/vn-user.json +++ b/back/models/vn-user.json @@ -23,10 +23,6 @@ "columnName": "name" } }, - "password": { - "type": "string", - "required": true - }, "roleFk": { "type": "number", "mysql": { @@ -42,9 +38,6 @@ "active": { "type": "boolean" }, - "email": { - "type": "string" - }, "created": { "type": "date" }, diff --git a/modules/ticket/back/methods/ticket/transferSales.js b/modules/ticket/back/methods/ticket/transferSales.js index f2cb89205..54306510c 100644 --- a/modules/ticket/back/methods/ticket/transferSales.js +++ b/modules/ticket/back/methods/ticket/transferSales.js @@ -138,14 +138,15 @@ module.exports = Self => { // Update original sale const rest = originalSale.quantity - sale.quantity; query = `UPDATE sale - SET quantity = ? + SET quantity = ?, + originalQuantity = ? WHERE id = ?`; - await Self.rawSql(query, [rest, sale.id], options); + await Self.rawSql(query, [rest, rest, sale.id], options); // Clone sale with new quantity - query = `INSERT INTO sale (itemFk, ticketFk, concept, quantity, originalQuantity, price, discount, priceFixed, + query = `INSERT INTO sale (itemFk, ticketFk, concept, quantity, price, discount, priceFixed, reserved, isPicked, isPriceFixed, isAdded) - SELECT itemFk, ?, concept, ?, originalQuantity, price, discount, priceFixed, + SELECT itemFk, ?, concept, ?, price, discount, priceFixed, reserved, isPicked, isPriceFixed, isAdded FROM sale WHERE id = ?`;