Fix[priceDifference]: Fixed shipped field #3380

Merged
jon merged 1 commits from Fix-priceDifferenceError into dev 2025-01-24 07:33:31 +00: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;