during LI creation, adopt the provider of the PO if linked to a PO (and no provider...
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 20 Aug 2010 15:35:53 +0000 (15:35 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 20 Aug 2010 15:35:53 +0000 (15:35 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@17286 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/extras/ils_events.xml
Open-ILS/src/perlmods/OpenILS/Application/Acq/Lineitem.pm

index 7f807b9..a8d0908 100644 (file)
                <desc xml:lang="en-US">The lineitem has no price</desc>
        </event>
        <event code='10005' textcode='ACQ_LINEITEM_NO_PROVIDER'>
-               <desc xml:lang="en-US">The lineitem has no price</desc>
+               <desc xml:lang="en-US">The lineitem has no provider</desc>
        </event>
 
        <event code='10101' textcode='ACQ_ALREADY_CANCELED'>
index 479c153..d7300e2 100644 (file)
@@ -54,6 +54,8 @@ sub create_lineitem {
             or return $e->die_event;
         return $e->die_event unless 
             $e->allowed('MANAGE_PROVIDER', $po->ordering_agency, $po);
+
+        $li->provider($po->provider) unless defined $li->provider;
     }
 
     $li->selector($e->requestor->id);