hotFix_6312 fix originalQuantity
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Sergio De la torre 2023-11-02 14:42:22 +01:00
parent 03e2f57306
commit 728838334c
1 changed files with 4 additions and 1 deletions

View File

@ -64,7 +64,10 @@ module.exports = Self => {
const sale = await models.Sale.findById(id, filter, myOptions); const sale = await models.Sale.findById(id, filter, myOptions);
const oldQuantity = sale.quantity; const oldQuantity = sale.quantity;
const result = await sale.updateAttributes({quantity: newQuantity}, myOptions); const result = await sale.updateAttributes({
quantity: newQuantity,
originalQuantity: newQuantity
}, myOptions);
const salesPerson = sale.ticket().client().salesPersonUser(); const salesPerson = sale.ticket().client().salesPersonUser();
if (salesPerson) { if (salesPerson) {