Merge remote-tracking branch 'origin/hotfix/total-round' into develop
This commit is contained in:
@@ -377,7 +377,7 @@ describe("TotalsService", () => {
|
|||||||
},
|
},
|
||||||
])
|
])
|
||||||
|
|
||||||
expect(res).toEqual(1243.75)
|
expect(res).toEqual(1244)
|
||||||
})
|
})
|
||||||
|
|
||||||
it("calculates refund with item fixed discount", async () => {
|
it("calculates refund with item fixed discount", async () => {
|
||||||
|
|||||||
@@ -328,10 +328,7 @@ class TotalsService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
rounded(value) {
|
rounded(value) {
|
||||||
const decimalPlaces = 4
|
return Math.round(value)
|
||||||
return Number(
|
|
||||||
Math.round(parseFloat(value + "e" + decimalPlaces)) + "e-" + decimalPlaces
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user