Commit cf7b724f authored by DevPilot's avatar DevPilot

fix(inventory): asset custody screens crashed on wrong employee name column

Controller selects employees as full_name_ar; both custody_index and
custody_transfer views were reading name_ar, which doesn't exist on
that result set. Live crash: Undefined array key "name_ar" at
custody_index.php:14. Pre-existing bug, unrelated to recent changes —
just hadn't been hit until now. Confirmed via repo-wide grep this was
the only place with the mismatch.
parent a22986b4
......@@ -11,7 +11,7 @@
<select name="employee_id" class="form-select">
<option value="">جميع الموظفين</option>
<?php foreach ($employees as $emp): ?>
<option value="<?= (int) $emp['id'] ?>" <?= ($employee_id ?? '') == $emp['id'] ? 'selected' : '' ?>><?= e($emp['name_ar']) ?></option>
<option value="<?= (int) $emp['id'] ?>" <?= ($employee_id ?? '') == $emp['id'] ? 'selected' : '' ?>><?= e($emp['full_name_ar']) ?></option>
<?php endforeach; ?>
</select>
</div>
......
......@@ -51,7 +51,7 @@
<select name="new_employee_id" class="form-select" required>
<option value="">-- اختر الموظف --</option>
<?php foreach ($employees as $emp): ?>
<option value="<?= (int) $emp['id'] ?>"><?= e($emp['name_ar']) ?></option>
<option value="<?= (int) $emp['id'] ?>"><?= e($emp['full_name_ar']) ?></option>
<?php endforeach; ?>
</select>
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment