@php $productsJson = collect($products ?? [])->map(function ($product) { return [ 'id' => $product->id, 'name' => $product->name, 'category_id' => $product->category_id, 'category_name' => $product->category->name ?? '', 'selling_price' => (float) $product->selling_price, 'image' => $product->image?->url, 'stock_qty' => (float) $product->stock_qty, 'barcode' => $product->barcode ?? '', ]; })->values(); $paymentMethodsJson = collect($paymentMethods ?? [])->map(function ($method) { if (is_array($method)) { return [ 'id' => $method['id'] ?? null, 'name' => $method['name'] ?? '', ]; } return [ 'id' => $method->id ?? null, 'name' => $method->name ?? '', ]; })->values(); $customersJson = collect($customers ?? [])->map(function ($customer) { return [ 'id' => $customer->id, 'name' => $customer->name, 'whatsapp' => $customer->whatsapp, 'email' => $customer->email, 'address' => $customer->address, 'status' => $customer->status, ]; })->values(); $orderTypesJson = collect($orderTypes ?? [])->map(function ($type) { return [ 'value' => $type, 'label' => match ($type) { 'dine_in' => 'Dine In', 'takeaway' => 'Take Away', 'delivery' => 'Delivery', 'online_gojek' => 'Online Gojek', 'online_grab' => 'Online Grab', 'online_shopee' => 'Online Shopee', 'reservasi' => 'Reservasi', 'preorder' => 'Pre Order', 'acara' => 'Acara', default => ucwords(str_replace('_', ' ', $type)), }, ]; })->values(); $checkoutDefaultsJson = [ 'customerMode' => 'existing', 'customerId' => '', 'customerName' => '', 'customerWhatsapp' => '', 'customerEmail' => '', 'customerAddress' => '', 'paymentMethodId' => $paymentMethodId ?? '', 'paymentAmount' => $paymentAmount ?? 0, 'orderStatusId' => $orderStatusId ?? '', 'orderType' => $orderType ?? \App\Models\Order::ORDER_TYPE_DINE_IN, ]; @endphp
@if (session()->has('success'))
{{ session('success') }}
@endif @if (session()->has('error'))
{{ session('error') }}
@endif

POS

Kelola transaksi kasir dengan pilihan kustomer existing atau baru

Produk

produk

Keranjang

Subtotal
Pajak
Total

Status Perangkat

Status Bluetooth:

Status Scanner: