From 289b1c217bd670d3958223a3d4ad8322cd4e2a94 Mon Sep 17 00:00:00 2001 From: hackerESQ Date: Mon, 9 Sep 2024 17:29:00 -0500 Subject: [PATCH] fixes std notation on holdings --- app/Models/Holding.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Models/Holding.php b/app/Models/Holding.php index fa37c68..5e94787 100644 --- a/app/Models/Holding.php +++ b/app/Models/Holding.php @@ -176,7 +176,7 @@ class Holding extends Model ->selectRaw('SUM(CASE WHEN transaction_type = "SELL" THEN ((sale_price - cost_basis) * quantity) ELSE 0 END) AS `realized_gains`') ->first(); - $total_quantity = $query->qty_purchases - $query->qty_sales; + $total_quantity = round($query->qty_purchases - $query->qty_sales, 5); $average_cost_basis = ( $query->qty_purchases > 0