Bug 12395: Save order line's creator
[koha.git] / acqui / orderreceive.pl
index c88a533..4dbb5f0 100755 (executable)
@@ -183,14 +183,7 @@ if( defined $order->{tax_rate_on_receiving} ) {
 
 my $suggestion = GetSuggestionInfoFromBiblionumber($order->{biblionumber});
 
-my $authorisedby = $order->{authorisedby};
-my $authorised_patron = Koha::Patrons->find( $authorisedby );
-if ( $authorised_patron ) { # This should not happen unless there was a migration issue (or very old install?)
-    $template->param(
-        memberfirstname  => $authorised_patron->firstname || "",
-        membersurname    => $authorised_patron->surname || "",
-    );
-}
+my $creator = Koha::Patrons->find( $order->{created_by} );
 
 my $budget = GetBudget( $order->{budget_id} );
 
@@ -223,6 +216,7 @@ $template->param(
     ecost                 => $ecost,
     unitprice             => $unitprice,
     tax_rate              => $tax_rate,
+    creator               => $creator,
     invoiceid             => $invoice->{invoiceid},
     invoice               => $invoice->{invoicenumber},
     datereceived          => $datereceived,