Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Content

Table of Contents

Overview

  • The purpose of this derived table is to show informations about the records in the table "folio_oa.charges" and their linked tables and reference data.

Github Issue

Attributes for the derived table

Folio TableFolio AttributeDescriptionDatatypeSample OutputFK (From table)PK (To table)Notes
folio_oa.chargech_owner_fk
UUID3e0a383d-b1d9-4a8f-ad39-d35670e7158dTable: 

folio_oa.charge

Attribute: ch_owner_fk

Table: folio_oa.publication_request

Attribute: pr_id

Link to derived table publication_request
folio_oa.chargeversion
INTEGER0


folio_oa.chargech_id
UUID199ce4f5-feac-43ea-b995-bf571f6e9ffb


folio_oa.chargech_amount_fk
UUID1f5b8b02-56a0-451d-8ccf-14a662ac90a8Table: 

folio_oa.charge

Attribute: ch_amount_fk

Table: folio_oa.monetary_value

Attribute: id


folio_oa.monetary_valuebasecurrency
TEXTEUR


folio_oa.monetary_valuemonval
NUMERIC1689


folio_oa.chargech_exchange_rate_fk
UUID26765a4e-00b8-4b8a-b3ee-49bc6d0166d8Table: 

folio_oa.charge

Attribute: ch_exchange_rate_fk

Table: folio_oa.exchange_rate

Attribute: id


folio_oa.exchange_ratefrom_currency
TEXTEUR


folio_oa.exchange_rateto_currency
TEXTEUR


folio_oa.exchange_ratecoefficient
NUMERIC1


folio_oa.chargech_description
TEXT

OA-Migration




folio_oa.chargech_discount
NUMERIC

0




folio_oa.chargech_discount_type_fk
UUID8aaa80fe859fe8ee0185a0ea5d5e0017Table: 

folio_oa.charge

Attribute: ch_discount_type_fk

Table: folio_oa.refdata_value

Attribute: rdv_id


folio_oa.refdata_valuech_discount_type_value
TEXT

percentage




folio_oa.refdata_valuech_discount_type_label
TEXT

percentage




folio_oa.chargech_category_fk
UUID8aaa80fe859fe8ee0185a0ea5d81001eTable: 

folio_oa.charge

Attribute: ch_category_fk

Table: folio_oa.refdata_value

Attribute: rdv_id


folio_oa.refdata_valuech_category_value
TEXT

apc




folio_oa.refdata_valuech_category_label
TEXT

APC




folio_oa.chargech_invoice_reference




Link to Module Invoice?
folio_oa.chargech_invoice_line_item_reference




Link to Module Invoice?
folio_oa.chargech_discount_note





folio_oa.chargech_tax
NUMERIC19


folio_oa.chargech_charge_status_fk
UUID

8aaa80fe859fe8ee0185a0ea5d70001a

Table: 

folio_oa.charge

Attribute: ch_charge_status_fk

Table: folio_oa.refdata_value

Attribute: rdv_id


folio_oa.refdata_valuech_charge_status_value
TEXT

expected




folio_oa.refdata_valuech_charge_status_label
TEXT

Erwartet




folio_oa.chargech_date_created
TIMESTAMP2023-03-03 10:59:26.744


folio_oa.chargech_last_updated
TIMESTAMP2023-03-03 10:59:26.744


folio_oa.chargech_payment_period
TEXT2023


Linking approach

folio_oa.charge
LEFT JOIN folio_oa.monetary_value ON monetary_value.id = charge.ch_amount_fk
LEFT JOIN folio_oa.exchange_rate ON exchange_rate.id = charge.ch_exchange_rate_fk
LEFT JOIN folio_oa.refdata_value AS discount_type ON discount_type.rdv_id = charge.ch_discount_type_fk
LEFT JOIN folio_oa.refdata_value AS category ON category.rdv_id = charge.ch_category_fk
LEFT JOIN folio_oa.refdata_value AS charge_status ON charge_status.rdv_id = charge.ch_charge_status_fk

Explanation to special relations between tables

Relation "folio_oa.charge" to "folio_oa.payer"

Image Added

The link between the tables "charge" and "payer" has to be an left join. There is no direct connection in the ER diagram, but you can use the FK "cpy_owner_fk" in the table "payer" to link to table "charge" with the attribute "ch_id".

folio_oa.charge
LEFT JOIN folio_oa.payer ON payer.cpy_owner_fk = charge.ch_id