<style>
    @media (min-width: 768px){
        .form-horizontal .form-group {
            margin-right: -10px;
            margin-left:-10px;
        }
    }
    table i{
        font-size:18px;
        margin: 5px
    }
    .remove{
        color: #ec0000;
        font-size: 22px;

    }
    .edit{
        color:green

    }
    .detail{
        color:#0e7fd9
    }
    .billtable thead>tr>th {
        color: #eeecda;
        background-color: #0081a8;
    }

    .data-search{
        margin: 10px 15px 0;
    }
    .btn-dark {
        color: #fff;
        background-color: #636262;
        border-color: #646464;
        margin-bottom: 15px
    }
    .data-search .form-control{
        border-radius:3px
    }
    .card{
        box-shadow: 0 4px 16px rgba(0,0,0,.12);
        padding: 10px;
        margin: 20px 0;
        border-radius: 5px
    }
</style>


<div class="row">

    <div class="container">


        <ol class="breadcrumb">
            <li><a href="#">المشروعات</a></li>
            <li><a href="projectreportControllerdetail2.php">تقرير صرف مواد ومرتجع مواد </a></li>
            <li class="active">عرض</li>
        </ol>

        <div class="panel panel-default panel-m">
            <div class="panel-heading">
                <h3 class="panel-title"> عرض     قرير صرف مواد ومرتجع مواد </h3>
                <a href="{$youtubes[243]->url}" target="_blank" class="hidden-print"><img src="../views/default/assets/img/youtube.png" class="pull-left" alt="Youtube" style="width: 2%;"></a>

            </div>

            <div class="panel-body">
                <form class="form-inline hidden-print" action="projectreportControllerdetail2.php" method="post">
                    <div class="data-search">
                        <div class="row">
                            <div class="col-lg-4">
                                <div class="form-group">
                                     <label class="sr-only">اسم المشروع</label>
                                        <input type="hidden" name="searchvalue" id="searchvalue" value="{$Programsettingdata['searchvalue']}"/>
                                        <input type="text"  id="projectId" name="projectId"  class="select2product wdt100"  data-placeholder="اختر مشروع" />  
                                </div>
                                <button type="submit" class="btn btn-primary">بحث</button>
                            </div>


                        </div>
                    </div>

                </form>

               <div class="col-lg-12">
                        <h3 style="text-align:center;">مصروفات </h3>
                         <table class="table billtable table-bordered table-black card dataTableClass22">
                            <thead>
                                <tr>
                                    <th rowspan="2">رقم  المنتج</th>
                                    <th rowspan="2">اسم المنتج</th>
                                    <th colspan="3"> صرف مواد </th>
                                    <th colspan="3"> مرتجع صرف مواد</th>
                                    <th colspan="2"> الصافى  </th>
                                </tr>
                                 <tr>
                                    <th>عدد </th>
                                    <th>السعر </th>
                                    <th>قيمة </th>
                                    <th>عدد </th>
                                    <th>السعر </th>
                                    <th>قيمة </th>
                                    <th>عدد </th>
                                    <th>قيمة </th>
                                </tr>
                            </thead>
                            <tbody>
                                {foreach $alldata as $data}
                                <tr>
                                    <td>{$data.productid}</td>
                                    <td>{$data.productName}</td>
                                    <td>{$data.pronumber}</td>
                                    <td>{$data.probuyprice}</td>
                                    <td>{$data.probuyprice * $data.pronumber}</td>
                                    <td >{$data.pronumbern}</td>
                                    <td>{$data.probuypricen}</td>
                                    <td>{$data.probuypricen * $data.pronumbern}</td>
                                    <td>{$data.pronumber - $data.pronumbern}</td>
                                    <td>{($data.probuyprice * $data.pronumber) - ($data.probuypricen * $data.pronumbern)}</td>


                                </tr>                               
                                {/foreach}
                            </tbody>
                        </table>
                 
                </div>
                <div class="col-lg-12">
                    <div class="col-lg-6" style="text-align:center;font-size: 20px;">
              صرف مواد               الاجمالى    <span style="color:red">{$alltotal}</span> 
                        
                      
                    </div>
                    <div class="col-lg-6" style="text-align:center;font-size: 20px;">
                      مرتجع صرف مواد         الاجمالى    <span style="color:red">{$alltotaln}</span> 
                    </div>
                </div>
              
            

                <div class="col-lg-12" style="text-align: center;">
                        <button type="button" class="btn btn-dark ft-nor" style="font-size: 20px" >
                           الصافي <span class="badge wht-clo">
                                <div >{$alltotals}</div>
                            </span>
                        </button>
                   
                </div>

            </div> <!-- end of panel-body-->

        </div>  <!-- end of panel panel-default-->

    </div> <!-- end of container-->

</div>  <!-- end of row-->


{literal}
<script>
    $(document).ready(function () {
        $('.dataTableClass22').dataTable({
            "order"
                    : [
                        [9, "desc"]       // order by drug cat
                    ]
        });
       
       
    });
</script>
{/literal}