Columns
Column | Type | Children | Parents | Comments | |||
---|---|---|---|---|---|---|---|
purchase_order_item_id | int8 |
|
|
The unique ID of the purchase order item. E.g. 8571. |
|||
purchase_order_id | int8 |
|
|
The ID of the associated purchase order. E.g. 918. |
|||
quantity | numeric |
|
|
The multiplier for the price when calculating the cost of the purchase order. E.g. 1.0. |
|||
price_cents | int4 |
|
|
The price, in cents, of one unit of the purchase order. E.g. 5600. |
|||
price_currency | varchar |
|
|
The currency the price is in. E.g. |
|||
gross_amount_cents | int4 |
|
|
The gross amount, in cents, that the purchase order costs. price_cents * quantity. E.g. 8200. |
|||
gross_amount_currency | varchar |
|
|
The currency the gross amount is in. E.g. |
|||
tax_amount_cents | int4 |
|
|
The tax amount, in cents, that the purchase order includes. E.g. 1500. |
|||
tax_amount_currency | varchar |
|
|
The currency the tax amount is in. E.g. |
|||
created_at | timestamp |
|
|
The date and time the purchase order item was created (in UTC). E.g. 2021-03-02 12:00:00. |
|||
updated_at | timestamp |
|
|
The date and time the purchase order item was updated (in UTC). E.g. 2021-03-02 12:00:00. |
|||
supplier_generated_invoice_id | int8 |
|
|
The invoice ID generated by the supplier. E.g. 16590. |
|||
estimated_delivery_date | date |
|
|
The date the product or service is expected to be delivered to the client. E.g. 2025-01-01. |
|||
actual_delivery_date | date |
|
|
The date the product or service was actually delivered to the client. E.g. 2025-01-01. |
|||
has_assumed_delivery_after_2025_07_01 | bool |
|
|
A True or False value, which says if the date of delivery of this PO line is after the 1st of July. E.g. True. Below is the logic to see whether delivery is happening after 1st July 2025 when source.actual_delivery_date >= “2025-07-01” then True when source.actual_delivery_date < “2025-07-01” then False when source.estimated_delivery_date >= “2025-07-01” then True when beginning_at >= “2025-07-01” then True when isnull(source.estimated_delivery_date) then True otherwise False |
|||
start_time | time |
|
|
The start time of the purchase order. E.g. 15:00. |
|||
end_time | time |
|
|
The end time of the purchase order. E.g. 16:00. |
|||
all_day | bool |
|
|
If the service lasted the whole day. True or False. E.g. True. |
|||
beginning_at | timestamp |
|
|
The date and time of the start of the service. E.g. |
|||
ending_at | timestamp |
|
|
The date and time of the end of the service. E.g. |
|||
membership_id | int4 |
|
|
The ID of the membership associated with the purchase order item. E.g. 1989. |
|||
is_current_membership | bool |
|
|
Whether the membership associated with the purchase order is a current one. True or False. E.g. True. |
|||
is_current_hcp_membership | bool |
|
|
Whether the membership associated with the purchase order is a current one, and has a HCP funding scheme. E.g. True. |
|||
is_open_ticket | bool |
|
|
Whether the ticket associated with the purchase order is open. E.g. True |
|||
client_contribution_amount_cents | int4 |
|
|
Amount in cents that a client pays towards the corresponding purchase order line amount. E.g. 500. |
|||
client_contribution_amount_currency | varchar |
|
|
The currency code for client contribution amount. E.g. |
|||
external_id | text |
|
|
There are different product_ids that this can refer to. They can be support at home codes, or product_ids if the membership funding scheme type is hcp. E.g. SERV-0001. |
|||
created_at_in_company_tz | timestamp |
|
|
The date and time created in the company timezone. E.g.: 2021-03-02 00:12:59. |
|||
updated_at_in_company_tz | timestamp |
|
|
The date and time updated in the company timezone. E.g.: 2021-03-02 00:12:59. |
|||
beginning_at_in_company_tz | timestamp |
|
|
The date and time the service begins in the company timezone. E.g.: 2021-03-02 00:12:59. |
|||
ending_at_in_company_tz | timestamp |
|
|
The date and time the services ends in the company timezone. E.g.: 2021-03-02 00:12:59. |
|||
company_id | int8 |
|
|
The company ID. E.g.: 345. |
Indexes
Constraint Name | Type | Sort | Column(s) |
---|---|---|---|
fct_purchase_order_items_pkey | Primary key | Asc | purchase_order_item_id |
fct_purchase_order_items_company_id_idx | Performance | Asc | company_id |
fct_purchase_order_items_purchase_order_id_idx | Performance | Asc | purchase_order_id |