@extends('layouts.innerpage')
@section('title', 'Gold Saving Scheme Payment')
@section('content')
Home / My Gold Saving Scheme {{Auth::user()->phone_no}} {{Auth::user()->email}} Account Name : SHRI ARTHI JEWELLERY Account Number : 35400002403 IFSC : SBIN0003690 Bank Name : State Bank of India Branch : GANAPATHY Payable Amount : {{number_format($totprice,2)}} Payable Amount : (Transfer to Shri Arthi Jewellery) Payable Amount : {{number_format($totprice,2)}} Payable Amount : (Scan and Pay With Any UPI App) Gateway Charge (2%) : {{number_format($gatewaycharge,2)}} Payable Amount : {{number_format($payable,2)}} Gateway Charge (2%) : Payable Amount : My Gold Saving Scheme
@else
@endif
Hi @if(Auth::user()->name!="") {{Auth::user()->name}} @else User @endif
@if(Auth::user()->phone_no!="")
@if($chitdetails->scheme_id==2)
@php
$gatewaycharge = ((2 / 100) * $totprice);
$payable = $gatewaycharge + $totprice;
@endphp
@if($chitdetails->scheme_id == 2)
@else
Mon
Ins Amount
Gold rate
on dateCredit
(in grams)Paid Date
Interest
Status
@endif
@if($chitdetails->scheme_id==2)
@php
$curdate = strtotime(date('d F Y'));
$payment_details_monthly = DB::table('payment_details')->where('user_id',$chitdetails->user_id)->where('chit_detail_id',$chitdetails->id)->groupBy(DB::raw('YEAR(payment_date)'), DB::raw('MONTH(payment_date)'))->orderBy('id','ASC')->get();
$cid = $chitdetails->id;
$amt = 0; $totamt = 0;
$wt=0; $totga = 0; $totwt = 0;
$total_interest=0; $current_interest = 0;
$lastmonth = date('d-m-Y',strtotime($chitdetails->joining_date));
$is_current = date('d-m-Y',strtotime($chitdetails->joining_date));
$monthcount = 11;
if($chitdetails->user_id==642 || $chitdetails->user_id==530) { $monthcount = 12; }
@endphp
@for($k=0;$k<=$monthcount;$k++)
@php
$paymentmonth = date('m',strtotime($lastmonth)); $paymentyear = date('Y',strtotime($lastmonth));
$payment_details = DB::table('payment_details')->where('user_id',$chitdetails->user_id)->where('chit_detail_id',$chitdetails->id)->where(DB::raw('YEAR(payment_date)'),$paymentyear)->where(DB::raw('MONTH(payment_date)'),$paymentmonth)->orderBy('id','ASC')->get();
//$paymentmonth_int = date('m',strtotime($lastmonth." -1 month")); $paymentyear_int = date('Y',strtotime($lastmonth." -1 month"));
$paymentdate_int = date('Y-m-d',strtotime($lastmonth));
//echo "Year :".$paymentyear_int;
//$payment_details_int = DB::table('payment_details')->where('approved',1)->where('user_id',$chitdetails->user_id)->where('chit_detail_id',$chitdetails->id)->where(DB::raw('YEAR(payment_date)'),$paymentyear_int)->where(DB::raw('MONTH(payment_date)'),$paymentmonth_int)->sum('amount');
$payment_details_int = DB::table('payment_details')->where('approved',1)->where('user_id',$chitdetails->user_id)->where('chit_detail_id',$chitdetails->id)->where(DB::raw('DATE(payment_date)'),'<',$paymentdate_int)->sum('amount');
$payment_details_gold = DB::table('payment_details')->where('approved',1)->where('user_id',$chitdetails->user_id)->where('chit_detail_id',$chitdetails->id)->where(DB::raw('DATE(payment_date)'),'<',$paymentdate_int)->sum('gold_weight');
$wt = DB::table('payment_details')->where('user_id',$chitdetails->user_id)->where('approved',1)->where('chit_detail_id',$chitdetails->id)->where(DB::raw('YEAR(payment_date)'),$paymentyear)->where(DB::raw('MONTH(payment_date)'),$paymentmonth)->sum('gold_weight');
$wt = number_format($wt,3);
$totwt = $wt+$totwt+$current_interest;
$totwt = number_format($totwt,3);
@endphp
@foreach($payment_details as $i => $item)
@php
$totamt = $totamt+$item->amount;
@endphp
Ins #
Mon Ins
Ins Amount
Gold rate
on dateCredit
(in grams)Paid Date
Status
@endforeach
@php
//echo "Total Paid Amt :".$payment_details_gold; echo "
@if($item->payment_date && $i==1)
@php $cdate = date("Y-m-d", strtotime($item->payment_date." -1 months")); @endphp
@endif
Payment for {{date('F Y',strtotime($item->payment_date))}}
@if($payment_details)
@else
@if($chitinsdate < $curdate)
@php $is_flag = $is_flag+1; @endphp
@endif
@endif
{{number_format($item->gold_weight,3)}}
{{date('d/m/Y',strtotime($item->payment_date))}}
@if($item->approved==0)
Waiting for Approval
@else
Paid
@endif
";
//echo ".75% : ".$ga = ((0.75/100)*$payment_details_int); echo "
";
$payment_details_gold = number_format(($payment_details_gold+$total_interest),3);
//echo "Total Paid Amt :".$payment_details_gold; echo "
";
if(date('Y')>=2025){
$ga = (0.005*$payment_details_gold);
} else {
$ga = (0.0075*$payment_details_gold);
}
$ga = number_format($ga,3);
//if(date('m-Y',strtotime($is_current)) <= date('m-Y')) {
//echo 'true'; echo "
";
$totga = number_format($ga,3);
$current_interest = $totga;
//}
$total_interest = $total_interest+$ga;
$total_interest = number_format($total_interest,3);
//echo 'GA : '.$ga; echo "
";
//echo 'Current Int : '.$current_interest; echo "
";
//echo 'Tot Int : '.$total_interest; echo "
";
@endphp
@if($k>0)
@if(date('m',strtotime($is_current)) <= date('m') && date('Y',strtotime($is_current)) <= date('Y') )
@else
@php
$d1 = new DateTime(date('d-m-Y', strtotime($is_current)));
$d2 = new DateTime(date('d-m-Y'));
@endphp
@if($d1->diff($d2)->m > 1 && date('Y', strtotime($is_current)) < date('Y'))
Interest capitilised for the month of {{date('F',strtotime($lastmonth." -1 month"))}}
@php
//echo "Tot Amt : ".$payment_details_int; echo "
";
//echo ".75% Int : ".((0.75/100)*$payment_details_int); echo "
";
//echo "G Rate : ".$item->gold_rate;
@endphp
@php
@endphp
{{$totga}}
@endif
@endif
@endif
@if($item->approved==1)
@php
$d1 = new DateTime(date('d-m-Y', strtotime($is_current)));
$d2 = new DateTime(date('d-m-Y'));
@endphp
@if(date('m',strtotime($is_current)) <= date('m') && date('Y',strtotime($is_current)) <= date('Y') )
Interest capitilised for the month of {{date('F',strtotime($lastmonth." -1 month"))}}
@php
//echo "Tot Amt : ".$payment_details_int; echo "
";
//echo ".75% Int : ".((0.75/100)*$payment_details_int); echo "
";
//echo "G Rate : ".$item->gold_rate;
@endphp
@php
@endphp
{{$totga}}
@else
@if($d1->diff($d2)->m > 1 && date('Y', strtotime($is_current)) < date('Y'))
Gold accumulated for the month {{date('F',strtotime($lastmonth))}}
@if($wt>0)
{{number_format($wt,3)}}
@else
[NIL]
@endif
@endif
@endif
@endif
@if($k>0)
@php
$d1 = new DateTime(date('d-m-Y', strtotime($is_current)));
$d2 = new DateTime(date('d-m-Y'));
@endphp
@if(date('m',strtotime($is_current)) <= date('m') && date('Y',strtotime($is_current)) <= date('Y') )
Gold accumulated for the month {{date('F',strtotime($lastmonth))}}
@if($wt>0)
{{number_format($wt,3)}}
@else
[NIL]
@endif
@else
@if($d1->diff($d2)->m > 1 && date('Y', strtotime($is_current)) < date('Y'))
Gold at the end of {{date('F',strtotime($lastmonth))}}
{{number_format(($totwt+$totga),3)}}
@endif
@endif
@endif
@php
$totalbal = number_format(($totwt+$totga),3);
//echo $totalbal.'****************'.$is_current; exit;
if(date('m',strtotime($is_current)) <= date('m') && date('Y',strtotime($is_current)) <= date('Y') ){
DB::table('chit_details')->where('id',$chitdetails->id)->update(array("total_interest"=>$totalbal));
}
$lastdate = date("Y-m-t", strtotime($lastmonth));
$datetime1 = date_create($lastmonth);
$datetime2 = date_create($lastdate);
$interval = date_diff($datetime1, $datetime2);
$between_days = $interval->format('%a') + 1;
$first_date = date('01-m-Y',strtotime($lastmonth));
$datetime11 = date_create($first_date);
$datetime22 = date_create($lastdate);
$interval1 = date_diff($datetime11, $datetime22);
$between_days1 = $interval1->format('%a') + 1;
if($between_days1===$between_days) {
$lastmonth = date('d-m-Y',strtotime('+1 month',strtotime($lastmonth)));
$is_current = date('d-m-Y',strtotime('+1 month',strtotime($is_current)));
} else {
$lastmonth = date('d-m-Y',strtotime('+1 month',strtotime($first_date)));
$is_current = date('d-m-Y',strtotime('+1 month',strtotime($first_date)));
}
@endphp
@endfor
@else
@for($i=0;$i<=11;$i++)
@php
$insmon = date('m/Y',strtotime('+'.$i.' month', strtotime($chitdetails->joining_date)));
$curdate = strtotime(date('d F Y'));
$payment_details = DB::table('payment_details')->where('no_of_installments',$i+1)->where('user_id',Auth::user()->id)->where('chit_detail_id',$chitdetails->id)->orderBy('id','DESC')->first();
$cid = $chitdetails->id;
$amt = 0;
if($payment_details) {
$amt = isset($chitscheme->installment_amount)?$chitscheme->installment_amount:$payment_details->amount;
}
@endphp
Gold at the end of {{date('F',strtotime($lastmonth))}}
{{number_format(($totwt+$totga),3)}}
@endfor
@endif
@if($totprice>0)
@endif
#{{$i+1}}
@if($chitdetails->joining_date)
{{date('F Y',strtotime('+'.$i.' month', strtotime($chitdetails->joining_date)))}}
@php $chitinsdate = strtotime('+'.$i.' month', strtotime($chitdetails->joining_date)); @endphp
@else
@if($payment_details && $i==1)
@php $cdate = date("Y-m-d", strtotime($payment_details->payment_date." -1 months")); @endphp
@endif
{{date('F Y',strtotime('+'.$i.' month', strtotime($cdate)))}}
@php $chitinsdate = strtotime('+'.$i.' month', strtotime($cdate)); @endphp
@endif
@if($payment_details)
@else
@if($chitinsdate < $curdate)
@php $is_flag = $is_flag+1; @endphp
@endif
@endif
@if($payment_details)
@if($payment_details) {{number_format($payment_details->gold_weight,3)}} @else - @endif
@if($payment_details) {{date('d/m/Y',strtotime($payment_details->payment_date))}} @else - @endif
@if($payment_details)
@if($payment_details->approved==0)
Waiting for Approval
@else
Paid
Print
@endif
@else
@php
$lastmon = date('m/Y',strtotime('-1 month', strtotime(date('Y-m-d'))));
@endphp
@if($insmon == date('m/Y') || $insmon == $lastmon || Auth::user()->enable_payment==1)
@php
$settings = DB::table('settings')->where('id',1)->first();
@endphp
@if($settings)
@if($settings->activate_online_payment==1 && $chitdetails->scheme_id==2)
Pay Now
@endif
@endif
@endif
@endif
Unable to process payment, you have crossed 11 months!
@endif
Payment Direct
You should shell out some quality time but no gateway charges u can Save 2%
Pay Using QR Code
Scan QR, Pay & Upload screenshot
Direct Bank Transfer
Pay to our Bank Account directly and upload screen shot
@if($chitdetails->scheme_id == 1)
Direct Bank Transfer
Pay to our Bank Account directly and upload screen shot
Payment via Gateway
Instant but 2% gateway charges will be collected on ur billing amount
Credit / Debit Card
Pay using Credit/Debit or International issued cards securely with our trusted payment partners
Wallets
Choose this option to place your order using digital wallet
UPI ID
Use our UPI payment options to complete your payment
Wallets
Choose this option to place your order using digital wallet
UPI ID
Use our UPI payment options to complete your payment