Bug 8129 - quick slips issuing does not work
Summary: quick slips issuing does not work
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: 3.8
Hardware: All All
: P5 - low normal
Assignee: Liz Rea
QA Contact:
URL:
Keywords:
Depends on:
Blocks: 6430
  Show dependency treegraph
 
Reported: 2012-05-18 21:14 UTC by L. Bareño
Modified: 2013-12-05 19:57 UTC (History)
7 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 8129 - Quickslips not printing (1.52 KB, patch)
2012-05-29 21:05 UTC, Liz Rea
Details | Diff | Splinter Review
Bug 8129 - Quickslips not printing (1.53 KB, patch)
2012-05-30 11:41 UTC, Kyle M Hall
Details | Diff | Splinter Review
[SIGNED OFF] Bug 8129 - Quickslips not printing (1.55 KB, patch)
2012-05-30 11:42 UTC, Kyle M Hall
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description L. Bareño 2012-05-18 21:14:37 UTC
in ./C4/Members.pm, IssueSlip function,

$today string has "yyyy-mm-dd" format, but $it->{'issuedate'} and $it->{'due_date'} are in "yyyy-mm-ddThh:mm:ss" format, so the "eq" and "le" string comparisons made later are not going to work.

suggested edition in ./C4/Members.pm:

    if ((substr $it->{'issuedate'}, 0, 10) eq $today) {
            $it->{'today'} = 1;
        }
        elsif ((substr $it->{'date_due'}, 0, 10) le $today) {
            $it->{'overdue'} = 1;
        }

        $it->{'date_due'}=format_date($it->{'date_due'});
    }


please accept my apologies for my lack of bugEtiquette.
Comment 1 Liz Rea 2012-05-29 21:05:50 UTC Comment hidden (obsolete)
Comment 2 Kyle M Hall 2012-05-30 11:41:02 UTC Comment hidden (obsolete)
Comment 3 Kyle M Hall 2012-05-30 11:42:55 UTC
Created attachment 9849 [details] [review]
[SIGNED OFF] Bug 8129 - Quickslips not printing

Implemented from the suggestions attached to the bug.

To test:
Check out a book to a patron
Click print -> quick slip

Slip should show only today's checkouts.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 4 Ian Walls 2012-06-04 15:23:16 UTC
Handles the date formatting with substrings... not the most general approach, but it works.  Less load on the system than using DateTime to cast as a date.

Updates variable name from "$today" to "$now", which is more general in our new hourly loan context.  I'm in favour.

Marking as Passed QA.
Comment 5 Chris Cormack 2012-06-05 15:00:25 UTC
Bug fix, pushed to 3.8.x will be in 3.8.2