From 318f8dd940a7a1d50c468f38b4649e8890b7ca2e Mon Sep 17 00:00:00 2001 From: hackerESQ Date: Sun, 20 Oct 2024 13:28:40 -0500 Subject: [PATCH] fix:only show dividends where qty > 0 --- app/Models/Holding.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); } /**