PHP File Manager
Editing File: payments.php
<div class="row"> <div class="col-sm-7"> <table class="table table-striped table-bordered"> <thead> <tr> <th>Date</th> <th>Payment type</th> <th>Preferred</th> <th>Amount</th> <th>Order</th> <th width="100">Actions</th> </tr> </thead> <tbody> <?php if(!empty($all_payments)): ?> <?php $payment_split = NULL; foreach($all_payments as $payment_info): ?> <?php if($payment_split != $payment_info->payment_order): ?> <tr> <th colspan="6"><?php echo ($payment_info->pending_payment) ? 'Unconfirmed payments' : (($payment_info->unpaid_order) ? 'Unpaid orders' : 'Payments'); ?></th> </tr> <?php $payment_split = $payment_info->payment_order; endif; ?> <tr> <td><?php echo date('jS F Y', $payment_info->date); ?></td> <td><?php echo ($payment_info->payment_type) ? accounting_payment_type($payment_info->payment_type) : '<em>N/A</em>'; ?></td> <td><?php echo ($payment_info->preferred_payment) ? payment_type($payment_info->preferred_payment) : '<em>N/A</em>'; ?></td> <td><?php echo display_money( ($payment_info->amount) ? $payment_info->amount : $payment_info->order_total_inc_vat); ?></td> <td><?php echo ($payment_info->order_id) ? '<a href="/orders/view/' . $payment_info->order_id . '">#' . $payment_info->order_number . '</a>' : '<em>N/A</em>'; ?></td> <td> <?php if($payment_info->pending_payment || $payment_info->unpaid_order): ?> <a href="/customers/view/<?php echo $customer_info->customer_id; ?>/payments/confirm/<?php echo $payment_info->order_id; ?>" onclick="return confirm('Are you sure this payment has been confirmed by cash?');"><img src="/assets/images/icons/money_add.png" alt="" /></a> <a href="/customers/view/<?php echo $customer_info->customer_id; ?>/payments/confirm/<?php echo $payment_info->order_id; ?>/<?php echo PAYMENT_TYPE_BACS; ?>" onclick="return confirm('Are you sure this payment has been confirmed by BACS?');"><img src="/assets/images/icons/lightning_add.png" alt="" /></a> <a href="/customers/view/<?php echo $customer_info->customer_id; ?>/payments/confirm/<?php echo $payment_info->order_id; ?>/<?php echo PAYMENT_TYPE_CREDIT_CARD; ?>" onclick="return confirm('Are you sure this payment has been confirmed with a credit card?');"><img src="/assets/images/icons/credit_card_add.png" alt="" /></a> <a href="/customers/view/<?php echo $customer_info->customer_id; ?>/payments/confirm/<?php echo $payment_info->order_id; ?>/<?php echo PAYMENT_TYPE_CHEQUE; ?>" onclick="return confirm('Are you sure this payment has been confirmed with a cheque?');"><img src="/assets/images/icons/cheque_add.png" alt="" /></a> <?php else: ?> <a href="/customers/view/<?php echo $customer_info->customer_id; ?>/payments/<?php echo ($payment_info->is_order_payment) ? 'delete-order-payment' : 'delete-payment'; ?>/<?php echo $payment_info->payment_id; ?>" onclick="return confirm('Are you sure you want to delete this payment?');"><img src="/assets/images/icons/delete.png" alt="Delete" /></a> <?php endif; ?> </td> </tr> <?php endforeach; ?> <?php else: ?> <tr> <td colspan="6">No payments</td> </tr> <?php endif; ?> </tbody> </table> <?php //preprint($customer_info); preprint($all_payments); ?> <div class="row"> <div class="col-sm-2"> <?php echo per_page_dropdown('form-control'); ?> </div> <div class="col-sm-10"> <?php echo $this->common->generatePagination('/customers/view/' . $customer_info->customer_id . '/payments', 5, NULL, NULL, $this->common->default_per_page); ?> </div> </div> </div> <div class="col-sm-5"> <div class="row payments-grid bottom-border"> <div class="col-sm-3 grid-block"> <span class="number-amount"><?php echo display_money($customer_info->total); ?></span> <span class="amount-label">Total</span> </div> <div class="col-sm-3 grid-block"> <span class="number-amount"><?php echo display_money($customer_info->total_outstanding); ?></span> <span class="amount-label">Outstanding</span> </div> <div class="col-sm-3 grid-block"> <span class="number-amount"><?php echo display_money($customer_info->total_paid); ?></span> <span class="amount-label">Paid</span> </div> <div class="col-sm-3 grid-block"> <span class="number-amount"><?php echo $customer_info->percentage_paid; ?>%</span> <span class="amount-label">Orders allocated</span> </div> </div> <form action="" method="post"> <div class="row radio-tabs"> <div class="col-sm-10 col-sm-offset-1"> <label class="radio-tab col-sm-3"> <span class="tab-button"> <img src="/assets/images/icons/cash.png" alt="" /> Cash <input type="radio" name="payment_type" value="<?php echo PAYMENT_TYPE_CASH; ?>" checked="checked" /> </span> </label> <label class="radio-tab col-sm-3"> <span class="tab-button"> <img src="/assets/images/icons/lightning.png" alt="" /> <abbr title="Bank Automated Clearing System" class="tooltipped">BACS</abbr> <input type="radio" name="payment_type" value="<?php echo PAYMENT_TYPE_BACS; ?>" /> </span> </label> <label class="radio-tab col-sm-3"> <span class="tab-button"> <img src="/assets/images/icons/credit_card.png" alt="" /> Credit Card <input type="radio" name="payment_type" value="<?php echo PAYMENT_TYPE_CREDIT_CARD; ?>" /> </span> </label> <label class="radio-tab col-sm-3"> <span class="tab-button"> <img src="/assets/images/icons/cheque.png" alt="" /> Cheque <input type="radio" name="payment_type" value="<?php echo PAYMENT_TYPE_CHEQUE; ?>" /> </span> </label> </div> </div> <div class="row"> <div class="col-sm-8 col-sm-offset-2"> <div class="input-group"> <div class="input-group-addon">£</div> <input type="number" name="paid_amount" value="" class="form-control input-mini" id="input-paid-amount" placeholder="..." step="0.01" style="width: 50%; min-width: 90px;" /> <input type="text" name="date_paid" value="<?php echo date('d-m-Y'); ?>" class="form-control input-mini" id="input-date-paid" placeholder="i.e. <?php echo date('d-m-Y'); ?>" style="width: 50%; min-width: 105px;" /> <div class="input-group-btn"> <button type="submit" name="add_payment" value="1" class="btn btn-success" id="add-payment">Add</button> </div> </div> </div> </div> </form> </div> </div> <script type="text/javascript"> $(function() { $('#input-date-paid').datepicker( { dateFormat: 'dd-mm-yy', maxDate: 0 }); }) </script>
Cancel