koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] CVS: koha/acqui lateorders.pl,NONE,1.1


From: Henri-Damien LAURENT
Subject: [Koha-cvs] CVS: koha/acqui lateorders.pl,NONE,1.1
Date: Tue, 09 Aug 2005 07:13:29 -0700

Update of /cvsroot/koha/koha/acqui
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24407/acqui

Added Files:
        lateorders.pl 
Log Message:
Adding lateorders page.
It provides the user with the list of items that have been ordered for a delay 
and are NOT yet received.
The user may filter by supplier or branch or delay.
This page is still under developpement.
Goal is to make it ready to print to reorder the books.

2 new functions have been written in Acquisition module :
getsupplierlistwithlateorders
getlateorders

branches has been modified to manage branch independancy.
Request for comment.
STILL UNDER developpment

--- NEW FILE ---
#!/usr/bin/perl

use strict;
use CGI;
use C4::Acquisition;
use C4::Auth;
use C4::Output;
use C4::Interface::CGI::Output;
use C4::Context;
use HTML::Template;

my $query = new CGI;
my ($template, $loggedinuser, $cookie)
= get_template_and_user({template_name => "acqui/lateorders.tmpl",
                                query => $query,
                                type => "intranet",
                                authnotrequired => 0,
                                flagsrequired => {acquisition => 1},
                                debug => 1,
                                });
# my $title = $query->param('title');
# my $ISSN = $query->param('ISSN');
# my @subscriptions = getsubscriptions($title,$ISSN);

my $supplierid = $query->param('supplierid');
my $delay = $query->param('delay');
my $branch = $query->param('branch');

$delay =($delay?$delay:30);

my %supplierlist = getsupplierlistwithlateorders($delay,$branch);
my @select_supplier;
push @select_supplier,"";
foreach my $supplierid (keys %supplierlist){
        push @select_supplier, $supplierid;
}
my $CGIsupplier=CGI::scrolling_list( -name     => 'supplierid',
                        -values   => address@hidden,
                        -default  => $supplierid,
                        -labels   => \%supplierlist,
                        -size     => 1,
                        -multiple => 0 );

my @select_branches;
my %select_branches;
push @select_branches,"";
$select_branches{""}="";
my ($count, @branches) = branches(); 
#branches is IndependantBranches aware
foreach my $branch (@branches){
        push @select_branches, $branch->{branchcode};
        $select_branches{$branch->{branchcode}}=$branch->{branchname};
}
my $CGIbranch=CGI::scrolling_list( -name     => 'branch',
                                -values   => address@hidden,
                                -labels   => \%select_branches,
                                -size     => 1,
                                -multiple => 0 );

my ($count, @lateorders) = getlateorders($delay,$supplierid,$branch);

$template->param(delay=>$delay) if ($delay);
$template->param(
        CGIbranch => $CGIbranch,
        CGIsupplier => $CGIsupplier,
        lateorders => address@hidden
        );
output_html_with_http_headers $query, $cookie, $template->output;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]