add errors in case gross performance is not set
This commit is contained in:
parent
b779964adb
commit
9b1e9397a8
@ -474,16 +474,18 @@ export class PortfolioService {
|
||||
new Big(currentPosition.marketPrice).mul(currentPosition.quantity)
|
||||
);
|
||||
if (currentPosition.grossPerformance) {
|
||||
hasErrors = true;
|
||||
grossPerformance = grossPerformance.plus(
|
||||
currentPosition.grossPerformance
|
||||
);
|
||||
} else {
|
||||
hasErrors = true;
|
||||
}
|
||||
if (currentPosition.grossPerformancePercentage) {
|
||||
hasErrors = true;
|
||||
grossPerformancePercentage = grossPerformancePercentage.mul(
|
||||
currentPosition.grossPerformancePercentage.plus(1)
|
||||
);
|
||||
} else {
|
||||
hasErrors = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user