From ad30c815ce0393f121fb9efa0d31ee514130b395 Mon Sep 17 00:00:00 2001 From: Olivia Reynolds Date: Fri, 5 Jun 2026 14:52:59 +0000 Subject: [PATCH] Bug 34166: Add total column to suggestions table This patch displays the "total_price" field from the API in the acquisition suggestions table. In line with other totals, it is displayed unitless after currency conversion. Test plan: 1. Navigate to Acquisitions > Suggestions. 2. Click "New purchase suggestion", then add a title, price, and number of copies. 3. Make note of the calculated total price. 3. Save the suggestion to return to the table. 4. Verify there is no "Total" column on the suggestions table. 5. Apply patch, update database, and refresh. 6. Verify there is a "Total" column on the suggestions table that matches the previously displayed total price. 7. Verify the "Total" column is listed under the "Columns" dropdown. 8. Above the suggestions table, click "Configure". 9. In the column settings for suggestions, check both "Is hidden by default" and "Cannot be toggled" for "total". 10. Underneath the column settings for suggestions, uncheck "Save configuration state on page change". 11. Save the column settings. 12. Return to the suggestions table. 13. Verify the "Total" column is hidden. 14. Verify the "Total" column is not listed under the "Columns" dropdown. Sponsored-by: Open Fifth Signed-off-by: Michaela Signed-off-by: Jonathan Druart Signed-off-by: Pedro Amorim --- admin/columns_settings.yml | 2 ++ .../prog/en/modules/suggestion/suggestion.tt | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/admin/columns_settings.yml b/admin/columns_settings.yml index a06bbfbd9c..a18271171e 100644 --- a/admin/columns_settings.yml +++ b/admin/columns_settings.yml @@ -246,6 +246,8 @@ modules: columnname: library - columnname: library_fund + - + columnname: total - columnname: staff_note - diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt index 6bfb560eb3..af076ebb14 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt @@ -770,6 +770,7 @@ Last updated Library Fund + Total Non-public note Status   @@ -1422,6 +1423,14 @@ return escape_str(row.fund?.name ? row.fund.name : ""); }, }, + { + data: "total", + searchable: true, + orderable: true, + render: function (data, type, row, meta) { + return escape_str(row.total_price ?? ""); + }, + }, { data: "staff_note", searchable: false,