# Zip schema ERD

Table and field reference for the Fivetran Zip connector.

## Table & Field Reference

### gl_account_subsidiary

| Column | Type | Keys |
| --- | --- | --- |
| gl_account_id | Unknown | PK, FK |
| subsidiary_id | Unknown | PK, FK |

### gl_account

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| active | Unknown |  |
| currency | Unknown |  |
| external_id | Unknown |  |
| name | Unknown |  |
| number | Unknown |  |
| source | Unknown |  |
| sub_type | Unknown |  |
| type | Unknown |  |

### user_group

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| name | Unknown |  |

### agreement_attribute

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| agreement_id | Unknown | PK, FK |
| config_id | Unknown |  |
| data | Unknown |  |
| entity_type | Unknown |  |
| integration_data | Json |  |
| name | Unknown |  |

### agreement_attachment

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| agreement_id | Unknown | PK, FK |
| name | Unknown |  |
| type | Unknown |  |
| url | Unknown |  |

### agreement_request

| Column | Type | Keys |
| --- | --- | --- |
| agreement_id | Unknown | PK, FK |
| request_id | Unknown | PK, FK |

### agreement_purchase_order

| Column | Type | Keys |
| --- | --- | --- |
| agreement_id | Unknown | PK, FK |
| purchase_order_id | Unknown | PK, FK |

### agreement_subsidiary

| Column | Type | Keys |
| --- | --- | --- |
| agreement_id | Unknown | PK, FK |
| subsidiary_id | Unknown | PK, FK |

### agreement_category

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| agreement_id | Unknown | PK, FK |
| name | Unknown |  |
| status | Unknown |  |
| type | Unknown |  |

### agreement_subcategory

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| agreement_id | Unknown | PK, FK |
| name | Unknown |  |
| status | Unknown |  |
| type | Unknown |  |

### agreement_renewal_stakeholder

| Column | Type | Keys |
| --- | --- | --- |
| agreement_id | Unknown | PK, FK |
| id | Unknown | PK, FK |

### agreement

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| department_id | Unknown | FK |
| original_request_id | Unknown | FK |
| renewal_workflow_id | Unknown | FK |
| vendor_id | Unknown | FK |
| amount | Unknown |  |
| attributes | Json |  |
| auto_renews | Unknown |  |
| child_requests | Json |  |
| currency | Unknown |  |
| display_renewal_status | Unknown |  |
| end_date | Unknown |  |
| execution_date | Unknown |  |
| name | Unknown |  |
| number | Unknown |  |
| opt_out_date | Unknown |  |
| renewal_alert_date | Unknown |  |
| renewal_date | Unknown |  |
| renewal_stakeholder_queues | Json |  |
| renewal_status | Unknown |  |
| start_date | Unknown |  |
| status | Unknown |  |

### subsidiary

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| address_country | Unknown |  |
| address_locality | Unknown |  |
| address_postcode | Unknown |  |
| address_region | Unknown |  |
| display_name | Unknown |  |
| external_ids | Json |  |
| is_active | Unknown |  |
| name | Unknown |  |

### subsidiary_line

| Column | Type | Keys |
| --- | --- | --- |
| index | Unknown | PK |
| subsidiary_id | Unknown | PK |
| line | Unknown |  |

### workflow

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| name | Unknown |  |
| status | Unknown |  |

### user_attribute

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| user_id | Unknown | PK, FK |
| config_id | Unknown |  |
| data | Unknown |  |
| integration_data | Json |  |
| name | Unknown |  |

### user_user_group

| Column | Type | Keys |
| --- | --- | --- |
| user_group_id | Unknown | PK, FK |
| user_id | Unknown | PK, FK |

### user_manager

| Column | Type | Keys |
| --- | --- | --- |
| manager_id | Unknown | PK, FK |
| user_id | Unknown | PK, FK |

### user_role

| Column | Type | Keys |
| --- | --- | --- |
| role_id | Unknown | PK, FK |
| user_id | Unknown | PK, FK |

### user_external_data

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| user_id | Unknown | PK, FK |
| source | Unknown |  |

### users

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| department_id | Unknown | FK |
| subsidiary_id | Unknown | FK |
| email | Unknown |  |
| first_name | Unknown |  |
| is_active | Unknown |  |
| last_name | Unknown |  |
| sso_enforced | Unknown |  |

### role

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| name | Unknown |  |

### vendor_external_data

| Column | Type | Keys |
| --- | --- | --- |
| index | Unknown | PK |
| vendor_id | Unknown | PK, FK |
| id | Unknown |  |
| source | Unknown |  |

### vendor_contact

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| vendor_id | Unknown | PK, FK |
| email | Unknown |  |
| name | Unknown |  |
| phone | Unknown |  |
| title | Unknown |  |

### vendor_subsidiary

| Column | Type | Keys |
| --- | --- | --- |
| subsidiary_id | Unknown | PK, FK |
| vendor_id | Unknown | PK, FK |

### vendor_currency

| Column | Type | Keys |
| --- | --- | --- |
| currency_id | Unknown | PK, FK |
| vendor_id | Unknown | PK, FK |

### vendor_category

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| vendor_id | Unknown | PK, FK |
| name | Unknown |  |

### vendor_attribute

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| vendor_id | Unknown | PK, FK |
| config_id | Unknown |  |
| data | Unknown |  |
| name | Unknown |  |

### vendor_address_line

| Column | Type | Keys |
| --- | --- | --- |
| index | Unknown | PK |
| vendor_id | Unknown | PK, FK |
| lines | Unknown |  |

### vendor

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| department_id | Unknown | FK |
| address_country | Unknown |  |
| address_locality | Unknown |  |
| address_postcode | Unknown |  |
| address_region | Unknown |  |
| alternate_name | Unknown |  |
| alternate_name_usage | Unknown |  |
| created_at | Unknown |  |
| currency | Unknown |  |
| description | Unknown |  |
| duns_number | Unknown |  |
| external_id | Unknown |  |
| last_reviewed_at | Unknown |  |
| legal_name | Unknown |  |
| name | Unknown |  |
| po_email | Unknown |  |
| primary_phone | Unknown |  |
| primary_phone_country | Unknown |  |
| remittance_email | Unknown |  |
| risk | Unknown |  |
| status | Unknown |  |
| tax_id_number | Unknown |  |
| tax_id_type | Unknown |  |
| tier | Unknown |  |
| updated_at | Instant |  |
| vat_number | Unknown |  |
| website_link | Unknown |  |

### currency_external_data

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| currency_id | Unknown | PK, FK |
| source | Unknown |  |

### currency

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| name | Unknown |  |

### department

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| display_name | Unknown |  |
| external_ids | Json |  |
| hide_in_zip | Unknown |  |
| is_active | Unknown |  |
| name | Unknown |  |

### lookup

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| display_name_fields | Json |  |
| filters | Json |  |
| integration_key | Unknown |  |
| integration_name | Unknown |  |
| name | Unknown |  |
| settings_fields | Unknown |  |
| show_in_zip | Unknown |  |

### approval_task

| Column | Type | Keys |
| --- | --- | --- |
| approval_id | Unknown | PK |
| id | Unknown | PK |
| complete_time | Unknown |  |
| description | Unknown |  |
| name | Unknown |  |
| status | Unknown |  |

### approval

| Column | Type | Keys |
| --- | --- | --- |
| _fivetran_id | String | PK |
| assignee_id | Unknown | FK |
| request_id | Unknown | FK |
| requester_id | Unknown | FK |
| active_duration_seconds | Unknown |  |
| active_elapsed_seconds | Unknown |  |
| complete_time | Unknown |  |
| config_type | Unknown |  |
| display_status | Unknown |  |
| due_date | Unknown |  |
| id | Unknown |  |
| name | Unknown |  |
| node_type | Unknown |  |
| parent_queue_id | Unknown |  |
| parent_queue_level | Unknown |  |
| parent_queue_name | Unknown |  |
| queue_id | Unknown |  |
| queue_level | Unknown |  |
| queue_name | Unknown |  |
| sla_hours | Unknown |  |
| start_time | Instant |  |
| status | Unknown |  |
| total_duration_seconds | Unknown |  |
| total_elapsed_seconds | Unknown |  |
| total_pause_time_seconds | Unknown |  |
| type | Unknown |  |
| updated_at | Instant |  |

### vendor_credit_line_item

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| vendor_credit_id | Unknown | PK, FK |
| department_id | Unknown | FK |
| expense_category_id | Unknown | FK |
| gl_code_id | Unknown | FK |
| item_account_id | Unknown | FK |
| location_id | Unknown | FK |
| currency | Unknown |  |
| description | Unknown |  |
| end_date | Unknown |  |
| name | Unknown |  |
| quantity | Unknown |  |
| rate | Unknown |  |
| secondary_line_type | Unknown |  |
| start_date | Unknown |  |
| total | Unknown |  |
| type | Unknown |  |

### vendor_credit

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| department_id | Unknown | FK |
| location_id | Unknown | FK |
| subsidiary_id | Unknown | FK |
| vendor_id | Unknown | FK |
| amount | Unknown |  |
| applied_invoices | Json |  |
| credit_id | Unknown |  |
| currency | Unknown |  |
| date | Unknown |  |
| description | Unknown |  |
| number | Unknown |  |

### lookup_option

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| lookup_id | Unknown | FK |
| key | Unknown |  |
| name | Unknown |  |
| show_in_zip | Unknown |  |

### location_external_data

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| location_id | Unknown | PK, FK |
| source | Unknown |  |

### location

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| name | Unknown |  |
| status | Unknown |  |

### item_account_subsidiary

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK, FK |
| item_account_id | Unknown | PK, FK |

### item_account

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| active | Unknown |  |
| external_id | Unknown |  |
| name | Unknown |  |
| type | Unknown |  |

### queue_owner

| Column | Type | Keys |
| --- | --- | --- |
| queue_owner_id | Unknown | PK |
| _fivetran_id | Unknown | PK, FK |

### queue_member

| Column | Type | Keys |
| --- | --- | --- |
| queue_member_id | Unknown | PK |
| _fivetran_id | Unknown | PK, FK |

### queue_purchase_request_workflows_condition

| Column | Type | Keys |
| --- | --- | --- |
| index | Unknown | PK |
| _fivetran_id | Unknown | PK, FK |
| attribute | Unknown |  |
| clause_operation | Unknown |  |
| condition_clause_value | Unknown |  |
| condition_group | Unknown |  |
| condition_number | Unknown |  |
| condition_operation | Unknown |  |
| currency | Unknown |  |

### queue_po_change_order_workflows_condition

| Column | Type | Keys |
| --- | --- | --- |
| index | Unknown | PK |
| _fivetran_id | Unknown | PK, FK |
| attribute | Unknown |  |
| clause_operation | Unknown |  |
| condition_clause_value | Unknown |  |
| condition_group | Unknown |  |
| condition_number | Unknown |  |
| condition_operation | Unknown |  |
| currency | Unknown |  |

### queue_bill_approvals_and_invoice_assignment_condition

| Column | Type | Keys |
| --- | --- | --- |
| index | Unknown | PK |
| _fivetran_id | Unknown | PK, FK |
| attribute | Unknown |  |
| clause_operation | Unknown |  |
| condition_clause_value | Unknown |  |
| condition_group | Unknown |  |
| condition_number | Unknown |  |
| condition_operation | Unknown |  |
| currency | Unknown |  |

### queue_payout_approvals_condition

| Column | Type | Keys |
| --- | --- | --- |
| index | Unknown | PK |
| _fivetran_id | Unknown | PK, FK |
| attribute | Unknown |  |
| clause_operation | Unknown |  |
| condition_clause_value | Unknown |  |
| condition_group | Unknown |  |
| condition_number | Unknown |  |
| condition_operation | Unknown |  |
| currency | Unknown |  |

### queue

| Column | Type | Keys |
| --- | --- | --- |
| _fivetran_id | String | PK |
| default_assignee | Unknown | FK |
| queue_id | Unknown | FK |
| all_members_can_view_approval | Unknown |  |
| all_members_will_receive_approval_notification | Unknown |  |
| assignment_logic | Unknown |  |
| description | Unknown |  |
| group_email | Unknown |  |
| name | Unknown |  |

### purchase_order_attribute

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| purchase_order_id | Unknown | PK, FK |
| config_id | Unknown |  |
| data | Unknown |  |
| integration_data | Json |  |
| name | Unknown |  |

### purchase_order_change

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| purchase_order_id | Unknown | PK, FK |

### purchase_order_line_item_attribute

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| purchase_order_id | Unknown | PK, FK |
| purchase_order_line_item_id | Unknown | PK, FK |
| config_id | Unknown |  |
| data | Unknown |  |
| integration_data_id | Unknown |  |
| integration_data_key | Unknown |  |
| integration_data_name | Unknown |  |
| integration_data_type | Unknown |  |
| name | Unknown |  |

### purchase_order_line_item_tax_code

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK, FK |
| purchase_order_id | Unknown | PK, FK |
| purchase_order_line_item_id | Unknown | PK, FK |
| created_at | Unknown |  |
| updated_at | Unknown |  |

### purchase_order_line_item

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| purchase_order_id | Unknown | PK, FK |
| department_id | Unknown | FK |
| expense_category_id | Unknown | FK |
| gl_code_id | Unknown | FK |
| item_account_id | Unknown | FK |
| location_id | Unknown | FK |
| billed_amount | Unknown |  |
| currency | Unknown |  |
| description | Unknown |  |
| end_date | Unknown |  |
| line_number | Unknown |  |
| name | Unknown |  |
| open_amount | Unknown |  |
| quantity | Unknown |  |
| rate | Unknown |  |
| secondary_line_type | Unknown |  |
| start_date | Unknown |  |
| tax_amount | Unknown |  |
| total | Unknown |  |
| type | Unknown |  |

### purchase_order_invoice

| Column | Type | Keys |
| --- | --- | --- |
| invoice_id | Unknown | PK, FK |
| purchase_order_id | Unknown | PK, FK |

### purchase_order

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| created_by_id | Unknown | FK |
| department_id | Unknown | FK |
| location_id | Unknown | FK |
| original_request_id | Unknown | FK |
| requester_id | Unknown | FK |
| subsidiary_id | Unknown | FK |
| vendor_id | Unknown | FK |
| agreement_number | Unknown |  |
| amount_billed | Unknown |  |
| category_category_type | Unknown |  |
| category_id | Unknown |  |
| category_name | Unknown |  |
| category_status | Unknown |  |
| created_at | Unknown |  |
| currency | Unknown |  |
| description | Unknown |  |
| end_date | Unknown |  |
| external_id | Unknown |  |
| number | Unknown |  |
| payment_frequency | Unknown |  |
| payment_method | Unknown |  |
| payment_terms | Unknown |  |
| source | Unknown |  |
| start_date | Unknown |  |
| status | Unknown |  |
| subcategory_category_type | Unknown |  |
| subcategory_id | Unknown |  |
| subcategory_name | Unknown |  |
| subcategory_status | Unknown |  |
| subcategory_type | Unknown |  |
| total_amount | Unknown |  |
| version_number | Unknown |  |

### request_attribute

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| request_id | Unknown | PK, FK |
| config_id | Unknown |  |
| integration_data_id | Unknown |  |
| integration_data_key | Unknown |  |
| integration_data_name | Unknown |  |
| integration_data_type | Unknown |  |
| name | Unknown |  |

### request_attachment

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| request_id | Unknown | PK, FK |
| attributes | Json |  |
| comment | Unknown |  |
| execution_date | Unknown |  |
| expire_date | Unknown |  |
| name | Unknown |  |
| renewal_date | Unknown |  |
| status | Unknown |  |
| type | Unknown |  |
| updated_at | Unknown |  |
| url | Unknown |  |

### request_external_data

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| request_id | Unknown | PK, FK |
| external_link | Unknown |  |
| external_object_type | Unknown |  |
| source | Unknown |  |

### request_price_line_item_attribute

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| request_id | Unknown | PK, FK |
| request_price_detail_line_item_id | Unknown | PK, FK |
| config_id | Unknown |  |
| data | Unknown |  |
| integration_data_id | Unknown |  |
| integration_data_key | Unknown |  |
| integration_data_name | Unknown |  |
| integration_data_type | Unknown |  |
| name | Unknown |  |

### request_price_detail_line_item

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| request_id | Unknown | PK, FK |
| department_id | Unknown | FK |
| expense_category_id | Unknown | FK |
| gl_code_id | Unknown | FK |
| item_account_id | Unknown | FK |
| location_id | Unknown | FK |
| currency | Unknown |  |
| description | Unknown |  |
| end_date | Unknown |  |
| line_number | Unknown |  |
| name | Unknown |  |
| quantity | Unknown |  |
| rate | Unknown |  |
| secondary_line_type | Unknown |  |
| start_date | Unknown |  |
| total | Unknown |  |
| type | Unknown |  |

### request_price_detail_saving_line_item

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| request_id | Unknown | PK, FK |
| amount | Unknown |  |
| currency | Unknown |  |
| description | Unknown |  |
| recognition_end_date | Unknown |  |
| recognition_frequency | Unknown |  |
| recognition_start_date | Unknown |  |
| saving_line_item_type | Unknown |  |

### request

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| department_id | Unknown | FK |
| owner_id | Unknown | FK |
| purchase_order_id | Unknown | FK |
| requester_id | Unknown | FK |
| subsidiary_id | Unknown | FK |
| vendor_id | Unknown | FK |
| workflow_id | Unknown | FK |
| amount_usd | Unknown |  |
| canceled_at | Unknown |  |
| category_id | Unknown |  |
| category_name | Unknown |  |
| completed_at | Unknown |  |
| created_at | Unknown |  |
| description | Unknown |  |
| external_id | Unknown |  |
| initiated_at | Unknown |  |
| link | Unknown |  |
| name | Unknown |  |
| number | Unknown |  |
| price_detail_currency | Unknown |  |
| price_detail_end_date | Unknown |  |
| price_detail_execution_date | Unknown |  |
| price_detail_id | Unknown |  |
| price_detail_renewal_date | Unknown |  |
| price_detail_saving_line_items | Unknown |  |
| price_detail_start_date | Unknown |  |
| price_detail_total | Unknown |  |
| price_detail_total_usd | Unknown |  |
| status | Unknown |  |
| subcategory_id | Unknown |  |
| subcategory_name | Unknown |  |

### audit_log

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| user_id | Unknown | FK |
| accessed_from | Unknown |  |
| data | Json |  |
| description | Unknown |  |
| event_type | Unknown |  |
| timestamps | Unknown |  |
| user_ip_address | Unknown |  |

### invoice_attribute

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| invoice_id | Unknown | PK, FK |
| config_id | Unknown |  |
| data | Unknown |  |
| integration_data | Unknown |  |
| name | Unknown |  |

### invoice_external_data

| Column | Type | Keys |
| --- | --- | --- |
| index | Unknown | PK |
| invoice_id | Unknown | PK, FK |
| id | Unknown |  |
| reference_id | Unknown |  |
| source | Unknown |  |

### invoice_applied_vendor_credit

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| invoice_id | Unknown | PK, FK |
| currency_id | Unknown | FK |
| amount | Unknown |  |
| credit_id | Unknown |  |
| date | Unknown |  |
| external_id | Unknown |  |
| number | Unknown |  |

### invoice_purchase_order

| Column | Type | Keys |
| --- | --- | --- |
| invoice_id | Unknown | PK, FK |
| purchase_order_id | Unknown | PK, FK |

### invoice_payout

| Column | Type | Keys |
| --- | --- | --- |
| invoice_id | Unknown | PK, FK |
| payout_id | Unknown | PK, FK |

### invoice_line_item_attribute

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| invoice_id | Unknown | PK, FK |
| invoice_line_item_id | Unknown | PK, FK |
| config_id | Unknown |  |
| data | Unknown |  |
| integration_data | Unknown |  |
| name | Unknown |  |

### invoice_line_item_tax_code

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK, FK |
| invoice_id | Unknown | PK, FK |
| invoice_line_item_id | Unknown | PK, FK |

### invoice_line_item

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| invoice_id | Unknown | PK, FK |
| department_id | Unknown | FK |
| expense_category_id | Unknown | FK |
| gl_code_id | Unknown | FK |
| item_account_id | Unknown | FK |
| location_id | Unknown | FK |
| amortization_schedule_end_date | Unknown |  |
| amortization_schedule_external_id | Unknown |  |
| amortization_schedule_name | Unknown |  |
| amortization_schedule_start_date | Unknown |  |
| currency | Unknown |  |
| description | Unknown |  |
| end_date | Unknown |  |
| end_date_iso | Unknown |  |
| matched_purchase_order_line_item_id | Unknown |  |
| name | Unknown |  |
| quantity | Unknown |  |
| rate | Unknown |  |
| secondary_line_type | Unknown |  |
| start_date | Unknown |  |
| start_date_iso | Unknown |  |
| total | Unknown |  |
| type | Unknown |  |

### invoice_payment_method_external_data

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| invoice_id | Unknown | PK, FK |
| source | Unknown |  |

### invoice_approval

| Column | Type | Keys |
| --- | --- | --- |
| index | Unknown | PK |
| invoice_id | Unknown | PK, FK |
| id | Unknown | FK |

### invoice

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| department_id | Unknown | FK |
| location_id | Unknown | FK |
| payment_method_id | Unknown | FK |
| subsidiary_id | Unknown | FK |
| vendor_id | Unknown | FK |
| amount | Unknown |  |
| bill_id | Unknown |  |
| created_at | Unknown |  |
| currency | Unknown |  |
| description | Unknown |  |
| due_date | Unknown |  |
| external_id | Unknown |  |
| flagged_for_coding | Unknown |  |
| flagged_for_coding_reason | Unknown |  |
| invoice_date | Unknown |  |
| misc_amount | Unknown |  |
| number | Unknown |  |
| payment_terms | Json |  |
| posting_period_id | Unknown |  |
| posting_period_name | Unknown |  |
| shipping_amount | Unknown |  |
| source | Unknown |  |
| status | Unknown |  |
| tax_amount | Unknown |  |
| type | Unknown |  |
| updated_at | Instant |  |
| withholding_tax_amount | Unknown |  |

### payment_method_external_data

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| payment_method_id | Unknown | PK, FK |
| payment_method_invoice_id | Unknown | PK, FK |
| source | Unknown |  |

### payment_method

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| invoice_id | Unknown | PK, FK |
| vendor_id | Unknown | FK |
| country | Unknown |  |
| is_approved | Unknown |  |
| is_deleted | Unknown |  |
| is_deleted_by_vendor | Unknown |  |
| payment_file_format_id | Unknown |  |
| payment_file_format_name | Unknown |  |
| payment_method | Unknown |  |
| updated_at | Unknown |  |
| custom_** |  |  |

### payout

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| invoice_id | Unknown | PK, FK |
| subsidiary_id | Unknown | FK |
| vendor_id | Unknown | FK |
| account_id | Unknown |  |
| account_name | Unknown |  |
| currency | Unknown |  |
| fx_rate | Unknown |  |
| paid_on_date | Unknown |  |
| payment_provider_creation_time | Unknown |  |
| reference_id | Unknown |  |

### tax_code

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| active | Unknown |  |
| city | Unknown |  |
| country | Unknown |  |
| county | Unknown |  |
| description | Unknown |  |
| display_name | Unknown |  |
| external_data | Json |  |
| external_id | Unknown |  |
| name | Unknown |  |
| rate | Unknown |  |
| state | Unknown |  |
| tax_code_type | Unknown |  |
| type | Unknown |  |

### expense_category_subsidiary

| Column | Type | Keys |
| --- | --- | --- |
| _fivetran_id | Unknown | PK, FK |
| subsidiary_id | Unknown | PK, FK |

### expense_category

| Column | Type | Keys |
| --- | --- | --- |
| _fivetran_id | String | PK |
| gl_code_id | Unknown | FK |
| active | Unknown |  |
| description | Unknown |  |
| name | Unknown |  |
| source | Unknown |  |

## Relationships

- gl_account_subsidiary(subsidiary_id) → subsidiary(id)
- gl_account_subsidiary(gl_account_id) → gl_account(id)
- agreement_attribute(agreement_id) → agreement(id)
- agreement_attachment(agreement_id) → agreement(id)
- agreement_request(request_id) → request(id)
- agreement_request(agreement_id) → agreement(id)
- agreement_purchase_order(purchase_order_id) → purchase_order(id)
- agreement_purchase_order(agreement_id) → agreement(id)
- agreement_subsidiary(subsidiary_id) → subsidiary(id)
- agreement_subsidiary(agreement_id) → agreement(id)
- agreement_category(agreement_id) → agreement(id)
- agreement_subcategory(agreement_id) → agreement(id)
- agreement_renewal_stakeholder(id) → users(id)
- agreement_renewal_stakeholder(agreement_id) → agreement(id)
- agreement(department_id) → department(id)
- agreement(vendor_id) → vendor(id)
- agreement(original_request_id) → request(id)
- agreement(renewal_workflow_id) → workflow(id)
- user_attribute(user_id) → users(id)
- user_user_group(user_group_id) → user_group(id)
- user_user_group(user_id) → users(id)
- user_manager(manager_id) → users(id)
- user_manager(user_id) → users(id)
- user_role(role_id) → role(id)
- user_role(user_id) → users(id)
- user_external_data(user_id) → users(id)
- users(subsidiary_id) → subsidiary(id)
- users(department_id) → department(id)
- vendor_external_data(vendor_id) → vendor(id)
- vendor_contact(vendor_id) → vendor(id)
- vendor_subsidiary(subsidiary_id) → subsidiary(id)
- vendor_subsidiary(vendor_id) → vendor(id)
- vendor_currency(currency_id) → currency(id)
- vendor_currency(vendor_id) → vendor(id)
- vendor_category(vendor_id) → vendor(id)
- vendor_attribute(vendor_id) → vendor(id)
- vendor_address_line(vendor_id) → vendor(id)
- vendor(department_id) → department(id)
- currency_external_data(currency_id) → currency(id)
- approval(assignee_id) → users(id)
- approval(request_id) → request(id)
- approval(requester_id) → users(id)
- vendor_credit_line_item(department_id) → department(id)
- vendor_credit_line_item(item_account_id) → item_account(id)
- vendor_credit_line_item(gl_code_id) → gl_account(id)
- vendor_credit_line_item(expense_category_id) → expense_category(_fivetran_id)
- vendor_credit_line_item(location_id) → location(id)
- vendor_credit_line_item(vendor_credit_id) → vendor_credit(id)
- vendor_credit(vendor_id) → vendor(id)
- vendor_credit(subsidiary_id) → subsidiary(id)
- vendor_credit(location_id) → location(id)
- vendor_credit(department_id) → department(id)
- lookup_option(lookup_id) → lookup(id)
- location_external_data(location_id) → location(id)
- item_account_subsidiary(id) → subsidiary(id)
- item_account_subsidiary(item_account_id) → item_account(id)
- queue_owner(_fivetran_id) → queue(_fivetran_id)
- queue_member(_fivetran_id) → queue(_fivetran_id)
- queue_purchase_request_workflows_condition(_fivetran_id) → queue(_fivetran_id)
- queue_po_change_order_workflows_condition(_fivetran_id) → queue(_fivetran_id)
- queue_bill_approvals_and_invoice_assignment_condition(_fivetran_id) → queue(_fivetran_id)
- queue_payout_approvals_condition(_fivetran_id) → queue(_fivetran_id)
- queue(default_assignee) → users(id)
- queue(queue_id) → approval(queue_id)
- purchase_order_attribute(purchase_order_id) → purchase_order(id)
- purchase_order_change(purchase_order_id) → purchase_order(id)
- purchase_order_line_item_attribute(purchase_order_line_item_id) → purchase_order_line_item(id)
- purchase_order_line_item_attribute(purchase_order_id) → purchase_order_line_item(purchase_order_id)
- purchase_order_line_item_tax_code(id) → tax_code(id)
- purchase_order_line_item_tax_code(purchase_order_line_item_id) → purchase_order_line_item(id)
- purchase_order_line_item_tax_code(purchase_order_id) → purchase_order_line_item(purchase_order_id)
- purchase_order_line_item(department_id) → department(id)
- purchase_order_line_item(item_account_id) → item_account(id)
- purchase_order_line_item(gl_code_id) → gl_account(id)
- purchase_order_line_item(expense_category_id) → expense_category(_fivetran_id)
- purchase_order_line_item(location_id) → location(id)
- purchase_order_line_item(purchase_order_id) → purchase_order(id)
- purchase_order_invoice(invoice_id) → invoice(id)
- purchase_order_invoice(purchase_order_id) → purchase_order(id)
- purchase_order(created_by_id) → users(id)
- purchase_order(requester_id) → users(id)
- purchase_order(location_id) → location(id)
- purchase_order(original_request_id) → request(id)
- purchase_order(subsidiary_id) → subsidiary(id)
- purchase_order(department_id) → department(id)
- purchase_order(vendor_id) → vendor(id)
- request_attribute(request_id) → request(id)
- request_attachment(request_id) → request(id)
- request_external_data(request_id) → request(id)
- request_price_line_item_attribute(request_price_detail_line_item_id) → request_price_detail_line_item(id)
- request_price_line_item_attribute(request_id) → request_price_detail_line_item(request_id)
- request_price_detail_line_item(department_id) → department(id)
- request_price_detail_line_item(item_account_id) → item_account(id)
- request_price_detail_line_item(gl_code_id) → gl_account(id)
- request_price_detail_line_item(expense_category_id) → expense_category(_fivetran_id)
- request_price_detail_line_item(location_id) → location(id)
- request_price_detail_line_item(request_id) → request(id)
- request_price_detail_saving_line_item(request_id) → request(id)
- request(subsidiary_id) → subsidiary(id)
- request(department_id) → department(id)
- request(vendor_id) → vendor(id)
- request(workflow_id) → workflow(id)
- request(owner_id) → users(id)
- request(requester_id) → users(id)
- request(purchase_order_id) → purchase_order(id)
- audit_log(user_id) → users(id)
- invoice_attribute(invoice_id) → invoice(id)
- invoice_external_data(invoice_id) → invoice(id)
- invoice_applied_vendor_credit(currency_id) → currency(id)
- invoice_applied_vendor_credit(invoice_id) → invoice(id)
- invoice_purchase_order(purchase_order_id) → purchase_order(id)
- invoice_purchase_order(invoice_id) → invoice(id)
- invoice_payout(payout_id) → payout(id)
- invoice_payout(invoice_id) → invoice(id)
- invoice_line_item_attribute(invoice_line_item_id) → invoice_line_item(id)
- invoice_line_item_attribute(invoice_id) → invoice_line_item(invoice_id)
- invoice_line_item_tax_code(id) → tax_code(id)
- invoice_line_item_tax_code(invoice_line_item_id) → invoice_line_item(id)
- invoice_line_item_tax_code(invoice_id) → invoice_line_item(invoice_id)
- invoice_line_item(department_id) → department(id)
- invoice_line_item(item_account_id) → item_account(id)
- invoice_line_item(gl_code_id) → gl_account(id)
- invoice_line_item(expense_category_id) → expense_category(_fivetran_id)
- invoice_line_item(location_id) → location(id)
- invoice_line_item(invoice_id) → invoice(id)
- invoice_payment_method_external_data(invoice_id) → invoice(id)
- invoice_approval(id) → approval(id)
- invoice_approval(invoice_id) → invoice(id)
- invoice(department_id) → department(id)
- invoice(location_id) → location(id)
- invoice(subsidiary_id) → subsidiary(id)
- invoice(vendor_id) → vendor(id)
- invoice(payment_method_id) → payment_method(id)
- payment_method_external_data(payment_method_id) → payment_method(id)
- payment_method_external_data(payment_method_invoice_id) → payment_method(invoice_id)
- payment_method(vendor_id) → vendor(id)
- payment_method(invoice_id) → invoice(id)
- payout(subsidiary_id) → subsidiary(id)
- payout(vendor_id) → vendor(id)
- payout(invoice_id) → invoice_payout(invoice_id)
- expense_category_subsidiary(subsidiary_id) → subsidiary(id)
- expense_category_subsidiary(_fivetran_id) → expense_category(_fivetran_id)
- expense_category(gl_code_id) → gl_account(id)
