<?php
/* Smarty version 3.1.34-dev-7, created on 2020-08-05 20:42:59
  from '/Applications/MAMP/htdocs/apstrix/crm-backend/ui/theme/default/crmajax.contact-subscriptions.tpl' */

/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
  'version' => '3.1.34-dev-7',
  'unifunc' => 'content_5f2aa953194a33_76207622',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    '4aefd9c571647192e1c5db32e868b43d18c446e3' => 
    array (
      0 => '/Applications/MAMP/htdocs/apstrix/crm-backend/ui/theme/default/crmajax.contact-subscriptions.tpl',
      1 => 1596631354,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
  ),
),false)) {
function content_5f2aa953194a33_76207622 (Smarty_Internal_Template $_smarty_tpl) {
?><a href="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
crmsubscription/add-subscribe" class="btn btn-primary waves-effect waves-light"><i class="fa fa-plus"></i> Choose Package</a>

<hr>

<table class="table table-bordered table-hover sys_table">
    <thead>
    <tr>
        <th>#</th>
        <th width="30%">Package Name</th>
        <th>Total Hours in Package</th>
        <th>Hours Used </th>
        <th>Remainaing Hours</th>
        <th>Status</th>
  
    </tr>
    </thead>
    <tbody>
    <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['subscriptions']->value, 'sub');
if ($_from !== null) {
foreach ($_from as $_smarty_tpl->tpl_vars['sub']->value) {
?>
        <tr>
            <td><?php echo $_smarty_tpl->tpl_vars['sub']->value['sl'];?>
</td>
            <td><?php echo $_smarty_tpl->tpl_vars['sub']->value['packagename'];?>
</td>

            <td><?php echo $_smarty_tpl->tpl_vars['sub']->value['totalhours'];?>
</td>
            
            <td><?php echo $_smarty_tpl->tpl_vars['sub']->value['used'];?>
</td>
            
            <td>
            <?php if ($_smarty_tpl->tpl_vars['sub']->value['remaining'] <= 0) {?>
                0
            <?php } else { ?>
             <?php echo $_smarty_tpl->tpl_vars['sub']->value['remaining'];?>

            <?php }?>
            </td>
            <td>
                <?php if ($_smarty_tpl->tpl_vars['sub']->value['remaining'] <= 0) {?>
                                        <span class="label label-danger">Package Expired</span>
                                    <?php } elseif ($_smarty_tpl->tpl_vars['sub']->value['remaining'] > 0) {?>
                                        <span class="label label-success">Active</span>
                                   
                                    <?php } else { ?>
                                        <span class="label label-info"></span>
                                    <?php }?>

            </td>
        </tr>
    <?php
}
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>

    </tbody>
</table><?php }
}
