[Koha-bugs] [Bug 19593] New: "Delete vendor" button is always set
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Wed Nov 8 16:58:42 CET 2017
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19593
Bug ID: 19593
Summary: "Delete vendor" button is always set
Change sponsored?: ---
Product: Koha
Version: 16.11
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P5 - low
Component: Acquisitions
Assignee: koha-bugs at lists.koha-community.org
Reporter: gwendal.joncour at univ-rennes2.fr
QA Contact: testopia at bugs.koha-community.org
On our freshly updated 16.11 instance, we noticed that on pages
/cgi-bin/koha/acqui/booksellers.pl and /cgi-bin/koha/acqui/supplier.pl, the
acquisition toolbar always shows the "Delete vendor" button instead of the
"Receive shipments", no matter the number of baskets attached to the vendor.
When I looking on conditions on
koha-tmpl/intranet-tmpl/prog/en/include/acquisitions-toolbar.inc, I saw that
basketcount variable is not set. acqui/booksellers.pl and acqui/supplier.pl
calling $suppliers[0]->{'basketcount'} and $supplier->{'basketcount'} from
Koha::Acquisition::Bookseller while Bookseller.pm has a basket_count method to
return it, explaining why the "Delete vendor" button is always shown.
The problem is mainly cosmetic but with it, the test on vendor deletion in
supplier.pl line 95...
if ( $supplier->{'basketcount'} == 0 ) {
...always returns true so the only thing preventing deletion of vendor with
baskets attached on is the database foreign key contraint.
--
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