<?php
/* Smarty version 3.1.33, created on 2020-08-11 11:09:59
  from '/Users/codeworldweb.com/websites/uvocorp/content/modules/wallet/views/nav_content.tpl' */

/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
  'version' => '3.1.33',
  'unifunc' => 'content_5f327c87cd7e96_18733716',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    'fcde92d088e49ceaabd2103e0a4bc84e8ca90ae6' => 
    array (
      0 => '/Users/codeworldweb.com/websites/uvocorp/content/modules/wallet/views/nav_content.tpl',
      1 => 1597140933,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
  ),
),false)) {
function content_5f327c87cd7e96_18733716 (Smarty_Internal_Template $_smarty_tpl) {
?><div class="tab-pane" id="wallet">
    <div class="row mb10">
        <div class="col-sm-4">
            <div class="stat-panel bg-gradient-primary">
                <div class="stat-cell">
                    <i class="fa fa-dollar-sign bg-icon"></i>
                    <span class="text-xlg"><?php echo htmlspecialchars(formatPrice($_smarty_tpl->tpl_vars['wallet_balance']->value), ENT_QUOTES, 'UTF-8');?>
</span><br>
                    <span class="text-lg">Balance</span><br>
                </div>
            </div>

            <button data-toggle="modal" data-size="small" data-url="#modalLoadWallet" class="btn btn-primary">
                <i class="fa fa-plus"></i> Load Funds
            </button>
            <button data-toggle="modal" data-size="small" data-url="#modalEditWallet" data-options='{"wallet_balance":<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['wallet_balance']->value, ENT_QUOTES, 'UTF-8');?>
}' class="btn btn-default">
                <i class="fa fa-edit"></i> Edit Balance
            </button>
        </div>
    </div>

    <?php if (count($_smarty_tpl->tpl_vars['transactions']->value)) {?>
        <div class="table-responsive">
            <table class="table table-striped table-bordered table-hover js_dataTable">
                <thead>
                    <tr>
                        <th>Type</th>
                        <th>Amount</th>
                        <th>Date</th>
                    </tr>
                </thead>
                <tbody>
                    <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['transactions']->value, 'transaction');
if ($_from !== null) {
foreach ($_from as $_smarty_tpl->tpl_vars['transaction']->value) {
?>
                        <tr>
                            <td>
                                <?php echo htmlspecialchars(ucfirst($_smarty_tpl->tpl_vars['transaction']->value['source']), ENT_QUOTES, 'UTF-8');?>
 <?php if ($_smarty_tpl->tpl_vars['transaction']->value['wallet_in']) {
echo htmlspecialchars(ucfirst($_smarty_tpl->tpl_vars['transaction']->value['payment_method']), ENT_QUOTES, 'UTF-8');
}?>
                            </td>
                            <td>
                                <span class="<?php if ($_smarty_tpl->tpl_vars['transaction']->value['wallet_in']) {?>text-success<?php } else { ?>text-danger<?php }?>">
                                    <?php if ($_smarty_tpl->tpl_vars['transaction']->value['wallet_in']) {?>+<?php } else { ?>-<?php }?> <?php echo htmlspecialchars($_smarty_tpl->tpl_vars['transaction']->value['amountFormatted'], ENT_QUOTES, 'UTF-8');?>

                                </span>
                            </td>
                            <td><span class="js_moment" data-time="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['transaction']->value['date'], ENT_QUOTES, 'UTF-8');?>
"><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['transaction']->value['date'], ENT_QUOTES, 'UTF-8');?>
</span></td>
                        </tr>
                    <?php
}
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
                </tbody>
            </table>
        </div>

    <?php } else { ?>
        <div class="text-center x-muted"> 
            <img class="mb20" width="15%" src="/static/images/no_results.png">
            <p class="mb10"><strong>No transactions to show</strong></p>
        </div>
    <?php }?>
</div>

<!-- Modal Load Wallet -->
<?php echo '<script'; ?>
 id="modalLoadWallet" type="text/template">
    <form class="js_ajax-forms p0 m0" data-url="/<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['module_name']->value, ENT_QUOTES, 'UTF-8');?>
/loadWallet" method="POST">
        <input name="wallet_id" type="hidden" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['wallet_id']->value, ENT_QUOTES, 'UTF-8');?>
"/>
        <div class="modal-header">
            <h5 class="modal-title">Load Funds</h5>
            <span class="modal-close" data-dismiss="modal" aria-label="Close">
                <i class="fa fa-times"></i>
            </span>
        </div>
        <div class="modal-body">

            <div class="form-group form-row">
                <label class="control-label text-left">Amount</label>
                <div class="input-group">
                    <div class="input-group-prepend"> 
                        <span class="input-group-text d-none d-sm-block">$</span> 
                    </div>
                    <input name="amount" type="text" class="form-control force-integer" autocomplete="off">
                </div>
            </div>
            <!-- success -->
            <div class="alert alert-success mt10 x-hidden" role="alert"></div>
            <!-- success -->

            <!-- error -->
            <div class="alert alert-danger mt10 x-hidden" role="alert"></div>
            <!-- error -->
        </div>
        <div class="modal-footer">
            <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
            <button type="submit" class="btn btn-info" id="modal-confirm-ok">Confirm</button>
        </div>
    </form>
<?php echo '</script'; ?>
>
<!-- Modal Load Wallet -->

<!-- Modal Edit Wallet -->
<?php echo '<script'; ?>
 id="modalEditWallet" type="text/template">
    <form class="js_ajax-forms p0 m0" data-url="/<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['module_name']->value, ENT_QUOTES, 'UTF-8');?>
/editWalletBalance" method="POST">
        <input name="wallet_id" type="hidden" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['wallet_id']->value, ENT_QUOTES, 'UTF-8');?>
"/>
        <div class="modal-header">
            <h5 class="modal-title">Load Funds</h5>
            <span class="modal-close" data-dismiss="modal" aria-label="Close">
                <i class="fa fa-times"></i>
            </span>
        </div>
        <div class="modal-body">

            <div class="form-group form-row">
                <label class="control-label text-left">Amount</label>
                <div class="input-group">
                    <div class="input-group-prepend"> 
                        <span class="input-group-text d-none d-sm-block">$</span> 
                    </div>
                    <input name="amount" type="text" class="form-control force-integer" autocomplete="off" value="{{wallet_balance}}">
                </div>
            </div>
            <!-- success -->
            <div class="alert alert-success mt10 x-hidden" role="alert"></div>
            <!-- success -->

            <!-- error -->
            <div class="alert alert-danger mt10 x-hidden" role="alert"></div>
            <!-- error -->
        </div>
        <div class="modal-footer">
            <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
            <button type="submit" class="btn btn-info" id="modal-confirm-ok">Save Changes</button>
        </div>
    </form>
<?php echo '</script'; ?>
>
<!-- Modal Edit Wallet -->

<?php }
}
