https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15962
Bug ID: 15962
Summary: Currency deletion doesn't correctly identify
currencies in use
Change sponsored?: ---
Product: Koha
Version: master
Hardware: All
URL: /cgi-bin/koha/admin/currency.pl?op=delete_confirm
OS: All
Status: NEW
Severity: normal
Priority: P5 - low
Component: Acquisitions
Assignee: [email protected]
Reporter: [email protected]
QA Contact: [email protected]
currency.pl tries to see if a currency is active before deleting it:
my $total_row = $dbh->selectrow_hashref(
'select count(*) as total from aqbooksellers where currency=?',
{}, $curr );
However it doesn't look like the currency column in aqbooksellers is used
(anymore?). It looks to me like there are two columns to check: List prices
aqbooksellers.listprice) and invoice price (aqbooksellers.invoiceprice).
If you try to delete a currency which is in use as a list or invoice price in a
vendor record the process will fail silently:
currency.pl: DBD::mysql::db do failed: Cannot delete or update a parent row: a
foreign key constraint fails (`koha`.`aqbasket`, CONSTRAINT `aqbasket_ibfk_3`
FOREIGN KEY (`basketgroupid`) REFERENCES `aqbasketgroups` (`id`) ON UPDATE
CASCADE)
--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
Koha-bugs mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/