@extends('layouts.default') @section('content')
@php $lc_data = DB::connection('mysql2')->table('lc_and_lg as l') ->join('accounts as a', 'a.id', '=', 'l.acc_id') ->where('a.status', 1) ->where('l.status', 1) ->where('l.type', 'lc') ->select( 'l.id', 'l.type', 'a.name', 'l.limit', DB::raw('l.limit_utilize as limit_utilized'), DB::raw('l.limit - l.limit_utilize as un_utilized'), DB::raw('ROUND(((l.limit - l.limit_utilize) / l.limit ) * 100, 2) as remaining_percentage') // DB::raw('CONCAT(FORMAT(((l.limit - l.limit_utilize) / l.limit ) * 100, 2), " %") as remaining_percentage') )->orderBy('l.id', 'desc')->get(); @endphp @foreach ($lc_data as $row) @endforeach
Zahabiya Chemicals Sanctioned Limit Limit Utilized Un Utilized Remaining % age
Rs in Millions
LC
{{$row->name}} {{number_format($row->limit , 2)}} {{number_format($row->limit_utilized , 2)}} {{number_format($row->un_utilized , 2)}} {{$row->remaining_percentage}} %
@php $bg_data = DB::connection('mysql2')->table('lc_and_lg as l') ->join('accounts as a', 'a.id', '=', 'l.acc_id') ->where('a.status', 1) ->where('l.status', 1) ->where('l.type', 'bank_gurantee') ->select( 'l.id', 'l.type', 'a.name', 'l.limit', DB::raw('l.limit_utilize as limit_utilized'), DB::raw('l.limit - l.limit_utilize as un_utilized'), DB::raw('ROUND(((l.limit - l.limit_utilize) / l.limit ) * 100, 2) as remaining_percentage') // DB::raw('CONCAT(ROUND((l.limit / (l.limit - 0)) * 100, 2), " %") as remaining_percentage') )->orderBy('l.id', 'desc')->get(); @endphp @foreach ($bg_data as $row) @endforeach
Bank Gurantee
{{$row->name}} {{$row->limit}} {{$row->limit_utilized}} {{$row->un_utilized}} {{$row->remaining_percentage}} %
{{--
Zahabiya Chemicals Bank Al Habib Habib Metro
Rs in Millions
LC
Sanctioned Limit 200 250 250
Limit Utilized 50.00 100.00 100.00
Un Utilized 150.00 150.00 150.00
Remaining % age 75.00% 60.00% 60.00%
Bank Gurantee
Sanctioned Limit 150 50 50
Limit Utilized 25.00 15.00 15.00
Un Utilized 125.00 35.00 35.00
Remaining % age 83.33% 70.00% 70.00%
--}}