<?php
/* Smarty version 3.1.36, created on 2026-01-01 08:48:38
  from '/home/planetgp/public_html/billing/templates/twenty-one/masspay.tpl' */

/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
  'version' => '3.1.36',
  'unifunc' => 'content_695634e6c49513_66961538',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    '3717bd901f483b6acd09c91bd38767282263518f' => 
    array (
      0 => '/home/planetgp/public_html/billing/templates/twenty-one/masspay.tpl',
      1 => 1686724568,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
  ),
),false)) {
function content_695634e6c49513_66961538 (Smarty_Internal_Template $_smarty_tpl) {
?><form method="post" action="clientarea.php?action=masspay">
    <input type="hidden" name="geninvoice" value="true" />

    <div class="card">
        <div class="card-body">
            <h3 class="card-title"><?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['lang'][0], array( array('key'=>"masspaytitle"),$_smarty_tpl ) );?>
</h3>
            <p class="text-muted"><?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['lang'][0], array( array('key'=>"masspaydescription"),$_smarty_tpl ) );?>
</p>

            <table class="table">
                <thead>
                    <tr>
                        <th><?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['lang'][0], array( array('key'=>'invoicesdescription'),$_smarty_tpl ) );?>
</th>
                        <th><?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['lang'][0], array( array('key'=>'invoicesamount'),$_smarty_tpl ) );?>
</th>
                    </tr>
                </thead>
                <tbody>
                    <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['invoiceitems']->value, 'invoiceitem', false, 'invid');
$_smarty_tpl->tpl_vars['invoiceitem']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['invid']->value => $_smarty_tpl->tpl_vars['invoiceitem']->value) {
$_smarty_tpl->tpl_vars['invoiceitem']->do_else = false;
?>
                        <tr>
                            <td colspan="2" class="bg-default">
                                <strong><?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['lang'][0], array( array('key'=>'invoicenumber'),$_smarty_tpl ) );?>
 <?php if ($_smarty_tpl->tpl_vars['invoiceitem']->value[0]['invoicenum']) {
echo $_smarty_tpl->tpl_vars['invoiceitem']->value[0]['invoicenum'];
} else {
echo $_smarty_tpl->tpl_vars['invid']->value;
}?></strong>
                                <input type="hidden" name="invoiceids[]" value="<?php echo $_smarty_tpl->tpl_vars['invid']->value;?>
" />
                            </td>
                        </tr>
                        <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['invoiceitem']->value, 'item');
$_smarty_tpl->tpl_vars['item']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['item']->value) {
$_smarty_tpl->tpl_vars['item']->do_else = false;
?>
                            <tr class="masspay-invoice-detail">
                                <td><?php echo $_smarty_tpl->tpl_vars['item']->value['description'];?>
</td>
                                <td><?php echo $_smarty_tpl->tpl_vars['item']->value['amount'];?>
</td>
                            </tr>
                        <?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
                    <?php
}
if ($_smarty_tpl->tpl_vars['invoiceitem']->do_else) {
?>
                        <tr>
                            <td colspan="6" align="center"><?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['lang'][0], array( array('key'=>'norecordsfound'),$_smarty_tpl ) );?>
</td>
                        </tr>
                    <?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
                    <tr class="masspay-total">
                        <td class="text-right"><?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['lang'][0], array( array('key'=>'invoicessubtotal'),$_smarty_tpl ) );?>
:</td>
                        <td><?php echo $_smarty_tpl->tpl_vars['subtotal']->value;?>
</td>
                    </tr>
                    <?php if ($_smarty_tpl->tpl_vars['tax']->value) {?>
                        <tr class="masspay-total">
                            <td class="text-right"><?php echo $_smarty_tpl->tpl_vars['taxrate1']->value;?>
% <?php echo $_smarty_tpl->tpl_vars['taxname1']->value;?>
:</td>
                            <td><?php echo $_smarty_tpl->tpl_vars['tax']->value;?>
</td>
                        </tr>
                    <?php }?>
                    <?php if ($_smarty_tpl->tpl_vars['tax2']->value) {?>
                        <tr class="masspay-total">
                            <td class="text-right"><?php echo $_smarty_tpl->tpl_vars['taxrate2']->value;?>
% <?php echo $_smarty_tpl->tpl_vars['taxname2']->value;?>
:</td>
                            <td><?php echo $_smarty_tpl->tpl_vars['tax2']->value;?>
</td>
                        </tr>
                    <?php }?>
                    <?php if ($_smarty_tpl->tpl_vars['credit']->value) {?>
                        <tr class="masspay-total">
                            <td class="text-right"><?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['lang'][0], array( array('key'=>'invoicescredit'),$_smarty_tpl ) );?>
:</td>
                            <td><?php echo $_smarty_tpl->tpl_vars['credit']->value;?>
</td>
                        </tr>
                    <?php }?>
                    <?php if ($_smarty_tpl->tpl_vars['partialpayments']->value) {?>
                        <tr class="masspay-total">
                            <td class="text-right"><?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['lang'][0], array( array('key'=>'invoicespartialpayments'),$_smarty_tpl ) );?>
:</td>
                            <td><?php echo $_smarty_tpl->tpl_vars['partialpayments']->value;?>
</td>
                        </tr>
                    <?php }?>
                    <tr class="masspay-total">
                        <td class="text-right"><?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['lang'][0], array( array('key'=>'invoicestotaldue'),$_smarty_tpl ) );?>
:</td>
                        <td><?php echo $_smarty_tpl->tpl_vars['total']->value;?>
</td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>

    <div class="row">
        <div class="col-sm-6 offset-sm-3">
            <div class="card bg-default">
                <div class="card-header">
                    <h3 class="card-title m-0"><?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['lang'][0], array( array('key'=>'masspaymentselectgateway'),$_smarty_tpl ) );?>
</h3>
                </div>
                <div class="card-body">
                    <fieldset>
                        <div class="col-md-12">
                            <div class="form-group">
                                <label for="paymentmethod" class="col-form-label"><?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['lang'][0], array( array('key'=>'orderpaymentmethod'),$_smarty_tpl ) );?>
:</label><br/>
                                <select name="paymentmethod" id="paymentmethod" class="form-control custom-select">
                                    <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['gateways']->value, 'gateway');
$_smarty_tpl->tpl_vars['gateway']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['gateway']->value) {
$_smarty_tpl->tpl_vars['gateway']->do_else = false;
?>
                                        <option value="<?php echo $_smarty_tpl->tpl_vars['gateway']->value['sysname'];?>
"><?php echo $_smarty_tpl->tpl_vars['gateway']->value['name'];?>
</option>
                                    <?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
                                </select>
                            </div>
                            <div class="form-group">
                                <button type="submit" class="btn btn-primary btn-block" id="btnMassPayMakePayment">
                                    <?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['lang'][0], array( array('key'=>'masspaymakepayment'),$_smarty_tpl ) );?>

                                </button>
                            </div>
                        </div>
                    </fieldset>
                </div>
            </div>
        </div>
    </div>

</form>
<?php }
}
