From 33315638dfe68caadaf4c23f2afdf406288458aa Mon Sep 17 00:00:00 2001 From: harshjagad20 Date: Fri, 1 Apr 2022 15:51:12 +0530 Subject: [PATCH] Fix expense receipt delete issue while update --- app/Models/Expense.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Models/Expense.php b/app/Models/Expense.php index 8c38268f..01dd69a2 100644 --- a/app/Models/Expense.php +++ b/app/Models/Expense.php @@ -262,7 +262,7 @@ class Expense extends Model implements HasMedia ExchangeRateLog::addExchangeRateLog($this); } - if (isset($request->is_attachment_receipt_removed) && (bool) $request->is_attachment_receipt_removed) { + if (isset($request->is_attachment_receipt_removed) && $request->is_attachment_receipt_removed == "true") { $this->clearMediaCollection('receipts'); } if ($request->hasFile('attachment_receipt')) {