From 13e3bede11766243c69ba4353780f356554b19a4 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 13 Oct 2011 15:39:29 -0400 Subject: [PATCH] [SIGNED-OFF] Fix for Bug 2601 - Order fines by date and time When a fine is paid off the modification of the original account line containing the fine gets its amount zeroed out and a line is added saying "Payment,thanks." Both these transactions happen at virtually the same time, so they cannot be ordered one after the other based on the timestamp. This patch adds a one second delay bewteen the two steps, and outputs the timestamp rather than the date of each transaction so that it is unambiguous when each one happened. NOTE: This fix will only fix the sorting of future transactions. Signed-off-by: Nicole C. Engard --- C4/Accounts.pm | 1 + .../prog/en/modules/members/boraccount.tt | 2 +- 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/C4/Accounts.pm b/C4/Accounts.pm index 2352e9e..b8b09a7 100644 --- a/C4/Accounts.pm +++ b/C4/Accounts.pm @@ -205,6 +205,7 @@ sub makepayment { INTO accountlines (borrowernumber, accountno, date, amount, description, accounttype, amountoutstanding) VALUES ( ?, ?, now(), ?, 'Payment,thanks', 'Pay', 0)" ); + sleep 1; $ins->execute($borrowernumber, $nextaccntno, $payment); $ins->finish; } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt index c5941fd..9e46844 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt @@ -43,7 +43,7 @@ [% FOREACH account IN accounts %] [% IF ( loop.odd ) %][% ELSE %][% END %] - [% account.date %] + [% account.timestamp %] [% account.description %] [% IF ( account.itemnumber ) %]View item [% END %][% account.title |html %] [% account.note %] [% IF ( account.amountcredit ) %][% ELSE %][% END %][% account.amount %] -- 1.7.2.3