<?php /* Smarty version Smarty-3.1.11, created on 2024-01-19 00:07:23
         compiled from "../views/default/returnbuybillview/editprint2a4.html" */ ?>
<?php /*%%SmartyHeaderCode:135556834665a9a11b3a83b0-06858367%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'bd9825f1c475e91fff63d2e6a5b361c0778bfd5c' => 
    array (
      0 => '../views/default/returnbuybillview/editprint2a4.html',
      1 => 1693253994,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '135556834665a9a11b3a83b0-06858367',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'billsettingsData' => 0,
    'billnameAddData' => 0,
    'userData' => 0,
    'Programsettingdata' => 0,
    'branchData' => 0,
    'returnbuybillData' => 0,
    'buyBillData' => 0,
    'Usergroupdata' => 0,
    'returnbuybilldetailData' => 0,
    'detail' => 0,
    'currency' => 0,
    'countBillDetails' => 0,
    'taxvalue' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_65a9a11b4d3934_95164355',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_65a9a11b4d3934_95164355')) {function content_65a9a11b4d3934_95164355($_smarty_tpl) {?>


<html dir="rtl">
    <head>

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

        </style>
    </head>
    <script src="../views/default/assets/js/jquery.js"></script>


    
    <script language="javascript" type="text/javascript">
        /*$(document).ready(function() {
         //window.print();
         printDiv();
         });*/
        function printDiv() {
            var divId = document.getElementById('printdiv');
            divId.setAttribute("className", "print_section print");
            divId.setAttribute("class", "print_section print");
            window.print();
            setTimeout(window.close, 0);
            // window.close();
        }
    </script>
    <style>
        .table-data td,.table-data th
        {
            border: 1px solid #444;
            font-size: 15px;
            text-align: center
        }
        .NEE
        {
            font-size: 14px;
        }
        .newdesign
        {
            font-size: 14px;
        }
        .copywrites
        {
            font-size: 11px;
        }
        .style2 {
            font-family: tahoma
        }
        .style4 {font-family: tahoma; font-size: 12px; font-weight: bold; }
        .hidden{
            display: none;
        }
    </style>
    
    <body  onLoad="printDiv()">
        <div id="printdiv" >
            <!--start title -->
            <div <?php if ($_smarty_tpl->tpl_vars['billsettingsData']->value[70]->billsettingsvalue==0){?><?php }else{ ?>  style="display:none"<?php }?>>
                <h2  style="  text-align:center"><?php echo $_smarty_tpl->tpl_vars['billnameAddData']->value->name;?>
</h2>
            </div>
            <!-- end title -->
            <table class="table-black"  border="0" cellpadding="0" cellspacing="0">
                <tr>
                    <td width="142" colspan="2" align="right" valign="top"><p><strong>

                                <?php if ($_smarty_tpl->tpl_vars['billsettingsData']->value[72]->billsettingsvalue==0||$_smarty_tpl->tpl_vars['userData']->value->branchId==0||$_smarty_tpl->tpl_vars['userData']->value->branchId==-1){?>
                                <img src="../views/default/images/upload/<?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->logo;?>
" alt="" width="122" height="75"><br>
                                <?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->phone;?>
<br>
                                <?php }else{ ?>
                                <img src="../views/default/images/branch_image/<?php echo $_smarty_tpl->tpl_vars['branchData']->value->logo;?>
" alt="" width="134" height="49"><br>
                                <?php echo $_smarty_tpl->tpl_vars['branchData']->value->mobile;?>
<br>
                                <?php }?>

                                </td>
                                </tr>
                                </table>

                                <table align="right" width="60%">


                                    <tr <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[16]->billsettingsvalue;?>
<?php $_tmp1=ob_get_clean();?><?php if ($_tmp1==0){?>  <?php }else{ ?> style="display:none !important" <?php }?>>
                                        <td align="right">
                                            <span>اسم المورد :</span>
                                            <span> <?php echo $_smarty_tpl->tpl_vars['returnbuybillData']->value->suppliername;?>
</span>
                                        </td>
                                    </tr>

                                    <!-- <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[18]->billsettingsvalue;?>
<?php $_tmp2=ob_get_clean();?><?php if ($_tmp2==0){?>
                                    <tr>
                                        <td align="right"> <?php echo $_smarty_tpl->tpl_vars['buyBillData']->value->buybilltotaldeptbefor;?>
:  </td>
                                    </tr>
                                    <?php }?> -->
                                    <tr  <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[61]->billsettingsvalue;?>
<?php $_tmp3=ob_get_clean();?><?php if ($_tmp3==0){?>  <?php }else{ ?> style="display:none !important" <?php }?>>
                                        <td align="right">
                                            <span>  رقم الفاتورة :</span>
                                            <span><?php echo $_smarty_tpl->tpl_vars['returnbuybillData']->value->returnbuybillSerial;?>
</span></td>
                                    </tr>
                                    <tr>
                                        <td align="right" >
                                            <span>  التاريخ:</span>
                                            <span><?php echo $_smarty_tpl->tpl_vars['returnbuybillData']->value->returnbuybilldate;?>
</span>
                                        </td>
                                    </tr>
                                    <tr class="<?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[18]->billsettingsvalue;?>
<?php $_tmp4=ob_get_clean();?><?php if ($_tmp4==0){?>  <?php }else{ ?> style="display:none !important" <?php }?>>
                                        <td dir="rtl">
                                            <span>الدين قبل :</span>
                                            <span> <?php echo $_smarty_tpl->tpl_vars['returnbuybillData']->value->buybilltotaldeptbefor;?>
</span>
                                        </td>
                                    </tr>
                                </table>
                                <table align="right" width="40%">

                                    <tr  <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[15]->billsettingsvalue;?>
<?php $_tmp5=ob_get_clean();?><?php if ($_tmp5==0){?>  <?php }else{ ?> style="display:none !important" <?php }?>>
                                        <td align="right">
                                            <span> رقم تسلسل الفاتورة :</span>
                                            <span><?php echo $_smarty_tpl->tpl_vars['returnbuybillData']->value->returnbuybillid;?>
</span> </td>
                                    </tr>

                                    <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->saveprinting;?>
<?php $_tmp6=ob_get_clean();?><?php if ($_tmp6==1){?>
                                    <tr>
                                        <td  align="right">
                                            <span>اسم المخزن:</span>
                                            <span> <?php echo $_smarty_tpl->tpl_vars['returnbuybillData']->value->storeName;?>
</span> </td>
                                    </tr>
                                    <?php }?>

                                    <tr <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[22]->billsettingsvalue;?>
<?php $_tmp7=ob_get_clean();?><?php if ($_tmp7==0){?><?php }else{ ?> style="display:none !important" <?php }?>>
                                        <td  align="right">
                                            <span>التعليق: </span>
                                            <span> <?php echo $_smarty_tpl->tpl_vars['returnbuybillData']->value->comment;?>
</span> </td>
                                    </tr>
                                </table>

                                <table width="100%"  cellpadding="0" cellspacing="0" dir="rtl" class="table-data">

                                    <tr>
                                        <th class="wdt20" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[40]->billsettingsvalue;?>
<?php $_tmp8=ob_get_clean();?><?php if ($_tmp8==0){?>  <?php }else{ ?> style="display:none !important;" <?php }?>>رقم</th>
                                        <td align="center"<?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[59]->billsettingsvalue;?>
<?php $_tmp9=ob_get_clean();?><?php if ($_tmp9==0){?> <?php }else{ ?>  style="display:none"    <?php }?> class="wdt120">الباركود</td>

                                        <td align="center" c>اسم المنتج</td>

                                        <td  align="center"<?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[7]->billsettingsvalue;?>
<?php $_tmp10=ob_get_clean();?><?php if ($_tmp10==0){?>  <?php }else{ ?> style="display:none !important" <?php }?> >ملاحظات</td>

                                        <td align="center" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[53]->billsettingsvalue;?>
<?php $_tmp11=ob_get_clean();?><?php if ($_tmp11==0){?>  <?php }else{ ?> style="display:none !important" <?php }?> >الوحدة</td>
                                        <td align="center" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[64]->billsettingsvalue;?>
<?php $_tmp12=ob_get_clean();?><?php if ($_tmp12==0){?> <?php }else{ ?>  style="display:none"    <?php }?>>العدد</td>
                                        <td align="center"   <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->scunitname;?>
<?php $_tmp13=ob_get_clean();?><?php if ($_tmp13=='0'){?>  hidden <?php }?> ><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->scunitname;?>
</td>

                                        <td align="center" class="<?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>">السعر</td>

                                        <td align="center" class="<?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[23]->billsettingsvalue;?>
<?php $_tmp14=ob_get_clean();?><?php if ($_tmp14==0){?> <?php }else{ ?>  style="display:none"    <?php }?> >الخصم</td>
                                        <td align="center" class="<?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>"> الاجمالى</td>


                                    </tr>



                                    <?php  $_smarty_tpl->tpl_vars['detail'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['detail']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['returnbuybilldetailData']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
 $_smarty_tpl->tpl_vars['detail']->iteration=0;
foreach ($_from as $_smarty_tpl->tpl_vars['detail']->key => $_smarty_tpl->tpl_vars['detail']->value){
$_smarty_tpl->tpl_vars['detail']->_loop = true;
 $_smarty_tpl->tpl_vars['detail']->iteration++;
?>
                                    <tr>
                                        <td <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[40]->billsettingsvalue;?>
<?php $_tmp15=ob_get_clean();?><?php if ($_tmp15==0){?>  <?php }else{ ?> style="display:none !important;" <?php }?>><?php echo $_smarty_tpl->tpl_vars['detail']->iteration;?>
</td>
                                        <td <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[59]->billsettingsvalue;?>
<?php $_tmp16=ob_get_clean();?><?php if ($_tmp16==0){?> <?php }else{ ?>  style="display:none !important;"    <?php }?>>

                                            <?php echo $_smarty_tpl->tpl_vars['detail']->value->parcode;?>


                                        </td>

                                        <td>

                                            <?php echo $_smarty_tpl->tpl_vars['detail']->value->productName;?>
 / <?php echo $_smarty_tpl->tpl_vars['detail']->value->productCatName;?>

                                            <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[79]->billsettingsvalue;?>
<?php $_tmp17=ob_get_clean();?><?php if ($_tmp17==0){?>
                                            <?php if (isset($_smarty_tpl->tpl_vars['detail']->value->sizeName)&&$_smarty_tpl->tpl_vars['detail']->value->sizeName!=''){?>/<?php echo $_smarty_tpl->tpl_vars['detail']->value->sizeName;?>
<?php }?>
                                            <?php if (isset($_smarty_tpl->tpl_vars['detail']->value->colorName)&&$_smarty_tpl->tpl_vars['detail']->value->colorName!=''){?>/<?php echo $_smarty_tpl->tpl_vars['detail']->value->colorName;?>
<?php }?>
                                            <?php }?>

                                        </td>


                                        <td <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[7]->billsettingsvalue;?>
<?php $_tmp18=ob_get_clean();?><?php if ($_tmp18==0){?>  <?php }else{ ?>  style="display:none !important"  <?php }?>>

                                            <?php echo $_smarty_tpl->tpl_vars['detail']->value->note;?>


                                        </td>


                                        <td <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[53]->billsettingsvalue;?>
<?php $_tmp19=ob_get_clean();?><?php if ($_tmp19==0){?>  <?php }else{ ?> style="display:none !important" <?php }?>>

                                            <?php echo $_smarty_tpl->tpl_vars['detail']->value->unitName;?>


                                        </td>




                                        <td <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[64]->billsettingsvalue;?>
<?php $_tmp20=ob_get_clean();?><?php if ($_tmp20==0){?> <?php }else{ ?>  style="display:none"    <?php }?>>

                                            <?php echo $_smarty_tpl->tpl_vars['detail']->value->returnbuybilldetailquantity;?>


                                        </td>
                                        <td  <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->scunitname;?>
<?php $_tmp21=ob_get_clean();?><?php if ($_tmp21=='0'){?>  hidden <?php }?> >
                                            <?php echo $_smarty_tpl->tpl_vars['detail']->value->otherdetailquantity;?>


                                        </td>


                                        <td class="<?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>">

                                            <?php echo $_smarty_tpl->tpl_vars['detail']->value->returnbuybilldetailprice;?>
 <?php echo $_smarty_tpl->tpl_vars['currency']->value;?>


                                        </td>



                                        <td class="<?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[23]->billsettingsvalue;?>
<?php $_tmp22=ob_get_clean();?><?php if ($_tmp22==0){?>  <?php }else{ ?> style="display:none !important" <?php }?>>

                                            <?php echo $_smarty_tpl->tpl_vars['detail']->value->discountvalue;?>


                                        </td>


                                        <td class="<?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>">

                                            <?php echo $_smarty_tpl->tpl_vars['detail']->value->returnbuybilldetailtotalprice;?>


                                        </td>





                                    </tr>

                                    <?php } ?>

                                </table>
                                <table width="50%"  align="left" cellpadding="0" cellspacing="0"  dir="rtl" class="table-data <?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>">
                                    <tr <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[58]->billsettingsvalue;?>
<?php $_tmp23=ob_get_clean();?><?php if ($_tmp23==0){?> <?php }else{ ?>  style="display:none"    <?php }?>>
                                        <td>اجمالي  القطع</td>
                                        <td><?php echo $_smarty_tpl->tpl_vars['countBillDetails']->value;?>
</td>
                                    </tr>
                                    <tr>
                                        <td>اجمالي الفاتوره</td>
                                        <td><?php echo $_smarty_tpl->tpl_vars['returnbuybillData']->value->returnbuybilltotalbill;?>
</td>
                                    </tr>


                                    <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['returnbuybillData']->value->returnbuybilldiscount;?>
<?php $_tmp24=ob_get_clean();?><?php if ($_tmp24>0){?>
                                    <tr <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[57]->billsettingsvalue;?>
<?php $_tmp25=ob_get_clean();?><?php if ($_tmp25==0){?> <?php }else{ ?>  style="display:none"    <?php }?>>
                                        <td>نوع الخصم</td>
                                        <td>
                                            <?php if ($_smarty_tpl->tpl_vars['returnbuybillData']->value->returnbuybilldiscountrype==0){?>
                                            مباشر
                                            <?php }else{ ?>
                                            بنسبة
                                            <?php }?>
                                        </td>
                                    </tr>

                                    <tr <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[57]->billsettingsvalue;?>
<?php $_tmp26=ob_get_clean();?><?php if ($_tmp26==0){?> <?php }else{ ?>  style="display:none"    <?php }?>>
                                        <td>قيمه الخصم</td>
                                        <td>  <?php echo $_smarty_tpl->tpl_vars['returnbuybillData']->value->returnbuybilldiscount;?>
 </td>
                                    </tr>
                                    <?php }?>
                                    <!---------------------ضريبه المبيعات-->
                                    <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[36]->billsettingsvalue;?>
<?php $_tmp27=ob_get_clean();?><?php if ($_tmp27==0){?>
                                    <tr>
                                        <td>  ضريبه القيمة المضافة</td>
                                        <!--<td><?php echo $_smarty_tpl->tpl_vars['returnbuybillData']->value->payedtax;?>
 %</td>-->
                                        <td><?php echo $_smarty_tpl->tpl_vars['taxvalue']->value;?>
<?php echo $_smarty_tpl->tpl_vars['currency']->value;?>
 (<?php echo $_smarty_tpl->tpl_vars['returnbuybillData']->value->payedtax;?>
%)</td>
                                    </tr>
                                    <?php }?>
                                    <tr <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[51]->billsettingsvalue;?>
<?php $_tmp28=ob_get_clean();?><?php if ($_tmp28==0){?> <?php }else{ ?>  style="display:none"    <?php }?>>
                                        <td>المبلغ بعد الخصم</td>
                                        <td><?php echo $_smarty_tpl->tpl_vars['returnbuybillData']->value->returnbuybillaftertotalbill;?>
 <?php echo $_smarty_tpl->tpl_vars['currency']->value;?>
</td>
                                    </tr>
                                    <tr <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[54]->billsettingsvalue;?>
<?php $_tmp29=ob_get_clean();?><?php if ($_tmp29==0){?> <?php }else{ ?>  style="display:none"    <?php }?>>



                                        <td>المدفوع</td>
                                        <td> <?php echo $_smarty_tpl->tpl_vars['returnbuybillData']->value->returnbuybilltotalpayed;?>
<?php echo $_smarty_tpl->tpl_vars['currency']->value;?>
</td>
                                    </tr>
                                    <tr <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[54]->billsettingsvalue;?>
<?php $_tmp30=ob_get_clean();?><?php if ($_tmp30==0){?> <?php }else{ ?>  style="display:none"    <?php }?>>
                                        <td>المتبقى</td>
                                        <td><?php echo $_smarty_tpl->tpl_vars['returnbuybillData']->value->returnbuybillfinalbill;?>
 <?php echo $_smarty_tpl->tpl_vars['currency']->value;?>
</td>
                                    </tr>

                                    <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['returnbuybillData']->value->returnbuybilltotaldeptafter;?>
<?php $_tmp31=ob_get_clean();?><?php if ($_tmp31!=0){?>
                                    <tr <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[54]->billsettingsvalue;?>
<?php $_tmp32=ob_get_clean();?><?php if ($_tmp32==0){?> <?php }else{ ?>  style="display:none"    <?php }?>>
                                        <td>إجمالى المديونيه</td>
                                        <td><?php echo $_smarty_tpl->tpl_vars['returnbuybillData']->value->returnbuybilltotaldeptafter;?>
<?php echo $_smarty_tpl->tpl_vars['currency']->value;?>
</td>
                                    </tr>
                                    <?php }?>

                                </table>
                                <div style="clear:both"></div>
                                <p class="NEE" style="text-align: center"><strong>
                                        <?php if ($_smarty_tpl->tpl_vars['billsettingsData']->value[72]->billsettingsvalue==0||$_smarty_tpl->tpl_vars['userData']->value->branchId==0||$_smarty_tpl->tpl_vars['userData']->value->branchId==-1){?>
                                        <?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->address;?>

                                        <?php }else{ ?>
                                        <?php echo $_smarty_tpl->tpl_vars['branchData']->value->branchAddress;?>

                                        <?php }?>
                                    </strong></p>
                                <p style="text-align: center"><span class="copywrites"  style="text-align: center">تصميم شركة جي تي فور 01110070882...</span></p>


                                </div>
                                </body><?php }} ?>