[open-ils-commits] r7759 -
trunk/Open-ILS/src/perlmods/OpenILS/Application
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Sep 5 11:33:37 EDT 2007
Author: erickson
Date: 2007-09-05 11:26:45 -0400 (Wed, 05 Sep 2007)
New Revision: 7759
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Cat.pm
Log:
returning the built-in pre-cat call number when a call number whose record is -1 is requested
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Cat.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Cat.pm 2007-09-05 14:40:05 UTC (rev 7758)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Cat.pm 2007-09-05 15:26:45 UTC (rev 7759)
@@ -1454,11 +1454,21 @@
my( $self, $conn, $auth, $label, $record_id, $org_id ) = @_;
my $e = new_editor(authtoken=>$auth, xact=>1);
return $e->die_event unless $e->checkauth;
+
+ my $vol;
+
+ if($record_id == OILS_PRECAT_RECORD) {
+
+ $vol = $e->retrieve_asset_call_number(OILS_PRECAT_CALL_NUMBER)
+ or return $e->die_event;
+
+ } else {
- my $vol = $e->search_asset_call_number(
- {label => $label, record => $record_id, owning_lib => $org_id, deleted => 'f'},
- {idlist=>1}
- )->[0];
+ $vol = $e->search_asset_call_number(
+ {label => $label, record => $record_id, owning_lib => $org_id, deleted => 'f'},
+ {idlist=>1}
+ )->[0];
+ }
# If the volume exists, return the ID
if( $vol ) { $e->rollback; return $vol; }
@@ -1474,12 +1484,6 @@
$vol->label($label);
$vol->record($record_id);
- #$vol->creator($e->requestor->id);
- #$vol->create_date('now');
- #$vol->editor($e->requestor->id);
- #$vol->edit_date('now');
- #$e->create_asset_call_number($vol) or return $e->die_event;
-
my $evt = create_volume( 0, $e, $vol );
return $evt if $evt;
More information about the open-ils-commits
mailing list