refs #5036 transferSales also transfer sale's logs
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Alexandre Riera 2023-02-24 08:55:04 +01:00
parent be8d19a9f8
commit 6590c6f1fa
1 changed files with 11 additions and 4 deletions

View File

@ -142,6 +142,13 @@ module.exports = Self => {
ticket: ticketId
}
}, myOptions);
query = `UPDATE ticketLog
SET originFk = ?
WHERE changedModel = 'Sale'
AND originFk = ?
AND changedModelId = ?`;
await Self.rawSql(query, [ticketId, id, sale.id], myOptions);
}
const isTicketEmpty = await models.Ticket.isEmpty(id, myOptions);