Bug 12274

Summary: Closed invoices not properly handled on invoice details page
Product: Koha Reporter: Jacek Ablewicz <abl>
Component: AcquisitionsAssignee: Jacek Ablewicz <abl>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: critical    
Priority: P3 CC: abl, gmcharlt, jonathan.druart+koha
Version: master   
Hardware: All   
OS: All   
See Also: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10613
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 10613    
Bug Blocks:    
Attachments: Bug 12274 - Closed invoices not properly handled on invoice details page
Bug 12274 - Closed invoices not properly handled on invoice details page
Bug 12274: Invoice detail: billingdate is badly formated
[PASSED QA] Bug 12274 - Closed invoices not properly handled on invoice details page
[PASSED QA] Bug 12274: Invoice detail: billingdate is badly formated

Description Jacek Ablewicz 2014-05-17 08:27:05 UTC
Symptoms:
- closed invoices are displayed as "Open" on details page (acqui/invoice.pl),
- it's not possible to reopen the closed invoice using "Edit" button.

(see also bug 3050 comment #11)
Comment 1 Jacek Ablewicz 2014-05-17 09:08:53 UTC
Ouch; it's not an "Edit" button, should be "Save" button instead in comment #1..
Comment 2 Jacek Ablewicz 2014-05-17 09:12:01 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2014-05-20 11:42:58 UTC Comment hidden (obsolete)
Comment 4 Jonathan Druart 2014-05-20 11:43:07 UTC Comment hidden (obsolete)
Comment 5 Jonathan Druart 2014-05-20 11:44:17 UTC
And I found another bug introduced by bug 10613.

This is critical for the release, I raise the severity.
Comment 6 Katrin Fischer 2014-05-21 10:31:35 UTC
Created attachment 28395 [details] [review]
[PASSED QA] Bug 12274 - Closed invoices not properly handled on invoice details page

Trivial fix for small regression (closed invoices are displayed as
"Open" on details page, and it's not possible to reopen the closed
invoice using "Save" button) introduced by bug 10613.

Test plan:

1) Create and close some invoices
2) Note that closed invoices are erroneously displayed as "Open"
on individual invoice[s] details page
3) Apply patch
4) Check previously closed invoices; their status on details page
should now be properly displayed as "Closed on ..." (and an option
for reopening would reappear as well)
5) Ensure that "Close" / "Reopen" checkboxes followed by "Save" button
do work as expected for individual open / closed invoices respectivelly.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described.
Comment 7 Katrin Fischer 2014-05-21 10:32:13 UTC
Created attachment 28396 [details] [review]
[PASSED QA] Bug 12274: Invoice detail: billingdate is badly formated

Bug 10613 sent the billingdate as a string. The template waits a DateTime
object.

To reproduce:
1/ Go on a invoice detail page
2/ Select a billing date
3/ Boom without the patch
[Tue May 20 13:39:18 2014] invoice.pl: Template process failed: undef
error - The 'day' parameter ("2014") to DateTime::new did not pass the
'an integer which is a possible valid day of month' callback.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Not all dates will make it go 'boom' but 31/07/2014 did.
Comment 8 Galen Charlton 2014-05-21 19:23:32 UTC
Pushed to master.  Thanks, Jacek and Jonathan!