View | Details | Raw Unified | Return to bug 13392
Collapse All | Expand All

(-)a/reports/suggestions_stats.pl (-6 / +8 lines)
Lines 27-34 use C4::Output; Link Here
27
use C4::Branch;
27
use C4::Branch;
28
use C4::Budgets;
28
use C4::Budgets;
29
use C4::Category;
29
use C4::Category;
30
use C4::Dates qw/format_date format_date_in_iso/;
30
use Koha::DateUtils qw/output_pref dt_from_string/;
31
use C4::ItemType;
32
use C4::Koha;
31
use C4::Koha;
33
use C4::Reports;
32
use C4::Reports;
34
33
Lines 123-129 foreach my $branch (@$branches) { Link Here
123
    $display_values->{branchcode}->{$branchcode} = $branch->{branchname};
122
    $display_values->{branchcode}->{$branchcode} = $branch->{branchname};
124
}
123
}
125
124
126
my @itemtypes = C4::ItemType->all;
125
my @itemtypes = Koha::ItemTypes->search;
127
foreach my $itemtype (@itemtypes) {
126
foreach my $itemtype (@itemtypes) {
128
    my $itype = $itemtype->itemtype;
127
    my $itype = $itemtype->itemtype;
129
    $display_values->{itemtype}->{$itype} = $itemtype->description;
128
    $display_values->{itemtype}->{$itype} = $itemtype->description;
Lines 184-194 sub calculate { Link Here
184
    foreach my $filter (qw(suggesteddate rejecteddate ordereddate)) {
183
    foreach my $filter (qw(suggesteddate rejecteddate ordereddate)) {
185
        if ($filters->{"${filter}_from"}) {
184
        if ($filters->{"${filter}_from"}) {
186
            push @conditions, "$filter >= ?";
185
            push @conditions, "$filter >= ?";
187
            push @bind_values, format_date_in_iso($filters->{"${filter}_from"});
186
            push @bind_values, output_pref({
187
                    dt => dt_from_string( $filters->{"${filter}_from"} ),
188
                    dateformat => 'iso', dateonly => 1 });
188
        }
189
        }
189
        if ($filters->{"${filter}_to"}) {
190
        if ($filters->{"${filter}_to"}) {
190
            push @conditions, "$filter <= ?";
191
            push @conditions, "$filter <= ?";
191
            push @bind_values, format_date_in_iso($filters->{"${filter}_to"});
192
            push @bind_values, output_pref({
193
                    dt => dt_from_string( $filters->{"${filter}_to"} ),
194
                    dateformat => 'iso', dateonly => 1 });
192
        }
195
        }
193
    }
196
    }
194
197
195
- 

Return to bug 13392