222 lines
13 KiB
PHP
222 lines
13 KiB
PHP
<div class="content-wrapper">
|
|
<div class="card">
|
|
<div class="card-body">
|
|
<h4 class="card-title">Tabel Transaksi</h4>
|
|
|
|
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<?php if ($this->session->flashdata()) : ?>
|
|
<div class="alert alert-danger" role="alert">
|
|
<?php
|
|
// echo $this->session->flashdata('demo');
|
|
?>
|
|
<?php echo $this->session->flashdata('cancel'); ?>
|
|
<?php echo $this->session->flashdata('hapus'); ?>
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
|
|
<?php if ($this->session->userdata('wilayah') == 0) { ?>
|
|
<div class="table-responsive">
|
|
<table id="order-listing" class="table">
|
|
<thead>
|
|
<tr>
|
|
<th>No</th>
|
|
<th>Tanggal</th>
|
|
<th>Customer</th>
|
|
<th>Driver</th>
|
|
<th>Layanan</th>
|
|
<th>Pick Up</th>
|
|
<th>Tujuan</th>
|
|
<th>Harga</th>
|
|
<th>Metode Pembayaran</th>
|
|
<th>Status</th>
|
|
<th>Tindakan</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php $i = 1;
|
|
|
|
foreach ($transaksi as $tr)
|
|
{ ?>
|
|
|
|
<tr>
|
|
<td><?= $i; ?></td>
|
|
<td><?= date('d-m-Y', strtotime($tr['waktu_order'])); ?></td>
|
|
<td><?= $tr['fullnama'] ?></td>
|
|
<td><?= $tr['nama_driver'] ?></td>
|
|
<td><?= $tr['fitur'] ?></td>
|
|
<td style="max-width:300px;"><?= $tr['alamat_asal'] ?></td>
|
|
<td style="max-width:300px;"><?= $tr['alamat_tujuan'] ?></td>
|
|
<td><?= $currency['app_currency'] ?>
|
|
<?= number_format($tr['biaya_akhir'], 0, ".", ".") ?></td>
|
|
<td>
|
|
<?php if ($tr['pakai_wallet'] == '0') {
|
|
echo 'CASH';
|
|
} else {
|
|
echo 'WALLET';
|
|
} ?>
|
|
</td>
|
|
<td>
|
|
<?php if ($tr['status'] == '2') { ?>
|
|
<label class="badge badge-primary"><?= $tr['status_transaksi']; ?></label>
|
|
<?php } ?>
|
|
<?php if ($tr['status'] == '3') { ?>
|
|
<label class="badge badge-success"><?= $tr['status_transaksi']; ?></label>
|
|
<?php } ?>
|
|
<?php if ($tr['status'] == '5') { ?>
|
|
<label class="badge badge-danger"><?= $tr['status_transaksi']; ?></label>
|
|
<?php } ?>
|
|
<?php if ($tr['status'] == '4') { ?>
|
|
<label class="badge badge-info"><?= $tr['status_transaksi']; ?></label>
|
|
<?php } ?>
|
|
</td>
|
|
<td>
|
|
<a href="<?= base_url(); ?>dashboard/detail/<?= $tr['id_transaksi']; ?>" class="btn btn-outline-primary">Lihat</a>
|
|
<a onclick="return confirm ('Are You Sure?')" href="<?= base_url(); ?>dashboard/delete/<?= $tr['id_transaksi']; ?>" class="btn btn-outline-danger">Hapus</a>
|
|
</td>
|
|
</tr>
|
|
<?php $i++;
|
|
} ?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<?php } ?>
|
|
<?php if ($this->session->userdata('wilayah') == 1) { ?>
|
|
<div class="table-responsive">
|
|
<table id="order-listing" class="table">
|
|
<thead>
|
|
<tr>
|
|
<th>No</th>
|
|
<th>Tanggal</th>
|
|
<th>Customer</th>
|
|
<th>Driver</th>
|
|
<th>Layanan</th>
|
|
<th>Pick Up</th>
|
|
<th>Tujuan</th>
|
|
<th>Harga</th>
|
|
<th>Metode Pembayaran</th>
|
|
<th>Status</th>
|
|
<th>Tindakan</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php $i = 1;
|
|
|
|
foreach ($transaksi1 as $tr)
|
|
{ ?>
|
|
|
|
<tr>
|
|
<td><?= $i; ?></td>
|
|
<td><?= date('d-m-Y', strtotime($tr['waktu_order'])); ?></td>
|
|
<td><?= $tr['fullnama'] ?></td>
|
|
<td><?= $tr['nama_driver'] ?></td>
|
|
<td><?= $tr['fitur'] ?></td>
|
|
<td style="max-width:300px;"><?= $tr['alamat_asal'] ?></td>
|
|
<td style="max-width:300px;"><?= $tr['alamat_tujuan'] ?></td>
|
|
<td><?= $currency['app_currency'] ?>
|
|
<?= number_format($tr['biaya_akhir'], 0, ".", ".") ?></td>
|
|
<td>
|
|
<?php if ($tr['pakai_wallet'] == '0') {
|
|
echo 'CASH';
|
|
} else {
|
|
echo 'WALLET';
|
|
} ?>
|
|
</td>
|
|
<td>
|
|
<?php if ($tr['status'] == '2') { ?>
|
|
<label class="badge badge-primary"><?= $tr['status_transaksi']; ?></label>
|
|
<?php } ?>
|
|
<?php if ($tr['status'] == '3') { ?>
|
|
<label class="badge badge-success"><?= $tr['status_transaksi']; ?></label>
|
|
<?php } ?>
|
|
<?php if ($tr['status'] == '5') { ?>
|
|
<label class="badge badge-danger"><?= $tr['status_transaksi']; ?></label>
|
|
<?php } ?>
|
|
<?php if ($tr['status'] == '4') { ?>
|
|
<label class="badge badge-info"><?= $tr['status_transaksi']; ?></label>
|
|
<?php } ?>
|
|
</td>
|
|
<td>
|
|
<a href="<?= base_url(); ?>dashboard/detail/<?= $tr['id_transaksi']; ?>" class="btn btn-outline-primary">Lihat</a>
|
|
<a onclick="return confirm ('Are You Sure?')" href="<?= base_url(); ?>dashboard/delete/<?= $tr['id_transaksi']; ?>" class="btn btn-outline-danger">Hapus</a>
|
|
</td>
|
|
</tr>
|
|
<?php $i++;
|
|
} ?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<?php } ?>
|
|
<?php if ($this->session->userdata('wilayah') == 3) { ?>
|
|
<div class="table-responsive">
|
|
<table id="order-listing" class="table">
|
|
<thead>
|
|
<tr>
|
|
<th>No</th>
|
|
<th>Tanggal</th>
|
|
<th>Customer</th>
|
|
<th>Driver</th>
|
|
<th>Layanan</th>
|
|
<th>Pick Up</th>
|
|
<th>Tujuan</th>
|
|
<th>Harga</th>
|
|
<th>Metode Pembayaran</th>
|
|
<th>Status</th>
|
|
<th>Tindakan</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php $i = 1;
|
|
|
|
foreach ($transaksi3 as $tr)
|
|
{ ?>
|
|
|
|
<tr>
|
|
<td><?= $i; ?></td>
|
|
<td><?= date('d-m-Y', strtotime($tr['waktu_order'])); ?></td>
|
|
<td><?= $tr['fullnama'] ?></td>
|
|
<td><?= $tr['nama_driver'] ?></td>
|
|
<td><?= $tr['fitur'] ?></td>
|
|
<td style="max-width:300px;"><?= $tr['alamat_asal'] ?></td>
|
|
<td style="max-width:300px;"><?= $tr['alamat_tujuan'] ?></td>
|
|
<td><?= $currency['app_currency'] ?>
|
|
<?= number_format($tr['biaya_akhir'], 0, ".", ".") ?></td>
|
|
<td>
|
|
<?php if ($tr['pakai_wallet'] == '0') {
|
|
echo 'CASH';
|
|
} else {
|
|
echo 'WALLET';
|
|
} ?>
|
|
</td>
|
|
<td>
|
|
<?php if ($tr['status'] == '2') { ?>
|
|
<label class="badge badge-primary"><?= $tr['status_transaksi']; ?></label>
|
|
<?php } ?>
|
|
<?php if ($tr['status'] == '3') { ?>
|
|
<label class="badge badge-success"><?= $tr['status_transaksi']; ?></label>
|
|
<?php } ?>
|
|
<?php if ($tr['status'] == '5') { ?>
|
|
<label class="badge badge-danger"><?= $tr['status_transaksi']; ?></label>
|
|
<?php } ?>
|
|
<?php if ($tr['status'] == '4') { ?>
|
|
<label class="badge badge-info"><?= $tr['status_transaksi']; ?></label>
|
|
<?php } ?>
|
|
</td>
|
|
<td>
|
|
<a href="<?= base_url(); ?>dashboard/detail/<?= $tr['id_transaksi']; ?>" class="btn btn-outline-primary">Lihat</a>
|
|
<a onclick="return confirm ('Are You Sure?')" href="<?= base_url(); ?>dashboard/delete/<?= $tr['id_transaksi']; ?>" class="btn btn-outline-danger">Hapus</a>
|
|
</td>
|
|
</tr>
|
|
<?php $i++;
|
|
} ?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<?php } ?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|