fix: calculate revenueDeviation without rounding errors
This commit is contained in:
parent
1996ab31d5
commit
37d50e04c1
|
|
@ -36,7 +36,7 @@ export class ToursCalculationAdapater {
|
||||||
);
|
);
|
||||||
const revenueDeviation =
|
const revenueDeviation =
|
||||||
tour.revenueDispoLive > 0
|
tour.revenueDispoLive > 0
|
||||||
? Math.floor((revenue - tour.revenueDispoLive) * 100) / 100
|
? Math.round((revenue * 100) - (tour.revenueDispoLive * 100)) / 100
|
||||||
: 0;
|
: 0;
|
||||||
|
|
||||||
const { consumptionCostsPerTour } =
|
const { consumptionCostsPerTour } =
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue