Compare commits

...

2 Commits

Author SHA1 Message Date
Javier Segarra 1890e5d541 Merge branch 'master' into Hotfix-PriceDifferenceShipped
gitea/salix/pipeline/pr-master There was a failure building this commit Details
2025-01-24 12:28:29 +00:00
Jon Elias 6da004e7cf fix: fixed shipped date when it is null
gitea/salix/pipeline/pr-master This commit looks good Details
2025-01-24 09:29:58 +01:00
1 changed files with 4 additions and 1 deletions

View File

@ -108,7 +108,10 @@ module.exports = Self => {
// Get items movable
const ticketOrigin = await models.Ticket.findById(args.id, null, myOptions);
const differenceShipped = ticketOrigin.shipped.getTime() > args.shipped.getTime();
let shipped = ticketOrigin.shipped ?? ticketOrigin.updated;
const differenceShipped = shipped.getTime() > args.shipped.getTime();
const differenceWarehouse = ticketOrigin.warehouseFk != args.warehouseId;
salesObj.haveDifferences = differenceShipped || differenceWarehouse;