-my @todayoverduesloop;
-my $counter = 0;
-
-my @getoverdues = GetOverduesForBranch( $default, $departement );
-
-# filter by departement
-if ($departement) {
- my ( $departementlib, $departementValue ) = GetDepartementLib($departement);
- $template->param(
- departement => $departementlib,
- departementValue => $departementValue,
- );
+my @getoverdues = GetOverduesForBranch( $default, $location );
+$debug and warn "HERE : $default / $location" . Dumper(@getoverdues);
+# search for location authorised value
+my ($tag,$subfield) = GetMarcFromKohaField('items.location','');
+my $tagslib = &GetMarcStructure(1,'');
+if ($tagslib->{$tag}->{$subfield}->{authorised_value}) {
+ my $values= GetAuthorisedValues($tagslib->{$tag}->{$subfield}->{authorised_value});
+ for (@$values) { $_->{selected} = 1 if $location eq $_->{authorised_value} }
+ $template->param(locationsloop => $values);