<html>
    <head>

        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <title>GT4</title>
        <style type="text/css">
        </style>
    </head>


    {literal}
    <script language="javascript" type="text/javascript">

        function printDiv() {

            var divId = document.getElementById('printdiv');
            divId.setAttribute("className", "print_section print");
            divId.setAttribute("class", "print_section print");
            window.print();

            setTimeout(function ()
            {
                window.close();
                window.location.href = 'priceoffersController.php?do=show';
            }, 500);

            // window.close();
            // window.location.href = 'priceoffersController.php?do=show';
        }
    </script>
    <style>
        .offerprint{
            font-size: 18px;
            font-family: "Arial",sans-serif;
            color: black;
        }
        .tbl{
            border-collapse: collapse;
            border:1px solid #111;
        }
        .tbl th {background:#a6a6a6; font-weight:600;}
        .tbl tr:nth-child(even){background:#ededed;}
        .tbl tr:nth-child(odd){background:#fff;}
        .txtc{text-align:center;}
        .txtr{text-align:right;}
        .txtl{text-align:left;}
        .tbl td li{text-align:left;padding-left:60px;}
        .nostyl{list-style:none;}
    </style>
    {/literal}
    <body onLoad="printDiv()">
        <div class="offerprint" id="printdiv" >
            <table border="0" class="table-black">
                <thead>
                    <tr>
                        <td style="text-align:center;"><img src="../views/default/images/upload/{$Programsettingdata->logo}" alt="" width="122" height="75"></td>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <td ><b>
                                التاريخ:  ‏{$offerpriceData->sysdate}
                                <br/>
                                الرقم: ‏{$offerpriceData->id}-‏{$offerpriceData->serialno}
                            </b></td>
                    </tr>

                    <tr>
                        <td class="txtc"><b><h1 style="text-decoration: underline;">عرض أسعار</h1></b></td>
                    </tr>

                <br /><br />
                <tr>
                    <td class="txtr"><b>السلام عليكم ورحمة الله وبركاته</b></td>
                </tr>
                <br />
                <tr>
                    <td class="txtr"><b>  عناية السيد/   {$clientname}
                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            المحترمون  </b></td>
                </tr>
                <br />
                <tr>
                    <td class="txtr"><b>{$conditionData->introduction}</b></td>
                </tr>
                </tbody>
            </table>


            <br />

            <table  border="1" class="txtc tbl table-black" style="direction:rtl;">
                <tbody>

                    {if {$offerpriceData->totalprice} eq {$offerpriceData->realtotalprice}}
                    <tr>
                        <th colspan="2">
                            <p><strong>م</strong></p>
                        </th>
                        <th>
                            <p><strong>اسم المنتج</strong></p>
                        </th>

                        <th>
                            <p><strong>سعر البيع</strong></p>
                        </th>
                        <th colspan="2">
                            <p><strong>الوصف</strong></p>
                        </th>
                        <th>
                            <p><strong>العدد</strong></p>
                        </th>

                        <th>
                            <p><strong>اجمالى السعر</strong></p>
                        </th>
                    </tr>
                    {assign var=i value=1}
                    {foreach $allproductdata as $data}
                    <tr>
                        <td>
                            <p><strong>{$i}. </strong><strong></strong></p>
                        </td>
                        <td colspan="2">
                            <p>{$data->productName}</p>
                        </td>
                        <td>
                            <p>{$data->sellprice}</p>
                        </td>
                        <td colspan="2">
                            <p>{$data->prodescrption}</p>
                        </td>
                        <td>
                            <p>{$data->pronumber}</p>
                        </td>
                        <td>
                            <p>{$data->totalprice}</p>
                        </td>
                    </tr>
                    {capture assign=i}{$i+1}{/capture}
                    {/foreach}

                    {else}
                    <tr>
                        <th colspan="2">
                            <p><strong>م</strong></p>
                        </th>
                        <th>
                            <p><strong>اسم المنتج</strong></p>
                        </th>
                        <th colspan="2">
                            <p><strong>الوصف</strong></p>
                        </th>
                        <th>
                            <p><strong>العدد</strong></p>
                        </th>
                    </tr>
                    {assign var=i value=1}
                    {foreach $allproductdata as $data}
                    <tr>
                        <td>
                            <p><strong>{$i}. </strong><strong></strong></p>
                        </td>
                        <td colspan="2">
                            <p>{$data->productName}</p>
                        </td>
                        <td colspan="2">
                            <p>{$data->prodescrption}</p>
                        </td>
                        <td>
                            <p>{$data->pronumber}</p>
                        </td>
                    </tr>
                    {capture assign=i}{$i+1}{/capture}
                    {/foreach}
                    {/if}


                    <tr>

                        <td colspan="7" width="552">
                            <p><strong>{$arabic_num}</strong></p>
                        </td>
                        <td colspan="1" width="159">
                            <p><strong>{$offerpriceData->totalprice}</strong></p>
                        </td>

                    </tr>
                </tbody>
            </table>

            <br/>
            <table border="0" class="table-black">

                <tbody>

                    <tr>
                        <td class="txtr" style=" float: right; font-size: 25px; font-weight: bold; text-decoration: underline;"><b>  :الشروط والاحكام  </b></td>
                    </tr>

                    <tr>
                        <td class="txtr"><b>{$conditionData->detail}</b></td>
                    </tr>

                    <tr>
                        <td class="txtc"><b><h3>....وتقبلوا خالص التحية </h3></b></td>
                    </tr>
                    <tr>
                        <td colspan="3" align="right"><p>&nbsp;</p>
                            <p>&nbsp;</p>
                            <p><span class="copywrites"><span class="copywrites" style="font-size: 14px">تصميم شركة جي تي فور 01110070882...</span></span></p></td>
                    </tr>
                </tbody>
            </table>


        </div>

    </body>