@extends('dashboard.Boutique.Boutique_template.layouts.grocery.app')
@section("css")
@include("dashboard.Boutique.Boutique_template.layouts.grocery.css_other_page")
@include('dashboard.Boutique.Boutique_template.styles.cart_styles')
@include('dashboard.Boutique.Boutique_template.styles.cart_responsive')
@endsection
@section('content')
@php $total=0; @endphp
@if(!isset($status) || $status=="SUCCESS")
@php $helpers=new \App\Http\Controllers\HelperController(); @endphp
@if(isset($commandes))
@if(count($commandes)>0)
@foreach($commandes as $key => $cmd)
@if($cmd->commande_article!=null)
@if(count($cmd->commande_article)>0)
@php
$price=$cmd->total_price;
if($cmd->currency!==\Illuminate\Support\Facades\Session::get('boutique')['meta']['currency_client'])
$price=$helpers->convertCurrency($cmd->currency,\Illuminate\Support\Facades\Session::get('boutique')['meta']['currency_client'],$price);
$total+=$price;
@endphp
@endif
@endif
@endforeach
@endif
@endif
@endif
@include("dashboard.Boutique.Boutique_template.layouts.grocery.banner",["page_title"=> "Détails des commandes effectuées","totalAchat"=> $total." ".\Illuminate\Support\Facades\Session::get('boutique')['meta']['currency_client'],])
Liste des commandes en paiement echelonner
@php $total=0; $helpers=new \App\Http\Controllers\HelperController(); @endphp
@if(isset(\Illuminate\Support\Facades\Session::get('boutique')['paiement_echelonner']) && \Illuminate\Support\Facades\Session::get('boutique')['paiement_echelonner']!=null)
@if(!isset($status) || $status=="SUCCESS")
@if(isset($commandes_datas))
@if(count($commandes_datas)>0)
Afficher : {{ count($commandes_datas) }} / {{ $commandes_datas->total()}}
@foreach($commandes_datas as $key => $cmd)
@if($cmd->commande_article!=null)
@if(count($cmd->commande_article)>0)
@php
$price=$cmd->total_price;
if($cmd->currency!==\Illuminate\Support\Facades\Session::get('boutique')['meta']['currency_client'])
$price=$helpers->convertCurrency($cmd->currency,\Illuminate\Support\Facades\Session::get('boutique')['meta']['currency_client'],$price);
$total+=$price;
@endphp
Ref: {{$cmd->reference}}
détails
{{$cmd->created_at->format('d / m / y à H:i')}}
@if($cmd->paiement_type=='paid_echellon')
paiement échelonné ({{\Illuminate\Support\Facades\Session::get('boutique')['paiement_echelonner']['max']}})
@if($cmd->montant_payer>=$cmd->total_price)
paiement effectué
@if($cmd->shipping==true)
@if($cmd->statut_shipping==false)
en attente de livraison
@else
payer et livré : {{$cmd->updated_at->format('d / m / y à H:i')}}
@endif
@else
Faire
une demande de livraison
@endif
@endif
@endif
Total commande : {{$cmd->total_wr}} {{\Illuminate\Support\Facades\Session::get('boutique')['meta']['currency_client']}}
@if(isset($cmd->code_promo_reduction) && $cmd->code_promo_reduction!=null)
Code Réduction : {{$cmd->code_promo_reduction}}%
@endif
@if(isset($cmd->montant_global_code_promo) && $cmd->montant_global_code_promo>0)
Code Réduction global : {{$cmd->montant_global_code_promo}}%
@endif
Total dû : {{$cmd->total_price > $cmd->montant_payer ? $cmd->total_price - $cmd->montant_payer : 0}} {{\Illuminate\Support\Facades\Session::get('boutique')['meta']['currency_client']}}
Total payer : {{$cmd->montant_payer}} {{\Illuminate\Support\Facades\Session::get('boutique')['meta']['currency_client']}}
@if($cmd->montant_payer<$cmd->total_price)
@php
$total_paiement = \Illuminate\Support\Facades\Session::get('boutique')['paiement_echelonner']['max'];
$unit = $cmd->total_price / $total_paiement;
$remain = $cmd->total_price - $cmd->montant_payer;
$numbers = ceil($remain / $unit);
@endphp
@if($numbers > 0)
Choisir le nombre de paiement (Reste à payer X{{$numbers}})
@for($i=1;$i<=$numbers;$i++)
{{$i}}
@endfor
Payer à nouveau
@endif
@endif
@foreach($cmd->commande_article as $key => $art)
@if($art->article!=null)
@foreach($art->article as $key => $article)
@foreach($images as $image)
@if($image->key==$article->slug)
@break
@endif
@endforeach
Name
{{\Illuminate\Support\Str::limit($article->name,17)}}
Quantité
{{$art->quantity}}
Prix de vente
{{$art->price}} {{$cmd->currency}}
Total
{{$art->total_price}} {{$cmd->currency}}
@if($art->choice!="[]")
Préférences
@php $choix=[]; $choix=json_decode($art->choice,true); @endphp
@if(isset($choix))
@foreach($choix as $key =>$value)
{{$key}} :
@if(array_key_exists($key,$choix) && is_array($choix[$key]))
@for($i=0;$i {{$choix[$key][$i]}}
@endfor
@endif
@endforeach
@endif
@endif
Exigence
{{$art->specificity}}
@endforeach
@endif
@endforeach
@endif
@endif
@endforeach
{{ $commandes_datas->links() }}
@else
Aucune commande trouvée
@endif
@else
Aucune commande trouvée
@endif
@else
Aucune commande disponible
@endif
@endif
@endsection
@section('script')
@if(session("paiement"))
@elseif(session("success"))
@elseif(session('error'))
@endif
@endsection