for a given lineitem, give each lid that does not have a callnumber label defined...
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 21 Apr 2009 14:17:58 +0000 (14:17 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 21 Apr 2009 14:17:58 +0000 (14:17 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@12935 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Acq/Order.pm

index 7a2a9a5..f7d494f 100644 (file)
@@ -720,14 +720,20 @@ sub create_lineitem_assets {
     # for each lineitem_detail, create the volume if necessary, create 
     # a copy, and link them all together.
     # -----------------------------------------------------------------
+    my $first_cn;
     for my $lid_id (@{$li_details}) {
 
         my $lid = $mgr->editor->retrieve_acq_lineitem_detail($lid_id) or return 0;
         next if $lid->eg_copy_id;
 
+        # use the same callnumber label for all items within this lineitem
+        $lid->cn_label($first_cn) if $first_cn and not $lid->cn_label;
+
         # apply defaults if necessary
         return 0 unless complete_lineitem_detail($mgr, $lid);
 
+        $first_cn = $lid->cn_label unless $first_cn;
+
         my $org = $lid->owning_lib;
         my $label = $lid->cn_label;
         my $bibid = $li->eg_bib_id;