X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=acqui%2Forderreceive.pl;h=fc79ccbba473342d79089fcb0451ab61e03b0936;hb=8101d83af67f696fc12cc1830d9b51fd120ef6a4;hp=f25b5a923aab5a42c4c23321ab40afc335f70bd8;hpb=0126eb3fb5cf68adade91f78c78cc3aff3a4597f;p=koha_fer diff --git a/acqui/orderreceive.pl b/acqui/orderreceive.pl index f25b5a923a..fc79ccbba4 100755 --- a/acqui/orderreceive.pl +++ b/acqui/orderreceive.pl @@ -199,6 +199,7 @@ $template->param( biblionumber => $order->{'biblionumber'}, ordernumber => $order->{'ordernumber'}, biblioitemnumber => $order->{'biblioitemnumber'}, + subscriptionid => $order->{subscriptionid}, booksellerid => $order->{'booksellerid'}, freight => $freight, name => $bookseller->{'name'}, @@ -214,7 +215,6 @@ $template->param( quantityreceived => $order->{'quantityreceived'}, rrp => sprintf( "%.2f", $rrp ), ecost => sprintf( "%.2f", $ecost ), - unitprice => sprintf( "%.2f", $unitprice), memberfirstname => $member->{firstname} || "", membersurname => $member->{surname} || "", invoiceid => $invoice->{invoiceid}, @@ -227,6 +227,15 @@ $template->param( firstnamesuggestedby => $suggestion->{firstnamesuggestedby}, ); +# regardless of the content of $unitprice e.g 0 or '' or any string will return in these cases 0.00 +# and the 'IF' in the .tt will show 0.00 and not 'ecost' (see BZ 7129) +# So if $unitprice == 0 we don't create unitprice +if ( $unitprice != 0) { + $template->param( + unitprice => sprintf( "%.2f", $unitprice), + ); +} + my $op = $input->param('op'); if ($op and $op eq 'edit'){ $template->param(edit => 1);