X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=acqui%2Flateorders.pl;h=86b13002a98539ac354850b16af4deb13468fd0a;hb=6b855be5f7c881a185c483f4cb35b5ddaecbb953;hp=55031ecc9ba1fb80e515e678a1721a6853ba86fc;hpb=324615e396be7fadc8ba3cfa1a9f6025e900df3a;p=koha_gimpoz diff --git a/acqui/lateorders.pl b/acqui/lateorders.pl index 55031ecc9b..86b13002a9 100755 --- a/acqui/lateorders.pl +++ b/acqui/lateorders.pl @@ -29,7 +29,7 @@ given on input arg. =over 4 -=item supplierid +=item booksellerid To know on which supplier this script have to display late order. =item delay @@ -64,7 +64,7 @@ my ($template, $loggedinuser, $cookie) = get_template_and_user({ debug => 1, }); -my $supplierid = $input->param('supplierid') || undef; # we don't want "" or 0 +my $booksellerid = $input->param('booksellerid') || undef; # we don't want "" or 0 my $delay = $input->param('delay'); my $branch = $input->param('branch'); my $op = $input->param('op'); @@ -95,15 +95,16 @@ if ($op and $op eq "send_alert"){ my %supplierlist = GetBooksellersWithLateOrders($delay); my (@sloopy); # supplier loop foreach (keys %supplierlist){ - push @sloopy, (($supplierid and $supplierid eq $_ ) ? + push @sloopy, (($booksellerid and $booksellerid eq $_ ) ? {id=>$_, name=>$supplierlist{$_}, selected=>1} : {id=>$_, name=>$supplierlist{$_}} ) ; } $template->param(SUPPLIER_LOOP => \@sloopy); -$template->param(Supplier=>$supplierlist{$supplierid}) if ($supplierid); -$template->param(SupplierId=>$supplierid) if ($supplierid); -my @lateorders = GetLateOrders($delay,$supplierid,$branch); +$template->param(Supplier=>$supplierlist{$booksellerid}) if ($booksellerid); +$template->param(booksellerid=>$booksellerid) if ($booksellerid); + +my @lateorders = GetLateOrders($delay,$booksellerid,$branch); my $total; foreach (@lateorders){