We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 973e583 commit 1c0c654Copy full SHA for 1c0c654
src/app/shared/services/score-keeper.service.ts
@@ -31,14 +31,14 @@ export class ScoreKeeperService {
31
this.total += sum;
32
console.log('Adding pl ', this.profitLossHash[stock], sum);
33
if (this.profitLossHash[stock]) {
34
- this.profitLossHash[stock] = Number(this.profitLossHash[stock]) + sum;
+ this.profitLossHash[stock] = Number(this.profitLossHash[stock].toFixed(2)) + sum;
35
} else {
36
this.profitLossHash[stock] = sum;
37
}
38
console.log('Final pl ', this.profitLossHash[stock]);
39
40
this.addSell(stock, sum);
41
- const log = `${this.profitLossHash[stock].toFixed()}`;
+ const log = `${this.profitLossHash[stock].toFixed(2)}`;
42
console.log(stock, ': ', log);
43
this.reportingService.addAuditLog(stock, log);
44
0 commit comments