<?php
/* Smarty version 5.4.2, created on 2025-01-02 07:43:45
  from 'file:../default/invoices_list.tpl' */

/* @var \Smarty\Template $_smarty_tpl */
if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array (
  'version' => '5.4.2',
  'unifunc' => 'content_6775d331a729e3_37058253',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    'd8244c9a92fa9eb692f9850e51295b649cf212bb' => 
    array (
      0 => '../default/invoices_list.tpl',
      1 => 1730635718,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
  ),
))) {
function content_6775d331a729e3_37058253 (\Smarty\Template $_smarty_tpl) {
$_smarty_current_dir = '/Users/razib/Herd/suite/ui/theme/default';
$_smarty_tpl->getInheritance()->init($_smarty_tpl, true);
?>


<?php 
$_smarty_tpl->getInheritance()->instanceBlock($_smarty_tpl, 'Block_1115001536775d331a187a3_25276491', "head");
?>




<?php 
$_smarty_tpl->getInheritance()->instanceBlock($_smarty_tpl, 'Block_16086326426775d331a1c9e0_50563950', "content");
?>


<?php 
$_smarty_tpl->getInheritance()->instanceBlock($_smarty_tpl, 'Block_3471331406775d331a6ebc9_64431777', "script");
?>



<?php $_smarty_tpl->getInheritance()->endChild($_smarty_tpl, ((string)$_smarty_tpl->getValue('layouts_admin')), $_smarty_current_dir);
}
/* {block "head"} */
class Block_1115001536775d331a187a3_25276491 extends \Smarty\Runtime\Block
{
public function callBlock(\Smarty\Template $_smarty_tpl) {
$_smarty_current_dir = '/Users/razib/Herd/suite/ui/theme/default';
?>

    <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/buttons/1.6.2/css/buttons.dataTables.min.css" />
    <style>
        <?php if (empty($_smarty_tpl->getValue('config')['admin_dark_theme'])) {?>
        .table-striped tbody tr:nth-of-type(odd) {
            background-color: #F7F9FC;
        }
        .bg-success{
            color:#23a52d;
        }
        .bg-info{
            color:#2F92B5!important;
        }
        <?php }?>


    </style>

<?php
}
}
/* {/block "head"} */
/* {block "content"} */
class Block_16086326426775d331a1c9e0_50563950 extends \Smarty\Runtime\Block
{
public function callBlock(\Smarty\Template $_smarty_tpl) {
$_smarty_current_dir = '/Users/razib/Herd/suite/ui/theme/default';
?>






    <div class="row">
        <div class="col-md-12">

            <div class="panel">

                <div class="panel-hdr">




                    <h2><?php echo $_smarty_tpl->getValue('_L')['Invoices'];?>
</h2>


                    <div class="panel-toolbar">

                        <div class="btn-group">
                            <a href="<?php echo $_smarty_tpl->getValue('_url');?>
invoices/add/" class="btn btn-primary  btn-sm"> <?php echo $_smarty_tpl->getValue('_L')['Add Invoice'];?>
</a>
                            <a href="<?php echo $_smarty_tpl->getValue('_url');?>
reports/invoices/" class="btn btn-warning btn-sm"> <?php echo $_smarty_tpl->getValue('_L')['View Reports'];?>
</a>
                        </div>

                    </div>
                </div>

                <div class="panel-container">
                    <div class="panel-content">
                        <div class="row">
                            <div class="col-md-3">
                                <div class="dashboard-stat2" style="background: linear-gradient(87deg,#2dce89 0,#2dcecc 100%)!important;border-radius: .375rem; min-height: 1px;
    padding: 1.5rem;
    flex: 1 1 auto">
                                    <div class="number">
                                        <h3 class="h2 font-weight-bold mb-0 text-white">
                                            <span><?php echo $_smarty_tpl->getSmarty()->getModifierCallback('formatCurrency')($_smarty_tpl->getValue('invoice_paid_amount'),$_smarty_tpl->getValue('config')['home_currency']);?>
</span>
                                        </h3>
                                        <small class="h5  mb-0 text-white"><?php echo $_smarty_tpl->getValue('_L')['Paid'];?>
</small>
                                    </div>

                                    <div class="progress-info">


                                        <div class="progress">
                                            <span style="width: <?php echo $_smarty_tpl->getValue('p')['Paid']['percentage'];?>
%;" class="progress-bar bg-info">

                                            </span>
                                        </div>
                                        <div class="progress-status">
                                            <div class="text-nowrap text-white font-weight-600"> <?php echo $_smarty_tpl->getValue('p')['Paid']['percentage'];?>
% </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="col-md-3">
                                <div class="dashboard-stat2" style="background: linear-gradient(87deg,#f5365c 0,#f56036 100%)!important;    border-radius: .375rem;min-height: 1px;
    padding: 1.5rem;
    flex: 1 1 auto">
                                    <div class="number">
                                        <h3 class="h2 font-weight-bold mb-0 text-white">
                                            <span><?php echo $_smarty_tpl->getSmarty()->getModifierCallback('formatCurrency')($_smarty_tpl->getValue('invoice_unpaid_amount'),$_smarty_tpl->getValue('config')['home_currency']);?>
</span>
                                        </h3>
                                        <small class="h5 mb-0 text-white"><?php echo $_smarty_tpl->getValue('_L')['Unpaid'];?>
</small>
                                    </div>
                                    <div class="progress-info">
                                        <div class="progress">
                                            <span style="width: <?php echo $_smarty_tpl->getValue('p')['Unpaid']['percentage'];?>
%;" class="progress-bar  bg-success">
                                                <span class="sr-only"><?php echo $_smarty_tpl->getValue('p')['Unpaid']['percentage'];?>
%</span>
                                            </span>
                                        </div>
                                        <div class="progress-status">
                                            <div class="text-nowrap text-white font-weight-600"> <?php echo $_smarty_tpl->getValue('p')['Unpaid']['percentage'];?>
% </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="col-md-3">
                                <div class="dashboard-stat2 " style="background: linear-gradient(87deg,#5e72e4 0,#825ee4 100%)!important;    border-radius: .375rem; rgba(0,0,0,.05); min-height: 1px;
    padding: 1.5rem;
    flex: 1 1 auto">
                                    <div class="number">
                                        <h3 class="h2 font-weight-bold mb-0 text-white">
                                            <span><?php echo $_smarty_tpl->getSmarty()->getModifierCallback('formatCurrency')($_smarty_tpl->getValue('invoice_partially_paid_amount'),$_smarty_tpl->getValue('config')['home_currency']);?>
</span>
                                        </h3>
                                        <small class="h5 mb-0 text-white""><?php echo $_smarty_tpl->getValue('_L')['Partially Paid'];?>
</small>
                                    </div>
                                    <div class="progress-info">
                                        <div class="progress">
                                            <span style="width: <?php echo $_smarty_tpl->getValue('p')['Partially Paid']['percentage'];?>
%;" class="progress-bar  bg-success">
                                                <span class="sr-only"><?php echo $_smarty_tpl->getValue('p')['Partially Paid']['percentage'];?>
%</span>
                                            </span>
                                        </div>
                                        <div class="progress-status">
                                            <div class="text-nowrap text-white font-weight-600"> <?php echo $_smarty_tpl->getValue('p')['Partially Paid']['percentage'];?>
% </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="col-md-3">
                                <div class="dashboard-stat2 " style="background: linear-gradient(87deg,#172b4d 0,#1a174d 100%)!important;   border-radius: .375rem;min-height: 1px;
    padding: 1.5rem;
    flex: 1 1 auto">
                                    <div class="number">
                                        <h3 class="h2 font-weight-bold mb-0 text-white">
                                            <span class="amount" data-a-sign="<?php echo $_smarty_tpl->getValue('config')['currency_code'];?>
 "><?php echo $_smarty_tpl->getSmarty()->getModifierCallback('formatCurrency')($_smarty_tpl->getValue('invoice_cancelled_amount'),$_smarty_tpl->getValue('config')['home_currency']);?>
</span>
                                        </h3>
                                        <small class="h5  mb-0 text-white"><?php echo $_smarty_tpl->getValue('_L')['Cancelled'];?>
</small>
                                    </div>
                                    <div class="progress-info">
                                        <div class="progress">
                                            <span style="width: <?php echo $_smarty_tpl->getValue('p')['Cancelled']['percentage'];?>
%;" class="progress-bar bg-success">
                                                <span class="sr-only"><?php echo $_smarty_tpl->getValue('p')['Cancelled']['percentage'];?>
%</span>
                                            </span>
                                        </div>
                                        <div class="progress-status">
                                            <div class="text-nowrap text-white font-weight-600"> <?php echo $_smarty_tpl->getValue('p')['Cancelled']['percentage'];?>
% </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <ul class="nav nav-tabs nav-tabs-clean mb-3" role="tablist">
                            <li class="nav-item"><a class="nav-link <?php if ($_smarty_tpl->getValue('tab') == 'filter') {?>active<?php }?>" href="<?php echo $_smarty_tpl->getValue('base_url');?>
invoices/list/"><?php echo $_smarty_tpl->getValue('_L')['Filter'];?>
</a></li>
                            <li class="nav-item"><a class="nav-link <?php if ($_smarty_tpl->getValue('tab') == 'unpaid') {?>active<?php }?>" href="<?php echo $_smarty_tpl->getValue('base_url');?>
invoices/list/"><?php echo $_smarty_tpl->getValue('_L')['Unpaid'];?>
</a></li>
                            <li class="nav-item"><a class="nav-link <?php if ($_smarty_tpl->getValue('tab') == 'partially_paid') {?>active<?php }?>" href="<?php echo $_smarty_tpl->getValue('base_url');?>
invoices/list/0/partially_paid/"><?php echo $_smarty_tpl->getValue('_L')['Partially Paid'];?>
</a></li>
                            <li class="nav-item"><a class="nav-link  <?php if ($_smarty_tpl->getValue('tab') == 'paid') {?>active<?php }?>" href="<?php echo $_smarty_tpl->getValue('base_url');?>
invoices/list/0/paid/"><?php echo $_smarty_tpl->getValue('_L')['Paid'];?>
</a></li>
                            <li class="nav-item"><a class="nav-link <?php if ($_smarty_tpl->getValue('tab') == 'cancelled') {?>active<?php }?>" href="<?php echo $_smarty_tpl->getValue('base_url');?>
invoices/list/0/cancelled/"><?php echo $_smarty_tpl->getValue('_L')['Cancelled'];?>
</a></li>
                            <li class="nav-item"><a class="nav-link <?php if ($_smarty_tpl->getValue('tab') == 'all') {?>active<?php }?>" href="<?php echo $_smarty_tpl->getValue('base_url');?>
invoices/list/0/all/"><?php echo $_smarty_tpl->getValue('_L')['All'];?>
</a></li>
                        </ul>




                        <div class="table-responsive">

                            <table id="clx_datatable" class="table table-striped w-100 sys_table footable">
                                <thead style="background: #f0f2ff">
                                <tr>
                                    <th>#</th>
                                    <th><?php echo $_smarty_tpl->getValue('_L')['Account'];?>
</th>
                                    <th><?php echo $_smarty_tpl->getValue('_L')['Customer Group'];?>
</th>
                                    <th><?php echo $_smarty_tpl->getSmarty()->getModifierCallback('__')('Staff');?>
</th>

                                    <?php if (!empty($_smarty_tpl->getValue('config')['invoice_group'])) {?>
                                        <th>
                                            <?php echo $_smarty_tpl->getValue('_L')['Group'];?>

                                        </th>
                                    <?php }?>

                                    <?php if (!empty($_smarty_tpl->getValue('config')['invoice_single_service'])) {?>
                                        <th>
                                            <?php echo $_smarty_tpl->getSmarty()->getModifierCallback('__')('Service');?>

                                        </th>
                                    <?php }?>


                                    <th><?php echo $_smarty_tpl->getValue('_L')['Title'];?>
</th>



                                    <th><?php echo $_smarty_tpl->getValue('_L')['Amount'];?>
</th>
                                    <th><?php echo $_smarty_tpl->getValue('_L')['Total Paid'];?>
</th>
                                    <th><?php ob_start();
echo $_smarty_tpl->getValue('_L')['Amount Due'];
$_prefixVariable1 = ob_get_clean();
echo $_prefixVariable1;?>
</th>
                                    <th><?php echo $_smarty_tpl->getValue('_L')['Invoice Date'];?>
</th>
                                    <th><?php echo $_smarty_tpl->getValue('_L')['Due Date'];?>
</th>
                                    <th>
                                        <?php echo $_smarty_tpl->getValue('_L')['Status'];?>

                                    </th>
                                    <?php if (!empty($_smarty_tpl->getValue('config')['invoice_items_purchasing'])) {?>
                                        <th><?php echo $_smarty_tpl->getSmarty()->getModifierCallback('__')('Purchase Cost');?>
</th>
                                    <?php }?>
                                    <?php if (!empty($_smarty_tpl->getValue('config')['invoice_items_shipping'])) {?>
                                        <th><?php echo $_smarty_tpl->getSmarty()->getModifierCallback('__')('Shipping Cost');?>
</th>
                                    <?php }?>
                                    <th class="text-end" width="140px;"><?php echo $_smarty_tpl->getValue('_L')['Manage'];?>
</th>
                                </tr>
                                </thead>
                                <tbody>

                                <?php
$_from = $_smarty_tpl->getSmarty()->getRuntime('Foreach')->init($_smarty_tpl, $_smarty_tpl->getValue('d'), 'ds');
$_smarty_tpl->getVariable('ds')->iteration = 0;
$foreach0DoElse = true;
foreach ($_from ?? [] as $_smarty_tpl->getVariable('ds')->value) {
$foreach0DoElse = false;
$_smarty_tpl->getVariable('ds')->iteration++;
$foreach0Backup = clone $_smarty_tpl->getVariable('ds');
?>
                                    <tr>
                                        <td data-value="<?php echo $_smarty_tpl->getValue('ds')['id'];?>
" data-order="<?php echo $_smarty_tpl->getVariable('ds')->iteration;?>
"><a href="<?php echo $_smarty_tpl->getValue('_url');?>
invoices/view/<?php echo $_smarty_tpl->getValue('ds')['id'];?>
/"><?php echo $_smarty_tpl->getValue('ds')['invoicenum'];
if ($_smarty_tpl->getValue('ds')['cn'] != '') {?> <?php echo $_smarty_tpl->getValue('ds')['cn'];?>
 <?php } else { ?> <?php echo $_smarty_tpl->getValue('ds')['id'];?>
 <?php }?></a> </td>
                                        <td>
                                            <?php if ((null !== ($_smarty_tpl->getValue('contacts')[$_smarty_tpl->getValue('ds')['userid']] ?? null))) {?>
                                                <a href="<?php echo $_smarty_tpl->getValue('_url');?>
invoices/view/<?php echo $_smarty_tpl->getValue('ds')['id'];?>
/">
                                                    <strong>
                                                        <?php echo $_smarty_tpl->getValue('ds')['account'];?>

                                                        <?php if ($_smarty_tpl->getValue('contacts')[$_smarty_tpl->getValue('ds')['userid']]->company != '') {?>
                                                            <br>  <?php echo $_smarty_tpl->getValue('contacts')[$_smarty_tpl->getValue('ds')['userid']]->company;?>

                                                        <?php }?>
                                                    </strong>
                                                </a>
                                                <?php if ($_smarty_tpl->getValue('contacts')[$_smarty_tpl->getValue('ds')['userid']]->email != '') {?>
                                                    <div class="mt-1">
                                                        <?php echo $_smarty_tpl->getValue('contacts')[$_smarty_tpl->getValue('ds')['userid']]->email;?>

                                                    </div>
                                                <?php }?>
                                                <?php if ($_smarty_tpl->getValue('contacts')[$_smarty_tpl->getValue('ds')['userid']]->phone != '') {?>
                                                    <div class="mt-1">
                                                        <?php echo $_smarty_tpl->getValue('contacts')[$_smarty_tpl->getValue('ds')['userid']]->phone;?>

                                                    </div>
                                                <?php }?>
                                            <?php }?>
                                        </td>
                                        <td>
                                            <?php if ((null !== ($_smarty_tpl->getValue('contacts')[$_smarty_tpl->getValue('ds')['userid']] ?? null))) {?>
                                                <?php if (!empty($_smarty_tpl->getValue('contacts')[$_smarty_tpl->getValue('ds')['userid']]->gid)) {?>
                                                    <?php echo $_smarty_tpl->getValue('contacts')[$_smarty_tpl->getValue('ds')['userid']]->gname;?>

                                                <?php }?>
                                            <?php }?>
                                        </td>

                                        <td>
                                            <?php if ((null !== ($_smarty_tpl->getValue('staffs')[$_smarty_tpl->getValue('ds')['aid']] ?? null))) {?>
                                                <?php echo $_smarty_tpl->getValue('staffs')[$_smarty_tpl->getValue('ds')['aid']]->fullname;?>

                                            <?php }?>
                                        </td>

                                        <?php if (!empty($_smarty_tpl->getValue('config')['invoice_group'])) {?>
                                            <td>
                                                <?php if (!empty($_smarty_tpl->getValue('invoice_groups')[$_smarty_tpl->getValue('ds')['group_id']])) {?>
                                                    <?php echo $_smarty_tpl->getValue('invoice_groups')[$_smarty_tpl->getValue('ds')['group_id']]->name;?>

                                                <?php }?>
                                            </td>
                                        <?php }?>

                                        <?php if (!empty($_smarty_tpl->getValue('config')['invoice_single_service'])) {?>
                                            <td>
                                                <?php if (!empty($_smarty_tpl->getValue('services')[$_smarty_tpl->getValue('ds')['service_id']])) {?>
                                                    <?php echo $_smarty_tpl->getValue('services')[$_smarty_tpl->getValue('ds')['service_id']]->name;?>

                                                <?php }?>
                                            </td>
                                        <?php }?>

                                        <td>
                                            <?php if (!empty($_smarty_tpl->getValue('ds')['title'])) {?>
                                                <a href="<?php echo $_smarty_tpl->getValue('_url');?>
invoices/view/<?php echo $_smarty_tpl->getValue('ds')['id'];?>
/">
                                                    <?php echo $_smarty_tpl->getValue('ds')['title'];?>

                                                </a>
                                            <?php }?>
                                        </td>
                                        <td><?php echo $_smarty_tpl->getSmarty()->getModifierCallback('formatCurrency')($_smarty_tpl->getValue('ds')['total'],$_smarty_tpl->getValue('ds')['currency_iso_code']);?>
</td>
                                        <td>
                                            <?php if (!empty($_smarty_tpl->getValue('ds')['credit'] && $_smarty_tpl->getValue('ds')['credit'] > 0)) {?>
                                                <?php echo $_smarty_tpl->getSmarty()->getModifierCallback('formatCurrency')($_smarty_tpl->getValue('ds')['credit'],$_smarty_tpl->getValue('ds')['currency_iso_code']);?>

                                            <?php }?>
                                        </td>
                                        <td>
                                            <?php if (!empty($_smarty_tpl->getValue('ds')['credit'] && $_smarty_tpl->getValue('ds')['credit'] > 0) && $_smarty_tpl->getValue('ds')['credit'] < $_smarty_tpl->getValue('ds')['total']) {?>
                                                <?php echo $_smarty_tpl->getSmarty()->getModifierCallback('formatCurrency')(($_smarty_tpl->getValue('ds')['total']-$_smarty_tpl->getValue('ds')['credit']),$_smarty_tpl->getValue('ds')['currency_iso_code']);?>

                                            <?php }?>
                                        </td>
                                        <td data-value="<?php echo $_smarty_tpl->getSmarty()->getModifierCallback('strtotime')($_smarty_tpl->getValue('ds')['date']);?>
"><?php echo $_smarty_tpl->getSmarty()->getModifierCallback('date')($_smarty_tpl->getValue('config')['df'],$_smarty_tpl->getSmarty()->getModifierCallback('strtotime')($_smarty_tpl->getValue('ds')['date']));?>
</td>
                                        <td data-value="<?php echo $_smarty_tpl->getSmarty()->getModifierCallback('strtotime')($_smarty_tpl->getValue('ds')['duedate']);?>
"><?php echo $_smarty_tpl->getSmarty()->getModifierCallback('date')($_smarty_tpl->getValue('config')['df'],$_smarty_tpl->getSmarty()->getModifierCallback('strtotime')($_smarty_tpl->getValue('ds')['duedate']));?>
</td>
                                        <td>

                                            <?php if ($_smarty_tpl->getValue('ds')['status'] == 'Unpaid') {?>
                                                <span class="badge badge-outline badge-outline-warning"><?php echo $_smarty_tpl->getSmarty()->getModifierCallback('ib_lan_get_line')($_smarty_tpl->getValue('ds')['status']);?>
</span>
                                            <?php } elseif ($_smarty_tpl->getValue('ds')['status'] == 'Paid') {?>
                                                <span class="badge badge-outline badge-outline-success"><?php echo $_smarty_tpl->getSmarty()->getModifierCallback('ib_lan_get_line')($_smarty_tpl->getValue('ds')['status']);?>
</span>
                                            <?php } elseif ($_smarty_tpl->getValue('ds')['status'] == 'Partially Paid') {?>
                                                <span class="badge badge-outline badge-outline-warning"><?php echo $_smarty_tpl->getSmarty()->getModifierCallback('ib_lan_get_line')($_smarty_tpl->getValue('ds')['status']);?>
</span>
                                            <?php } elseif ($_smarty_tpl->getValue('ds')['status'] == 'Cancelled') {?>
                                                <span class="badge badge-outline badge-outline-warning"><?php echo $_smarty_tpl->getSmarty()->getModifierCallback('ib_lan_get_line')($_smarty_tpl->getValue('ds')['status']);?>
</span>
                                            <?php } else { ?>
                                                <?php echo $_smarty_tpl->getSmarty()->getModifierCallback('ib_lan_get_line')($_smarty_tpl->getValue('ds')['status']);?>

                                            <?php }?>



                                        </td>

                                        <?php if (!empty($_smarty_tpl->getValue('config')['invoice_items_purchasing'])) {?>
                                            <td>
                                                <?php if (!empty($_smarty_tpl->getValue('ds')['purchase_cost'])) {?>
                                                    <?php echo $_smarty_tpl->getSmarty()->getModifierCallback('formatCurrency')($_smarty_tpl->getValue('ds')['purchase_cost'],$_smarty_tpl->getValue('ds')['currency_iso_code']);?>

                                                <?php }?>
                                            </td>
                                        <?php }?>
                                        <?php if (!empty($_smarty_tpl->getValue('config')['invoice_items_shipping'])) {?>
                                            <td>
                                                <?php if (!empty($_smarty_tpl->getValue('ds')['shipping_cost'])) {?>
                                                    <?php echo $_smarty_tpl->getSmarty()->getModifierCallback('formatCurrency')($_smarty_tpl->getValue('ds')['shipping_cost'],$_smarty_tpl->getValue('ds')['currency_iso_code']);?>

                                                <?php }?>
                                            </td>
                                        <?php }?>

                                        <td class="text-end">


                                            <div class="btn-group">
                                                <a href="<?php echo $_smarty_tpl->getValue('_url');?>
invoices/view/<?php echo $_smarty_tpl->getValue('ds')['id'];?>
/" class="btn btn-primary btn-icon" data-bs-toggle="tooltip" data-placement="top" title="<?php echo $_smarty_tpl->getValue('_L')['View'];?>
"><i class="fal fa-file-alt"></i></a>

                                                <a href="<?php echo $_smarty_tpl->getValue('_url');?>
invoices/clone/<?php echo $_smarty_tpl->getValue('ds')['id'];?>
/" class="btn btn-success btn-icon" data-bs-toggle="tooltip" data-placement="top" title="<?php echo $_smarty_tpl->getValue('_L')['Clone'];?>
"><i class="fal fa-copy"></i></a>


                                                <a href="<?php echo $_smarty_tpl->getValue('_url');?>
invoices/edit/<?php echo $_smarty_tpl->getValue('ds')['id'];?>
/" class="btn btn-info btn-icon" data-bs-toggle="tooltip" data-placement="top" title="<?php echo $_smarty_tpl->getValue('_L')['Edit'];?>
"><i class="fal fa-file-edit"></i></a>

                                                <?php if ($_smarty_tpl->getValue('ds')['r'] != '0') {?>

                                                    <a href="<?php echo $_smarty_tpl->getValue('_url');?>
invoices/stop_recurring/<?php echo $_smarty_tpl->getValue('ds')['id'];?>
/" class="btn btn-info btn-icon" data-bs-toggle="tooltip" data-placement="top" title="<?php echo $_smarty_tpl->getValue('_L')['Stop Recurring'];?>
"><i class="fal fa-stop"></i></a>

                                                <?php }?>

                                                <a href="#" class="btn btn-danger btn-icon cdelete" id="iid<?php echo $_smarty_tpl->getValue('ds')['id'];?>
" data-bs-toggle="tooltip" data-placement="top" title="<?php echo $_smarty_tpl->getValue('_L')['Delete'];?>
"><i class="fal fa-trash-alt"></i></a>
                                            </div>


                                        </td>
                                    </tr>
                                <?php
$_smarty_tpl->setVariable('ds', $foreach0Backup);
}
$_smarty_tpl->getSmarty()->getRuntime('Foreach')->restore($_smarty_tpl, 1);?>

                                </tbody>



                            </table>

                        </div>
                    </div>

                </div>

            </div>
        </div>
    </div>
<?php
}
}
/* {/block "content"} */
/* {block "script"} */
class Block_3471331406775d331a6ebc9_64431777 extends \Smarty\Runtime\Block
{
public function callBlock(\Smarty\Template $_smarty_tpl) {
$_smarty_current_dir = '/Users/razib/Herd/suite/ui/theme/default';
?>



    <?php echo '<script'; ?>
 type="text/javascript" src="https://cdn.datatables.net/buttons/1.6.2/js/dataTables.buttons.min.js"><?php echo '</script'; ?>
>
    <?php echo '<script'; ?>
 type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"><?php echo '</script'; ?>
>
    <?php echo '<script'; ?>
 type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/pdfmake.min.js"><?php echo '</script'; ?>
>
    <?php echo '<script'; ?>
 type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/vfs_fonts.js"><?php echo '</script'; ?>
>
    <?php echo '<script'; ?>
 type="text/javascript" src="https://cdn.datatables.net/buttons/1.6.2/js/buttons.html5.min.js"><?php echo '</script'; ?>
>

    <?php echo '<script'; ?>
>
        $(function () {

            var $modal = $('#cloudonex_body');

            $('#clx_datatable').dataTable(
                {
                    responsive: true,
                    lengthChange: false,
                    dom:
                    /*	--- Layout Structure
                        --- Options
                        l	-	length changing input control
                        f	-	filtering input
                        t	-	The table!
                        i	-	Table information summary
                        p	-	pagination control
                        r	-	processing display element
                        B	-	buttons
                        R	-	ColReorder
                        S	-	Select

                        --- Markup
                        < and >				- div element
                        <"class" and >		- div with a class
                        <"#id" and >		- div with an ID
                        <"#id.class" and >	- div with an ID and a class

                        --- Further reading
                        https://datatables.net/reference/option/dom
                        --------------------------------------
                     */
                        "<'row mb-3'<'col-sm-12 col-md-6 d-flex align-items-center justify-content-start'f><'col-sm-12 col-md-6 d-flex align-items-center justify-content-end'lB>>" +
                        "<'row'<'col-sm-12'tr>>" +
                        "<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>",
                    buttons: [
                        /*{
                            extend:    'colvis',
                            text:      'Column Visibility',
                            titleAttr: 'Col visibility',
                            className: 'mr-sm-3'
                        },*/
                        {
                            extend: 'pdfHtml5',
                            text: 'PDF',
                            titleAttr: 'Generate PDF',
                            className: 'btn-danger btn-sm mr-1'
                        },
                        {
                            extend: 'excelHtml5',
                            text: 'Excel',
                            titleAttr: 'Generate Excel',
                            className: 'btn-success btn-sm mr-1'
                        },
                        {
                            extend: 'csvHtml5',
                            text: 'CSV',
                            titleAttr: 'Generate CSV',
                            className: 'btn-primary btn-sm mr-1'
                        },
                        {
                            extend: 'copyHtml5',
                            text: 'Copy',
                            titleAttr: 'Copy to clipboard',
                            className: 'btn-warning btn-sm mr-1'
                        },
                        {
                            extend: 'print',
                            text: 'Print',
                            titleAttr: 'Print Table',
                            className: 'btn-secondary btn-sm'
                        }
                    ],
                    "language": {
                        "emptyTable": "<?php echo $_smarty_tpl->getValue('_L')['No items to display'];?>
",
                        "info":      "<?php echo $_smarty_tpl->getValue('_L')['Showing _START_ to _END_ of _TOTAL_ entries'];?>
",
                        "infoEmpty":      "<?php echo $_smarty_tpl->getValue('_L')['Showing 0 to 0 of 0 entries'];?>
",
                        buttons: {
                            pageLength: '<?php echo $_smarty_tpl->getValue('_L')['Show all'];?>
'
                        },
                        searchPlaceholder: "<?php echo $_smarty_tpl->getSmarty()->getModifierCallback('__')('Search');?>
"
                    },
                }
            );


            $modal.on('click', '.cdelete', function(e){

                e.preventDefault();
                var id = this.id;
                app.confirm("<?php echo $_smarty_tpl->getSmarty()->getModifierCallback('__')('are_you_sure');?>
", function(result) {
                    if(result){
                        window.location.href = base_url + "delete/invoice/" + id;
                    }
                });


            });





        });
    <?php echo '</script'; ?>
>
<?php
}
}
/* {/block "script"} */
}
