Fix blank/missing items in spending report (#2432)

* Fixes blank/missing items in spending report

Use left (outer) join when connecting product to optional product group

* Properly display ungrouped items in table and chart

---------

Co-authored-by: Bernd Bestel <bernd@berrnd.de>
This commit is contained in:
Torqu3Wr3nch
2024-01-09 12:36:09 -05:00
committed by GitHub
parent 99f448dd64
commit 151bd7f025
3 changed files with 27 additions and 6 deletions

View File

@@ -4,7 +4,7 @@ var totalAmount = 0.0;
$("#metrics-table tbody tr").each(function()
{
var self = $(this);
labels.push(self.find("td:eq(0)").attr("data-chart-label"));
labels.push(self.find("td:eq(0)").text().trim());
var itemTotal = Number.parseFloat(self.find("td:eq(1)").attr("data-chart-value"));
data.push(itemTotal);
totalAmount += + itemTotal;