From 8d9efa1f550126cc8c0c9cd4f85d8675f1ba8910 Mon Sep 17 00:00:00 2001 From: A1Gard Date: Tue, 20 Aug 2024 06:00:57 +0330 Subject: [PATCH] fixed bug --- app/Http/Controllers/Admin/CustomerController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/Admin/CustomerController.php b/app/Http/Controllers/Admin/CustomerController.php index 8bc85d0..b2afa2e 100644 --- a/app/Http/Controllers/Admin/CustomerController.php +++ b/app/Http/Controllers/Admin/CustomerController.php @@ -51,7 +51,7 @@ class CustomerController extends XController { $customer->name = $request->input('name'); - if ($customer->credit != $request->input('credit')){ + if ($customer->credit != $request->input('credit') && $customer->id != null){ $diff = $request->input('credit') - $customer->credit; $customer->credit = $request->input('credit')??0 ; $cr = new Credit();