Files
kulakpos_web/Modules/Business/resources/views/sales/cart-list.blade.php

73 lines
3.9 KiB
PHP
Raw Normal View History

2026-03-15 17:08:23 +07:00
@if(isset($cart_contents))
2026-05-14 11:55:22 +07:00
@php
$modules = product_setting()->modules ?? [];
@endphp
2026-03-15 17:08:23 +07:00
@foreach($cart_contents as $cart)
2026-05-14 11:55:22 +07:00
<tr
data-row_id="{{ $cart->rowId }}"
data-product_id="{{ $cart->id }}"
data-product_name="{{ $cart->name }}"
data-product_code="{{ $cart->options->product_code ?? '' }}"
data-product_unit_id="{{ $cart->options->product_unit_id ?? '' }}"
data-product_unit_name="{{ $cart->options->product_unit_name ?? '' }}"
data-product_image="{{ $cart->options->product_image ?? '' }}"
data-product_type="{{ $cart->options->product_type ?? '' }}"
data-has_serial="{{ $cart->options->has_serial ?? 0 }}"
data-serials='@json($cart->options->serial_numbers ?? [])'
data-batch_no="{{ $cart->options->batch_no ?? '' }}"
data-stock_id="{{ $cart->options->stock_id ?? '' }}"
data-update_route="{{ route('business.carts.update', $cart->rowId) }}"
data-destroy_route="{{ route('business.carts.destroy', $cart->rowId) }}">
<td>
<img class="table-img" src="{{ asset($cart->options->product_image ?? 'assets/images/products/box.svg') }}">
</td>
<td>{{ $cart->name }}</td>
<td>{{ $cart->options->product_code }}</td>
<td>{{ $cart->options->batch_no ?? '' }}</td>
<td>{{ $cart->options->product_unit_name }}</td>
<td>
<input class="text-center sales-input cart-price" type="number" step="any" min="0" value="{{ round($cart->price, 2) }}" placeholder="0">
</td>
@if (moduleCheck('SerialCodeAddon'))
<td class="serial-cell serial-option">
<button type="button" class="serial-cell-button mx-auto" @if(($cart->options->has_serial ?? 0) != 1) disabled @endif data-bs-toggle="modal" data-bs-target="#serialModal">
<svg width="28" height="28" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M4 7H18" stroke="var(--clr-primary)" stroke-width="2" stroke-linecap="round"/>
<path d="M23 7H23.0105" stroke="var(--clr-primary)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M23 14H23.0105" stroke="var(--clr-primary)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M23 21H23.0105" stroke="var(--clr-primary)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M4 14H18" stroke="var(--clr-primary)" stroke-width="2" stroke-linecap="round"/>
<path d="M4 21H18" stroke="var(--clr-primary)" stroke-width="2" stroke-linecap="round"/>
</svg>
</button>
2026-03-15 17:08:23 +07:00
</td>
2026-05-14 11:55:22 +07:00
@endif
@if ($modules['allow_product_discount'] ?? false)
2026-03-15 17:08:23 +07:00
<td>
2026-05-14 11:55:22 +07:00
<input class="text-center sales-input cart-discount" type="number" step="any" min="0" value="{{ $cart->options->discount ?? 0 }}" placeholder="0">
2026-03-15 17:08:23 +07:00
</td>
2026-05-14 11:55:22 +07:00
@endif
<td class="large-td">
<div class="d-flex gap-2 align-items-center justify-content-center">
<button class="incre-decre minus-btn">
<i class="fas fa-minus icon"></i>
2026-03-15 17:08:23 +07:00
</button>
2026-05-14 11:55:22 +07:00
<input type="number" step="any" value="{{ $cart->qty }}" class="dynamic-width cart-qty " placeholder="{{ __('0') }}" >
<button class="incre-decre plus-btn">
<i class="fas fa-plus icon"></i>
</button>
</div>
</td>
<td class="cart-subtotal">
{{ currency_format(round(($cart->price - ($cart->options->discount ?? 0)) * $cart->qty, 2), currency: business_currency()) }}
</td>
<td>
<button class='x-btn remove-btn'>
<img src="{{ asset('assets/images/icons/x.svg') }}" alt="">
</button>
</td>
</tr>
@endforeach
@endif