<?php $pageTitle='Vendors'; ?>
<div class="page-heading"><div><p class="eyebrow">Accounts Payable</p><h1>Vendors</h1></div></div><div class="content-grid two-col"><form class="panel form-stack" method="post" action="<?= url('/accounting/vendors/store') ?>"><?= csrf_field() ?><h2>Add Vendor</h2><label><span>Company Name</span><input name="company_name" required></label><div class="form-grid two"><label><span>Contact</span><input name="contact_name"></label><label><span>Phone</span><input name="phone"></label><label><span>Email</span><input type="email" name="email"></label><label><span>Tax ID</span><input name="tax_id"></label></div><label><span>Address</span><input name="address"></label><label><span>Payment Terms</span><input name="payment_terms" placeholder="Net 30"></label><button class="btn btn-primary">Add Vendor</button></form><div class="panel"><div class="table-wrap"><table><thead><tr><th>Company</th><th>Contact</th><th>Terms</th><th>Status</th></tr></thead><tbody><?php foreach($vendors as $v):?><tr><td><strong><?= e($v['company_name']) ?></strong><br><small><?= e($v['email']??'') ?></small></td><td><?= e($v['contact_name']??'-') ?><br><small><?= e($v['phone']??'') ?></small></td><td><?= e($v['payment_terms']??'-') ?></td><td><?= e(readable_status($v['status'])) ?></td></tr><?php endforeach;?></tbody></table></div></div></div>
