refs #6974 refactor: optimize sale_add
This commit is contained in:
parent
d0d710f023
commit
adaba6ecfb
|
@ -56,7 +56,9 @@ BEGIN
|
|||
typeFk,
|
||||
clientFk,
|
||||
companyFk,
|
||||
IF (marginComponents IS NULL, 0, CAST(marginComponents + amount + surcharge - total AS DECIMAL(10, 3)))
|
||||
IF (marginComponents IS NULL,
|
||||
0,
|
||||
CAST(marginComponents + amount + surcharge - total AS DECIMAL(10, 3)))
|
||||
FROM calculatedSales;
|
||||
END$$
|
||||
DELIMITER ;
|
||||
|
|
Loading…
Reference in New Issue