<?= view('admin/layouts/header', ['title' => 'Tambah Penjualan']) ?>
<?= view('admin/layouts/sidebar', [
    'activeMenu' => 'penjualan',
    'userName'   => $userName,
    'userEmail'  => $userEmail,
]) ?>
<?= view('admin/layouts/topbar', [
    'pageTitle'    => 'Tambah Penjualan',
    'pageSubtitle' => 'Input transaksi penjualan barang ke pelanggan.',
    'topbarAction' => '<a href="' . site_url('admin/penjualan') . '" class="btn btn-outline-dark"><i class="bi bi-arrow-left me-1"></i>Kembali</a>',
]) ?>

<?= view('admin/penjualan/form', [
    'action'            => site_url('admin/penjualan/store'),
    'pelanggan'         => $pelanggan,
    'tanggalPenjualan'  => $tanggalPenjualan,
    'noTransaksi'       => $noTransaksi,
    'initialItems'      => $initialItems,
    'initialPayment'    => 0,
    'pajakPersen'       => $pajakPersen ?? 11,
    'submitLabel'       => 'Simpan Penjualan',
    'lookupUrl'         => site_url('admin/penjualan/barang/lookup'),
    'datatableUrl'      => site_url('admin/penjualan/barang/datatable'),
    'generateNumberUrl' => site_url('admin/penjualan/generate-number'),
]) ?>

<?= view('admin/layouts/footer') ?>
