<?php /* Smarty version Smarty-3.1.11, created on 2025-02-12 03:43:39
         compiled from "../views/default/sellbillview/editprint2a4.html" */ ?>
<?php /*%%SmartyHeaderCode:11535531767abfccb12a090-22690057%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'fea081a966558f0d98fec5ac168507c234897a52' => 
    array (
      0 => '../views/default/sellbillview/editprint2a4.html',
      1 => 1694467940,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '11535531767abfccb12a090-22690057',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'billsettingsData' => 0,
    'userData' => 0,
    'Programsettingdata' => 0,
    'branchData' => 0,
    'billnameAddData' => 0,
    'sellbillData' => 0,
    'clientdata' => 0,
    'manyStores' => 0,
    'billUserData' => 0,
    'Usergroupdata' => 0,
    'sellbilldetailData' => 0,
    'sellbilldetail' => 0,
    'quantity' => 0,
    'totalWritten' => 0,
    'discountvalue' => 0,
    'taxvalue' => 0,
    'currency' => 0,
    'billPayments' => 0,
    'data' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_67abfccb38e996_66138036',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_67abfccb38e996_66138036')) {function content_67abfccb38e996_66138036($_smarty_tpl) {?><html dir="rtl">

<head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <title>GT4</title>
    <style type="text/css">
        @media print {
            @page {
                size: 100mm 200mm landscape;
                /* landscape */
                /* you can also specify margins here: */
                margin: 5mm;
                margin-right: 5mm;
                /* for compatibility with both A4 and Letter */
            }

            #printdiv {
                margin-top: {
                    $billsettingsData[82]->billsettingsvalue
                }

                mm;
                /* user margin */
            }
        }

        .hidden {
            display: none;
        }
    </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>
    .td td {
        border-right-widtd: 1px;
        border-bottom-widtd: 1px;

        border-bottom-color: #999;
        font-size: 13px;
        border-right-color: #999;
    }

    .NEE {
        font-size: 14px;
    }

    .newdesign {
        font-size: 14px;
    }

    .copywrites {
        font-size: 11px;
    }

    table.border-data td {
        border: 1px solid #000;
        text-align: center
    }

    td {
        font-size: 13px
    }
</style>



<body onLoad="printDiv()">
    <div id="printdiv">
        <b>


            <!-- width="<?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[25]->billsettingsvalue;?>
<?php $_tmp1=ob_get_clean();?><?php if ($_tmp1==0){?>420  <?php }else{ ?> 250<?php }?>" -->
            <table width="100%" border="0" cellpadding="0" cellspacing="0">
                <tr>
                    <td width="142" colspan="2" align="right" valign="top" <?php if ($_smarty_tpl->tpl_vars['billsettingsData']->value[72]->billsettingsvalue==2){?>style="display:none;"<?php }?>>
                        <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="134"
                                    height="49"><br>
                                <?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->phone;?>

                                <?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;?>

                                <?php }?>
                            </strong></p>
                    </td>
                </tr>
                <tr>
                    <td></td>
                    <td></td>
                    <td <?php if ($_smarty_tpl->tpl_vars['billsettingsData']->value[70]->billsettingsvalue==0){?><?php }else{ ?> style="display:none"<?php }?> colspan="2"
                        align="center" class="style1" dir="rtl">
                        <h1 style="float:right; text-align:center"><?php echo $_smarty_tpl->tpl_vars['billnameAddData']->value->name;?>
</h1>
                    </td>
                </tr>

            </table>
            <h3 style="margin: 0;text-align: center!important">فاتورة المبيعات</h3>

            <table width="50%" style="float:right">
                <tr <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[16]->billsettingsvalue;?>
<?php $_tmp2=ob_get_clean();?><?php if ($_tmp2==0){?> <?php }else{ ?> style="display:none !important" <?php }?>>

                    <td dir="rtl">
                        <span> اسم العميل :</span>
                        <span> <?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->tempclientName;?>
 </span>
                    </td>

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

                    <td dir="rtl">
                        <span> عنوان العميل : </span>
                        <span> <?php echo $_smarty_tpl->tpl_vars['clientdata']->value->clientaddress;?>
</span>
                    </td>

                </tr>
                <tr <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[39]->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['clientdata']->value->clientphone;?>
</span>
                    </td>

                </tr>

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

                    <td dir="rtl">
                        <span>كود العميل :</span>
                        <span><?php echo $_smarty_tpl->tpl_vars['clientdata']->value->clientcode;?>
</span>
                    </td>

                </tr>
                <tr <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[15]->billsettingsvalue;?>
<?php $_tmp6=ob_get_clean();?><?php if ($_tmp6==0&&$_smarty_tpl->tpl_vars['Programsettingdata']->value->clientserial==1){?> <?php }else{ ?>
                    style="display:none !important" <?php }?>>
                    <td dir="rtl">
                        <span>رقم الفاتورة :</span>
                        <span> <?php if ($_smarty_tpl->tpl_vars['sellbillData']->value->taxBillNumber>0){?><?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->taxBillNumber;?>
<?php }else{ ?><?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->sellbillid;?>
<?php }?></span>
                    </td>

                </tr>
                <tr>
                    <td dir="rtl">
                        <span>التاريخ :</span>
                        <span> <?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->sellbillsysdate;?>
</span>
                    </td>

                </tr>
            </table>
            <table width="45%" style="float:left">
                <tr <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[3]->billsettingsvalue;?>
<?php $_tmp7=ob_get_clean();?><?php if ($_tmp7==0){?> <?php }else{ ?> style="display:none" <?php }?>>
                    <td dir="rtl">
                        <span> <?php if ($_smarty_tpl->tpl_vars['Programsettingdata']->value->delegate_seller==0){?> بائع <?php }elseif($_smarty_tpl->tpl_vars['Programsettingdata']->value->delegate_seller==1){?>مندوب <?php }elseif($_smarty_tpl->tpl_vars['Programsettingdata']->value->delegate_seller==2){?>طبيب <?php }?> :</span>
                        <span><?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->employeename;?>
</span>

                    </td>

                </tr>

                <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->saveprinting;?>
<?php $_tmp8=ob_get_clean();?><?php if ($_tmp8==1&&$_smarty_tpl->tpl_vars['manyStores']->value!=1){?>
                <tr>
                    <td dir="rtl">
                        <span> اسم المخزن :</span>
                        <span> <?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->storeName;?>
</span>
                    </td>

                </tr>
                <?php }?>
                <tr>
                    <td align="right">
                        <span>اسم المستخدم:</span>
                        <span> <?php echo $_smarty_tpl->tpl_vars['billUserData']->value->employeename;?>
 </span>
                    </td>
                </tr>

                <tr <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[101]->billsettingsvalue;?>
<?php $_tmp9=ob_get_clean();?><?php if ($_tmp9==0){?> <?php }else{ ?> style="display:none" <?php }?>>
                    <td dir="rtl">
                        <span> عملية الفاتورة :</span>
                        <span> <?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->billoperationName;?>
</span>
                    </td>

                </tr>

                <tr <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[22]->billsettingsvalue;?>
<?php $_tmp10=ob_get_clean();?><?php if ($_tmp10==0){?> <?php }else{ ?> style="display:none" <?php }?>>
                    <td dir="rtl">
                        <span> التعليق :</span>
                        <span> <?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->comment;?>
</span>
                    </td>

                </tr>
            </table>

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

                <tr>
                    <td align="center" bgcolor="#E8E8E8">م</td>
                    <td align="center" bgcolor="#E8E8E8" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[20]->billsettingsvalue;?>
<?php $_tmp11=ob_get_clean();?><?php if ($_tmp11==0){?> <?php }else{ ?>
                        style="display:none !important" <?php }?> class="wdt120">الباركود</td>
                    <td align="center" bgcolor="#E8E8E8" c>اسم المنتج</td>
                    <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[26]->billsettingsvalue;?>
<?php $_tmp12=ob_get_clean();?><?php if ($_tmp12==0&&$_smarty_tpl->tpl_vars['billsettingsData']->value[108]->billsettingsvalue==0){?>
                    <td align="center" bgcolor="#E8E8E8">المخزن</td>
                    <?php }?>
                    <td align="center" bgcolor="#E8E8E8" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[7]->billsettingsvalue;?>
<?php $_tmp13=ob_get_clean();?><?php if ($_tmp13==0){?> <?php }else{ ?>
                        style="display:none !important" <?php }?> >ملاحظات</td>

                    <td align="center" bgcolor="#E8E8E8" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[21]->billsettingsvalue;?>
<?php $_tmp14=ob_get_clean();?><?php if ($_tmp14==0){?> <?php }else{ ?>
                        style="display:none !important" <?php }?> >الوحدة</td>


                    <td align="center" bgcolor="#E8E8E8" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[46]->billsettingsvalue;?>
<?php $_tmp15=ob_get_clean();?><?php if ($_tmp15==0){?> <?php }else{ ?>
                        style="display:none" <?php }?>>العدد</td>
                    <td align="center" bgcolor="#E8E8E8" <?php if ($_smarty_tpl->tpl_vars['Programsettingdata']->value->scunitname=='0'||$_smarty_tpl->tpl_vars['billsettingsData']->value[67]->billsettingsvalue==1){?> hidden <?php }?>
                        ><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->scunitname;?>
</td>
                    <td class="<?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>" align="center" bgcolor="#E8E8E8">
                        السعر</td>
                    <td class="<?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>" align="center" bgcolor="#E8E8E8" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[23]->billsettingsvalue;?>
<?php $_tmp16=ob_get_clean();?><?php if ($_tmp16==0){?> <?php }else{ ?> style="display:none !important" <?php }?>
                        >الخصم</td>
                    <td class="<?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>" align="center" bgcolor="#E8E8E8" <?php if ($_smarty_tpl->tpl_vars['Programsettingdata']->value->ratioshow==0){?> style="display:none !important" <?php }?>>النسيه</td>
                    <td class="<?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>" align="center" bgcolor="#E8E8E8">
                        الاجمالى</td>


                </tr>

                <?php  $_smarty_tpl->tpl_vars['sellbilldetail'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['sellbilldetail']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['sellbilldetailData']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
 $_smarty_tpl->tpl_vars['sellbilldetail']->index=-1;
foreach ($_from as $_smarty_tpl->tpl_vars['sellbilldetail']->key => $_smarty_tpl->tpl_vars['sellbilldetail']->value){
$_smarty_tpl->tpl_vars['sellbilldetail']->_loop = true;
 $_smarty_tpl->tpl_vars['sellbilldetail']->index++;
?>
                <tr>
                    <td align="center"><?php echo $_smarty_tpl->tpl_vars['sellbilldetail']->index+1;?>
</td>
                    <td align="center" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[20]->billsettingsvalue;?>
<?php $_tmp17=ob_get_clean();?><?php if ($_tmp17==0){?> <?php }else{ ?> style="display:none
                        !important" <?php }?>>
                        <?php echo $_smarty_tpl->tpl_vars['sellbilldetail']->value->parcode;?>

                    </td>
                    <td align="center" dir="ltr">
                        <?php echo $_smarty_tpl->tpl_vars['sellbilldetail']->value->productName;?>
<?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[60]->billsettingsvalue;?>
<?php $_tmp18=ob_get_clean();?><?php if ($_tmp18==0){?>/
                        <?php echo $_smarty_tpl->tpl_vars['sellbilldetail']->value->productCatName;?>
<?php }?>
                        <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[79]->billsettingsvalue;?>
<?php $_tmp19=ob_get_clean();?><?php if ($_tmp19==0){?>
                        <?php if (isset($_smarty_tpl->tpl_vars['sellbilldetail']->value->sizeName)&&$_smarty_tpl->tpl_vars['sellbilldetail']->value->sizeName!=''){?>/<?php echo $_smarty_tpl->tpl_vars['sellbilldetail']->value->sizeName;?>
<?php }?>
                        <?php if (isset($_smarty_tpl->tpl_vars['sellbilldetail']->value->colorName)&&$_smarty_tpl->tpl_vars['sellbilldetail']->value->colorName!=''){?>/<?php echo $_smarty_tpl->tpl_vars['sellbilldetail']->value->colorName;?>
<?php }?>
                        <?php }?>

                        <?php if ($_smarty_tpl->tpl_vars['sellbilldetail']->value->soldSerialsInDetails!=''){?> (sn: <?php echo $_smarty_tpl->tpl_vars['sellbilldetail']->value->soldSerialsInDetails;?>
)
                        <?php }?>
                    </td>

                    <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[26]->billsettingsvalue;?>
<?php $_tmp20=ob_get_clean();?><?php if ($_tmp20==0&&$_smarty_tpl->tpl_vars['billsettingsData']->value[108]->billsettingsvalue==0){?>
                    <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['sellbilldetail']->value->storeName;?>
<?php $_tmp21=ob_get_clean();?><?php if ($_tmp21!=''){?>
                        <td align="center" dir="ltr">
                            <div id="productparcode1">
                                <p class="form-control-static"> <?php echo $_smarty_tpl->tpl_vars['sellbilldetail']->value->storeName;?>
 </p>
                            </div>
                        </td>
                        <?php }else{ ?>
                        <td align="center" dir="ltr">
                            <div id="productparcode1">
                                <p class="form-control-static">

                                    <?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->storeName;?>

                                </p>
                            </div>
                        </td>
                        <?php }?>
                        <?php }?>

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

                        </td>
                        <td align="center" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[21]->billsettingsvalue;?>
<?php $_tmp23=ob_get_clean();?><?php if ($_tmp23==0){?> <?php }else{ ?>
                            style="display:none !important" <?php }?>>
                            <?php echo $_smarty_tpl->tpl_vars['sellbilldetail']->value->unitName;?>

                        </td>
                        <td align="center" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[46]->billsettingsvalue;?>
<?php $_tmp24=ob_get_clean();?><?php if ($_tmp24==0){?> <?php }else{ ?>
                            style="display:none" <?php }?>>
                            <?php echo $_smarty_tpl->tpl_vars['sellbilldetail']->value->sellbilldetailquantity;?>

                        </td>
                        <td align="center" <?php if ($_smarty_tpl->tpl_vars['Programsettingdata']->value->scunitname=='0'||$_smarty_tpl->tpl_vars['billsettingsData']->value[67]->billsettingsvalue==1){?> hidden <?php }?>>
                            <?php echo $_smarty_tpl->tpl_vars['sellbilldetail']->value->otherdetailquantity;?>

                        </td>
                        <td class="<?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>" align="center">
                            <?php echo $_smarty_tpl->tpl_vars['sellbilldetail']->value->sellbilldetailprice;?>

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

                        </td>
                        <td class="<?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>" <?php if ($_smarty_tpl->tpl_vars['Programsettingdata']->value->ratioshow==0){?> style="display:none !important" <?php }?>>
                            <?php echo $_smarty_tpl->tpl_vars['sellbilldetail']->value->discounttype;?>

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

                        </td>
                </tr>
                <?php } ?>
                <tfoot>
                    <tr>
                        <td>الاجمالى</td>
                        <td align="center" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[20]->billsettingsvalue;?>
<?php $_tmp26=ob_get_clean();?><?php if ($_tmp26==0){?> <?php }else{ ?>
                            style="display:none !important" <?php }?>></td>
                        <td align="center"></td>
                        <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[26]->billsettingsvalue;?>
<?php $_tmp27=ob_get_clean();?><?php if ($_tmp27==0&&$_smarty_tpl->tpl_vars['billsettingsData']->value[108]->billsettingsvalue==0){?>
                        <td align="center"></td>
                        <?php }?>
                        <td align="center" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[7]->billsettingsvalue;?>
<?php $_tmp28=ob_get_clean();?><?php if ($_tmp28==0){?> <?php }else{ ?>
                            style="display:none !important" <?php }?>></td>

                        <td <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[21]->billsettingsvalue;?>
<?php $_tmp29=ob_get_clean();?><?php if ($_tmp29==0){?> <?php }else{ ?> style="display:none !important"
                            <?php }?>></td>
                        <td align="center" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[46]->billsettingsvalue;?>
<?php $_tmp30=ob_get_clean();?><?php if ($_tmp30==0){?> <?php }else{ ?>
                            style="display:none" <?php }?>>
                            <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[41]->billsettingsvalue;?>
<?php $_tmp31=ob_get_clean();?><?php if ($_tmp31==0){?>
                            <?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->sellQuantity;?>

                            <?php }?>
                        </td>
                        <td <?php if ($_smarty_tpl->tpl_vars['Programsettingdata']->value->scunitname=='0'||$_smarty_tpl->tpl_vars['billsettingsData']->value[67]->billsettingsvalue==1){?>
                            hidden <?php }?>>
                            <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->sellQuantity;?>
<?php $_tmp32=ob_get_clean();?><?php if ($_tmp32<=0){?> <?php echo $_smarty_tpl->tpl_vars['quantity']->value;?>
 <?php }else{ ?> <?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->sellQuantity;?>

                                <?php }?>
                        </td>
                        <!-- <td <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[46]->billsettingsvalue;?>
<?php $_tmp33=ob_get_clean();?><?php if ($_tmp33==0){?> <?php }else{ ?>  style="display:none"<?php }?>></td> -->
                        <td class="<?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>"></td>
                        <td class="<?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>" align="center" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[23]->billsettingsvalue;?>
<?php $_tmp34=ob_get_clean();?><?php if ($_tmp34==0){?> <?php }else{ ?> style="display:none !important"
                            <?php }?>> </td>
                        <td class="<?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>" <?php if ($_smarty_tpl->tpl_vars['Programsettingdata']->value->ratioshow==0){?> style="display:none !important" <?php }?>></td>
                        <td class="<?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>">
                            <?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->sellbilltotalbill;?>
</td>
                    </tr>
                </tfoot>

            </table>

            <div align="right" dir="rtl" style="margin-top:5px;margin-right:5px;display: inline-block;width: 60%;">
                <p class="<?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>"><?php echo $_smarty_tpl->tpl_vars['totalWritten']->value;?>
</p>
            </div>

            <table class="td border-data <?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>" width="35%" border="0"
                align="left" cellpadding="0" cellspacing="0" dir="rtl" style="margin-top:5px">
                <!--                    <tr <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[58]->billsettingsvalue;?>
<?php $_tmp35=ob_get_clean();?><?php if ($_tmp35==0){?> <?php }else{ ?>  style="display:none"    <?php }?>>
                                            <td>اجمالي  القطع</td>
                                            <td>
                                                <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->sellQuantity;?>
<?php $_tmp36=ob_get_clean();?><?php if ($_tmp36<=0){?>
                                                <?php echo $_smarty_tpl->tpl_vars['quantity']->value;?>

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

                                                <?php }?>
                                            </td>
                                        </tr>-->
                <!--                    <tr>
                                            <td>اجمالي الفاتوره</td>
                                            <td><?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->sellbilltotalbill;?>
</td>
                                        </tr>-->

                <?php if ($_smarty_tpl->tpl_vars['sellbillData']->value->extraDiscountVal>0&&$_smarty_tpl->tpl_vars['billsettingsData']->value[90]->billsettingsvalue==1&&$_smarty_tpl->tpl_vars['billnameAddData']->value->extraDiscountPlace==1){?>
                <tr>
                    <td>خصم اضافى</td>
                    <td><?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->extraDiscountVal;?>
</td>
                </tr>
                <?php }?>
                <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->sellbilldiscount;?>
<?php $_tmp37=ob_get_clean();?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[47]->billsettingsvalue;?>
<?php $_tmp38=ob_get_clean();?><?php if ($_tmp37>0&&$_tmp38==0){?>
                <!--                    <tr <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[23]->billsettingsvalue;?>
<?php $_tmp39=ob_get_clean();?><?php if ($_tmp39==0){?> <?php }else{ ?>  style="display:none"    <?php }?>>

                                            <td>نوع الخصم</td>
                                            <td>
                                                <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->sellbilldiscounttype;?>
<?php $_tmp40=ob_get_clean();?><?php if ($_tmp40==1){?>
                                                مباشر
                                                <?php }else{ ?>
                                                بنسبة
                                                <?php }?>
                                            </td>
                                        </tr>-->

                <tr <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->sellbilldiscount;?>
<?php $_tmp41=ob_get_clean();?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[47]->billsettingsvalue;?>
<?php $_tmp42=ob_get_clean();?><?php if ($_tmp41>0&&$_tmp42==0){?> <?php }else{ ?>
                    style="display:none" <?php }?>>
                    <td>قيمه الخصم</td>
                    <td> <?php echo $_smarty_tpl->tpl_vars['discountvalue']->value;?>
<?php if ($_smarty_tpl->tpl_vars['sellbillData']->value->sellbilldiscounttype==2){?>(%<?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->sellbilldiscount;?>
)<?php }?></td>
                </tr>
                <?php }?>
                <?php if ($_smarty_tpl->tpl_vars['sellbillData']->value->extraDiscountVal>0&&$_smarty_tpl->tpl_vars['billsettingsData']->value[90]->billsettingsvalue==1&&$_smarty_tpl->tpl_vars['billnameAddData']->value->extraDiscountPlace==0){?>
                <tr>
                    <td>خصم اضافى</td>
                    <td><?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->extraDiscountVal;?>
</td>
                </tr>
                <?php }?>

                <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[31]->billsettingsvalue;?>
<?php $_tmp43=ob_get_clean();?><?php if ($_tmp43==0&&$_smarty_tpl->tpl_vars['taxvalue']->value>0){?>
                <tr>
                    <td>ضريبه القيمة المضافة</td>
                    <td>
                        <?php echo $_smarty_tpl->tpl_vars['taxvalue']->value;?>
<?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->currancy;?>
 (<?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->tax;?>
%)</td>
                </tr>
                <?php }?>
                <?php if ($_smarty_tpl->tpl_vars['billnameAddData']->value->taxOfDiscountPrint==0&&$_smarty_tpl->tpl_vars['sellbillData']->value->taxOfDiscountVal>0){?>
                <tr>
                    <td>ضريبه خصم</td>
                    <td> <?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->taxOfDiscountVal;?>
</td>
                </tr>
                <?php }?>
                <tr <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[28]->billsettingsvalue;?>
<?php $_tmp44=ob_get_clean();?><?php if ($_tmp44==0&&$_smarty_tpl->tpl_vars['sellbillData']->value->sellbillaftertotalbill!=$_smarty_tpl->tpl_vars['sellbillData']->value->sellbilltotalbill){?> <?php }else{ ?> style="display:none" <?php }?>>
                    <td>الصافى</td>
                    <td><?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->sellbillaftertotalbill;?>
 <?php echo $_smarty_tpl->tpl_vars['currency']->value;?>
</td>
                </tr>
                <tr <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[29]->billsettingsvalue;?>
<?php $_tmp45=ob_get_clean();?><?php if ($_tmp45==0&&$_smarty_tpl->tpl_vars['sellbillData']->value->sellbilltotalpayed!=0&&$_smarty_tpl->tpl_vars['sellbillData']->value->sellbilltotalpayed!=$_smarty_tpl->tpl_vars['sellbillData']->value->sellbilltotalbill){?> <?php }else{ ?> style="display:none"
                    <?php }?>>
                    <td>المدفوع</td>
                    <td> <?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->sellbilltotalpayed;?>
 <?php echo $_smarty_tpl->tpl_vars['currency']->value;?>
</td>
                </tr>
                <tr <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[18]->billsettingsvalue;?>
<?php $_tmp46=ob_get_clean();?><?php if ($_tmp46==0&&$_smarty_tpl->tpl_vars['sellbillData']->value->sellbilltotalpayed!=0||$_smarty_tpl->tpl_vars['sellbillData']->value->sellbilltotaldeptbefor!=0){?> <?php }else{ ?> style="display:none" <?php }?>>
                    <td>المديونية السابقه</td>
                    <td> <?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->sellbilltotaldeptbefor;?>
 <?php echo $_smarty_tpl->tpl_vars['currency']->value;?>
</td>
                </tr>
                <tr <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[30]->billsettingsvalue;?>
<?php $_tmp47=ob_get_clean();?><?php if ($_tmp47==0&&$_smarty_tpl->tpl_vars['sellbillData']->value->sellbillfinalbill>0){?> <?php }else{ ?>
                    style="display:none" <?php }?>>
                    <td>المتبقى </td>
                    <td><?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->sellbillfinalbill;?>
 <?php echo $_smarty_tpl->tpl_vars['currency']->value;?>
</td>
                </tr>
                <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->sellbilltotaldeptafter;?>
<?php $_tmp48=ob_get_clean();?><?php if ($_tmp48!=0){?>
                    <tr <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[19]->billsettingsvalue;?>
<?php $_tmp49=ob_get_clean();?><?php if ($_tmp49==0){?> <?php }else{ ?> style="display:none" <?php }?>>
                        <td>الدين بعد</td>
                        <td><?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->sellbilltotaldeptafter;?>
 <?php echo $_smarty_tpl->tpl_vars['currency']->value;?>
</td>
                    </tr>
                    <?php }?>

            </table>

            <?php if (count($_smarty_tpl->tpl_vars['billPayments']->value)>0){?>
            <!--<h4 style="text-align: center;margin: 0">دفعات على الفاتورة</h4>-->
            <table class="td border-data <?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>" width="60%" border="0"
                align="right" cellpadding="0" cellspacing="0" dir="rtl" style="margin-top:5px">
                <tr>
                    <td> م</td>
                    <td> قيمة الفاتورة</td>
                    <!--<td>  قيمة الدين قبل</td>-->
                    <td> القيمة المدفوعة </td>
                    <!--<td>  قيمة الدين بعد</td>-->
                    <td> تاريخ الدفع</td>
                    <td> طريقة الدفع</td>
                </tr>
                <?php  $_smarty_tpl->tpl_vars['data'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['data']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['billPayments']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['data']->key => $_smarty_tpl->tpl_vars['data']->value){
$_smarty_tpl->tpl_vars['data']->_loop = true;
?>
                <tr class="gradeA ">
                    <td> <?php echo $_smarty_tpl->tpl_vars['data']->value['itra'];?>
</td>
                    <td> <?php echo $_smarty_tpl->tpl_vars['data']->value['finalnetbillvalue'];?>
 </td>
                    <!--<td> <?php echo $_smarty_tpl->tpl_vars['data']->value['wait_before'];?>
</td>-->
                    <td> <?php echo $_smarty_tpl->tpl_vars['data']->value['clientdebtchangeamount'];?>
 </td>
                    <!--<td> <?php echo $_smarty_tpl->tpl_vars['data']->value['wait_after'];?>
</td>-->
                    <td> <?php echo $_smarty_tpl->tpl_vars['data']->value['date'];?>
 </td>
                    <td> <?php echo $_smarty_tpl->tpl_vars['data']->value['paytype'];?>
 </td>
                </tr>
                <?php } ?>
            </table>
            <?php }?>

            <div style="clear:both"></div>
            <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[43]->billsettingsvalue;?>
<?php $_tmp50=ob_get_clean();?><?php if ($_tmp50==0){?>
            <table width="100%" style="font-weight: bolder;text-align: center">

                <tr>
                    <td width="33%">المبيعات</td>
                    <td width="33%">الحسابات</td>
                    <td width="33%">توقيع وختم العميل </td>
                </tr>
                <tr>
                    <td height="40px"></td>
                    <td height="40px"></td>
                    <td height="40px"></td>
                </tr>

            </table>
            <div style="clear:both"></div>
            <?php }?>
            <!-- footer -->
            <div style="clear: both"></div>
            <div style="text-align: right">
                <p class="NEE" <?php if ($_smarty_tpl->tpl_vars['billsettingsData']->value[72]->billsettingsvalue==2){?>style="display:none;"<?php }?>><strong><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->address;?>
</strong></p>
            </div>
            <div style="text-align: center">
                <p <?php if ($_smarty_tpl->tpl_vars['billsettingsData']->value[81]->billsettingsvalue==1){?>style="display:none"<?php }?>><span
                        class="copywrites"><span class="copywrites">تصميم شركة جي تي فور 01110070882...</span></span>
                </p>
                </td>
            </div>
        </b>
    </div>

</body><?php }} ?>