Fix i_transaction_id as v_transaction_id.

This commit is contained in:
Dominik Pantůček 2025-07-17 16:50:02 +02:00
parent e31165d668
commit 95e55aef23

View file

@ -48,10 +48,10 @@ BEGIN
'Receipt: ' || i_description);
-- the "profit"
INSERT INTO public.transaction_splits (transaction, side, account, amount, memo)
VALUES (i_transaction_id, 'credit', i_profits_id, i_amount, i_user_name);
VALUES (v_transaction_id, 'credit', i_profits_id, i_amount, i_user_name);
-- the user
INSERT INTO public.transaction_splits (transaction, side, account, amount, memo)
VALUES (i_transaction_id, 'credit', i_user_id, i_amount, 'Credit from receipt: ' || i_description);
VALUES (v_transaction_id, 'credit', i_user_id, i_amount, 'Credit from receipt: ' || i_description);
END;
$$;