fix: calculate revenueDeviation without rounding errors
This commit is contained in:
+1
-1
@@ -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 } =
|
||||||
|
|||||||
Reference in New Issue
Block a user