Lines 30-35
use C4::Auth;
Link Here
|
30 |
use C4::Dates qw/format_date format_date_in_iso/; |
30 |
use C4::Dates qw/format_date format_date_in_iso/; |
31 |
use C4::Debug; |
31 |
use C4::Debug; |
32 |
use C4::Biblio qw/GetMarcBiblio GetRecordValue GetFrameworkCode/; |
32 |
use C4::Biblio qw/GetMarcBiblio GetRecordValue GetFrameworkCode/; |
|
|
33 |
use C4::Acquisition qw/GetOrdersByBiblionumber/; |
33 |
|
34 |
|
34 |
my $input = new CGI; |
35 |
my $input = new CGI; |
35 |
my $startdate = $input->param('from'); |
36 |
my $startdate = $input->param('from'); |
Lines 47-52
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
Link Here
|
47 |
} |
48 |
} |
48 |
); |
49 |
); |
49 |
|
50 |
|
|
|
51 |
my $booksellerid = $input->param('booksellerid') // ''; |
52 |
my $basketno = $input->param('basketno') // ''; |
53 |
if ($booksellerid && $basketno) { |
54 |
$template->param( booksellerid => $booksellerid, basketno => $basketno ); |
55 |
} |
56 |
|
50 |
my ( $year, $month, $day ) = Today(); |
57 |
my ( $year, $month, $day ) = Today(); |
51 |
my $todaysdate = sprintf("%-04.4d-%-02.2d-%02.2d", $year, $month, $day); |
58 |
my $todaysdate = sprintf("%-04.4d-%-02.2d-%02.2d", $year, $month, $day); |
52 |
# Find yesterday for the default shelf pull start and end dates |
59 |
# Find yesterday for the default shelf pull start and end dates |
Lines 160-165
while ( my $data = $sth->fetchrow_hashref ) {
Link Here
|
160 |
); |
167 |
); |
161 |
} |
168 |
} |
162 |
|
169 |
|
|
|
170 |
{ |
171 |
for my $rd ( @reservedata ) { |
172 |
$rd->{biblionumber} || next; |
173 |
my $pcnt = CountPendingOrdersByBiblionumber( $rd->{biblionumber} ); |
174 |
$pcnt || next; |
175 |
$rd->{pendingorders} = $pcnt; |
176 |
} |
177 |
} |
178 |
|
163 |
$template->param( |
179 |
$template->param( |
164 |
ratio_atleast1 => $ratio_atleast1, |
180 |
ratio_atleast1 => $ratio_atleast1, |
165 |
todaysdate => format_date($todaysdate), |
181 |
todaysdate => format_date($todaysdate), |
Lines 170-172
$template->param(
Link Here
|
170 |
); |
186 |
); |
171 |
|
187 |
|
172 |
output_html_with_http_headers $input, $cookie, $template->output; |
188 |
output_html_with_http_headers $input, $cookie, $template->output; |
|
|
189 |
|
190 |
sub CountPendingOrdersByBiblionumber { |
191 |
my $biblionumber = shift; |
192 |
my @orders = GetOrdersByBiblionumber( $biblionumber ); |
193 |
scalar(@orders) || return(0); |
194 |
my $cnt=0; for my $order ( @orders ) { |
195 |
defined($order->{datecancellationprinted}) && $order->{datecancellationprinted} && next; |
196 |
my $onum = $order->{quantity} // 0; |
197 |
my $rnum = $order->{quantityreceived} // 0; |
198 |
$rnum >= $onum && next; |
199 |
$cnt+=$onum; $cnt-=$rnum; |
200 |
} |
201 |
$cnt; |
202 |
} |