<style>
    .myresult {
        -webkit-print-color-adjust: exact;
    }

    @media print {
        tr>.myborder {
            border: 1px solid black !important;

        }

        .myborder {
            color: solid #000 !important;


        }
    }
</style>


<div class="row">
    <div class="container">

        <ol class="breadcrumb">
            <li><a href="#">المخازن</a></li>
            <li><a href="storemovementController.php?do=show">التحويل بين المخازن</a></li>
            <li class="active">عرض تفاصيل تحويل</li>
        </ol>


        <div class="panel panel-default panel-m">
            <div class="panel-heading">
                <h3 class="panel-title">عرض تفاصيل التحويل</h3>
            </div>
            <div class="panel-body">


                <form class="form-horizontal" role="form" action="otherstoremovementController.php?do=show"
                    method="post">


                    <!--                    <div class="form-group">
                                            <label class="col-lg-2 control-label">رقم السيريال</label>
                                            <div class="col-lg-4">
                                                <label>
                                                {$perationdata->oprationnumber}
                                                </label>
                                            </div>
                                        </div>-->
                    {if $Programsettingdata->clientserial eq 1}
                    <div class="form-group">
                        <label class="col-lg-2 control-label"> رقم الايصال</label>
                        <div class="col-lg-4">
                            <label>
                                {$perationdata['operationnum']}
                            </label>
                        </div>
                    </div>
                    {/if}

                    <!--                    <div class="form-group noprint">
                                            <label class="col-lg-2 control-label">التعليق</label>
                                            <div class="col-lg-4">
                                                <label>
                                                {$perationdata->comment}
                                                </label>
                                            </div>
                                        </div>-->


                    <div class="form-group">
                        <label class="col-lg-2 control-label">تاريخ التحويل</label>
                        <div class="col-lg-4">
                            <label>
                                {$perationdata['transferproductdate']}
                            </label>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-lg-2 control-label">اسم المستخدم </label>
                        <div class="col-lg-4">
                            <label>
                                {$loadData[0]->employeename}
                            </label>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-lg-2 control-label">من </label>
                        <div class="col-lg-4">
                            <label>
                                {$loadData[0]->storefromName}
                            </label>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-lg-2 control-label">الى </label>
                        <div class="col-lg-4">
                            <label>
                                {$loadData[0]->storetoName}
                            </label>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-lg-2 control-label">التاريخ </label>
                        <div class="col-lg-4">
                            <label>
                                {$loadData[0]->transferproductdate}
                            </label>
                        </div>
                    </div>
                    <!-- =================================================   -->

                    <div class="form-group">
                        <!-- end of title row-->
                        <div class="table-responsive">
                            <table class="table billtable table-bordered table-black" id="containerpros">
                                <thead>
                                    <tr>
                                        <!--                                        <th class="wdt200 myborder">من </th>
                                                                                <th class="wdt200 myborder">الى</th>-->
                                        <th class="wdt200 myborder">اسم المنتج</th>

                                        <th class="myborder">الكمية المحولة</th>
                                        <th class="myborder {if $usergroupdata->hideBillPrices == 1}hidden{/if}" {if
                                            $loadData[0]->priceType == '' || $loadData[0]->priceType == 'hide'}
                                            style="display:none" {/if}>السعر</th>
                                        <th class="myborder {if $usergroupdata->hideBillPrices == 1}hidden{/if}" {if
                                            $loadData[0]->priceType == '' || $loadData[0]->priceType == 'hide'}
                                            style="display:none" {/if}>الاجمالي</th>
                                        <!--<th class="myborder">التاريخ</th>-->
                                    </tr>
                                </thead>
                                <tbody>
                                    {assign var=x value=0}
                                    {foreach $loadData as $myloadData}
                                    <!--                                    {*if {$myloadData->conditions} eq 1*}

                                                                        <tr class="danger">-->
                                    <tr>
                                        <!--                                        <td class="myborder">
                                                                                    {$myloadData->storefromName}
                                                                                </td>

                                                                                <td class="myborder">

                                                                                    {$myloadData->storetoName}

                                                                                </td>-->
                                        <td class="myborder">
                                            {$myloadData->productName} / {$myloadData->productCatName}
                                        </td>
                                        <td class="myborder">
                                            {$myloadData->transferproductamount}
                                            {assign var=x value=$x+$myloadData->transferproductamount}
                                        </td>
                                        <td class="myborder {if $usergroupdata->hideBillPrices == 1}hidden{/if}" {if
                                            $loadData[0]->priceType == '' || $loadData[0]->priceType == 'hide'}
                                            style="display:none"{/if}>
                                            {$myloadData->price/$myloadData->transferproductamount}
                                        </td>
                                        <td class="myborder {if $usergroupdata->hideBillPrices == 1}hidden{/if}" {if
                                            $loadData[0]->priceType == '' || $loadData[0]->priceType == 'hide'}
                                            style="display:none"{/if}>
                                            {$myloadData->price}
                                            {assign var=y value=$y+$myloadData->price}
                                        </td>
                                        <!--                                        <td class="myborder">
                                                                                    {$myloadData->transferproductdate}
                                                                                </td>-->



                                    </tr>
                                    {/foreach}
                                </tbody>
                            </table>

                            <br>
                            <button type="button" style="color:black!important; border:1px solid black !important;"
                                class="btn btn-primary pull-left ft-nor">
                                اجمالى الكمية المحولة <span class="badge wht-clo">
                                    <div id="totalQuantityMove" style="color:black!important;">{$x}</div>
                                </span>
                            </button>

                        </div>
                    </div>

                    <!--<hr style="height:2px !important; color:#000 " />-->



                    <div class="form-group noprint">
                        <div class="col-lg-offset-2 col-lg-4">
                            <!--  ----  -->
                            {if count($loadData) > 0 && {$loadData[0]->conditions} eq 0}



                            <!--  ----  -->
                            {if $loadData[0]->recieveType == 1}
                            {if $loadData[0]->recieveUserid != 0}
                            <label style="width:25%">استلم<br /><strong>{$loadData[0]->recieveUserName}</strong></label>
                            {else}
                            {if $userData->storeSupervisor == 1 &&
                            $loadData[0]->storeidto|in_array:$userData->storeSupervisorStores}<a
                                href="storemovementController.php?do=recieveAllproducts&operationnum={$loadData[0]->operationnum}"
                                type="button" class="btn btn-default btn-primary" style="color: white">استلام
                                المشرف</a>{else}<!--غير مسموح-->{/if}
                            <a href="storemovementController.php?do=tempdelete2&operationnum={$loadData[0]->operationnum}"
                                type="button" class="btn btn-default btn-danger" style="color: white">ايقاف</a>
                            {/if}
                            {/if}





                            <button type="button" onclick="print_Custom('mycustomheader');"
                                class="btn btn-success noprint">طباعة</button>

                            <a href="dailyentry.php?id={$loadData[0]->dailyentryid}" target="_blank" type="button"
                                class="hidden-print noprint btn btn-primary" style="color: white">قيد اليومية</a>
                            {/if}
                            <!--  ----  -->

                            <!--<button type="submit"  class="btn btn-primary noprint"> رجوع</button>-->


                        </div>
                    </div>




                </form>
            </div>
        </div>

        <!------------------------old data-------------------------------------->
        {if !empty($oldperationdata)}
        <div class="panel panel-default panel-m noprint">
            <div class="panel-heading">
                <h3 class="panel-title">عرض تفاصيل التحويل القديم</h3>
            </div>
            <div class="panel-body">


                <form class="form-horizontal" role="form" action="otherstoremovementController.php?do=show"
                    method="post">


                    <div class="form-group">
                        <label class="col-lg-2 control-label">رقم السيريال</label>
                        <div class="col-lg-4">
                            {$oldperationdata->oprationnumber}
                        </div>
                    </div>


                    <div class="form-group">
                        <label class="col-lg-2 control-label">التعليق</label>
                        <div class="col-lg-4">

                            {$oldperationdata->comment}

                        </div>
                    </div>


                    <div class="form-group">
                        <label class="col-lg-2 control-label">تاريخ التحويل</label>
                        <div class="col-lg-4">
                            {$oldperationdata->oprationdata}
                        </div>
                    </div>

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

                    <div class="form-group">
                        <!-- end of title row-->
                        <div class="table-responsive">
                            <table class="table billtable table-bordered table-black" id="containerpros">
                                <thead>
                                    <tr>
                                        <th class="wdt200">من </th>
                                        <th class="wdt200">الى</th>
                                        <th class="wdt200">اسم المنتج</th>

                                        <th>الكمية المحولة</th>
                                        <th>التاريخ</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    {foreach $oldloadData as $myloadData}

                                    <tr>

                                        <td>
                                            {$myloadData->storefromName}
                                        </td>

                                        <td>

                                            {$myloadData->storetoName}

                                        </td>
                                        <td>
                                            {$myloadData->productName} / {$myloadData->productCatName}
                                        </td>
                                        <td>
                                            {$myloadData->transferproductamount}
                                        </td>

                                        <td>
                                            {$myloadData->transferproductdate}
                                        </td>



                                    </tr>
                                    {/foreach}
                                </tbody>
                            </table>
                        </div>
                    </div>

                    <hr style="height:2px !important; color:#000 " />




            </div>
        </div>
        {/if}


    </div>
</div>

{literal}
<script>
    print_Custom('mycustomheader');
</script>
{/literal}