fix: refs #235425 sale priceFixed update
gitea/salix/pipeline/pr-master This commit looks good
Details
gitea/salix/pipeline/pr-master This commit looks good
Details
This commit is contained in:
parent
70b1628649
commit
4da11c65bb
|
@ -92,6 +92,19 @@ module.exports = Self => {
|
|||
}, myOptions);
|
||||
}
|
||||
await sale.updateAttributes({price: newPrice}, myOptions);
|
||||
await Self.rawSql(`
|
||||
UPDATE sale
|
||||
SET priceFixed = (
|
||||
SELECT SUM(value)
|
||||
FROM sale s
|
||||
JOIN saleComponent sc ON sc.saleFk = s.id
|
||||
JOIN component c ON c.id = sc.componentFk
|
||||
JOIN componentType ct ON ct.id = c.typeFk
|
||||
WHERE ct.isBase
|
||||
AND s.id = ?
|
||||
)
|
||||
WHERE id = ?
|
||||
`, [id, id], myOptions);
|
||||
|
||||
await Self.rawSql('CALL vn.manaSpellersRequery(?)', [userId], myOptions);
|
||||
await Self.rawSql('CALL vn.ticket_recalc(?, NULL)', [sale.ticketFk], myOptions);
|
||||
|
|
Loading…
Reference in New Issue