almost done
parent
81144d5515
commit
137eb42ac7
|
@ -18,10 +18,9 @@ class Transaksi extends Controller
|
|||
$KelompokKategori = KelompokKategori::with('kelompokKategoriPivot.produk')->get();
|
||||
|
||||
foreach ($KelompokKategori as $item) {
|
||||
foreach ($item->kelompokKategoriPivot as $kelompokKategoriPivot) {
|
||||
foreach ($item->kelompokKategoriPivot as $kelompokKategoriPivot) {
|
||||
// Query tambahan untuk mendapatkan total pembelian berdasarkan produk
|
||||
$totalPembelianByProduk[$kelompokKategoriPivot->produk->id] = DetailPesanan::
|
||||
select('detail_pesanans.produk_id', DB::raw('SUM(detail_pesanans.jumlah_produk) as total_beli'))
|
||||
$totalPembelianByProduk[$kelompokKategoriPivot->produk->id] = DetailPesanan::select('detail_pesanans.produk_id', DB::raw('SUM(detail_pesanans.jumlah_produk) as total_beli'))
|
||||
->where('detail_pesanans.produk_id', '=', $kelompokKategoriPivot->produk->id)
|
||||
->groupBy('detail_pesanans.produk_id')
|
||||
->first();
|
||||
|
@ -81,6 +80,7 @@ class Transaksi extends Controller
|
|||
'jumlah_produk' => $value['qty'],
|
||||
'harga_produk' => $value['harga'],
|
||||
'total_harga_produk' => $value['total'],
|
||||
'keterangan_produk' => $value['keterangan'] ?? null,
|
||||
];
|
||||
$detailPesananModels = \App\Models\DetailPesanan::create($oderDatas);
|
||||
}
|
||||
|
|
|
@ -20,6 +20,7 @@ class DetailPesanan extends Model
|
|||
'harga_produk',
|
||||
'jumlah_produk',
|
||||
'total_harga_produk',
|
||||
'keterangan_produk',
|
||||
'diskon_id',
|
||||
'nama_diskon',
|
||||
'kode_diskon',
|
||||
|
|
|
@ -17,13 +17,25 @@ class Produk extends Model
|
|||
'kategori_produk_id',
|
||||
'kode_produk',
|
||||
'nama_produk',
|
||||
'gambar_produk',
|
||||
'varian_produk',
|
||||
'deskripsi_produk',
|
||||
'harga_produk',
|
||||
'stok_produk',
|
||||
'tersedia',
|
||||
'gambar_produk',
|
||||
'urutan',
|
||||
];
|
||||
|
||||
// full path to reach image from storage folder and check if image exists or not
|
||||
public function getGambarProdukAttribute($value)
|
||||
{
|
||||
$storage = storage_path('app/public/produk/' . $this->kategori_produk_id . '/' . $value);
|
||||
if (file_exists($storage)) {
|
||||
return asset('storage/produk/' . $this->kategori_produk_id . '/' . $value);
|
||||
} else {
|
||||
return asset('assets/images/menu_image.jpeg');
|
||||
}
|
||||
}
|
||||
|
||||
public function kategori_produk()
|
||||
{
|
||||
|
|
|
@ -18,6 +18,20 @@ scratch. This page gets rid of all links and provides the needed markup only.
|
|||
<!-- Theme style -->
|
||||
<link rel="stylesheet" href="{{ asset('assets/dist/css/adminlte.min.css') }}">
|
||||
|
||||
<style>
|
||||
/* Chrome, Safari, Edge, Opera */
|
||||
input::-webkit-outer-spin-button,
|
||||
input::-webkit-inner-spin-button {
|
||||
-webkit-appearance: none;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* Firefox */
|
||||
input[type=number] {
|
||||
-moz-appearance: textfield;
|
||||
}
|
||||
</style>
|
||||
|
||||
@stack('styles')
|
||||
|
||||
</head>
|
||||
|
|
|
@ -33,11 +33,11 @@
|
|||
}
|
||||
|
||||
/* .literely-table td,
|
||||
th,
|
||||
tr {
|
||||
border-collapse: collapse;
|
||||
border: 0.1px solid rgb(85, 85, 85);
|
||||
} */
|
||||
th,
|
||||
tr {
|
||||
border-collapse: collapse;
|
||||
border: 0.1px solid rgb(85, 85, 85);
|
||||
} */
|
||||
|
||||
.rotate90 {
|
||||
-webkit-transform: rotate(90deg);
|
||||
|
@ -64,6 +64,10 @@
|
|||
hr.style2 {
|
||||
border-top: 1px solid #8c8b8b;
|
||||
}
|
||||
|
||||
.dashed-line {
|
||||
border: 1.5px dashed black;
|
||||
}
|
||||
</style>
|
||||
|
||||
<body style="width: 80mm;">
|
||||
|
@ -87,7 +91,6 @@
|
|||
<table class="literely-table" style="width: 100%;">
|
||||
<tbody>
|
||||
@foreach ($pesanan->detailPesanan as $item)
|
||||
{{-- @dd($item) --}}
|
||||
<tr>
|
||||
<td style="width: 2px;">{{ $loop->iteration }}</td>
|
||||
<td style="width: 80px;" colspan="3">{{ $item->nama_produk }}</td>
|
||||
|
@ -96,7 +99,9 @@
|
|||
<td></td>
|
||||
<td style="text-align: right">{{ $item->jumlah_produk }}</td>
|
||||
<td style="text-align: right">{{ convert_to_rupiah($item->harga_produk) }}</td>
|
||||
<td style="text-align: right">{{ convert_to_rupiah($item->total_harga_produk) }}</td>
|
||||
<td style="text-align: right;width: 30px">
|
||||
{{ $item->diskon_persen != '' ? $item->diskon_persen . '%' : '' }}</td>
|
||||
<td style="text-align: right;width: 90px">{{ convert_to_rupiah($item->total_harga_produk) }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
|
@ -134,8 +139,49 @@
|
|||
<hr class="style1">
|
||||
<p style="text-align: center">Terima Kasih, Selamat Datang Kembali</p>
|
||||
<p style="text-align: center;font-size: 7pt;">@sepiringtelurkeriting</p>
|
||||
|
||||
|
||||
<hr class="dashed-line" style="margin-top: 15px;">
|
||||
<p style="text-align: center;font-size: 7pt">untuk dapur</p>
|
||||
<hr class="dashed-line" style="margin-top: 10px;">
|
||||
<span style="display: flex; justify-content: space-between;margin-top: 10px;">
|
||||
<span>
|
||||
<p>{{ tanggal_indonesia($pesanan->tanggal_pesanan) }}</p>
|
||||
<p>{{ date('H:i', strtotime($pesanan->tanggal_pesanan)) }}</p>
|
||||
<p>Meja: {{ $pesanan->nomor_meja }}</p>
|
||||
</span>
|
||||
<span style="text-align: right">
|
||||
<p>{{ $pesanan->kode_pesanan }}</p>
|
||||
<p>Kasir: {{ $pesanan->user->name }}</p>
|
||||
<p>Order: {{ $pesanan->nama_pemesan }}</p>
|
||||
</span>
|
||||
</span>
|
||||
<p></p>
|
||||
<hr class="style2">
|
||||
<p style="text-align: left; margin-top:3px;">Menu Order</p>
|
||||
<table class="table" style="width: 100%;">
|
||||
<tbody>
|
||||
@foreach ($pesanan->detailPesanan as $item)
|
||||
<tr>
|
||||
<td style="width: 80px;" colspan="3">
|
||||
{{ $loop->iteration }}. {{ $item->nama_produk }}
|
||||
<br>
|
||||
<small>
|
||||
{{ $item->keterangan_produk }}
|
||||
</small>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<p style="text-align: left; margin-top:5px;">Keterangan Pesanan Keseluruhan</p>
|
||||
<table class="table" style="width: 100%;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="width: 80px;" colspan="3">
|
||||
{{ $pesanan->keterangan_pesanan != '' ? $pesanan->keterangan_pesanan : '-' }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<hr class="style2">
|
||||
</body>
|
||||
<script>
|
||||
window.print();
|
||||
|
|
|
@ -1,177 +1,188 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252" />
|
||||
<title>Document</title>
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Oswald&family=Roboto:wght@300;400&display=swap"
|
||||
rel="stylesheet">
|
||||
</head>
|
||||
|
||||
<style>
|
||||
@page {
|
||||
margin: 0.2cm;
|
||||
}
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252" />
|
||||
<title>Document</title>
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Oswald&family=Roboto:wght@300;400&display=swap"
|
||||
rel="stylesheet">
|
||||
</head>
|
||||
|
||||
html {
|
||||
color: black;
|
||||
}
|
||||
<style>
|
||||
@page {
|
||||
margin: 0.2cm;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: 'Oswald';
|
||||
font-size: 8pt;
|
||||
/* transform: scaleY(1.5); */
|
||||
}
|
||||
html {
|
||||
color: black;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 11pt;
|
||||
font-weight: bold;
|
||||
}
|
||||
body {
|
||||
font-family: 'Oswald';
|
||||
font-size: 8pt;
|
||||
/* transform: scaleY(1.5); */
|
||||
}
|
||||
|
||||
/* .literely-table td,
|
||||
.title {
|
||||
font-size: 11pt;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* .literely-table td,
|
||||
th,
|
||||
tr {
|
||||
border-collapse: collapse;
|
||||
border: 0.1px solid rgb(85, 85, 85);
|
||||
} */
|
||||
|
||||
.rotate90 {
|
||||
-webkit-transform: rotate(90deg);
|
||||
-moz-transform: rotate(90deg);
|
||||
-o-transform: rotate(90deg);
|
||||
-ms-transform: rotate(90deg);
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
.rotate90 {
|
||||
-webkit-transform: rotate(90deg);
|
||||
-moz-transform: rotate(90deg);
|
||||
-o-transform: rotate(90deg);
|
||||
-ms-transform: rotate(90deg);
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6,
|
||||
p {
|
||||
margin: 0;
|
||||
}
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6,
|
||||
p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
hr.style1 {
|
||||
border-top: 3px double #8c8b8b;
|
||||
}
|
||||
hr.style1 {
|
||||
border-top: 3px double #8c8b8b;
|
||||
}
|
||||
|
||||
hr.style2 {
|
||||
border-top: 1px solid #8c8b8b;
|
||||
}
|
||||
.dashed-line {
|
||||
border: 1.5px dashed black;
|
||||
}
|
||||
</style>
|
||||
hr.style2 {
|
||||
border-top: 1px solid #8c8b8b;
|
||||
}
|
||||
|
||||
<body style="width: 80mm;">
|
||||
<h2 style="text-align: center">Sepiring Telur Keriting</h2>
|
||||
<p style="text-align: center">Jln. Jawa No. 28A, Jember</p>
|
||||
<hr class="style2">
|
||||
<span style="display: flex; justify-content: space-between">
|
||||
<span>
|
||||
<p>{{ tanggal_indonesia($pesanan->tanggal_pesanan) }}</p>
|
||||
<p>{{ date('H:i', strtotime($pesanan->tanggal_pesanan)) }}</p>
|
||||
<p>Meja: {{ $pesanan->nomor_meja }}</p>
|
||||
</span>
|
||||
<span style="text-align: right">
|
||||
<p>{{ $pesanan->kode_pesanan }}</p>
|
||||
<p>Kasir: {{ $pesanan->user->name }}</p>
|
||||
<p>Order: {{ $pesanan->nama_pemesan }}</p>
|
||||
</span>
|
||||
.dashed-line {
|
||||
border: 1.5px dashed black;
|
||||
}
|
||||
</style>
|
||||
|
||||
<body style="width: 80mm;">
|
||||
<h2 style="text-align: center">Sepiring Telur Keriting</h2>
|
||||
<p style="text-align: center">Jln. Jawa No. 28A, Jember</p>
|
||||
<hr class="style2">
|
||||
<span style="display: flex; justify-content: space-between">
|
||||
<span>
|
||||
<p>{{ tanggal_indonesia($pesanan->tanggal_pesanan) }}</p>
|
||||
<p>{{ date('H:i', strtotime($pesanan->tanggal_pesanan)) }}</p>
|
||||
<p>Meja: {{ $pesanan->nomor_meja }}</p>
|
||||
</span>
|
||||
<p></p>
|
||||
<hr class="style2">
|
||||
<table class="literely-table" style="width: 100%;">
|
||||
<tbody>
|
||||
@foreach ($pesanan->detailPesanan as $item)
|
||||
{{-- @dd($item) --}}
|
||||
<tr>
|
||||
<td style="width: 2px;">{{ $loop->iteration }}</td>
|
||||
<td style="width: 80px;" colspan="3">{{ $item->nama_produk }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td style="text-align: right">{{ $item->jumlah_produk }}</td>
|
||||
<td style="text-align: right">{{ convert_to_rupiah($item->harga_produk) }}</td>
|
||||
<td style="text-align: right">{{ convert_to_rupiah($item->total_harga_produk) }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<hr class="style2">
|
||||
<table style="width: 100%;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 20px;text-align: right">{{ $pesanan->total_pesanan }}</th>
|
||||
<th style="text-align: right">Total :</th>
|
||||
<th style="text-align: right">{{ convert_to_rupiah($pesanan->total_bayar) }}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th style="text-align: right">Diskon :</th>
|
||||
<th style="text-align: right">{{ $pesanan->diskon_persen ?? 0 }} %</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th style="text-align: right">Grand Total :</th>
|
||||
<th style="text-align: right">{{ convert_to_rupiah($pesanan->grand_total) }}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th style="text-align: right">Bayar :</th>
|
||||
<th style="text-align: right">{{ convert_to_rupiah($pesanan->nominal_bayar) }}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th style="text-align: right">Kembali :</th>
|
||||
<th style="text-align: right">{{ convert_to_rupiah($pesanan->nominal_kembali) }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<hr class="style1">
|
||||
<p style="text-align: center">Terima Kasih, Selamat Datang Kembali</p>
|
||||
<p style="text-align: center;font-size: 7pt;">@sepiringtelurkeriting</p>
|
||||
<hr class="dashed-line" style="margin-top: 15px;">
|
||||
<hr class="style2" style="margin-top: 15px;">
|
||||
<span style="display: flex; justify-content: space-between">
|
||||
<span>
|
||||
<p>{{ tanggal_indonesia($pesanan->tanggal_pesanan) }}</p>
|
||||
<p>{{ date('H:i', strtotime($pesanan->tanggal_pesanan)) }}</p>
|
||||
</span>
|
||||
<span style="text-align: right">
|
||||
<p>{{ $pesanan->kode_pesanan }}</p>
|
||||
<p>{{ $pesanan->user->name }}</p>
|
||||
</span>
|
||||
<span style="text-align: right">
|
||||
<p>{{ $pesanan->kode_pesanan }}</p>
|
||||
<p>Kasir: {{ $pesanan->user->name }}</p>
|
||||
<p>Order: {{ $pesanan->nama_pemesan }}</p>
|
||||
</span>
|
||||
<p></p>
|
||||
<hr class="style2">
|
||||
<p style="text-align: left; margin-top:3px;">Menu</p>
|
||||
<table class="table" style="width: 100%;">
|
||||
<tbody>
|
||||
@foreach ($pesanan->detailPesanan as $item)
|
||||
<tr>
|
||||
<td style="width: 80px;" colspan="3">* {{ $item->nama_produk }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<p style="text-align: left; margin-top:3px;">Keterangan Pesanan</p>
|
||||
<table class="table" style="width: 100%;">
|
||||
<tbody>
|
||||
</span>
|
||||
<p></p>
|
||||
<hr class="style2">
|
||||
<table class="literely-table" style="width: 100%;">
|
||||
<tbody>
|
||||
@foreach ($pesanan->detailPesanan as $item)
|
||||
<tr>
|
||||
<td style="width: 80px;" colspan="3">* {{ $pesanan->keterangan_pesanan }}</td>
|
||||
<td style="width: 2px;">{{ $loop->iteration }}</td>
|
||||
<td style="width: 80px;" colspan="3">{{ $item->nama_produk }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<hr class="style2">
|
||||
</body>
|
||||
<script>
|
||||
window.print();
|
||||
</script>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td style="text-align: right">{{ $item->jumlah_produk }}</td>
|
||||
<td style="text-align: right">{{ convert_to_rupiah($item->harga_produk) }}</td>
|
||||
<td style="text-align: right">{{ convert_to_rupiah($item->total_harga_produk) }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<hr class="style2">
|
||||
<table style="width: 100%;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 20px;text-align: right">{{ $pesanan->total_pesanan }}</th>
|
||||
<th style="text-align: right">Total :</th>
|
||||
<th style="text-align: right">{{ convert_to_rupiah($pesanan->total_bayar) }}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th style="text-align: right">Diskon :</th>
|
||||
<th style="text-align: right">{{ $pesanan->diskon_persen ?? 0 }} %</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th style="text-align: right">Grand Total :</th>
|
||||
<th style="text-align: right">{{ convert_to_rupiah($pesanan->grand_total) }}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th style="text-align: right">Bayar :</th>
|
||||
<th style="text-align: right">{{ convert_to_rupiah($pesanan->nominal_bayar) }}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th style="text-align: right">Kembali :</th>
|
||||
<th style="text-align: right">{{ convert_to_rupiah($pesanan->nominal_kembali) }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<hr class="style1">
|
||||
<p style="text-align: center">Terima Kasih, Selamat Datang Kembali</p>
|
||||
<p style="text-align: center;font-size: 7pt;">@sepiringtelurkeriting</p>
|
||||
<hr class="dashed-line" style="margin-top: 15px;">
|
||||
<p style="text-align: center;font-size: 7pt">untuk dapur</p>
|
||||
<hr class="dashed-line" style="margin-top: 10px;">
|
||||
<span style="display: flex; justify-content: space-between;margin-top: 10px;">
|
||||
<span>
|
||||
<p>{{ tanggal_indonesia($pesanan->tanggal_pesanan) }}</p>
|
||||
<p>{{ date('H:i', strtotime($pesanan->tanggal_pesanan)) }}</p>
|
||||
<p>Meja: {{ $pesanan->nomor_meja }}</p>
|
||||
</span>
|
||||
<span style="text-align: right">
|
||||
<p>{{ $pesanan->kode_pesanan }}</p>
|
||||
<p>Kasir: {{ $pesanan->user->name }}</p>
|
||||
<p>Order: {{ $pesanan->nama_pemesan }}</p>
|
||||
</span>
|
||||
</span>
|
||||
<p></p>
|
||||
<hr class="style2">
|
||||
<p style="text-align: left; margin-top:3px;">Menu Order</p>
|
||||
<table class="table" style="width: 100%;">
|
||||
<tbody>
|
||||
@foreach ($pesanan->detailPesanan as $item)
|
||||
<tr>
|
||||
<td style="width: 80px;" colspan="3">
|
||||
{{ $loop->iteration }}. {{ $item->nama_produk }}
|
||||
<br>
|
||||
<small>
|
||||
{{ $item->keterangan_produk }}
|
||||
</small>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<p style="text-align: left; margin-top:5px;">Keterangan Pesanan Keseluruhan</p>
|
||||
<table class="table" style="width: 100%;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="width: 80px;" colspan="3">
|
||||
{{ $pesanan->keterangan_pesanan != '' ? $pesanan->keterangan_pesanan : '-' }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<hr class="style2">
|
||||
</body>
|
||||
<script>
|
||||
window.print();
|
||||
</script>
|
||||
|
||||
</html>
|
||||
|
|
|
@ -113,11 +113,7 @@
|
|||
</div>
|
||||
<div class="card-body">
|
||||
<img style="width: 100%;height: 100%;object-fit: cover;"
|
||||
src="
|
||||
@if ($kelompokKategoriPivot->produk->gambar_produk != null) {{ asset('storage/' . $kelompokKategoriPivot->produk->gambar_produk) }}
|
||||
@else
|
||||
{{ asset('assets/images/menu_image.jpeg') }} @endif
|
||||
"
|
||||
src="{{ $kelompokKategoriPivot->produk->gambar_produk }}"
|
||||
alt="{{ $kelompokKategoriPivot->produk->nama_produk ?? '' }}">
|
||||
</div>
|
||||
<a class="btn btn-warning"
|
||||
|
@ -146,11 +142,7 @@
|
|||
</div>
|
||||
<div class="card-body">
|
||||
<img style="width: 100%;height: 100%;object-fit: cover;"
|
||||
src="
|
||||
@if ($kelompokKategoriPivot->produk->gambar_produk != null) {{ asset('storage/' . $kelompokKategoriPivot->produk->gambar_produk) }}
|
||||
@else
|
||||
{{ asset('assets/images/menu_image.jpeg') }} @endif
|
||||
"
|
||||
src="{{ $kelompokKategoriPivot->produk->gambar_produk }}"
|
||||
alt="{{ $kelompokKategoriPivot->produk->nama_produk ?? '' }}">
|
||||
</div>
|
||||
<a class="btn btn-warning"
|
||||
|
@ -179,11 +171,7 @@
|
|||
</div>
|
||||
<div class="card-body">
|
||||
<img style="width: 100%;height: 100%;object-fit: cover;"
|
||||
src="
|
||||
@if ($kelompokKategoriPivot->produk->gambar_produk != null) {{ asset('storage/' . $kelompokKategoriPivot->produk->gambar_produk) }}
|
||||
@else
|
||||
{{ asset('assets/images/menu_image.jpeg') }} @endif
|
||||
"
|
||||
src="{{ $kelompokKategoriPivot->produk->gambar_produk }}"
|
||||
alt="{{ $kelompokKategoriPivot->produk->nama_produk ?? '' }}">
|
||||
</div>
|
||||
<a class="btn btn-warning"
|
||||
|
@ -212,11 +200,7 @@
|
|||
</div>
|
||||
<div class="card-body">
|
||||
<img style="width: 100%;height: 100%;object-fit: cover;"
|
||||
src="
|
||||
@if ($kelompokKategoriPivot->produk->gambar_produk != null) {{ asset('storage/' . $kelompokKategoriPivot->produk->gambar_produk) }}
|
||||
@else
|
||||
{{ asset('assets/images/menu_image.jpeg') }} @endif
|
||||
"
|
||||
src="{{ $kelompokKategoriPivot->produk->gambar_produk }}"
|
||||
alt="{{ $kelompokKategoriPivot->produk->nama_produk ?? '' }}">
|
||||
</div>
|
||||
<a class="btn btn-warning"
|
||||
|
@ -244,11 +228,7 @@
|
|||
</div>
|
||||
<div class="card-body">
|
||||
<img style="width: 100%;height: 100%;object-fit: cover;"
|
||||
src="
|
||||
@if ($kelompokKategoriPivot->produk->gambar_produk != null) {{ asset('storage/' . $kelompokKategoriPivot->produk->gambar_produk) }}
|
||||
@else
|
||||
{{ asset('assets/images/menu_image.jpeg') }} @endif
|
||||
"
|
||||
src="{{ $kelompokKategoriPivot->produk->gambar_produk }}"
|
||||
alt="{{ $kelompokKategoriPivot->produk->nama_produk ?? '' }}">
|
||||
</div>
|
||||
<a class="btn btn-warning"
|
||||
|
@ -281,11 +261,7 @@
|
|||
<div class="card-body">
|
||||
<div class="col-md-12">
|
||||
<img style="width: 100%;height: 100%;object-fit: cover;"
|
||||
src="
|
||||
@if ($kelompokKategoriPivot->produk->gambar_produk != null) {{ asset('storage/' . $kelompokKategoriPivot->produk->gambar_produk) }}
|
||||
@else
|
||||
{{ asset('assets/images/menu_image.jpeg') }} @endif
|
||||
"
|
||||
src="{{ $kelompokKategoriPivot->produk->gambar_produk }}"
|
||||
alt="{{ $kelompokKategoriPivot->produk->nama_produk ?? '' }}">
|
||||
<div class="col-md-12 mt-1"
|
||||
style="align-items: center;align-content: center;">
|
||||
|
@ -319,11 +295,7 @@
|
|||
<div class="card-body">
|
||||
<div class="col-md-12">
|
||||
<img style="width: 100%;height: 100%;object-fit: cover;"
|
||||
src="
|
||||
@if ($kelompokKategoriPivot->produk->gambar_produk != null) {{ asset('storage/' . $kelompokKategoriPivot->produk->gambar_produk) }}
|
||||
@else
|
||||
{{ asset('assets/images/menu_image.jpeg') }} @endif
|
||||
"
|
||||
src="{{ $kelompokKategoriPivot->produk->gambar_produk }}"
|
||||
alt="{{ $kelompokKategoriPivot->produk->nama_produk ?? '' }}">
|
||||
<div class="col-md-12 mt-1"
|
||||
style="align-items: center;align-content: center;">
|
||||
|
@ -364,12 +336,18 @@
|
|||
<div class="card-body">
|
||||
<table class="table table-bordered table-striped" id="order-menus" width="100%">
|
||||
<thead style="background-color: lightgray">
|
||||
<tr>
|
||||
{{-- <tr>
|
||||
<th width="60%" class="text-center">Menu</th>
|
||||
<th>Qty</th>
|
||||
<th width="10%" style="text-align: center">
|
||||
<i class="fas fa-cog"></i>
|
||||
</th>
|
||||
</tr> --}}
|
||||
<tr>
|
||||
<th class="text-center">Menu</th>
|
||||
<th class="text-center" width="100px">Qty</th>
|
||||
<th class="text-center" width="60px">(%)</th>
|
||||
<th class="text-center" width="30px">⚙️</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="tbody-order-menus">
|
||||
|
@ -377,7 +355,7 @@
|
|||
<tfoot style="background-color: lightgray">
|
||||
<tr>
|
||||
<th class="text-center">Total</th>
|
||||
<th colspan="2">
|
||||
<th colspan="3">
|
||||
<span class="row">
|
||||
<span class="col-6">Rp.</span>
|
||||
<span class="col-6" style="text-align: right" id="total">0</span>
|
||||
|
@ -387,7 +365,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<th class="text-center">Diskon (%)</th>
|
||||
<th colspan="2">
|
||||
<th colspan="3">
|
||||
<div class="input-group input-group-sm">
|
||||
<input type="number" name="diskon" class="form-control rounded-0">
|
||||
</div>
|
||||
|
@ -395,7 +373,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<th class="text-center">Grand Total</th>
|
||||
<th colspan="2">
|
||||
<th colspan="3">
|
||||
<span class="row">
|
||||
<span class="col-6">Rp.</span>
|
||||
<span class="col-6" style="text-align: right" id="total-diskon">0</span>
|
||||
|
@ -405,7 +383,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<th class="text-center">Bayar</th>
|
||||
<th colspan="2">
|
||||
<th colspan="3">
|
||||
<div class="input-group input-group-sm">
|
||||
<input type="text" name="nominal-bayar" class="form-control rounded-0"
|
||||
required id="nominal-bayar">
|
||||
|
@ -414,7 +392,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<th class="text-center">Kembali</th>
|
||||
<th colspan="2">
|
||||
<th colspan="3">
|
||||
<span class="row">
|
||||
<span class="col-6">Rp.</span>
|
||||
<span class="col-6" style="text-align: right" id="kembali">0</span>
|
||||
|
@ -423,7 +401,7 @@
|
|||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="3">
|
||||
<th colspan="4">
|
||||
<span class="row">
|
||||
<input type="text" name="nama-pemesan" class="form-control rounded-0"
|
||||
placeholder="Nama Pemesan" id="nama-pemesan" required>
|
||||
|
@ -437,7 +415,7 @@
|
|||
</th>
|
||||
</tr>
|
||||
<tr style="background-color: white">
|
||||
<th colspan="3">
|
||||
<th colspan="4">
|
||||
<button class="btn btn-warning btn-block" id="pesan-bayar">Bayar</button>
|
||||
</th>
|
||||
</tr>
|
||||
|
@ -868,7 +846,8 @@
|
|||
qty: qty,
|
||||
diskonSatuan: diskonSatuan,
|
||||
harga: harga,
|
||||
total: total
|
||||
total: total,
|
||||
keterangan: document.getElementsByName('keterangan_satuan')[i - 1].value
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue