<field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
<field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
<field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
+ <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
<field reporter:label="Fund" name="fund" reporter:datatype="link" />
<field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
<field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
<link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
<link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
<link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
+ <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
</links>
</class>
return 1 if $lid->recv_time;
+ $lid->receiver($e->requestor->id);
$lid->recv_time('now');
$e->update_acq_lineitem_detail($lid) or return 0;
return 1 unless $lid->recv_time;
+ $lid->clear_receiver;
$lid->clear_recv_time;
$e->update_acq_lineitem_detail($lid) or return 0;
owning_lib INT REFERENCES actor.org_unit (id) ON DELETE SET NULL DEFERRABLE INITIALLY DEFERRED,
location INT REFERENCES asset.copy_location (id) ON DELETE SET NULL DEFERRABLE INITIALLY DEFERRED,
recv_time TIMESTAMP WITH TIME ZONE,
+ receiver INT REFERENCES actor.usr (id) DEFERRABLE INITIALLY DEFERRED,
cancel_reason INT REFERENCES acq.cancel_reason( id ) DEFERRABLE INITIALLY DEFERRED
);
--- /dev/null
+-- Evergreen DB patch XXXX.data.acq-copy-creator-from-receiver.sql
+BEGIN;
+
+-- check whether patch can be applied
+SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+
+ALTER TABLE acq.lineitem_detail
+ ADD COLUMN receiver INT REFERENCES actor.usr (id) DEFERRABLE INITIALLY DEFERRED;
+
+
+COMMIT;