diff --git a/app/Models/Holding.php b/app/Models/Holding.php index c9ed89e..2340c17 100644 --- a/app/Models/Holding.php +++ b/app/Models/Holding.php @@ -102,7 +102,8 @@ class Holding extends Model ->from('transactions') ->whereRaw("transactions.portfolio_id = '$this->portfolio_id'") ->whereRaw("transactions.symbol = '$this->symbol'"); - }); + }) + ->having('total_received', '>', 0); } /**