<field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true" />
<field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" oils_obj:required="true" />
<field reporter:label="Code" name="code" reporter:datatype="text" oils_obj:required="true" />
+ <field reporter:label="Active" name="active" reporter:datatype="bool" oils_obj:required="true" />
<field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
<field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
<field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
</eg-fm-record-editor>
<eg-fm-record-editor #allocateToFundDialog idlClass="acqfa"
- [preloadLinkedValues]="true">
+[fieldOptions]="{funding_source:{linkedSearchConditions:{'active':'t'},preloadLinkedValues:true}}">
</eg-fm-record-editor>
<eg-fund-transfer-dialog #transferDialog></eg-fund-transfer-dialog>
<eg-grid-column path="owner"></eg-grid-column>
<eg-grid-column path="code"></eg-grid-column>
<eg-grid-column path="currency_type"></eg-grid-column>
+ <eg-grid-column path="active"></eg-grid-column>
<eg-grid-column path="balance" datatype="money" [filterable]="false" [sortable]="false"
i18n-label label="Balance"></eg-grid-column>
<eg-grid-column path="total_credits" datatype="money" [filterable]="false" [sortable]="false"
owner INT NOT NULL REFERENCES actor.org_unit (id) DEFERRABLE INITIALLY DEFERRED,
currency_type TEXT NOT NULL REFERENCES acq.currency_type (code) DEFERRABLE INITIALLY DEFERRED,
code TEXT NOT NULL,
+ active BOOL NOT NULL DEFAULT TRUE,
CONSTRAINT funding_source_code_once_per_owner UNIQUE (code,owner),
CONSTRAINT funding_source_name_once_per_owner UNIQUE (name,owner)
);
--- /dev/null
+BEGIN;
+
+--SELECT evergreen.upgrade_deps_block_check('TODO', :eg_version);
+
+-- Add an active flag column
+
+ALTER TABLE acq.funding_source ADD COLUMN active BOOL;
+
+UPDATE acq.funding_source SET active = 't';
+
+ALTER TABLE acq.funding_source ALTER COLUMN active SET NOT NULL DEFAULT TRUE;
+
+COMMIT;
\ No newline at end of file