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