<?php /* Smarty version Smarty-3.1.11, created on 2025-01-28 21:00:00
         compiled from "../views/default/sellbillview/editprint2.html" */ ?>
<?php /*%%SmartyHeaderCode:129336442567992930052d76-26721815%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'a82f986e9cb6ced673dbab7354feddc5a969d7f8' => 
    array (
      0 => '../views/default/sellbillview/editprint2.html',
      1 => 1701254230,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '129336442567992930052d76-26721815',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'billsettingsData' => 0,
    'Programsettingdata' => 0,
    'sellbillData' => 0,
    'userData' => 0,
    'branchData' => 0,
    'billnameAddData' => 0,
    'billUserData' => 0,
    'Usergroupdata' => 0,
    'sellbilldetailData' => 0,
    'sellbilldetail' => 0,
    'taxvalue' => 0,
    'discountvalue' => 0,
    'quantity' => 0,
    'billPayments' => 0,
    'data' => 0,
    'clientdata' => 0,
    'manyStores' => 0,
    'sellorder' => 0,
    'currency' => 0,
    'qrerp' => 0,
    'base64qr' => 0,
    'base64qrs' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_67992930463b83_13042652',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_67992930463b83_13042652')) {function content_67992930463b83_13042652($_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>
    <style>
        @media print {
            @page {
                size: 100mm 200mm landscape;
                /* landscape */
                /* you can also specify margins here: */
                margin: 0mm;
                margin-right: 0mm;
                /* for compatibility with both A4 and Letter */
                /* size: 139mm 215mm;
  height: 215mm;
  width: 139mm; */
            }

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

                mm;
                /* user margin */
            }

            td {
                font-weight: bolder !important;
            }
        }

        table.info tr {
            width: 100%;
        }



        .body {
            direction: rtl
        }

        td {
            margin: 0
        }

        .table-black1 tbody>tr>td {

            vertical-align: middle;
            text-align: center;
            border: 1px solid #000;
        }

        .result,
        .result tr,
        .result tr td {
            border: 1px solid #000
        }

        .td td {
            border-right-widtd: 1px;
            border-bottom-widtd: 1px;
            border-left-widtd: 0px;
            border-top-style: none;
            border-right-style: dotted;
            border-bottom-style: solid;
            border-left-style: none;
            border-bottom-color: #999;
            font-size: 17px;
            border-right-color: #999;
        }

        .NEE {
            font-size: 14px;
        }

        .newdesign {
            font-size: 14px;
        }

        .copywrites {
            font-size: 11px;
        }

        td {
            margin: 0 !important
        }

        .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 {
        font-size: 15px;
        font-weight: 200;
        padding: 0 2px
    }

    .td td {
        border-right-width: 1px;
        border-bottom-width: 1px;
        border-left-width: 0px;
        border-top-style: none;
        border-right-style: dotted;
        border-bottom-style: solid;
        border-left-style: none;
        border-bottom-color: #999;
        font-size: 17px;
        border-right-color: #999;
        padding: 0 2px
    }

    .NEE {
        font-size: 14px;
    }

    .newdesign {
        font-size: 14px;
    }

    .copywrites {
        font-size: 11px;
    }
</style>
<style>
    .td td {
        border-right-width: 1px;
        border-bottom-width: 1px;
        border-left-width: 0px;
        border-top-style: none;
        border-right-style: dotted;
        border-bottom-style: solid;
        border-left-style: none;
        border-bottom-color: #999;
        font-size: 18px;
        border-right-color: #999;
        padding: 0 2px
    }

    .NEE {
        font-size: 14px;
    }

    .newdesign {
        font-size: 14px;
    }

    .copywrites {
        font-size: 11px;
    }

    .style2 {
        font-family: tahoma
    }

    .style4 {
        font-family: tahoma;
        font-size: 14px;
        font-weight: bold;
        border: 1px solid #999 !important;
    }

    .serial {
        background-color: #C8C8C8;
        height: 20px;
        width: 150px;
        padding: 5px;
        margin: 5px;
        border: medium double #000000;
        text-align: center;
    }

    .style1 {
        font-size: 15px
    }

    .style-num {
        font-size: 12px
    }

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

    td {
        font-size: 13px;
        padding: 0 2px
    }

    .table-last td {
        border: 1px solid #444;
        text-align: center
    }
</style>


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

        <b>
            <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[25]->billsettingsvalue;?>
<?php $_tmp1=ob_get_clean();?><?php if ($_tmp1==0){?>

            <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="table-black">
                <tr>
                    <!-- <td colspan="2"><div <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[15]->billsettingsvalue&&$_smarty_tpl->tpl_vars['Programsettingdata']->value->clientserial==1;?>
<?php $_tmp2=ob_get_clean();?><?php if ($_tmp2==0){?>  <?php }else{ ?> style="display:none !important" <?php }?> class="serial"><?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->sellbillid;?>
</div></td>
                        <td>&nbsp;</td>
                        <td>&nbsp;</td>
                        <td>&nbsp;</td> -->
                    <td colspan="2" align="center" class="style1" <?php if ($_smarty_tpl->tpl_vars['billsettingsData']->value[72]->billsettingsvalue==2){?>style="display:none;"<?php }?>>
                        <?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 }?>
                    </td>
                </tr>
            </table>
            <div style="clear:both"></div>
            <!--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" class="style1"><?php echo $_smarty_tpl->tpl_vars['billnameAddData']->value->name;?>
</h2>
            </div>
            <!-- end title -->
            <div style="clear:both"></div>

            <table width="45%" align="right" cellpadding="0" cellspacing="0" class="table-black"
                style="margin-bottom: 10px;font-size:10px">
                <tr>
                    <!--  <td  align="right"  dir="rtl"><!--span class="style1 style2"><?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 }?> :<?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->employeename;?>
</span--><!--</td>-->

                    <?php if ($_smarty_tpl->tpl_vars['Programsettingdata']->value->clientserial==1){?>
                    <td style="padding: 2px" align="right">
                        <span class="">رقم تسلسل الفاتورة :</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>
                    <?php }?>

                </tr>
                <tr>
                    <td style="padding: 2px" align="right" nowrap width="">
                        <span class="">التاريخ :</span>
                        <span><?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->sellbilldate;?>
</span>
                    </td>
                </tr>
                <tr>
                    <td style="padding: 2px" align="right" nowrap width="">
                        <span class="">اسم المستخدم :</span>
                        <span><?php echo $_smarty_tpl->tpl_vars['billUserData']->value->employeename;?>
</span>
                    </td>
                </tr>
                <tr>
                    <td style="padding: 2px;<?php if ($_smarty_tpl->tpl_vars['billsettingsData']->value[72]->billsettingsvalue==2){?>;display:none;<?php }?>"
                        align="right" nowrap>
                        <span class="" style="direction:rtl"> العنوان :</span>
                        <span>
                            <?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 }?>
                        </span>
                    </td>
                </tr>

            </table>
            <table width="50%" align="right" cellpadding="0" cellspacing="0" class="table-black"
                style="margin-bottom: 10px">
                <!--الدين بعد -->
                <tr>
                    <!--td align="right"  dir="rtl" ><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[18]->billsettingsvalue;?>
<?php $_tmp3=ob_get_clean();?><?php if ($_tmp3==0){?> <span class="style1 style2"> (حساب / سابق) :<?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->sellbilltotaldeptbefor;?>
</span> <?php }?></td-->
                    <td align="right" style="padding: 3px"> <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[27]->billsettingsvalue;?>
<?php $_tmp4=ob_get_clean();?><?php if ($_tmp4==0){?>
                        <?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->storeName;?>
<?php }?> </td>
                </tr>
                <tr>
                    <td colspan="2" align="right"
                        style="padding: 3px;<?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[16]->billsettingsvalue;?>
<?php $_tmp5=ob_get_clean();?><?php if ($_tmp5==0){?>  <?php }else{ ?> display:none !important; <?php }?>"
                        nowrap>
                        <span>السيد :</span>
                        <span> <?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->tempclientName;?>
</span>

                    </td>
                </tr>
                <tr>
                    <td colspan="2" align="right"
                        style="padding: 3px;<?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[101]->billsettingsvalue;?>
<?php $_tmp6=ob_get_clean();?><?php if ($_tmp6==0){?>  <?php }else{ ?> display:none !important; <?php }?>"
                        nowrap>
                        <span>عملية الفاتورة :</span>
                        <span> <?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->billoperationName;?>
</span>

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

                    </td>
                </tr>
            </table>
            <div style="clear:both"></div>
            <h4 style="text-align: center;margin: 0">فاتورة مبيعات</h4>
            <table width="100%" border="0" cellpadding="" cellspacing="" class="table-black1" style="direction: ltr">
                <tr>
                    <td class="<?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>" align="center" bgcolor="#B4B4B4"
                        class="style4">اجمالى</td>
                    <td class="<?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>" align="center" bgcolor="#B4B4B4"
                        class="style4" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[23]->billsettingsvalue;?>
<?php $_tmp8=ob_get_clean();?><?php if ($_tmp8==0){?> <?php }else{ ?> style="display:none"
                        <?php }?> >الخصم</td>
                    <td class="<?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>" align="center" bgcolor="#B4B4B4"
                        class="style4">السعر</td>
                    <td align="center" bgcolor="#B4B4B4" class="style4" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->scunitname;?>
<?php $_tmp9=ob_get_clean();?><?php if ($_tmp9=='0'||$_smarty_tpl->tpl_vars['billsettingsData']->value[67]->billsettingsvalue){?> hidden <?php }?> ><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->scunitname;?>

                    </td>

                    <td align="center" bgcolor="#B4B4B4" class="style4" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[46]->billsettingsvalue;?>
<?php $_tmp10=ob_get_clean();?><?php if ($_tmp10==0){?> <?php }else{ ?> style="display:none" <?php }?>>الكمية</td>
                    <td align="center" bgcolor="#B4B4B4" class="style4" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[21]->billsettingsvalue;?>
<?php $_tmp11=ob_get_clean();?><?php if ($_tmp11==0){?> <?php }else{ ?> style="display:none" <?php }?>>الوحدة</td>
                    <td align="center" bgcolor="#B4B4B4" class="style4" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[7]->billsettingsvalue;?>
<?php $_tmp12=ob_get_clean();?><?php if ($_tmp12==0){?> <?php }else{ ?> style="display:none !important" <?php }?>>التعليق</td>
                    <td align="center" bgcolor="#B4B4B4" class="style4" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[20]->billsettingsvalue;?>
<?php $_tmp13=ob_get_clean();?><?php if ($_tmp13==0){?> <?php }else{ ?> style="display:none" <?php }?>>الباركود</td>
                    <td width="50%" align="center" bgcolor="#B4B4B4" class="style4">اسم المنتج</td>
                    <td align="right" bgcolor="#B4B4B4" class="style4">م </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 class="<?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>" align="center"
                        class="style2 style-num"> <?php echo $_smarty_tpl->tpl_vars['sellbilldetail']->value->sellbilldetailtotalprice;?>
 </td>
                    <td class="<?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>" align="center" class="style2 style1"
                        <?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 !important"
                        <?php }?>>
                        <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[34]->billsettingsvalue;?>
<?php $_tmp15=ob_get_clean();?><?php if ($_tmp15==0){?><?php echo $_smarty_tpl->tpl_vars['sellbilldetail']->value->discountvalue;?>
 <?php }else{ ?>
                        <?php echo $_smarty_tpl->tpl_vars['sellbilldetail']->value->discounttype;?>
 <?php }?>
                    </td>
                    <td class="<?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>" align="center"
                        class="style2 style1"><?php echo $_smarty_tpl->tpl_vars['sellbilldetail']->value->sellbilldetailprice;?>
 </td>
                    <td align="center" class="style2 style1" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->scunitname;?>
<?php $_tmp16=ob_get_clean();?><?php if ($_tmp16=='0'||$_smarty_tpl->tpl_vars['billsettingsData']->value[67]->billsettingsvalue){?> hidden <?php }?>>
                        <?php echo $_smarty_tpl->tpl_vars['sellbilldetail']->value->otherdetailquantity;?>

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

                    <td align="center" class="style2 style1" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[21]->billsettingsvalue;?>
<?php $_tmp18=ob_get_clean();?><?php if ($_tmp18==0){?> <?php }else{ ?>
                        style="display:none" <?php }?>><?php echo $_smarty_tpl->tpl_vars['sellbilldetail']->value->unitName;?>
 </td>
                    <td align="center" class="style2 style1" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[7]->billsettingsvalue;?>
<?php $_tmp19=ob_get_clean();?><?php if ($_tmp19==0){?> <?php }else{ ?>
                        style="display:none !important" <?php }?>><?php echo $_smarty_tpl->tpl_vars['sellbilldetail']->value->note;?>
 </td>
                    <td align="center" class="style2 style1" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[20]->billsettingsvalue;?>
<?php $_tmp20=ob_get_clean();?><?php if ($_tmp20==0){?> <?php }else{ ?>
                        style="display:none !important" <?php }?>><?php echo $_smarty_tpl->tpl_vars['sellbilldetail']->value->parcode;?>
</td>
                    <td align="right" class="style2 style1"><?php echo $_smarty_tpl->tpl_vars['sellbilldetail']->value->productName;?>
<?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[60]->billsettingsvalue;?>
<?php $_tmp21=ob_get_clean();?><?php if ($_tmp21==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 $_tmp22=ob_get_clean();?><?php if ($_tmp22==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>
                    <td align="center" class="style2 style-num"><?php echo $_smarty_tpl->tpl_vars['sellbilldetail']->index+1;?>
</td>
                </tr>
                <?php } ?>

            </table>
            <hr style="background-color: #000">
            <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[80]->billsettingsvalue;?>
<?php $_tmp23=ob_get_clean();?><?php if ($_tmp23==0){?>

            <table width="20%" border="" cellpadding="0" cellspacing="" class="result class=" <?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>" style="float:right">
                <tr>
                    <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[80]->billsettingsvalue;?>
<?php $_tmp24=ob_get_clean();?><?php if ($_tmp24==0){?>
                    <td align="center" bgcolor="#B4B4B4"><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->delivery;?>
<?php $_tmp25=ob_get_clean();?><?php if ($_tmp25==0){?>شحن<?php }else{ ?> توصيل <?php }?>
                    </td>
                    <td align="center" bgcolor="#B4B4B4">الاجمالي </td>
                    <?php }?>
                </tr>
                <tr>
                    <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[80]->billsettingsvalue;?>
<?php $_tmp26=ob_get_clean();?><?php if ($_tmp26==0){?>

                    <td align="center" class="style1"><?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->delivery;?>
</td>
                    <td align="center" class="style1"><?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->totalafterdelivery;?>
</td>
                    <?php }?>

                </tr>
            </table>
            <?php }?>


            <table width="40%" border="" cellpadding="0" cellspacing=""
                class="result <?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>" style="float:left" dir="ltr">

                <tr>
                    <!--الدين بعد -->

                    <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[19]->billsettingsvalue;?>
<?php $_tmp27=ob_get_clean();?><?php if ($_tmp27==0){?>
                    <td align="center" bgcolor="#B4B4B4"
                        class="style1 <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->sellbilltotaldeptafter;?>
<?php $_tmp28=ob_get_clean();?><?php ob_start();?><?php echo $_tmp28;?>
<?php $_tmp29=ob_get_clean();?><?php if ($_tmp29!=0){?>  <?php }else{ ?> style=" display:none
                        !important" <?php }?>}>اجمالى المديونيه</td>



                    <?php }?>

                    <!--الباقى -->


                    <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[30]->billsettingsvalue;?>
<?php $_tmp30=ob_get_clean();?><?php if ($_tmp30==0&&$_smarty_tpl->tpl_vars['sellbillData']->value->sellbillfinalbill>0){?>
                    <td align="center" bgcolor="#B4B4B4">الباقي</td>
                    <?php }?>

                    <!--المدفوع-->
                    <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[29]->billsettingsvalue;?>
<?php $_tmp31=ob_get_clean();?><?php if ($_tmp31==0&&$_smarty_tpl->tpl_vars['sellbillData']->value->sellbilltotalpayed!=$_smarty_tpl->tpl_vars['sellbillData']->value->sellbilltotalbill){?>
                    <td align="center" bgcolor="#B4B4B4">المدفوع</td>
                    <?php }?>

                    <!--الدين قبل-->
                    <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[18]->billsettingsvalue;?>
<?php $_tmp32=ob_get_clean();?><?php if ($_tmp32==0){?>
                    <?php if ($_smarty_tpl->tpl_vars['sellbillData']->value->sellbilltotalpayed!=0||$_smarty_tpl->tpl_vars['sellbillData']->value->sellbilltotaldeptbefor!=0){?>
                    <td align="center" bgcolor="#B4B4B4">الدين قبل</td>
                    <?php }?>
                    <?php }?>


                    <!--الصافي -->
                    <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[28]->billsettingsvalue;?>
<?php $_tmp33=ob_get_clean();?><?php if ($_tmp33==0&&$_smarty_tpl->tpl_vars['sellbillData']->value->sellbillaftertotalbill!=$_smarty_tpl->tpl_vars['sellbillData']->value->sellbilltotalbill){?>
                    <td align="center" bgcolor="#B4B4B4">الصافي</td>
                    <?php }?>

                    <?php if ($_smarty_tpl->tpl_vars['billnameAddData']->value->taxOfDiscountPrint==0&&$_smarty_tpl->tpl_vars['sellbillData']->value->taxOfDiscountVal>0){?>
                    <td align="center" bgcolor="#B4B4B4">ضريبه خصم </td>
                    <?php }?>

                    <!--ضريبه المبيعات -->

                    <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[31]->billsettingsvalue;?>
<?php $_tmp34=ob_get_clean();?><?php if ($_tmp34==0&&$_smarty_tpl->tpl_vars['taxvalue']->value>0){?>
                    <td align="center" bgcolor="#B4B4B4">ضريبه القيمة المضافة</td>
                    <?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){?>
                    <td align="center" bgcolor="#B4B4B4">خصم اضافى </td>
                    <!--<td  align="center" bgcolor="#B4B4B4">نوع الخصم</td>-->
                    <?php }?>

                    <!--الخصم -->
                    <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->sellbilldiscount;?>
<?php $_tmp35=ob_get_clean();?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[47]->billsettingsvalue;?>
<?php $_tmp36=ob_get_clean();?><?php if ($_tmp35>0&&$_tmp36==0){?>
                    <td align="center" bgcolor="#B4B4B4">قيمة الخصم</td>
                    <!--<td  align="center" bgcolor="#B4B4B4">نوع الخصم</td>-->
                    <?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==1){?>
                    <td align="center" bgcolor="#B4B4B4">خصم اضافى </td>
                    <!--<td  align="center" bgcolor="#B4B4B4">نوع الخصم</td>-->
                    <?php }?>

                    <td align="center" bgcolor="#B4B4B4" class="style1">الاجمالي</td>
                    <td <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[21]->billsettingsvalue;?>
<?php $_tmp37=ob_get_clean();?><?php if ($_tmp37==0){?> <?php }else{ ?> style="display:none" <?php }?>
                        width="9%" align="center" bgcolor="#B4B4B4" class="style1">عدد الوحدات</td>
                </tr>
                <tr>

                    <!-----------الدين بعد ------------------->



                    <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[19]->billsettingsvalue;?>
<?php $_tmp38=ob_get_clean();?><?php if ($_tmp38==0){?>

                    <td align="center" class="style1" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->sellbilltotaldeptafter;?>
<?php $_tmp39=ob_get_clean();?><?php ob_start();?><?php echo $_tmp39;?>
<?php $_tmp40=ob_get_clean();?><?php if ($_tmp40!=0){?> <?php }else{ ?>
                            style="display:none !important" <?php }?>><?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->sellbilltotaldeptafter;?>
</td>
                    <?php }?>

                    <!-----------الباقى ------------------->
                    <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[30]->billsettingsvalue;?>
<?php $_tmp41=ob_get_clean();?><?php if ($_tmp41==0&&$_smarty_tpl->tpl_vars['sellbillData']->value->sellbillfinalbill>0){?>
                    <td align="center" class="style1"><?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->sellbillfinalbill;?>
</td>
                    <?php }?>

                    <!-----------المدفوع ------------------->
                    <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[29]->billsettingsvalue;?>
<?php $_tmp42=ob_get_clean();?><?php if ($_tmp42==0&&$_smarty_tpl->tpl_vars['sellbillData']->value->sellbilltotalpayed!=$_smarty_tpl->tpl_vars['sellbillData']->value->sellbilltotalbill){?>
                    <td align="center" class="style1"><?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->sellbilltotalpayed;?>
</td>
                    <?php }?>

                    <!-----------الدين قبل ------------------->
                    <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[18]->billsettingsvalue;?>
<?php $_tmp43=ob_get_clean();?><?php if ($_tmp43==0){?>
                    <?php if ($_smarty_tpl->tpl_vars['sellbillData']->value->sellbilltotalpayed!=0||$_smarty_tpl->tpl_vars['sellbillData']->value->sellbilltotaldeptbefor!=0){?>
                    <td align="center" class="style1"><?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->sellbilltotaldeptbefor;?>
</td>
                    <?php }?>
                    <?php }?>


                    <!-----------الصافي ------------------->
                    <?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){?>
                    <td align="center" class="style1"><?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->sellbillaftertotalbill;?>
</td>
                    <?php }?>

                    <?php if ($_smarty_tpl->tpl_vars['billnameAddData']->value->taxOfDiscountPrint==0&&$_smarty_tpl->tpl_vars['sellbillData']->value->taxOfDiscountVal>0){?>
                    <td align="center" class="style1"><?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->taxOfDiscountVal;?>
</td>
                    <?php }?>


                    <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[31]->billsettingsvalue;?>
<?php $_tmp45=ob_get_clean();?><?php if ($_tmp45==0&&$_smarty_tpl->tpl_vars['taxvalue']->value>0){?>
                    <!-----------ضريبة المبيعات ------------------->
                    <td align="center" class="style1"><?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>
                    <?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){?>
                    <td align="center" class="style1"><?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->extraDiscountVal;?>
</td>
                    <?php }?>

                    <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->sellbilldiscount;?>
<?php $_tmp46=ob_get_clean();?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[47]->billsettingsvalue;?>
<?php $_tmp47=ob_get_clean();?><?php if ($_tmp46>0&&$_tmp47==0){?>
                    <td align="center" class="style1">
                        <?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>
                    <!--                        <td align="center" class="style1">
                                                    <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->sellbilldiscounttype;?>
<?php $_tmp48=ob_get_clean();?><?php if ($_tmp48==1){?>
                                                    مباشر
                                                    <?php }else{ ?>
                                                    بنسبة
                                                    <?php }?>
                                                </td>-->
                    <?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==1){?>
                    <td align="center" class="style1"><?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->extraDiscountVal;?>
</td>
                    <?php }?>

                    <td align="center" class="style1"><?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->sellbilltotalbill;?>
</td>
                    <td <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[21]->billsettingsvalue;?>
<?php $_tmp49=ob_get_clean();?><?php if ($_tmp49==0){?> <?php }else{ ?> style="display:none" <?php }?>
                        align="center" class="style1">
                        <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->sellQuantity;?>
<?php $_tmp50=ob_get_clean();?><?php if ($_tmp50<=0){?> <?php echo $_smarty_tpl->tpl_vars['quantity']->value;?>
 <?php }else{ ?> <?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->sellQuantity;?>

                            <?php }?> </td>

                </tr>
            </table>
            <?php if (count($_smarty_tpl->tpl_vars['billPayments']->value)>0){?>
            <!--<h4 style="text-align: center;margin: 0">دفعات على الفاتورة</h4>-->
            <table class="<?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>" width="50%" border="" cellpadding="0"
                cellspacing="" class="result" style="float:right" dir="rtl">
                <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>
            <table>
                <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[43]->billsettingsvalue;?>
<?php $_tmp51=ob_get_clean();?><?php if ($_tmp51==0){?>

                <tr>


                    <td>توقيع العميل </td>
                    <td></td>
                    <td>توقيع ال<?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 }?> </td>
                    <td></td>
                    <td><?php echo $_smarty_tpl->tpl_vars['billnameAddData']->value->goodsReceiptApproval;?>
</td>
                </tr>

                <?php }?>
                <tr>

                    <td nowrapalign="right" valign="bottom"><span class="style1"
                            style="direction:rtl"><!--strong><?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->useremployeename;?>
</strong--></span></td>
            </table>
            <!-- footer -->
            <div style="text-align: center;<?php if ($_smarty_tpl->tpl_vars['billsettingsData']->value[81]->billsettingsvalue==1){?>display:none<?php }?>">
                <p><span class="copywrites">تصميم شركة جي تي فور 01110070882</span></p>
            </div>


            <?php }else{ ?>

            <table width="97%" align="center" cellpadding="0" cellspacing="0">
                <tr>
                    <!-- <td colspan="2"><div <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[15]->billsettingsvalue&&$_smarty_tpl->tpl_vars['Programsettingdata']->value->clientserial==1;?>
<?php $_tmp52=ob_get_clean();?><?php if ($_tmp52==0){?>  <?php }else{ ?> style="display:none !important" <?php }?> class="serial"><?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->sellbillid;?>
</div></td> -->

                    <td width="142" align="center" 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="122"
                                    height="50"><br>
                                <span style="font-size:14px"><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->phone;?>
</span>
                                <?php }else{ ?>
                                <img src="../views/default/images/branch_image/<?php echo $_smarty_tpl->tpl_vars['branchData']->value->logo;?>
" alt="" width="122"
                                    height="50"><br>
                                <span style="font-size:14px"> <?php echo $_smarty_tpl->tpl_vars['branchData']->value->mobile;?>
</span>
                                <?php }?>

                    </td>
                </tr>
            </table>
            <!--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" class="style1"><?php echo $_smarty_tpl->tpl_vars['billnameAddData']->value->name;?>
</h2>
            </div>
            <!-- end title -->
            <div style="clear:both"></div>
            <table style="width:55%;float:right;margin-top: 7px">
                <!--                    <tr <?php if ($_smarty_tpl->tpl_vars['billsettingsData']->value[70]->billsettingsvalue==0){?><?php }else{ ?>  style="display:none"<?php }?>>
                                            <td align="right" class="style1" dir="rtl">
                                                <h1  style="float:right; text-align:right"><?php echo $_smarty_tpl->tpl_vars['billnameAddData']->value->name;?>
</h1>    </td>
                                        </tr>-->
                <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[18]->billsettingsvalue;?>
<?php $_tmp53=ob_get_clean();?><?php if ($_tmp53==0){?>
                <?php if ($_smarty_tpl->tpl_vars['sellbillData']->value->sellbilltotalpayed!=0||$_smarty_tpl->tpl_vars['sellbillData']->value->sellbilltotaldeptbefor!=0){?>
                <tr>
                    <td align="right">
                        <?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices!=1){?>
                        <span> الدين قبل:</span>
                        <span><?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->sellbilltotaldeptbefor;?>
 </span>
                        <?php }?>
                    </td>

                </tr>
                <?php }?>
                <?php }?>

                <tr <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[16]->billsettingsvalue;?>
<?php $_tmp54=ob_get_clean();?><?php if ($_tmp54==0){?> <?php }else{ ?> style="display:none !important" <?php }?>>
                    <td align="right">
                        <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 $_tmp55=ob_get_clean();?><?php if ($_tmp55==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[3]->billsettingsvalue;?>
<?php $_tmp56=ob_get_clean();?><?php if ($_tmp56==0){?> <?php }else{ ?> style="display:none" <?php }?>>
                    <td align="right">
                        <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>
                <tr>
                    <td align="right">
                        <span> تاريخ البيان:</span>
                        <span><?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->sellbilldate;?>
</span>
                    </td>
                </tr>
                <tr <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[112]->billsettingsvalue;?>
<?php $_tmp57=ob_get_clean();?><?php if ($_tmp57==0){?> <?php }else{ ?> style="display:none" <?php }?>>
                    <td align="right">
                        <span> تاريخ التسليم:</span>
                        <span><?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->datestarting;?>
</span>
                    </td>
                </tr>
            </table>
            <table style="width:45%;float:left">

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

                    <td dir="rtl">
                        <span>تليفون العميل:</span>
                        <span><?php echo $_smarty_tpl->tpl_vars['clientdata']->value->clientphone;?>
 <?php if ($_smarty_tpl->tpl_vars['clientdata']->value->clientmobile!=''){?> - <?php echo $_smarty_tpl->tpl_vars['clientdata']->value->clientmobile;?>
<?php }?></span>
                    </td>

                </tr>

                <tr <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[39]->billsettingsvalue;?>
<?php $_tmp59=ob_get_clean();?><?php if ($_tmp59==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>

                <?php if ($_smarty_tpl->tpl_vars['Programsettingdata']->value->clientserial==1){?>
                <tr>

                    <td align="right">
                        <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>
                    <td> </td>
                </tr>
                <?php }?>




                

                <!--المخزن -->
                <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[27]->billsettingsvalue;?>
<?php $_tmp60=ob_get_clean();?><?php if ($_tmp60==0&&$_smarty_tpl->tpl_vars['manyStores']->value!=1){?>

                <tr>
                    <td align="right">
                        <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>

                <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[101]->billsettingsvalue;?>
<?php $_tmp61=ob_get_clean();?><?php if ($_tmp61==0){?>
                <tr>
                    <td align="right">
                        <span> عملية الفاتورة:</span>
                        <span> <?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->billoperationName;?>
</span>
                    </td>
                </tr>
                <?php }?>
                <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[22]->billsettingsvalue;?>
<?php $_tmp62=ob_get_clean();?><?php if ($_tmp62==0){?>
                <tr>
                    <td align="right">
                        <span> التعليق:</span>
                        <span> <?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->comment;?>
</span>
                    </td>
                </tr>
                <?php }?>

            </table>
            <div style="clear:both"></div>
            <table style="width:100%">
                <?php if ($_smarty_tpl->tpl_vars['sellorder']->value<1){?>
                <h4 style="text-align: center;margin: 0">فاتورة المبيعات</h4>
                <?php }else{ ?>
                <h3 style="text-align: center;margin: 0"> أمر بيع </h3>
                <?php }?>
            </table>
            <div style="clear:both"></div>

            <table class="data" width="100%" 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 $_tmp63=ob_get_clean();?><?php if ($_tmp63==0){?> <?php }else{ ?>
                        style="display:none" <?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 $_tmp64=ob_get_clean();?><?php if ($_tmp64==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 $_tmp65=ob_get_clean();?><?php if ($_tmp65==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 $_tmp66=ob_get_clean();?><?php if ($_tmp66==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 $_tmp67=ob_get_clean();?><?php if ($_tmp67==0){?> <?php }else{ ?>
                        style="display:none !important" <?php }?>>العدد</td>
                    <td align="center" bgcolor="#E8E8E8" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->scunitname;?>
<?php $_tmp68=ob_get_clean();?><?php if ($_tmp68=='0'){?> hidden <?php }?>
                        ><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->scunitname;?>
</th>

                    <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 $_tmp69=ob_get_clean();?><?php if ($_tmp69==0){?> <?php }else{ ?> style="display:none" <?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 $_tmp70=ob_get_clean();?><?php if ($_tmp70==0){?> <?php }else{ ?> style="display:none
                        !important" <?php }?>>

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


                    </td>


                    <td align="center" dir="ltr">

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


                        <?php echo $_smarty_tpl->tpl_vars['sellbilldetail']->value->productName;?>
<?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[60]->billsettingsvalue;?>
<?php $_tmp71=ob_get_clean();?><?php if ($_tmp71==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 $_tmp72=ob_get_clean();?><?php if ($_tmp72==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 }?>


                    </td>

                    <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[26]->billsettingsvalue;?>
<?php $_tmp73=ob_get_clean();?><?php if ($_tmp73==0&&$_smarty_tpl->tpl_vars['billsettingsData']->value[108]->billsettingsvalue==0){?>
                    <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['sellbilldetail']->value->storeName;?>
<?php $_tmp74=ob_get_clean();?><?php if ($_tmp74!=''){?>
                        <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 $_tmp75=ob_get_clean();?><?php if ($_tmp75==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 $_tmp76=ob_get_clean();?><?php if ($_tmp76==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 $_tmp77=ob_get_clean();?><?php if ($_tmp77==0){?> <?php }else{ ?>
                            style="display:none
                            !important" <?php }?>>

                            <?php echo $_smarty_tpl->tpl_vars['sellbilldetail']->value->sellbilldetailquantity;?>


                        </td>
                        <td align="center" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->scunitname;?>
<?php $_tmp78=ob_get_clean();?><?php if ($_tmp78=='0'||$_smarty_tpl->tpl_vars['billsettingsData']->value[67]->billsettingsvalue){?> 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;?>

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

                        </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 $_tmp79=ob_get_clean();?><?php if ($_tmp79==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 echo $_smarty_tpl->tpl_vars['sellbilldetail']->value->sellbilldetailtotalprice;?>


                        </td>





                </tr>

                <?php } ?>

            </table>
            <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[80]->billsettingsvalue;?>
<?php $_tmp80=ob_get_clean();?><?php if ($_tmp80==0){?>
            <table align="right" cellpadding="0" cellspacing="0" style="margin-top: 5px" dir="rtl" class="table-last">
                <tr <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[80]->billsettingsvalue;?>
<?php $_tmp81=ob_get_clean();?><?php if ($_tmp81==0){?> <?php }else{ ?> style="display:none" <?php }?>>
                    <td><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->delivery;?>
<?php $_tmp82=ob_get_clean();?><?php if ($_tmp82==0){?> : شحن<?php }else{ ?> : توصيل <?php }?></td>
                    <td><?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->delivery;?>
</td>
                </tr>
                <tr <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[80]->billsettingsvalue;?>
<?php $_tmp83=ob_get_clean();?><?php if ($_tmp83==0){?> <?php }else{ ?> style="display:none" <?php }?>>
                    <td>الاجمالي :</td>
                    <td><?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->totalafterdelivery;?>
</td>
                </tr>
            </table>
            <?php }?>
            <table align="left" cellpadding="0" cellspacing="0" style="margin-top: 5px" dir="rtl"
                class="table-last <?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 $_tmp84=ob_get_clean();?><?php if ($_tmp84==0){?> <?php }else{ ?> style="display:none" <?php }?>>
                    <td>اجمالي القطع</td>
                    <td>
                        <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->sellQuantity;?>
<?php $_tmp85=ob_get_clean();?><?php if ($_tmp85<=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>
                <!---->
                <!--tr>

                    <td <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[47]->billsettingsvalue;?>
<?php $_tmp86=ob_get_clean();?><?php if ($_tmp86==0){?>  <?php }else{ ?> style="display:none !important" <?php }?>>نوع الخصم</td>
                    <td>
                    <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->sellbilldiscounttype;?>
<?php $_tmp87=ob_get_clean();?><?php if ($_tmp87==1){?>
                                        مباشر
                                        <?php }else{ ?>
                                        بنسبة
                                        <?php }?>
                    </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 }?>

                <tr <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->sellbilldiscount;?>
<?php $_tmp88=ob_get_clean();?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[47]->billsettingsvalue;?>
<?php $_tmp89=ob_get_clean();?><?php if ($_tmp88>0&&$_tmp89==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 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 $_tmp90=ob_get_clean();?><?php if ($_tmp90==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>
                    <td>المبلغ </td>
                    <td><?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->sellbillaftertotalbill;?>
 <?php echo $_smarty_tpl->tpl_vars['currency']->value;?>
</td>
                </tr>

                <!---->
                <!--الصافى -->
                <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[28]->billsettingsvalue;?>
<?php $_tmp91=ob_get_clean();?><?php if ($_tmp91==0&&$_smarty_tpl->tpl_vars['sellbillData']->value->sellbillaftertotalbill!=$_smarty_tpl->tpl_vars['sellbillData']->value->sellbilltotalbill){?>


                <tr>
                    <td>الصافى</td>
                    <td> <?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->sellbillaftertotalbill;?>
 <?php echo $_smarty_tpl->tpl_vars['currency']->value;?>
</td>
                </tr>
                <?php }?>

                <!--المدفوع -->


                <tr<?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[29]->billsettingsvalue;?>
<?php $_tmp92=ob_get_clean();?><?php if ($_tmp92==0&&$_smarty_tpl->tpl_vars['sellbillData']->value->sellbilltotalpayed!=$_smarty_tpl->tpl_vars['sellbillData']->value->sellbilltotalbill){?> <?php }else{ ?> style="display:none !important" <?php }?>>
                    <td>المدفوع</td>
                    <td> <?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->sellbilltotalpayed;?>
 <?php echo $_smarty_tpl->tpl_vars['currency']->value;?>
</td>
                    </tr>

                    <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[30]->billsettingsvalue;?>
<?php $_tmp93=ob_get_clean();?><?php if ($_tmp93==0&&$_smarty_tpl->tpl_vars['sellbillData']->value->sellbillfinalbill>0){?>
                    <tr>
                        <td>المتبقى</td>
                        <td><?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->sellbillfinalbill;?>
 <?php echo $_smarty_tpl->tpl_vars['currency']->value;?>
</td>
                    </tr>
                    <?php }?>

                    <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[18]->billsettingsvalue;?>
<?php $_tmp94=ob_get_clean();?><?php if ($_tmp94==0){?>
                    <?php if ($_smarty_tpl->tpl_vars['sellbillData']->value->sellbilltotalpayed!=0||$_smarty_tpl->tpl_vars['sellbillData']->value->sellbilltotaldeptbefor!=0){?>
                    <tr>
                        <td>المديونيه السابقة</td>
                        <td><?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->sellbilltotaldeptbefor;?>
 <?php echo $_smarty_tpl->tpl_vars['currency']->value;?>
</td>
                    </tr>
                    <?php }?>
                    <?php }?>

                    <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[19]->billsettingsvalue;?>
<?php $_tmp95=ob_get_clean();?><?php if ($_tmp95==0){?>


                    <tr <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->sellbilltotaldeptafter;?>
<?php $_tmp96=ob_get_clean();?><?php if ($_tmp96!=0){?> <?php }else{ ?> style="display:none !important" <?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 width="50%" cellpadding="0" cellspacing="0" style="margin-top: 5px;float:right"
                class="table-last <?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>" dir="rtl"
                class="<?php if ($_smarty_tpl->tpl_vars['Usergroupdata']->value->hideBillPrices==1){?>hidden<?php }?>">
                <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>
            <table>

                <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[43]->billsettingsvalue;?>
<?php $_tmp97=ob_get_clean();?><?php if ($_tmp97==0){?>

                <tr>

                    <td>توقيع العميل </td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td>توقيع ال<?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 }?> </td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td><?php echo $_smarty_tpl->tpl_vars['billnameAddData']->value->goodsReceiptApproval;?>
</td>
                </tr>

                <?php }?>
            </table>
            <div style="clear:both"></div>
            <div nowrap <?php if ($_smarty_tpl->tpl_vars['billsettingsData']->value[72]->billsettingsvalue==2){?>style="display:none;"<?php }?>><p
                    style="
                                                                                                             text-align: right"><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>
            </div>

            <!-- footer -->

            <?php if ($_smarty_tpl->tpl_vars['qrerp']->value>1){?>
            <div style="text-align: center;">
                <?php if ($_smarty_tpl->tpl_vars['qrerp']->value==3||$_smarty_tpl->tpl_vars['qrerp']->value==4){?>
                <img src="data:image/jpeg;base64,<?php echo $_smarty_tpl->tpl_vars['base64qr']->value;?>
" style="width:120px;height: 120px;" />
                <?php }?>
                <?php if ($_smarty_tpl->tpl_vars['qrerp']->value==2||$_smarty_tpl->tpl_vars['qrerp']->value==4){?>
                <img src="data:image/jpeg;base64,<?php echo $_smarty_tpl->tpl_vars['base64qrs']->value;?>
" style="width:120px;height: 120px;" />
                <?php }?>
            </div>
            <?php }?>

            <div style="
                     text-align: center;
                     <?php if ($_smarty_tpl->tpl_vars['billsettingsData']->value[81]->billsettingsvalue==1){?>display:none<?php }?>">

                <p><span class="copywrites">تصميم شركة جي تي فور 01110070882</span></p>
            </div>

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