From a56de30268d406ba9ec17fa39bfc6368c9777af0 Mon Sep 17 00:00:00 2001 From: Bernd Bestel Date: Mon, 3 Apr 2023 18:35:38 +0200 Subject: [PATCH] Fixed /stockoverview "Min. stock amount" column sorting (fixes #2189) --- changelog/70_UNRELEASED_xxxx.xx.xx.md | 2 +- public/viewjs/stockoverview.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/changelog/70_UNRELEASED_xxxx.xx.xx.md b/changelog/70_UNRELEASED_xxxx.xx.xx.md index ccb4d372..257a7731 100644 --- a/changelog/70_UNRELEASED_xxxx.xx.xx.md +++ b/changelog/70_UNRELEASED_xxxx.xx.xx.md @@ -31,7 +31,7 @@ - The product option "Quick consume amount" (the amount used for the "quick consume/open buttons" on the stock overview page) has been split into another option "Quick open amount", to be able to set different amounts for consume and open (defaults to the "Quick consume amount" per product, so no changed behavior when not configured) - Changed that for the product's average and last price (and for the price history chart) stock transactions with an empty or `0` price are ignored - Fixed that hiding the "Purchased date" column (table options) on the stock entries page didn't work -- Fixed that sorting by the "Value" column on the stock overview page didn't work +- Fixed that sorting by the "Value" and "Min. stock amount" columns on the stock overview page didn't work - Fixed that the consumed amount was wrong, when consuming multiple substituted subproducts at once and when multiple/different conversion factors were involved - Fixed that for a product's average price, only currently in-stock items were considered, not already consumed ones diff --git a/public/viewjs/stockoverview.js b/public/viewjs/stockoverview.js index ae2ff774..0590994a 100755 --- a/public/viewjs/stockoverview.js +++ b/public/viewjs/stockoverview.js @@ -27,7 +27,7 @@ var stockOverviewTable = $('#stock-overview-table').DataTable({ { "type": "html", "targets": 5 }, { "type": "html", "targets": 11 }, { "type": "custom-sort", "targets": 12 }, - { "type": "num", "targets": 13 }, + { "type": "html-num-fmt", "targets": 13 }, { "type": "custom-sort", "targets": 4 }, { "type": "custom-sort", "targets": 18 } ].concat($.fn.dataTable.defaults.columnDefs)