@extends('layouts.admin') @push('styles') @endpush @section('content')
Refresh

Sale List

@php $sl = 1; $cashStatus = ''; $totalAmt = 0; $totalVat = 0; $totalSD = 0; $totalDis = 0; $totalScharge = 0; @endphp @foreach ($saleData as $k => $v) @php $sale_date = date('d-m-Y', strtotime($v->sale_date)); $totalAmt = $totalAmt + $v->inv_amt; $totalDis = $totalDis + $v->total_dis_amt; $totalSD = $totalSD + $v->total_sd; $totalVat = $totalVat + $v->total_vat; $totalScharge = $totalScharge + $v->total_scharge; @endphp @if ($v->cash_status == '1') @php $cashStatus = 'Pending'; @endphp @elseif($v->cash_status == '2') @php $cashStatus = 'Paid'; @endphp @elseif($v->cash_status == '3') @php $cashStatus = 'Void'; @endphp @else @php $cashStatus = 'Cancle'; @endphp @endif @php $receiveMethodsList = ''; if ($v->payment_method == 'Due') { $receivePaymentInfoquery = Helper::receivedPayAmt([ 'due_receive.sale_id' => $v->id ]); if(count($receivePaymentInfoquery) > 0){ }else{ $receivePaymentInfoquery = []; } }else{ $receivePaymentInfoquery = []; } if(count($receivePaymentInfoquery) > 0){ $receiveMethods = []; foreach($receivePaymentInfoquery as $v2){ $receiveMethods[] = $v2->pmode_name; } $receiveMethodsList = implode('/', $receiveMethods); } @endphp @endforeach
SL Date Invoice No. Inv. Amt. Total Dis. Total SD Total Vat Cash Status Pmode Mobile No Cor. Client Note Action
{{ $sl++ }} {{ $sale_date }} {{ $v->invoiceno }} {{ $v->inv_amt }} {{ $v->total_dis_amt }} {{ $v->total_sd }} {{ $v->total_vat }} {{ $cashStatus }} {{ $v->payment_method }} @if($receiveMethodsList) ( Received: {{$receiveMethodsList}}) @endif {{ $v->mobile_no }} {{ $v->company_name }} {{ $v->note }} @can('update_payment') @if (empty($v->payment_date) && $v->payment_method !== 'Due') @endif @if (empty($v->payment_date) && $v->payment_method === 'Due') {{-- --}} @endif @endcan
TOTAL {{ $totalAmt }} {{ $totalDis }} {{ $totalSD }} {{ $totalVat }}
@endsection @push('scripts') @if (Auth::user()->hasRole('sale_user')) @else @endif @endpush