Commit a946db53 authored by DevPilot's avatar DevPilot

fix(accounting): statement views crashed on wrong name column

Controllers select suppliers.name_ar and members.full_name_ar, but
the views referenced a nonexistent 'name' key, fataling the page.
parent 04f46767
......@@ -12,7 +12,7 @@
<select name="member_id" class="form-select">
<option value="">— اختر عضو —</option>
<?php foreach ($members as $m): ?>
<option value="<?= (int)$m['id'] ?>" <?= (int)($filters['member_id'] ?? 0) === (int)$m['id'] ? 'selected' : '' ?>><?= e($m['name']) ?></option>
<option value="<?= (int)$m['id'] ?>" <?= (int)($filters['member_id'] ?? 0) === (int)$m['id'] ? 'selected' : '' ?>><?= e($m['full_name_ar']) ?></option>
<?php endforeach; ?>
</select>
</div>
......@@ -33,7 +33,7 @@
<!-- Statement -->
<div class="card">
<div style="padding:15px 20px;border-bottom:1px solid #E5E7EB;display:flex;justify-content:space-between;align-items:center;">
<h3 style="margin:0;">كشف حساب: <?= e($member['name']) ?></h3>
<h3 style="margin:0;">كشف حساب: <?= e($member['full_name_ar']) ?></h3>
<button type="button" class="btn btn-outline" onclick="window.print()">طباعة</button>
</div>
......
......@@ -12,7 +12,7 @@
<select name="supplier_id" class="form-select">
<option value="">— اختر مورد —</option>
<?php foreach ($suppliers as $s): ?>
<option value="<?= (int)$s['id'] ?>" <?= (int)($filters['supplier_id'] ?? 0) === (int)$s['id'] ? 'selected' : '' ?>><?= e($s['name']) ?></option>
<option value="<?= (int)$s['id'] ?>" <?= (int)($filters['supplier_id'] ?? 0) === (int)$s['id'] ? 'selected' : '' ?>><?= e($s['name_ar']) ?></option>
<?php endforeach; ?>
</select>
</div>
......@@ -33,7 +33,7 @@
<!-- Statement -->
<div class="card">
<div style="padding:15px 20px;border-bottom:1px solid #E5E7EB;display:flex;justify-content:space-between;align-items:center;">
<h3 style="margin:0;">كشف حساب: <?= e($supplier['name']) ?></h3>
<h3 style="margin:0;">كشف حساب: <?= e($supplier['name_ar']) ?></h3>
<button type="button" class="btn btn-outline" onclick="window.print()">طباعة</button>
</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