http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10867
Bug ID: 10867
Summary: Adding label to batch, search by date requires "on or
after date".
Change sponsored?: ---
Product: Koha
Version: 3.12
Hardware: All
OS: All
Status: NEW
Severity: minor
Priority: P5 - low
Component: Label printing
Assignee: [email protected]
Reporter: [email protected]
QA Contact: [email protected]
When searching for items to add to a batch of labels, the "Added on or after
date" has to be filled in when the "Added on or before date" field is filled
in.
Steps to reproduce:
** Log in, and go to Home › Tools › Labels home › Manage label Batches › New
Batch › Add Items
** Select a date in the "on or before" field, but not in the "on or after"
field.
** It does not matter whether a keyword/title/etc. is specified.
** Click "Search"
** Error occurs:
Software error:
Can't call method "output" without a package or object reference at
/usr/share/koha/intranet/cgi-bin/labels/label-item-search.pl line 100.
Taking a look at the code:
77 $datefrom = $query->param('datefrom');
78 $dateto = $query->param('dateto');
79
80 if ($datefrom) {
81 $datefrom = C4::Dates->new($datefrom);
82 if ($QParser) {
83 $ccl_query .= ' && ' if $ccl_textbox;
84 $ccl_query .=
85 "acqdate(" . $datefrom->output("iso") . '-)';
86 } else {
87 $ccl_query .= ' and ' if $ccl_textbox;
88 $ccl_query .=
89 "acqdate,st-date-normalized,ge=" .
$datefrom->output("iso");
90 }
91 }
92
93 if ($dateto) {
94 $dateto = C4::Dates->new($dateto);
95 if ($QParser) {
96 $ccl_query .= ' && ' if ( $ccl_textbox || $datefrom );
97 $ccl_query .= "acqdate(-" . $dateto->output("iso") . ')';
98 } else {
99 $ccl_query .= ' and ' if ( $ccl_textbox || $datefrom );
100 $ccl_query .= "acqdate,st-date-normalized,le=" .
$datefrom->output("iso");
101 }
102 }
At line 100, $datefrom is used, without cheking whether it is set.
--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/