@extends('layouts.layout') @section('title', 'Reports :: Transaction History') @section('content')

Transaction History

@csrf
Payment Date
Scheme
@if(Session::has('message')) @endif @if(count($payment_history)>0) @foreach($payment_history as $key=>$item) @php $userinfo = DB::table('users')->where('id',$item->user_id)->first(); $inspaid = DB::table('payment_details')->where('chit_detail_id',$item->id)->count(); $gold_weight = DB::table('payment_details')->where('chit_detail_id',$item->id)->sum('gold_weight'); $paymentinfo = DB::table('payment_details')->where('chit_detail_id',$item->id)->orderBy('id','DESC')->first(); if($item->scheme_id && $item->group_id) { $chitinfo = DB::table('chit_scheme')->where('scheme_id',$item->scheme_id)->where('id',$item->group_id)->first(); } @endphp @endforeach @else @endif
# CustName Group RegNo InsPaid TotalIns JoinDate BillDate BillNo Amount Weight
{{ $key+1 }} @if(isset($userinfo->name)) {{ $userinfo->name }} @endif @if(isset($chitinfo->chit_name)) {{ $chitinfo->chit_name }} @endif @if($item->regno) {{ $item->regno }} @endif {{ $inspaid }} {{ isset($chitinfo->no_of_installment)?$chitinfo->no_of_installment:'-' }} @if($item->joining_date && $item->joining_date!='0000-00-00') {{ date("d/m/Y",strtotime($item->joining_date))}} @endif @if($paymentinfo->payment_date && $paymentinfo->payment_date!='0000-00-00') {{ date("d/m/Y",strtotime($paymentinfo->payment_date))}} @endif {{$paymentinfo->bill_no}} @php $insamt = isset($chitinfo->installment_amount)?number_format($chitinfo->installment_amount):''; @endphp {{$insamt}} @if(!$insamt) {{isset($paymentinfo->amount)?number_format($paymentinfo->amount):''}} @endif {{number_format($gold_weight,3)}}

No records found!

@endsection