[open-ils-commits] r10350 -
branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Acq
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Aug 13 11:54:26 EDT 2008
Author: erickson
Date: 2008-08-13 11:54:24 -0400 (Wed, 13 Aug 2008)
New Revision: 10350
Modified:
branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Acq/Lineitem.pm
Log:
on lineitem_detail create, generate temp barcode and callnumber using optional org-setting prefix. also allow for default coyp shelving location org setting.
Modified: branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Acq/Lineitem.pm
===================================================================
--- branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Acq/Lineitem.pm 2008-08-13 14:19:43 UTC (rev 10349)
+++ branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Acq/Lineitem.pm 2008-08-13 15:54:24 UTC (rev 10350)
@@ -534,8 +534,25 @@
}
$e->create_acq_lineitem_detail($li_detail) or return $e->die_event;
+
+ unless($li_detail->barcode) {
+ my $pfx = $U->ou_ancestor_setting_value($li_detail->owning_lib, 'acq.tmp_barcode_prefix') || 'ACQ';
+ $li_detail->barcode($pfx.$li_detail->id);
+ }
+ unless($li_detail->cn_label) {
+ my $pfx = $U->ou_ancestor_setting_value($li_detail->owning_lib, 'acq.tmp_callnumber_prefix') || 'ACQ';
+ $li_detail->cn_label($pfx.$li_detail->id);
+ }
+
+ if(my $loc = $U->ou_ancestor_setting_value($li_detail->owning_lib, 'acq.default_copy_location')) {
+ $li_detail->location($loc);
+ }
+
+ $e->update_acq_lineitem_detail($li_detail) or return $e->die_event;
+
$e->commit;
- return $li_detail->id;
+ return $li_detail if $$options{return_obj};
+ return $li_detail->id
}
__PACKAGE__->register_method(
More information about the open-ils-commits
mailing list