fix: refs #7835 transferSales
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Guillermo Bonet 2024-08-05 12:57:38 +02:00
parent df672a22eb
commit 91253cc807
1 changed files with 2 additions and 2 deletions

View File

@ -83,12 +83,12 @@ module.exports = Self => {
for (const sale of sales) {
const originalSale = map.get(sale.id);
if (sale.quantity == originalSale.quantity) {
if (sale.quantity == originalSale?.quantity) {
query = `UPDATE sale
SET ticketFk = ?
WHERE id = ?`;
await Self.rawSql(query, [ticketId, sale.id], myOptions);
} else if (sale.quantity != originalSale.quantity) {
} else if (sale.quantity != originalSale?.quantity) {
await transferPartialSale(
ticketId, originalSale, sale, myOptions);
}