Advertisement
chrissharp123

Untitled

Dec 11th, 2018
413
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. evergreen=# \d+ reporter.acq_fund_debit_view
  2.                               View "reporter.acq_fund_debit_view"
  3.              Column             |           Type           | Modifiers | Storage  | Description
  4. --------------------------------+--------------------------+-----------+----------+-------------
  5.  fund_id                        | integer                  |           | plain    |
  6.  fund_code                      | text                     |           | extended |
  7.  fund_debit_id                  | integer                  |           | plain    |
  8.  invoice_item_id                | integer                  |           | plain    |
  9.  inv_item_inv_id                | integer                  |           | plain    |
  10.  invoice_item_invoice_ident     | text                     |           | extended |
  11.  invoice_item_provider_id       | integer                  |           | plain    |
  12.  invoice_item_inv_provider_code | text                     |           | extended |
  13.  inv_entry_inv_id               | integer                  |           | plain    |
  14.  inv_entry_invoice_ident        | text                     |           | extended |
  15.  inv_entry_provider_id          | integer                  |           | plain    |
  16.  inv_entry_provider_code        | text                     |           | extended |
  17.  po_item_id                     | integer                  |           | plain    |
  18.  po_item_po_id                  | integer                  |           | plain    |
  19.  lineitem_detail_id             | bigint                   |           | plain    |
  20.  lineitem_id                    | bigint                   |           | plain    |
  21.  po_id                          | integer                  |           | plain    |
  22.  po_provider_id                 | integer                  |           | plain    |
  23.  po_provider_code               | text                     |           | extended |
  24.  fund_debit_origin_amount       | numeric                  |           | main     |
  25.  fund_debit_amount              | numeric                  |           | main     |
  26.  encumbrance                    | boolean                  |           | plain    |
  27.  fund_debit_type                | text                     |           | extended |
  28.  create_time                    | timestamp with time zone |           | plain    |
  29. View definition:
  30.  SELECT fund.id AS fund_id,
  31.     fund.code AS fund_code,
  32.     fd.id AS fund_debit_id,
  33.     acqii.id AS invoice_item_id,
  34.     invoice_item_invoice.id AS inv_item_inv_id,
  35.     invoice_item_invoice.inv_ident AS invoice_item_invoice_ident,
  36.     inv_item_provider.id AS invoice_item_provider_id,
  37.     inv_item_provider.code AS invoice_item_inv_provider_code,
  38.     inv_entry_invoice.id AS inv_entry_inv_id,
  39.     inv_entry_invoice.inv_ident AS inv_entry_invoice_ident,
  40.     inv_entry_provider.id AS inv_entry_provider_id,
  41.     inv_entry_provider.code AS inv_entry_provider_code,
  42.     acqpoi.id AS po_item_id,
  43.     po_item_po.id AS po_item_po_id,
  44.     lid.id AS lineitem_detail_id,
  45.     jub.id AS lineitem_id,
  46.     po.id AS po_id,
  47.     po_provider.id AS po_provider_id,
  48.     po_provider.code AS po_provider_code,
  49.     fd.origin_amount AS fund_debit_origin_amount,
  50.     fd.amount AS fund_debit_amount,
  51.     fd.encumbrance,
  52.     fd.debit_type AS fund_debit_type,
  53.     fd.create_time
  54.    FROM acq.fund fund
  55.      LEFT JOIN acq.fund_debit fd ON fd.fund = fund.id
  56.      LEFT JOIN acq.invoice_item acqii ON acqii.fund_debit = fd.id
  57.      LEFT JOIN acq.invoice invoice_item_invoice ON acqii.invoice = invoice_item_invoice.id
  58.      LEFT JOIN acq.po_item acqpoi ON acqpoi.fund_debit = fd.id
  59.      LEFT JOIN acq.purchase_order po_item_po ON acqpoi.purchase_order = po_item_po.id
  60.      LEFT JOIN acq.lineitem_detail lid ON lid.fund_debit = fd.id
  61.      LEFT JOIN acq.lineitem jub ON lid.lineitem = jub.id
  62.      LEFT JOIN acq.purchase_order po ON jub.purchase_order = po.id
  63.      LEFT JOIN acq.provider po_provider ON po.provider = po_provider.id
  64.      LEFT JOIN acq.provider inv_item_provider ON invoice_item_invoice.provider = inv_item_provider.id
  65.      LEFT JOIN acq.invoice_entry inv_entry ON inv_entry.lineitem = jub.id
  66.      LEFT JOIN acq.invoice inv_entry_invoice ON inv_entry.invoice = inv_entry_invoice.id
  67.      LEFT JOIN acq.provider inv_entry_provider ON inv_entry_invoice.provider = inv_entry_provider.id;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement