Fix with register deposit

This commit is contained in:
Anna-Sara Sélea 2026-01-15 18:42:39 +01:00
parent 3fdea4581f
commit 4ab664db22

View file

@ -62,8 +62,9 @@ class CustomerGroupController extends Controller
$customer = Customer::findOrFail($customerItem); $customer = Customer::findOrFail($customerItem);
$customer->customer_group_id = $customerGroup->id; $customer->customer_group_id = $customerGroup->id;
$customer->is_in_group = 1; $customer->is_in_group = 1;
$groupAmount += $customer->deposit; $groupAmount += $customer->amount_left;
$customer->deposit = 0; $customer->deposit = 0;
$customer->amount_left = 0;
$customer->save(); $customer->save();
} }