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: [email protected]
Reporter: [email protected]
QA Contact: [email protected]
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.
_______________________________________________
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/