The acquisition table is displayed on the bibliographic detail page, even if the record has not been ordered. It is caused by commit 43326754b110c62fbb2909eea1595656833f8c02 Bug 20366: Add subscription info to the acq tab on the biblio detail page The "orders" variable sent to the template switched from an arrayref to a Koha::Acquisition::Orders object. The condition [% IF orders %] in the template is no longer correct (always true) and must be replaced with [% IF orders.count %] Wrong display: https://snipboard.io/wXOHLJ.jpg Expected display: https://snipboard.io/E8GP6K.jpg
Created attachment 95523 [details] [review] Bug 24058: acquisition table displayed even if no order exist (bib detail) This patch corrects the template check for existence of acquisitions data on the bibliographic detail page. Now it will correctly hide the DataTable when there is no data. To test, apply the patch and enable the AcquisitionDetails system preference. - View the bibliographic detail page for a title which has no associated Acquisitions data. Under the "Acquisitions details" tab you should see only a message, "There is no order for this biblio." - View the detail page for a title which has associated Acquisitions data. The "Acquisitions details" tab should show the correct information.
Created attachment 95528 [details] [review] Bug 24058: acquisition table displayed even if no order exist (bib detail) This patch corrects the template check for existence of acquisitions data on the bibliographic detail page. Now it will correctly hide the DataTable when there is no data. To test, apply the patch and enable the AcquisitionDetails system preference. - View the bibliographic detail page for a title which has no associated Acquisitions data. Under the "Acquisitions details" tab you should see only a message, "There is no order for this biblio." - View the detail page for a title which has associated Acquisitions data. The "Acquisitions details" tab should show the correct information. Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Created attachment 95650 [details] [review] Bug 24058: acquisition table displayed even if no order exist (bib detail) This patch corrects the template check for existence of acquisitions data on the bibliographic detail page. Now it will correctly hide the DataTable when there is no data. To test, apply the patch and enable the AcquisitionDetails system preference. - View the bibliographic detail page for a title which has no associated Acquisitions data. Under the "Acquisitions details" tab you should see only a message, "There is no order for this biblio." - View the detail page for a title which has associated Acquisitions data. The "Acquisitions details" tab should show the correct information. Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Nice work! Pushed to master for 19.11.00