_table_body.php
3 months ago
edit_form.php
1 year ago
index.php
1 year ago
view_receipt_by_key.php
1 year ago
_table_body.php
53 lines
| 1 | <?php |
| 2 | /* |
| 3 | * Copyright (c) 2023 LatePoint LLC. All rights reserved. |
| 4 | */ |
| 5 | |
| 6 | /* @var $transactions OsTransactionModel[] */ |
| 7 | /* @var $customer_name_query string */ |
| 8 | |
| 9 | if ( ! defined( 'ABSPATH' ) ) { |
| 10 | exit; // Exit if accessed directly |
| 11 | } |
| 12 | |
| 13 | |
| 14 | if ($transactions) { |
| 15 | foreach ($transactions as $transaction) { ?> |
| 16 | <tr> |
| 17 | <td class="text-center os-column-faded"><?php echo esc_html($transaction->id); ?></td> |
| 18 | <td><?php echo esc_html($transaction->token); ?></td> |
| 19 | <td> |
| 20 | <?php if ($transaction->order_id) { ?> |
| 21 | <?php echo '<a href="#" class="in-table-link" ' . OsOrdersHelper::quick_order_btn_html($transaction->order_id) . '><span>' . esc_html($transaction->order_id) . '</span><span>'.esc_html__('View', 'latepoint').'</span><i class="latepoint-icon latepoint-icon-external-link"></i></a>'; ?> |
| 22 | <?php } else { |
| 23 | echo 'n/a'; |
| 24 | } ?> |
| 25 | </td> |
| 26 | <td> |
| 27 | |
| 28 | <?php if ($transaction->order_id) { ?> |
| 29 | |
| 30 | <a class="os-with-avatar" target="_blank" <?php echo OsCustomerHelper::quick_customer_btn_html($transaction->customer->id); ?> href="#"> |
| 31 | <span class="os-avatar" style="background-image: url(<?php echo esc_url($transaction->customer->get_avatar_url()); ?>)"></span> |
| 32 | <span class="os-name"><?php echo esc_html($transaction->customer->full_name); ?></span> |
| 33 | <i class="latepoint-icon latepoint-icon-external-link"></i> |
| 34 | </a> |
| 35 | <?php } else { |
| 36 | echo 'n/a'; |
| 37 | } ?> |
| 38 | </td> |
| 39 | <td> |
| 40 | <div class="lp-processor-logo lp-processor-logo-<?php echo esc_attr($transaction->processor); ?>"><?php echo esc_html(OsPaymentsHelper::get_nice_payment_processor_name($transaction->processor)); ?></div> |
| 41 | </td> |
| 42 | <td> |
| 43 | <div class="lp-method-logo lp-method-logo-<?php echo esc_attr($transaction->payment_method); ?>"><?php echo esc_html(OsPaymentsHelper::get_nice_payment_method_name($transaction->payment_method)); ?></div> |
| 44 | </td> |
| 45 | <td><?php echo esc_html(OsMoneyHelper::format_price($transaction->amount, true, false)); ?></td> |
| 46 | <td><span class="lp-transaction-status lp-transaction-status-<?php echo esc_attr($transaction->status); ?>"><?php echo esc_html(OsPaymentsHelper::get_nice_transaction_status_name($transaction->status)); ?></span> |
| 47 | <td><span class="lp-transaction-status lp-transaction-funds-status-<?php echo esc_attr($transaction->kind); ?>"><?php echo esc_html(OsPaymentsHelper::get_nice_transaction_kind_name($transaction->kind)); ?></span> |
| 48 | </td> |
| 49 | <td><?php echo esc_html($transaction->readable_created_date()); ?></td> |
| 50 | </tr> |
| 51 | <?php |
| 52 | } |
| 53 | } ?> |