Skip to content

Commit

Permalink
Merge pull request #6500 from gabriele-v/master
Browse files Browse the repository at this point in the history
fix(#5685): fix decimal values
  • Loading branch information
whalley committed Jan 31, 2024
2 parents 17e5fd5 + 94c6c92 commit c836db5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/reports/transactions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ table {

if (chart > -1)
{
double value_chart = std::accumulate(total_in_base_curr.begin(), total_in_base_curr.end(), 0,
double value_chart = std::accumulate(total_in_base_curr.begin(), total_in_base_curr.end(), (double)0,
[](const double previous, decltype(*total_in_base_curr.begin()) p) { return previous + p.second; });
values_chart[lastSortLabel] += value_chart;
}
Expand Down Expand Up @@ -488,13 +488,13 @@ table {
{
auto statsMin = std::min_element
(values_chart.begin(), values_chart.end(),
[](const std::pair<wxString, int>& p1, const std::pair<wxString, int>& p2) {
[](const std::pair<wxString, double>& p1, const std::pair<wxString, double>& p2) {
return p1.second < p2.second;
}
);
auto statsMax = std::max_element
(values_chart.begin(), values_chart.end(),
[](const std::pair<wxString, int>& p1, const std::pair<wxString, int>& p2) {
[](const std::pair<wxString, double>& p1, const std::pair<wxString, double>& p2) {
return p1.second < p2.second;
}
);
Expand Down

0 comments on commit c836db5

Please sign in to comment.