@php
$order = \App\Order::with('orderDetails')->where('id', @$array['content'])->first();
$orderw = \App\Order::where('id', @$array['content'])->select('wallet_discount')->first();
$ww = $array['wallet_a'];
$userbalance = $array['userbalance'];
$orderidcode = $array['orderidcode'];
$generalsetting = \App\GeneralSetting::first();
$rupees = '
₹ ';
$grandTotal = \App\OrderDetail::where('order_id', @$array['content'])->sum('price');
$checkPincode = DB::table('delivery_tat')->where('destination_pin', json_decode(@$order->shipping_address)->postal_code)->first();
foreach ($order->orderDetails as $key => $value) {
if ($value->product->managed_by == 1) {
$match = $value->product->id;
break;
}
}
if(!empty($match)) {
if(!empty(@$checkPincode)){
$add_number_of_days = $checkPincode->surface_tat;
$delivery_date = date('d-m-Y',strtotime(@$order->created_at) + (24*3600*$add_number_of_days));
}else{
$delivery_date = date('d-m-Y',strtotime(@$order->created_at) + (24*3600*7));
}
}else{
$delivery_date = date('d-m-Y',strtotime(@$order->created_at) + (24*3600*7));
}
@endphp
Hi {{ucfirst($order->user->name)}}
Refund of ₹{{$ww}} for your ekhadiindia.com Order id
{{$orderidcode}} has been applied to your Khadi Wallet
Balance.Your balance now reflects the additional funds added to
your account.
Updated Khadi Wallet Balance |
₹{{$userbalance}} |
|