@extends('layouts/pos_layout') @section('title', '| Details Opening Balance') @section('content') @include('successMsg')
Opening Balance List    
Details Opening Balance
@php $no=0; $totalInstallment = 0; $totalSales = 0; $totalCollection = 0; $totalBalance = 0; @endphp @foreach ($data as $details) @php $totalInstallment += $details->installment_amount; $totalSales += $details->opening_amount; $totalCollection += $details->paid_amount; $totalBalance += $details->balance; @endphp {{-- --}} @php $count = DB::select( DB::raw( "SELECT count(id) as total FROM pos_collections WHERE sales_bill_no = '$details->sale_bill_no' AND is_opening_balance = 0 AND deleted_at IS NULL", ), ); // dd(date('Y-m-d',strtotime($branch_active_date)), date('Y-m-d',strtotime($details->opening_date)), $count[0]->total == 0 ) @endphp {{-- @if ($branch_active_date == $details->opening_date && $count[0]['total'] == 0) --}} @if (date('Y-m-d', strtotime($branch_active_date)) == date('Y-m-d', strtotime($details->opening_date)) && $count[0]->total == 0) @else @endif @endforeach
SL. Customer Information Product Information Sale Information Collection Information Balance Amount Action
Customer Name Customer Id Product Name Product Model Product Barcode Sale Date Bill Number Installment Package Installment Amount Sale Amount Last Collection Date Collection Amount
{{ ++$no }}{{++$no}} {{$details->id}}{{ $details->customer->name }} {{ $details->customer->customer_id_no }} {{ ($details->product) ? $details->product->name : '' }} {{ ($details->product) ? (($details->product->model) ? $details->product->model->name : '') : '' }} {{ ($details->product) ? $details->product->barcode : '' }} {{ $details->sales_date }} SLS{{ $details->sale_bill_no }} {{ $details->installment_package }} {{ $details->installment_amount }} {{ $details->opening_amount }} {{ $details->last_collection_date }} {{ $details->paid_amount }} {{ $details->balance }}     Close
Total: {{ number_format($totalInstallment, 2) }} {{ number_format($totalSales, 2) }} {{ number_format($totalCollection, 2) }} {{ number_format($totalBalance, 2) }}
@endsection