acq.fund_transfer

Fund Transfer Each row represents the transfer of money from a source fund to a destination fund. There should be corresponding entries in acq.fund_allocation. The purpose of acq.fund_transfer is to record how much money moved from which fund to which other fund.

The presence of two amount fields, rather than one, reflects the possibility that the two funds are denominated in different currencies. If they use the same currency type, the two amounts should be the same.

Deferrable Constraints: The following FK constraints are deferrable — they are checked at transaction end, not statement end: fund_transfer_dest_fund_fkey, fund_transfer_funding_source_credit_fkey, fund_transfer_src_fund_fkey, fund_transfer_transfer_user_fkey.

Columns

Column Type Nullable Default Notes

id PK

integer

No

nextval('acq.fund_transfer_id_seq'::regclass)

src_fund FK

integer

No

acq.fund(id)

src_amount

numeric

No

dest_fund FK

integer

Yes

acq.fund(id)

dest_amount

numeric

Yes

transfer_time

timestamp with time zone

No

now()

transfer_user FK

integer

No

actor.usr(id)

note

text

Yes

funding_source_credit FK

integer

No

acq.funding_source_credit(id)

Primary Key

(id)

Foreign Keys

Column(s) References On Delete On Update Deferrable Constraint

dest_fund

acq.fund(id)

NO ACTION

NO ACTION

DEFERRED

fund_transfer_dest_fund_fkey

funding_source_credit

acq.funding_source_credit(id)

NO ACTION

NO ACTION

DEFERRED

fund_transfer_funding_source_credit_fkey

src_fund

acq.fund(id)

NO ACTION

NO ACTION

DEFERRED

fund_transfer_src_fund_fkey

transfer_user

actor.usr(id)

NO ACTION

NO ACTION

DEFERRED

fund_transfer_transfer_user_fkey

Indexes

Index Method Definition

fund_transfer_pkey PK

btree

CREATE UNIQUE INDEX fund_transfer_pkey ON acq.fund_transfer USING btree (id)

acqftr_usr_idx

btree

CREATE INDEX acqftr_usr_idx ON acq.fund_transfer USING btree (transfer_user)