mirror of
https://git.dirksys.ovh/dirk/bankserver.git
synced 2025-12-20 02:59:20 +01:00
fix transaction view
This commit is contained in:
parent
ac54d2fdc9
commit
b5635559f3
@ -38,7 +38,6 @@ create view transactions_with_user_info as select
|
|||||||
case
|
case
|
||||||
when t."from" is null then t.interop_name
|
when t."from" is null then t.interop_name
|
||||||
when t."to" is null then t.interop_name
|
when t."to" is null then t.interop_name
|
||||||
else null
|
|
||||||
end as interop_name,
|
end as interop_name,
|
||||||
-- From Participant
|
-- From Participant
|
||||||
uf.id AS from_user_id,
|
uf.id AS from_user_id,
|
||||||
@ -51,7 +50,7 @@ create view transactions_with_user_info as select
|
|||||||
ut.name AS to_user_name,
|
ut.name AS to_user_name,
|
||||||
at.name AS to_account_name
|
at.name AS to_account_name
|
||||||
from transactions t
|
from transactions t
|
||||||
join accounts af ON t."from" = af.id
|
left join accounts af ON t."from" = af.id
|
||||||
join users uf ON af."user" = uf.id
|
left join users uf ON af."user" = uf.id
|
||||||
join accounts at ON t."to" = at.id
|
left join accounts at ON t."to" = at.id
|
||||||
join users ut ON at."user" = ut.id;
|
left join users ut ON at."user" = ut.id;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user