@extends('layouts.app') @section('content') @php $posPermissionPrefix = $saleMode === 'wholesale' ? 'wholesale' : 'retail_pos'; $canSaveSale = auth()->user()->hasPermission($posPermissionPrefix.'.save'); $canSaveAndPrint = auth()->user()->hasPermission($posPermissionPrefix.'.save_print'); $canCreditSale = auth()->user()->hasPermission($posPermissionPrefix.'.credit_sale'); $canQuotation = auth()->user()->hasPermission($posPermissionPrefix.'.quotation'); $canMpesaStk = auth()->user()->hasPermission($posPermissionPrefix.'.mpesa_stk'); $canSuspendBill = auth()->user()->hasPermission($posPermissionPrefix.'.suspend_bill'); $canUnsuspendBill = auth()->user()->hasPermission($posPermissionPrefix.'.unsuspend_bill'); $canAddCustomer = auth()->user()->hasPermission($posPermissionPrefix.'.add_customer'); @endphp
{{ $pageTitle }}
User: {{ auth()->user()->name }}
Branch: {{ auth()->user()->branch->name ?? 'No Branch Assigned' }}
@if($canMpesaModem && !$editSale) @endif @if($canSuspendBill) @endif @if($canUnsuspendBill) @endif @if($shiftManagementEnabled) @if($activeShift) @permission('shifts.close') @endpermission @permission('shifts.reports') Shift Report @endpermission @else @permission('shifts.open') @endpermission @endif @endif
@csrf
@if($shiftManagementEnabled && !$activeShift)
Open your shift before selling.
@endif @if($editSale)
Editing invoice {{ $editSale->invoice_no }}. Posted items are locked; add new items then save.
@endif
# Item Name Qty (F1) S.Price Disc Sub Total Action
Search or scan product to add items to sale.
@if($canAddCustomer) @endif
Total Qty 0
Discount {{ $currencyCode }} 0.00
{{ $currencyCode }} 0.00
@php($mpesaShortcutShown = false) @foreach($paymentMethods as $method) @php($methodName = strtolower(trim($method->name))) @continue($methodName === 'credit') @php($requiresReference = !in_array($methodName, ['cash', 'credit'])) @php($isCredit = $methodName === 'credit') @php($paymentShortcut = $methodName === 'cash' ? 'F2' : null) @if(!$paymentShortcut && str_contains($methodName, 'mpesa') && !$mpesaShortcutShown) @php($paymentShortcut = 'F3') @php($mpesaShortcutShown = true) @endif
@if($isCredit) @else @endif @if($requiresReference) @endif
@endforeach
@if($canMpesaStk) @endif @if($canCreditSale) @endif @if($canQuotation) @endif
@if($canSaveSale) @endif @if($canSaveAndPrint) @endif
Paid {{ $currencyCode }} 0.00
Change {{ $currencyCode }} 0.00
@if($canMpesaModem && !$editSale)

Incoming M-Pesa Payments

New payments appear automatically.
Code Customer Phone Amount Time Action
Waiting for M-Pesa payments...
@endif

Add Customer

Suspended Bills

Hold No. Customer Items Total Time Action
No suspended bills.
@if($shiftManagementEnabled)

Open Shift

@csrf

Close Shift

@csrf
@endif @endsection