if ($lid->eg_copy_id) {
my $copy = $e->retrieve_asset_copy($lid->eg_copy_id) or return 0;
# only update status if it hasn't already been updated
- $copy->status(OILS_COPY_STATUS_IN_PROCESS) if $copy->status == OILS_COPY_STATUS_ON_ORDER;
+ if ($copy->status == OILS_COPY_STATUS_ON_ORDER) {
+ my $custom_status = $U->ou_ancestor_setting_value(
+ $e->requestor->ws_ou, 'acq.copy_status_on_receiving', $e);
+ my $new_status = $custom_status || OILS_COPY_STATUS_IN_PROCESS;
+ $copy->status($new_status);
+ }
$copy->edit_date('now');
$copy->editor($e->requestor->id);
$copy->creator($e->requestor->id) if $U->ou_ancestor_setting_value(
'When receiving a copy in acquisitions, set the copy "creator" to be the staff that received the copy',
'coust', 'description'),
'bool', null)
-
+,( 'acq.copy_status_on_receiving', 'acq',
+ oils_i18n_gettext('acq.copy_status_on_receiving',
+ 'Initial status for received items',
+ 'coust', 'label'),
+ oils_i18n_gettext('acq.copy_status_on_receiving',
+ 'Allows staff to designate a custom copy status on received lineitems. Default status is "In Process".',
+ 'coust', 'description'),
+ 'link', 'ccs')
,( 'acq.default_circ_modifier', 'acq',
oils_i18n_gettext('acq.default_circ_modifier',
'Default circulation modifier',
--- /dev/null
+BEGIN;
+
+SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+
+INSERT into config.org_unit_setting_type
+( name, grp, label, description, datatype, fm_class ) VALUES
+( 'acq.copy_status_on_receiving', 'acq',
+ oils_i18n_gettext('acq.copy_status_on_receiving',
+ 'Initial status for received items',
+ 'coust', 'label'),
+ oils_i18n_gettext('acq.copy_status_on_receiving',
+ 'Allows staff to designate a custom copy status on received lineitems. Default status is "In Process".',
+ 'coust', 'description'),
+ 'link', 'ccs');
+
+COMMIT;