rebalanceIncreasedCredit: set billId and credId in __INTERNAL_TRIGGER_STACK row

This commit is contained in:
Florian "flowdy" Heß 2017-01-22 21:39:41 +01:00
parent 84d913836e
commit 031c248b74
1 changed files with 1 additions and 1 deletions

View File

@ -7,7 +7,7 @@ CREATE TRIGGER rebalanceIncreasedCredit
BEGIN
INSERT INTO __INTERNAL_TRIGGER_STACK
SELECT t.ROWID, NEW.value, ca.difference,
SELECT t.ROWID, t.billId, t.credId,
min(ca.difference, NEW.value - OLD.value)
FROM Transfer t
JOIN CurrentArrears ca ON t.billId = ca.billId