money.cashdrawer_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 |
|---|---|---|---|
org_unit |
|
Yes |
|
cashdrawer |
|
Yes |
|
payment_type |
|
Yes |
|
payment_ts |
|
Yes |
|
amount |
|
Yes |
|
voided |
|
Yes |
|
note |
|
Yes |
View Definition
SELECT ou.id AS org_unit,
ws.id AS cashdrawer,
t.payment_type,
p.payment_ts,
p.amount,
p.voided,
p.note
FROM actor.org_unit ou
JOIN actor.workstation ws ON ou.id = ws.owning_lib
LEFT JOIN money.bnm_desk_payment p ON ws.id = p.cash_drawer
LEFT JOIN money.payment_view t ON p.id = t.id;