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

(-)a/C4/Suggestions.pm (-2 / +12 lines)
Lines 25-31 use CGI; Link Here
25
25
26
use C4::Context;
26
use C4::Context;
27
use C4::Output;
27
use C4::Output;
28
use C4::Dates qw(format_date);
28
use C4::Dates qw(format_date format_date_in_iso);
29
use C4::SQLHelper qw(:all);
29
use C4::SQLHelper qw(:all);
30
use C4::Debug;
30
use C4::Debug;
31
use C4::Letters;
31
use C4::Letters;
Lines 147-152 sub SearchSuggestion { Link Here
147
        }
147
        }
148
    }
148
    }
149
149
150
    my $today = C4::Dates->today('iso');
151
152
    foreach ( qw( suggesteddate manageddate accepteddate ) ) {
153
        my $from = $_ . "_from";
154
        my $to = $_ . "_to";
155
        if ($$suggestion{$from} || $$suggestion{$to}) {
156
            push @query, " AND suggestions.suggesteddate BETWEEN '" 
157
                . (format_date_in_iso($$suggestion{$from}) || 0000-00-00) . "' AND '" . (format_date_in_iso($$suggestion{$to}) || $today) . "'";
158
        } 
159
    }
160
150
    $debug && warn "@query";
161
    $debug && warn "@query";
151
    my $sth=$dbh->prepare("@query");
162
    my $sth=$dbh->prepare("@query");
152
    $sth->execute(@sql_params);
163
    $sth->execute(@sql_params);
153
- 

Return to bug 5947