<?php
/* Smarty version 3.1.29, created on 2019-04-24 10:04:33
  from "/home/achahost/public_html/account/templates/Five/masspay.tpl" */

if ($_smarty_tpl->smarty->ext->_validateCompiled->decodeProperties($_smarty_tpl, array (
  'has_nocache_code' => false,
  'version' => '3.1.29',
  'unifunc' => 'content_5cc034b1b8b116_86641438',
  'file_dependency' => 
  array (
    '4a7ec92ba95e8d1100dee392bf173058038eaadc' => 
    array (
      0 => '/home/achahost/public_html/account/templates/Five/masspay.tpl',
      1 => 1499437492,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
  ),
),false)) {
function content_5cc034b1b8b116_86641438 ($_smarty_tpl) {
?>
<form method="post" action="clientarea.php?action=masspay" class="form-horizontal">
    <input type="hidden" name="geninvoice" value="true" />

    <table class="table">
        <thead>
            <tr>
                <th><?php echo $_smarty_tpl->tpl_vars['LANG']->value['invoicesdescription'];?>
</th>
                <th><?php echo $_smarty_tpl->tpl_vars['LANG']->value['invoicesamount'];?>
</th>
            </tr>
        </thead>
        <tbody>
            <?php
$_from = $_smarty_tpl->tpl_vars['invoiceitems']->value;
if (!is_array($_from) && !is_object($_from)) {
settype($_from, 'array');
}
$__foreach_invoiceitem_0_saved_item = isset($_smarty_tpl->tpl_vars['invoiceitem']) ? $_smarty_tpl->tpl_vars['invoiceitem'] : false;
$__foreach_invoiceitem_0_saved_key = isset($_smarty_tpl->tpl_vars['invid']) ? $_smarty_tpl->tpl_vars['invid'] : false;
$_smarty_tpl->tpl_vars['invoiceitem'] = new Smarty_Variable();
$_smarty_tpl->tpl_vars['invid'] = new Smarty_Variable();
$_smarty_tpl->tpl_vars['invoiceitem']->_loop = false;
foreach ($_from as $_smarty_tpl->tpl_vars['invid']->value => $_smarty_tpl->tpl_vars['invoiceitem']->value) {
$_smarty_tpl->tpl_vars['invoiceitem']->_loop = true;
$__foreach_invoiceitem_0_saved_local_item = $_smarty_tpl->tpl_vars['invoiceitem'];
?>
                <tr>
                    <td colspan="2" class="bg-info">
                        <strong><?php echo $_smarty_tpl->tpl_vars['LANG']->value['invoicenumber'];?>
 <?php 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->tpl_vars['invoiceitem']->value;
if (!is_array($_from) && !is_object($_from)) {
settype($_from, 'array');
}
$__foreach_item_1_saved_item = isset($_smarty_tpl->tpl_vars['item']) ? $_smarty_tpl->tpl_vars['item'] : false;
$_smarty_tpl->tpl_vars['item'] = new Smarty_Variable();
$_smarty_tpl->tpl_vars['item']->_loop = false;
foreach ($_from as $_smarty_tpl->tpl_vars['item']->value) {
$_smarty_tpl->tpl_vars['item']->_loop = true;
$__foreach_item_1_saved_local_item = $_smarty_tpl->tpl_vars['item'];
?>
                    <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->tpl_vars['item'] = $__foreach_item_1_saved_local_item;
}
if ($__foreach_item_1_saved_item) {
$_smarty_tpl->tpl_vars['item'] = $__foreach_item_1_saved_item;
}
?>
            <?php
$_smarty_tpl->tpl_vars['invoiceitem'] = $__foreach_invoiceitem_0_saved_local_item;
}
if (!$_smarty_tpl->tpl_vars['invoiceitem']->_loop) {
?>
                <tr>
                    <td colspan="6" align="center"><?php echo $_smarty_tpl->tpl_vars['LANG']->value['norecordsfound'];?>
</td>
                </tr>
            <?php
}
if ($__foreach_invoiceitem_0_saved_item) {
$_smarty_tpl->tpl_vars['invoiceitem'] = $__foreach_invoiceitem_0_saved_item;
}
if ($__foreach_invoiceitem_0_saved_key) {
$_smarty_tpl->tpl_vars['invid'] = $__foreach_invoiceitem_0_saved_key;
}
?>
            <tr class="masspay-total">
                <td class="text-right"><?php echo $_smarty_tpl->tpl_vars['LANG']->value['invoicessubtotal'];?>
:</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 $_smarty_tpl->tpl_vars['LANG']->value['invoicescredit'];?>
:</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 $_smarty_tpl->tpl_vars['LANG']->value['invoicespartialpayments'];?>
:</td>
                    <td><?php echo $_smarty_tpl->tpl_vars['partialpayments']->value;?>
</td>
                </tr>
            <?php }?>
            <tr class="masspay-total">
                <td class="text-right"><?php echo $_smarty_tpl->tpl_vars['LANG']->value['invoicestotaldue'];?>
:</td>
                <td><?php echo $_smarty_tpl->tpl_vars['total']->value;?>
</td>
            </tr>
        </tbody>
    </table>

    <div class="row">
        <div class="col-sm-6 col-sm-offset-3">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h3 class="panel-title"><?php echo $_smarty_tpl->tpl_vars['LANG']->value['masspaymentselectgateway'];?>
</h3>
                </div>
                <div class="panel-body">
                    <fieldset>
                        <div class="col-md-12">
                            <div class="form-group">
                                <label for="paymentmethod" class="control-label"><?php echo $_smarty_tpl->tpl_vars['LANG']->value['orderpaymentmethod'];?>
:</label><br/>
                                <select name="paymentmethod" id="paymentmethod" class="form-control">
                                    <?php
$_from = $_smarty_tpl->tpl_vars['gateways']->value;
if (!is_array($_from) && !is_object($_from)) {
settype($_from, 'array');
}
$__foreach_gateway_2_saved_item = isset($_smarty_tpl->tpl_vars['gateway']) ? $_smarty_tpl->tpl_vars['gateway'] : false;
$_smarty_tpl->tpl_vars['gateway'] = new Smarty_Variable();
$_smarty_tpl->tpl_vars['gateway']->_loop = false;
foreach ($_from as $_smarty_tpl->tpl_vars['gateway']->value) {
$_smarty_tpl->tpl_vars['gateway']->_loop = true;
$__foreach_gateway_2_saved_local_item = $_smarty_tpl->tpl_vars['gateway'];
?>
                                        <option value="<?php echo $_smarty_tpl->tpl_vars['gateway']->value['sysname'];?>
"><?php echo $_smarty_tpl->tpl_vars['gateway']->value['name'];?>
</option>
                                    <?php
$_smarty_tpl->tpl_vars['gateway'] = $__foreach_gateway_2_saved_local_item;
}
if ($__foreach_gateway_2_saved_item) {
$_smarty_tpl->tpl_vars['gateway'] = $__foreach_gateway_2_saved_item;
}
?>
                                </select>
                            </div>
                            <div class="form-group">
                                <input type="submit" value="<?php echo $_smarty_tpl->tpl_vars['LANG']->value['masspaymakepayment'];?>
" class="btn btn-primary btn-block" />
                            </div>
                        </div>
                    </fieldset>
                </div>
            </div>
        </div>
    </div>

</form>
<?php }
}
