account_id -> id

This commit is contained in:
TMA 2025-07-12 18:25:24 +02:00
parent 81366fd2bb
commit 8ee51a23d9

View file

@ -87,7 +87,11 @@ BEGIN
-- the profit
INSERT INTO public.transaction_splits (transaction, side, account, amount, memo)
VALUES (v_transaction_id, 'debit', (SELECT account_id FROM accounts WHERE name = 'BrmBar Profits'), v_profit, (SELECT 'Margin on ' || "name" FROM public.accounts WHERE id = i_item_id));
VALUES (v_transaction_id,
'debit',
(SELECT id FROM public.accounts WHERE name = 'BrmBar Profits'),
v_profit,
(SELECT 'Margin on ' || "name" FROM public.accounts WHERE id = i_item_id));
-- Return the cost
RETURN v_cost;