Skip to content

Commit a0239aa

Browse files
committed
Reduce credits used by a factor of 100
and fix toFixed bug
1 parent 579f7bb commit a0239aa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

data_rows/WarehouseMeteringHistory.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ export default class WarehouseMeteringHistory extends DataRow {
1212
super();
1313
this._setStartAndEnd(date);
1414
this.WAREHOUSE_NAME = randomFromArray(["BIG_WH", "SMALL_WH"]);
15-
this.CREDITS_USED = Math.random() * 100;
15+
let credits_used = Math.random();
1616
if (this.WAREHOUSE_NAME == "SMALL_WH") {
17-
this.CREDITS_USED *= 0.3;
17+
credits_used *= 0.3;
1818
}
19-
this.CREDITS_USED.toFixed(2);
19+
this.CREDITS_USED = credits_used.toFixed(2);
2020
}
2121

2222
_setStartAndEnd(date) {

0 commit comments

Comments
 (0)