Merge pull request 'hotFix_6312 fix originalQuantity' (!1819) from hotFix_6312 into master
gitea/salix/pipeline/head This commit looks good Details

Reviewed-on: #1819
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
This commit is contained in:
Sergio De la torre 2023-11-02 14:05:17 +00:00
commit 439b3091d0
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 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();
if (salesPerson) {