<style>
    @media print{

        tr > .myblack {
            border: 1px solid black !important;
        }


        .myleft{
            padding-top: 20px !important;
        }
        .myright{

            margin-top: 50px !important;
            float: right !important;
            margin-bottom: 10px !important;
        }

        .margintop{
            margin-top: 90px  !important;
        }
    }
</style>
<div class="row">
    <div class="container">
        <ol class="breadcrumb">
            <li><a href="#">متجر اون لاين</a></li>
            <li><a href="programsettingsController.php">طلبات الاونلاين</a></li>
            <li class="active">تفاصيل الطلب</li>
        </ol>
        <h3>تفاصيل الطلب</h3>
        <hr/>
        <form class="form-horizontal " role="form" action="sellbillController.php?do=show" method="post">
            <div class="row ">
                <div class="col-lg-8">
                    <div class="form-group">
                        <label class="col-lg-3 control-label  myleft">رقم الاوردر</label>
                        <div class="col-lg-9">
                            <p class="form-control-static"> {$onlineTempOrders->onlineorderid} </p>
                        </div>
                    </div>
                    <!-- end of form-group-->

                    <div class="form-group" >
                        <label class="col-lg-3 control-label myleft">اسم العميل </label>
                        <div class="col-lg-9">
                            <p class="form-control-static"> {$onlineTempOrders->clientname} </p>
                        </div>
                    </div>
                    <!-- end of form-group-->

                    <div class="form-group">
                        <label class="col-lg-3 control-label myleft">تاريخ الاوردر</label>
                        <div class="col-lg-9">
                            <p class="form-control-static"> {$onlineTempOrders->createdatetime} </p>
                        </div>
                    </div>
                    <!-- end of form-group-->


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

                <div class="clearfix"></div>
                <div class="margintop"></div>

                <!-- =================================================   -->

                <div class="row">
                    <div class="row">
                        <hr class='hidden-print'/>
                        <div class="col-lg-6">
                            <h4>المنتجات</h4>
                        </div>
                    </div>
                    <!-- end of title row-->

                    <div class="table-responsive">
                        <table class="table billtable table-bordered table-black" id="containerpros">
                            <thead>
                                <tr>
                                    <th class="wdt60 myblack">م </th>
                                    <th class="wdt300 myblack">اسم المنتج</th>
                                    <th class="wdt100n myblack">العدد</th>
                                    <th class="wdt100n myblack">السعر</th>
                                    <th class="wdt100n myblack"> الاجمالى</th>
                                </tr>
                            </thead>
                            <tbody>

                                {assign var=x value=1}
                                {assign var=total value=0}
                                {foreach $onlineTempOrderProducts as $data}
                                <tr>
                                    <td  class=" myblack">{$x}</td>

                                    <td  class=" myblack" >
                                        <div id="productdiv1">
                                            <p class="form-control-static" style="direction: ltr"> {$data->productName}/ {$data->productCatName}
                                                {if !empty($data->sizeid)}/ {$data->sizeid}{/if}
                                                {if $data->colorName != ''}/ {$data->colorName}{/if}
                                            </p>
                                        </div>
                                    </td>

                                    <td  class=" myblack">
                                        <p class="form-control-static"> {$data->quantity} </p>
                                    </td>

                                    <td  class=" myblack" >
                                        <div id="propricechange1">
                                            <p class="form-control-static"> {$data->price} </p>
                                        </div>
                                    </td>

                                    <td  class=" myblack" >
                                        <p class="form-control-static"> {$data->total} </p>
                                        {assign var=total value=$total+$data->total}
                                    </td>
                                </tr>
                                {capture assign=x}{$x+1}{/capture}
                                {/foreach}

                            </tbody>

                        </table>
                    </div>
                    <!--                    <button type="button" class="btn btn-primary pull-left ft-nor"> الاجمالى <span class="badge wht-clo">
                                                <div id="sellbilltotal">{$total}</div>
                                            </span> </button>-->
                </div>
                <!-- end of second row-->

                <div class="row">
                    <div class="col-lg-3 total-bill">
                        <hr/>

                        <div class="form-group mg-bt5">
                            <label class="col-lg-5 control-label">اجمالى المنتجات</label>
                            <div class="col-lg-7">
                                <p class="form-control-static" id="gentotal">{$onlineTempOrders->ordertotal}</p>
                            </div>
                        </div>
                        <div class="form-group mg-bt5">
                            <label class="col-lg-5 control-label">اجمالي تكلفه الشحن </label>
                            <div class="col-lg-7">
                                <p class="form-control-static" id="gentotal">{$onlineTempOrders->shippingcost}</p>
                            </div>
                        </div>
                        <div class="form-group mg-bt5">
                            <label class="col-lg-5 control-label">قيمه الضريبه </label>
                            <div class="col-lg-7">
                                <p class="form-control-static" id="gentotal">{$onlineTempOrders->tax_value}</p>
                            </div>
                        </div>
                        <div class="form-group mg-bt5">
                            <label class="col-lg-5 control-label">اجمالى الطلب </label>
                            <div class="col-lg-7">
                                <p class="form-control-static" id="gentotal">{$onlineTempOrders->fulltotal}</p>
                            </div>
                        </div>

                    </div>
                    <!-- end of totals center-->
                </div>
                <!-- end of fourth row-->
                <button data-link="sellbillController.php?do=onlineOrderConfirm&id={$onlineTempOrders->onlineorderid}" type="button" class="btn btn-success confiDialog">موافقة</button>
                <button data-link="sellbillController.php?do=onlineOrderRefuse&id={$onlineTempOrders->onlineorderid}" type="button" class="btn btn-danger confiDialog">رفض </button>

                <!-- end of fifth row-->

        </form>
    </div>
    <!-- end of container-->
</div>
<!-- end of main row-->

{literal}
<script>
    $('.confiDialog').click(function () {
        var txt;
        var r = confirm("هل انت متأكد ؟");
        if (r == true) {
            //txt = "You pressed OK!";
            window.location = $(this).data('link');
        }
//        else {
//            txt = "You pressed Cancel!";
//        }
    });
</script>
{/literal}