<?= $this->extend('layouts/owner') ?>

<?= $this->section('content') ?>

<div class="container-fluid">

<div class="card">

<div class="card-header bg-success">

<h3>

Bill Of Material

</h3>

</div>

<div class="card-body">

<h4>

<?= esc($product['nama_product']) ?>

</h4>

<table class="table table-bordered">

<thead>

<tr>

<th>No</th>

<th>Material</th>

<th>Spesifikasi</th>

<th>Qty</th>

<th>Unit</th>

<th>Harga</th>

<th>Subtotal</th>

</tr>

</thead>

<tbody>

<?php $no=1; ?>

<?php foreach($materials as $m): ?>

<tr>

<td><?= $no++ ?></td>

<td><?= esc($m['material_name']) ?></td>

<td><?= esc($m['specification']) ?></td>

<td><?= $m['qty'] ?></td>

<td><?= esc($m['unit']) ?></td>

<td>

Rp <?= number_format($m['price']) ?>

</td>

<td>

Rp <?= number_format($m['subtotal']) ?>

</td>

</tr>

<?php endforeach; ?>

</tbody>

</table>

</div>

</div>

</div>

<?= $this->endSection() ?>