[Koha-bugs] [Bug 10490] Overdue fines cap (amount) in circulation rules is saved incorrectly (rounded)
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Wed Jun 19 21:14:59 CEST 2013
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10490
--- Comment #1 from Galen Charlton <gmcharlt at gmail.com> ---
Nice catch. Also, oops. Also, we really ought to be counting everything in
pennies and not use decimal data types for currencies.
Regardless, I think altering the column type to decimal(28,6) should do the
trick and preserve existing values:
MariaDB [koha]> create table tmp (overduefinescap decimal null);
Query OK, 0 rows affected (0.05 sec)
MariaDB [koha]> insert into tmp values (1.25);
Query OK, 1 row affected, 1 warning (0.00 sec)
MariaDB [koha]> select * from tmp;
+-----------------+
| overduefinescap |
+-----------------+
| 1 |
+-----------------+
1 row in set (0.00 sec)
MariaDB [koha]> alter table tmp modify column overduefinescap decimal(28,6)
null;
Query OK, 1 row affected (0.06 sec)
Records: 1 Duplicates: 0 Warnings: 0
MariaDB [koha]> select * from tmp;
+-----------------+
| overduefinescap |
+-----------------+
| 1.000000 |
+-----------------+
1 row in set (0.00 sec)
--
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
More information about the Koha-bugs
mailing list