Merge branch 'master' into test
This commit is contained in:
commit
d6e09fcfc9
|
@ -83,12 +83,12 @@ module.exports = Self => {
|
||||||
|
|
||||||
for (const sale of sales) {
|
for (const sale of sales) {
|
||||||
const originalSale = map.get(sale.id);
|
const originalSale = map.get(sale.id);
|
||||||
if (sale.quantity == originalSale.quantity) {
|
if (sale.quantity == originalSale?.quantity) {
|
||||||
query = `UPDATE sale
|
query = `UPDATE sale
|
||||||
SET ticketFk = ?
|
SET ticketFk = ?
|
||||||
WHERE id = ?`;
|
WHERE id = ?`;
|
||||||
await Self.rawSql(query, [ticketId, sale.id], myOptions);
|
await Self.rawSql(query, [ticketId, sale.id], myOptions);
|
||||||
} else if (sale.quantity != originalSale.quantity) {
|
} else if (sale.quantity != originalSale?.quantity) {
|
||||||
await transferPartialSale(
|
await transferPartialSale(
|
||||||
ticketId, originalSale, sale, myOptions);
|
ticketId, originalSale, sale, myOptions);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue