money.desk_payment_view (view)
|
This is a database view, not a base table. It has no triggers, indexes, or FK constraints of its own. Querying this view may be more efficient than joining the underlying tables directly. |
Columns
| Column | Type | Nullable | Notes |
|---|---|---|---|
id |
|
Yes |
|
xact |
|
Yes |
|
payment_ts |
|
Yes |
|
voided |
|
Yes |
|
amount |
|
Yes |
|
note |
|
Yes |
|
amount_collected |
|
Yes |
|
accepting_usr |
|
Yes |
|
cash_drawer |
|
Yes |
|
payment_type |
|
Yes |
|
refundable |
|
Yes |
View Definition
SELECT p.id,
p.xact,
p.payment_ts,
p.voided,
p.amount,
p.note,
p.amount_collected,
p.accepting_usr,
p.cash_drawer,
c.relname AS payment_type,
COALESCE(f.enabled, true) AS refundable
FROM money.bnm_desk_payment p
JOIN pg_class c ON p.tableoid = c.oid
LEFT JOIN config.global_flag f ON f.name = (p.tableoid::regclass || '.is_refundable'::text);