<section class="content-header">
	<div class="container-fluid">
		<div id="flash" data-flash="<?= $this->session->flashdata('success'); ?>"></div>
		<div class="row ">
			<div class="col-sm-6">
				<h1>SUPPLIER <button data-toggle="modal" data-target="#foaminv" class="btn btn-sm btn-primary align-middle ">
						<i class="fas fa-plus"></i>
					</button></h1>

			</div>
		</div>
	</div>
</section>
<section class="content">

	<div class="row">
		<?php foreach ($invid->result() as $am => $data) : ?>
			<div class="col-12 col-lg-6 col-sm-6  align-items-stretch">
				<div class="card bg-light">
					<div class="card-header text-muted border-bottom-0">
						<span class="right badge badge-secondary"><?= $data->sup_acc ?></span> Supllier
					</div>
					<div class="card-body pt-0">
						<div class="row">
							<div class="col-12">
								<h2 class="lead"><b><?= $data->nama_sup ?></b></h2>
								<ul class="ml-12 mb-0 fa-ul text-muted">
									<li class="small"><span class="fa-li"></span> <b>Address :</b> <?= $data->alamat_sup ?></li>
									<li class="small"><span class="fa-li"></span> <b>Phone #:</b> <?= $data->no_hpsup ?></li>
								</ul>
							</div>

						</div>
					</div>
					<div class="card-footer">

						<a href="https://wa.me/<?= $data->no_hpsup ?>?text=Hai Apa Kabar, Ada yg bisa di bantu ?" target="black" class="btn btn-sm bg-success">
							<i class="fab fa-whatsapp"></i>
						</a>
						<a id="btn-hapus" href="<?= site_url('supl/delsupl/' . $data->id_sup) ?>" class="btn btn-sm btn-secondary">
							<i class="fas fa-trash-restore-alt"></i>
						</a>

					</div>
				</div>
			</div>
		<?php endforeach ?>
	</div>
</section>

<!-- Start modal add invid -->
<form action="<?= base_url('supl/addsupl'); ?>" enctype="multipart/form-data" method="post">
	<div class="modal fade bd-example-modal-lg" id="foaminv" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
		<div class="modal-dialog modal-lg modal-dialog-centered">
			<div class="modal-content">
				<div class="modal-body">

					<div class="input-group mt-2 col-sm-12 ">
						<div class="input-group-prepend">
							<span class="input-group-text">
								<i class="fas fa-user-circle"></i>
							</span>
						</div>
						<input required autocomplete="off" class="form-control text-uppercase" name="nama_sup" type="text" placeholder="Nama Lengkap">
					</div>

					<div class="input-group mt-2 col-sm-12 ">
						<div class="input-group-prepend">
							<span class="input-group-text">
								<i class="fas fa-store"></i>
							</span>
						</div>
						<input required autocomplete="off" class="form-control text-uppercase" name="alamat_sup" type="text" placeholder="Alamat Toko">
					</div>

					<div class="input-group mt-2 col-sm-12 ">
						<div class="input-group-prepend">
							<span class="input-group-text">
								<i class="fas fa-phone"></i>
							</span>
						</div>
						<input required autocomplete="off" class="form-control text-uppercase" name="no_hpsup" type="text" placeholder="No. Handphone">
					</div>

					<div class="input-group mt-2 col-sm-12 ">
						<div class="input-group-prepend">
							<span class="input-group-text">
								<i class="fas fa-dolly"></i>
							</span>
						</div>
						<input required autocomplete="off" class="form-control text-uppercase" name="sup_acc" type="text" placeholder="Produk Yang di Layani">
					</div>

					<div class="input-group mt-2 col-sm-12 ">
						<div class="input-group-prepend">
							<span class="input-group-text">
								<i class="fas fa-envelope"></i>
							</span>
						</div>
						<input autocomplete="off" class="form-control text-uppercase" name="sup_email" type="text" placeholder="Email">
					</div>


					<div class="col mb-3 mt-2 text-center text-secondary ">
						<i class="fas fa-money-bill-wave"></i> <strong> Data Pembayaran</strong>
					</div>

					<div class="input-group mt-2 col-sm-12 ">
						<div class="input-group-prepend">
							<span class="input-group-text">
								<i class="fas fa-pen-alt"></i>
							</span>
						</div>
						<input autocomplete="off" class="form-control text-uppercase" name="sup_reg" type="text" placeholder="No.Rekening">
					</div>

					<div class="input-group mt-2 col-sm-12 ">
						<div class="input-group-prepend">
							<span class="input-group-text">
								<i class="fas fa-building"></i>
							</span>
						</div>
						<select class="form-control" name="invkm_bank" required>
							<option value="">- Pilih Bank -</option>
							<option value="BSI"> Bank BSI </option>
							<option value="BNI"> Bank BNI </option>
							<option value="BNI"> Bank BRI </option>
							<option value="BTN"> Bank BTN </option>
							<option value="Mandiri"> Bank Mandiri </option>
							<option value="BCA"> Bank BCA </option>
						</select>
					</div>

					<div class="modal-footer">
						<button type="submit" class="btn btn-secondary w-100">Simpan Data Supllier </button>
					</div>
				</div>
			</div>
		</div>
	</div>

</form>
<!-- ending modal add mekanik -->