%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /proc/self/root/var/www/html/resources/views/factures/
Upload File :
Create Path :
Current File : //proc/self/root/var/www/html/resources/views/factures/index.blade.php

@extends('template')

@section('title')
    la liste des factures
@endsection

@section('content')
    <div class="container fluid">
        <div class="card">
            <div class="card-header">
                <h5 class="card-title font-weight-bold text-primary">Liste des factures</h5>
            </div>
            <div class="card-body">
                <ul class="nav nav-tabs" id="myTab" role="tablist">
                    <li class="nav-item">
                        <a class="nav-link active" id="home-tab" data-toggle="tab" href="#home" role="tab"
                            aria-controls="home" aria-selected="true">Clients</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" id="profile-tab" data-toggle="tab" href="#profile" role="tab"
                            aria-controls="profile" aria-selected="false">Fournisseurs</a>
                    </li>
                </ul>
                <div class="tab-content" id="myTabContent">
                    <div class="tab-pane fade show active" id="home" role="tabpanel" aria-labelledby="home-tab">
                        <div class="table-responsive">
                            <table class="table table-hover table-sm">
                                <thead>
                                    <th>Num Facture</th>
                                    <th>Type</th>
                                    <th>Date</th>
                                    <th>Client</th>
                                    <th>détail</th>
                                </thead>
                                <tbody>
                                    @foreach ($factures_client as $facture)
                                        <tr>
                                            <td>{{ $facture->num_facture }}</td>
                                            <td>
                                                <x-type-facture :type="$facture->type" />
                                            </td>
                                            <td>{{ $facture->date }}</td>
                                            <td>{{ $facture->user->name }}</td>
                                            <td> <button class="badge badge-info btn-sm border-0" data-toggle="collapse"
                                                    data-target="#facture_products-{{ $facture->id }}"><i
                                                        class="fas fa-eye"></i></button> </td>
                                        </tr>
                                        <tr id="facture_products-{{ $facture->id }}" class="collapse collapsed">
                                            <td colspan="5">
                                                <ul>
                                                    @foreach ($facture->commande->commande_products as $com_prod)
                                                        <li><span>{{ $com_prod->product->parent->name_prod }}</span> -
                                                            <span>{{ $com_prod->product->ref_prod }}</span> -
                                                            <span>{{ $com_prod->product->prixvente - $com_prod->remise }}DH</span>
                                                        </li>
                                                    @endforeach
                                                </ul>
                                            </td>
                                        </tr>
                                    @endforeach
                                </tbody>
                            </table>
                        </div>
                    </div>
                    <div class="tab-pane fade" id="profile" role="tabpanel" aria-labelledby="profile-tab">
                        <div class="table-responsive">
                            <table class="table table-hover table-sm">
                                <thead>
                                    <th>Num Facture</th>
                                    <th>Type</th>
                                    <th>Date</th>
                                    <th>Fournisseur</th>
                                    <th>détail</th>
                                </thead>
                                <tbody>
                                    @foreach ($factures_fournisseur as $facture)
                                        <tr>
                                            <td>{{ $facture->num_facture }}</td>
                                            <td>
                                                <x-type-facture :type="$facture->type" />
                                            </td>
                                            <td>{{ $facture->date }}</td>
                                            <td>{{ $facture->user->name }}</td>
                                            <td> <button class="btn btn-info btn-sm" data-toggle="collapse"
                                                    data-target="#facture_products-{{ $facture->id }}"><i
                                                        class="fas fa-eye"></i></button> </td>
                                        </tr>
                                        <tr id="facture_products-{{ $facture->id }}" class="collapse collapsed">
                                            <td colspan="5">
                                                <ul>
                                                    @foreach ($facture->products as $com_prod)
                                                        <li><span>{{ $com_prod->parent ? $com_prod->parent->name_prod : '' }}</span>
                                                            -
                                                            <span>{{ $com_prod->ref_prod }}</span> -
                                                            <span>{{ $com_prod->prixachat }}DH</span>
                                                        </li>
                                                    @endforeach
                                                </ul>
                                            </td>
                                        </tr>
                                    @endforeach
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
@endsection

Zerion Mini Shell 1.0