<?php /* Smarty version Smarty-3.1.11, created on 2024-07-15 17:45:04
         compiled from "..\views\default\sellbillview\billPDF.html" */ ?>
<?php /*%%SmartyHeaderCode:3131266954400af45b4-85515821%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '2410c28a75da48d0b14fef2daaf3400ebbb76407' => 
    array (
      0 => '..\\views\\default\\sellbillview\\billPDF.html',
      1 => 1706779475,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '3131266954400af45b4-85515821',
  '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_66954401080c31_23960036',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_66954401080c31_23960036')) {function content_66954401080c31_23960036($_smarty_tpl) {?><html dir="rtl">

    <head>

        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <title>GT4</title>
        <style>
            .titleTd{
                width: 40%;
            }
            .dataTd{
                width: 60%;
            }
        </style>

    </head>


    <body>
        <div style="text-align: center;">
            <?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" style="display: block; margin: 0 auto;">
            <br/><strong><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->phone;?>
</strong>
            <?php }else{ ?>
            <img src="../views/default/images/branch_image/<?php echo $_smarty_tpl->tpl_vars['branchData']->value->logo;?>
" alt="" width="134" height="49" style="display: block; margin: 0 auto;">
            <br/><strong><?php echo $_smarty_tpl->tpl_vars['branchData']->value->mobile;?>
</strong>
            <?php }?>
        </div>
        <h1 style="float:right; text-align:center" <?php if ($_smarty_tpl->tpl_vars['billsettingsData']->value[70]->billsettingsvalue==0){?><?php }else{ ?> style="display:none"<?php }?>> <?php echo $_smarty_tpl->tpl_vars['billnameAddData']->value->name;?>
</h1>
        <h3 style="margin: 0;text-align: center!important">فاتورة المبيعات</h3>
        <div>

            <!--just for organizing as not all css supported-->
            <table>
                <tr>
                    <td>
                        <!--right table-->
                        <table style="width:100%">
                            <tr <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[16]->billsettingsvalue;?>
<?php $_tmp1=ob_get_clean();?><?php if ($_tmp1==0){?> <?php }else{ ?> style="display:none !important" <?php }?>>

                                <td class="titleTd">اسم العميل:</td>
                                <td class="dataTd"><?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->tempclientName;?>
</td>
                            </tr>
                            <tr <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[39]->billsettingsvalue;?>
<?php $_tmp2=ob_get_clean();?><?php if ($_tmp2==0){?> <?php }else{ ?> style="display:none !important" <?php }?>>
                                <td class="titleTd">عنوان العميل:</td>
                                <td class="dataTd"><?php echo $_smarty_tpl->tpl_vars['clientdata']->value->clientaddress;?>
</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 class="titleTd">تليفون العميل:</td>
                                <td class="dataTd"><?php echo $_smarty_tpl->tpl_vars['clientdata']->value->clientphone;?>
</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 class="titleTd">كود العميل:</td>
                                <td class="dataTd"><?php echo $_smarty_tpl->tpl_vars['clientdata']->value->clientcode;?>
</td>
                            </tr>
                            <tr <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[15]->billsettingsvalue;?>
<?php $_tmp5=ob_get_clean();?><?php if ($_tmp5==0&&$_smarty_tpl->tpl_vars['Programsettingdata']->value->clientserial==1){?> <?php }else{ ?>
                                style="display:none !important" <?php }?>>
                                <td class="titleTd">رقم الفاتورة:</td>
                                <td class="dataTd"><?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 }?></td>
                            </tr>
                            <tr>
                                <td class="titleTd">التاريخ:</td>
                                <td class="dataTd"><?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->sellbillsysdate;?>
</td>
                            </tr>
                        </table>

                    </td>
                    <td>
                        <!--left table-->
                        <table>
                            <tr <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[3]->billsettingsvalue;?>
<?php $_tmp6=ob_get_clean();?><?php if ($_tmp6==0){?> <?php }else{ ?> style="display:none" <?php }?>>
                                <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><?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->employeename;?>
</td>
                            </tr>
                            <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->saveprinting;?>
<?php $_tmp7=ob_get_clean();?><?php if ($_tmp7==1&&$_smarty_tpl->tpl_vars['manyStores']->value!=1){?>
                            <tr>
                                <td class="titleTd">اسم المخزن:</td>
                                <td class="dataTd"><?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->storeName;?>
</td>
                            </tr>
                            <?php }?>
                            <tr>
                                <td class="titleTd">اسم المستخدم:</td>
                                <td class="dataTd"><?php echo $_smarty_tpl->tpl_vars['billUserData']->value->employeename;?>
</td>
                            </tr>

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

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

        </div>




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

            <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 $_tmp10=ob_get_clean();?><?php if ($_tmp10==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 $_tmp11=ob_get_clean();?><?php if ($_tmp11==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 $_tmp12=ob_get_clean();?><?php if ($_tmp12==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 $_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[46]->billsettingsvalue;?>
<?php $_tmp14=ob_get_clean();?><?php if ($_tmp14==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 $_tmp15=ob_get_clean();?><?php if ($_tmp15==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 $_tmp16=ob_get_clean();?><?php if ($_tmp16==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 $_tmp17=ob_get_clean();?><?php if ($_tmp17==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 $_tmp18=ob_get_clean();?><?php if ($_tmp18==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 $_tmp19=ob_get_clean();?><?php if ($_tmp19==0&&$_smarty_tpl->tpl_vars['billsettingsData']->value[108]->billsettingsvalue==0){?>
                <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['sellbilldetail']->value->storeName;?>
<?php $_tmp20=ob_get_clean();?><?php if ($_tmp20!=''){?>
                <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 $_tmp21=ob_get_clean();?><?php if ($_tmp21==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 $_tmp22=ob_get_clean();?><?php if ($_tmp22==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 $_tmp23=ob_get_clean();?><?php if ($_tmp23==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 $_tmp24=ob_get_clean();?><?php if ($_tmp24==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 bgcolor="#E8E8E8">
                    <td>الاجمالى</td>
                    <td align="center" <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[20]->billsettingsvalue;?>
<?php $_tmp25=ob_get_clean();?><?php if ($_tmp25==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 $_tmp26=ob_get_clean();?><?php if ($_tmp26==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 $_tmp27=ob_get_clean();?><?php if ($_tmp27==0){?> <?php }else{ ?>
                        style="display:none !important" <?php }?>></td>

                    <td <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[21]->billsettingsvalue;?>
<?php $_tmp28=ob_get_clean();?><?php if ($_tmp28==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 $_tmp29=ob_get_clean();?><?php if ($_tmp29==0){?> <?php }else{ ?>
                        style="display:none" <?php }?>>
                        <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[41]->billsettingsvalue;?>
<?php $_tmp30=ob_get_clean();?><?php if ($_tmp30==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 $_tmp31=ob_get_clean();?><?php if ($_tmp31<=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 $_tmp32=ob_get_clean();?><?php if ($_tmp32==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 $_tmp33=ob_get_clean();?><?php if ($_tmp33==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" cellpadding="0" cellspacing="0" style="margin-top:5px">
            <?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 $_tmp34=ob_get_clean();?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[47]->billsettingsvalue;?>
<?php $_tmp35=ob_get_clean();?><?php if ($_tmp34>0&&$_tmp35==0){?>
            <tr <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['sellbillData']->value->sellbilldiscount;?>
<?php $_tmp36=ob_get_clean();?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[47]->billsettingsvalue;?>
<?php $_tmp37=ob_get_clean();?><?php if ($_tmp36>0&&$_tmp37==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 $_tmp38=ob_get_clean();?><?php if ($_tmp38==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 $_tmp39=ob_get_clean();?><?php if ($_tmp39==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 $_tmp40=ob_get_clean();?><?php if ($_tmp40==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 $_tmp41=ob_get_clean();?><?php if ($_tmp41==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 $_tmp42=ob_get_clean();?><?php if ($_tmp42==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 $_tmp43=ob_get_clean();?><?php if ($_tmp43!=0){?>
            <tr <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['billsettingsData']->value[19]->billsettingsvalue;?>
<?php $_tmp44=ob_get_clean();?><?php if ($_tmp44==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" cellpadding="0" cellspacing="0" 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>
        <div style="clear:both"></div>
        <?php }?>

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



</body><?php }} ?>