|
Lines 117-146
if ($do_it) {
Link Here
|
| 117 |
} |
117 |
} |
| 118 |
else { |
118 |
else { |
| 119 |
my $dbh = C4::Context->dbh; |
119 |
my $dbh = C4::Context->dbh; |
| 120 |
my @select; |
|
|
| 121 |
my %select; |
| 122 |
my $req; |
120 |
my $req; |
| 123 |
$req = $dbh->prepare("SELECT distinctrow id,name FROM aqbooksellers ORDER BY name"); |
121 |
$req = $dbh->prepare("SELECT distinctrow id,name FROM aqbooksellers ORDER BY name"); |
| 124 |
$req->execute; |
122 |
$req->execute; |
| 125 |
push @select, ""; |
123 |
my $booksellers = $req->fetchall_arrayref({}); |
| 126 |
$select{''} = "All Suppliers"; |
|
|
| 127 |
while ( my ( $value, $desc ) = $req->fetchrow ) { |
| 128 |
push @select, $desc; |
| 129 |
$select{$value}=$desc; |
| 130 |
} |
| 131 |
my $CGIBookSellers = CGI::scrolling_list( |
| 132 |
-name => 'Filter', |
| 133 |
-id => 'supplier', |
| 134 |
-values => \@select, |
| 135 |
-labels => \%select, |
| 136 |
-size => 1, |
| 137 |
-multiple => 0 |
| 138 |
); |
| 139 |
|
124 |
|
| 140 |
$req = $dbh->prepare("SELECT DISTINCTROW itemtype,description FROM itemtypes ORDER BY description"); |
125 |
$req = $dbh->prepare("SELECT DISTINCTROW itemtype,description FROM itemtypes ORDER BY description"); |
| 141 |
$req->execute; |
126 |
$req->execute; |
| 142 |
undef @select; |
127 |
my @select; |
| 143 |
undef %select; |
128 |
my %select; |
| 144 |
push @select, ""; |
129 |
push @select, ""; |
| 145 |
$select{''} = "All Item Types"; |
130 |
$select{''} = "All Item Types"; |
| 146 |
while ( my ( $value, $desc ) = $req->fetchrow ) { |
131 |
while ( my ( $value, $desc ) = $req->fetchrow ) { |
|
Lines 256-262
else {
Link Here
|
| 256 |
} |
241 |
} |
| 257 |
|
242 |
|
| 258 |
$template->param( |
243 |
$template->param( |
| 259 |
CGIBookSeller => $CGIBookSellers, |
244 |
booksellers => $booksellers, |
| 260 |
CGIItemType => $CGIItemTypes, |
245 |
CGIItemType => $CGIItemTypes, |
| 261 |
CGIBudget => $CGIBudget, |
246 |
CGIBudget => $CGIBudget, |
| 262 |
hassort1 => $hassort1, |
247 |
hassort1 => $hassort1, |
|
Lines 305-324
sub calculate {
Link Here
|
| 305 |
} else { |
290 |
} else { |
| 306 |
$cell{filter} = format_date(@$filters[$i]); |
291 |
$cell{filter} = format_date(@$filters[$i]); |
| 307 |
} |
292 |
} |
| 308 |
given ($i) { |
293 |
$cell{crit} = $i; |
| 309 |
when (0) { $cell{crit} = "Placed On From" } |
|
|
| 310 |
when (1) { $cell{crit} = "Placed On To" } |
| 311 |
when (2) { $cell{crit} = "Received On From" } |
| 312 |
when (3) { $cell{crit} = "Received On To" } |
| 313 |
when (4) { $cell{crit} = "Bookseller" } |
| 314 |
when (5) { $cell{crit} = "Home branch" } |
| 315 |
when (6) { $cell{crit} = "Collection" } |
| 316 |
when (7) { $cell{crit} = "Doc Type" } |
| 317 |
when (8) { $cell{crit} = "Budget" } |
| 318 |
when (9) { $cell{crit} = "Sort1" } |
| 319 |
when (10) { $cell{crit} = "Sort2" } |
| 320 |
default { $cell{crit} = "" } |
| 321 |
} |
| 322 |
push @loopfilter, \%cell; |
294 |
push @loopfilter, \%cell; |
| 323 |
} |
295 |
} |
| 324 |
} |
296 |
} |
| 325 |
- |
|
|