Files

53 lines
2.7 KiB
PHP
Raw Permalink Normal View History

2026-03-15 17:08:23 +07:00
@if(isset($cart_contents))
@foreach($cart_contents as $cart)
<tr data-row_id="{{ $cart->rowId }}" 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="{{ $cart->price }}"
placeholder="0">
</td>
@if ($modules['allow_product_discount'] ?? false)
<td>
<input class="text-center sales-input cart-discount" type="number" step="any" min="0"
value="{{ $cart->options->discount ?? 0 }}" placeholder="0">
</td>
@endif
<td class="cart-vat-percent text-center">
{{ $cart->options->vat_percent ?? 0 }}%
<input type="hidden" class="cart-vat-percent-input" value="{{ $cart->options->vat_percent ?? 0 }}">
</td>
<td class="cart-vat-value text-center">
{{ currency_format(($cart->price * $cart->qty) * ($cart->options->vat_percent ?? 0) / 100, currency: business_currency()) }}
</td>
<td class="large-td">
<div class="d-flex gap-2 align-items-center">
<button class="incre-decre minus-btn">
<i class="fas fa-minus icon"></i>
</button>
<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(($cart->price - ($cart->options->discount ?? 0)) * $cart->qty, 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