Bug 8129

Summary: quick slips issuing does not work
Product: Koha Reporter: L. Bareño <leonardobareno>
Component: CirculationAssignee: Liz Rea <wizzyrea>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P5 - low CC: chris, gmcharlt, jonathan.druart+koha, koha.sekjal, kyle.m.hall, paul.poulain, wizzyrea
Version: 3.8   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on:    
Bug Blocks: 6430    
Attachments: Bug 8129 - Quickslips not printing
Bug 8129 - Quickslips not printing
[SIGNED OFF] Bug 8129 - Quickslips not printing

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;


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