diff --git a/app/Http/Controllers/Kasir/History.php b/app/Http/Controllers/Kasir/History.php index 5e2f3d0..5a115db 100644 --- a/app/Http/Controllers/Kasir/History.php +++ b/app/Http/Controllers/Kasir/History.php @@ -9,39 +9,42 @@ use Illuminate\Http\Request; class History extends Controller { - public function index(){ - return view('pages.history.index'); - } + public function index() + { + return view('pages.History.index'); + } - public function getDataHistory(){ - $data = Pesanan::with(['detailPesanan', 'user'])->get(); - $nomor = 1; + public function getDataHistory() + { + $data = Pesanan::with(['detailPesanan', 'user'])->get(); + $nomor = 1; - return $datatables = datatables() - ->of($data) - ->addColumn('nomor', function($data) use (&$nomor){ - return $nomor++; - }) - ->addColumn('nama_user', function($data) { - return $data->user->name; - }) - ->addColumn('created_at', function($data) { - return \Carbon\Carbon::parse($data->created_at)->format('d F Y H:i:s'); - }) - ->addColumn('grand_total', function($data) { - return 'Rp ' . number_format($data->grand_total, 0, ',', '.'); - }) - ->addColumn('ubah', function($data) { - return '
-
'; - }) - ->rawColumns(['nomor', 'nama_user', 'created_at', 'grand_total', 'ubah']) - ->make(true); - } + return $datatables = datatables() + ->of($data) + ->addColumn('nomor', function ($data) use (&$nomor) { + return $nomor++; + }) + ->addColumn('nama_user', function ($data) { + return $data->user->name; + }) + ->addColumn('created_at', function ($data) { + return \Carbon\Carbon::parse($data->created_at)->format('d F Y H:i:s'); + }) + ->addColumn('grand_total', function ($data) { + return 'Rp ' . number_format($data->grand_total, 0, ',', '.'); + }) + ->addColumn('ubah', function ($data) { + return '
+
'; + }) + ->rawColumns(['nomor', 'nama_user', 'created_at', 'grand_total', 'ubah']) + ->make(true); + } - public function print($id){ - $pesanan = \App\Models\Pesanan::with('detailPesanan', 'user')->find($id); + public function print($id) + { + $pesanan = \App\Models\Pesanan::with('detailPesanan', 'user')->find($id); - return view('pages.kasir.print_dapur', compact('pesanan')); - } + return view('pages.Kasir.print_dapur', compact('pesanan')); + } } diff --git a/public/assets/font/Bitum.ttf b/public/assets/font/Bitum.ttf new file mode 100644 index 0000000..57a609b Binary files /dev/null and b/public/assets/font/Bitum.ttf differ diff --git a/resources/views/pages/Kasir/print.blade.php b/resources/views/pages/Kasir/print.blade.php index dfca6c4..0b42851 100644 --- a/resources/views/pages/Kasir/print.blade.php +++ b/resources/views/pages/Kasir/print.blade.php @@ -6,15 +6,20 @@ Document - - - + {{-- + --}} + {{-- --}} - +

Sepiring Telur Keriting

Jln. Jawa No. 28A, Jember


@@ -99,9 +104,7 @@ {{ $item->jumlah_produk }} {{ convert_to_rupiah($item->harga_produk) }} - - {{ $item->diskon_persen != '' ? $item->diskon_persen . '%' : '' }} - {{ convert_to_rupiah($item->total_harga_produk) }} + {{ convert_to_rupiah($item->total_harga_produk) }} @endforeach diff --git a/resources/views/pages/Kasir/print_dapur.blade.php b/resources/views/pages/Kasir/print_dapur.blade.php index 0644006..0b42851 100644 --- a/resources/views/pages/Kasir/print_dapur.blade.php +++ b/resources/views/pages/Kasir/print_dapur.blade.php @@ -6,15 +6,20 @@ Document - - - + {{-- + --}} + {{-- --}} - +

Sepiring Telur Keriting

Jln. Jawa No. 28A, Jember


diff --git a/resources/views/pages/Kasir/transaksi.blade.php b/resources/views/pages/Kasir/transaksi.blade.php index 6ff6843..4803b48 100644 --- a/resources/views/pages/Kasir/transaksi.blade.php +++ b/resources/views/pages/Kasir/transaksi.blade.php @@ -46,9 +46,10 @@ aria-labelledby="custom-tabs-four-{{ $item->kode_kelompok_kategori }}-tab">
@if ($item->kode_kelompok_kategori == 'PAK-SKOM') -
+
-
+
-
+
@foreach ($item->kelompokKategoriPivot as $key2 => $kelompokKategoriPivot) @if ($kelompokKategoriPivot->produk->urutan == 1) -
+
-
+
{{ $kelompokKategoriPivot->produk->nama_produk ?? '' }} -
+
@foreach ($item->kelompokKategoriPivot as $key2 => $kelompokKategoriPivot) @if ($kelompokKategoriPivot->produk->urutan == 2) -
+
-
+
{{ $kelompokKategoriPivot->produk->nama_produk ?? '' }} -
+
@foreach ($item->kelompokKategoriPivot as $key2 => $kelompokKategoriPivot) @if ($kelompokKategoriPivot->produk->urutan == 3) -
+
-
+
{{ $kelompokKategoriPivot->produk->nama_produk ?? '' }} -
+
@foreach ($item->kelompokKategoriPivot as $key2 => $kelompokKategoriPivot) @if ($kelompokKategoriPivot->produk->urutan == 4) -
+
-
+
{{ $kelompokKategoriPivot->produk->nama_produk ?? '' }} -
+
@foreach ($item->kelompokKategoriPivot as $key2 => $kelompokKategoriPivot) @if ($kelompokKategoriPivot->produk->urutan == 5) -
+
-
+
{{ $kelompokKategoriPivot->produk->nama_produk ?? '' }} -
+
kelompokKategoriPivot as $key2 => $kelompokKategoriPivot) {{-- Jika paket irit --}} @if ($kelompokKategoriPivot->kelompok_kategori_id == 2) -
+
-
+
{{ $kelompokKategoriPivot->produk->nama_produk ?? '' }} -
+
@@ -270,7 +276,7 @@
- Pesan
@@ -284,13 +290,13 @@
@else -
+
-
+
{{ $kelompokKategoriPivot->produk->nama_produk ?? '' }} -
+
@@ -304,7 +310,7 @@
- Pesan
@@ -323,7 +329,7 @@
-
+
Kode Pesanan @@ -922,12 +928,12 @@ } else if (kembaliHidden < 0) { alert('Pembayaran kurang'); return false; - } else if (nomorMeja == '') { - alert('Nomor meja tidak boleh kosong'); - return false; } else if (namaPemesan == '') { alert('Nama pemesan tidak boleh kosong'); return false; + } else if (nomorMeja == '') { + alert('Nomor meja tidak boleh kosong'); + return false; } @@ -1080,11 +1086,6 @@ var htmlEntitiesData = dataParse.replace(/\"/g, '"'); // Tampilkan hasil var show_modal_paket = document.getElementById('show-modal-paket'); - if (result.gambar_produk != null) { - var gambar_produk = result.full_path; - } else { - var gambar_produk = "{{ asset('assets/images/menu_image.jpeg') }}"; - } show_modal_paket.innerHTML += `
@@ -1096,7 +1097,7 @@
${result.nama_produk ?? ''}