Display payment method on sale report - refs #7768

1.10.x
Angel Fernando Quiroz Campos 10 years ago
parent 1ebec60d96
commit 5b26584ff2
  1. 4
      plugin/buycourses/src/sales_report.php
  2. 2
      plugin/buycourses/view/sales_report.tpl

@ -62,6 +62,7 @@ if (isset($_GET['order'])) {
$productTypes = $plugin->getProductTypes();
$saleStatuses = $plugin->getSaleStatuses();
$paymentTypes = $plugin->getPaymentTypes();
$selectedFilterType = '0';
$selectedStatus = isset($_GET['status']) ? $_GET['status'] : BuyCoursesPlugin::SALE_STATUS_PENDING;
@ -122,7 +123,8 @@ foreach ($sales as $sale) {
'price' => $sale['price'],
'product_name' => $sale['product_name'],
'product_type' => $productTypes[$sale['product_type']],
'complete_user_name' => api_get_person_name($sale['firstname'], $sale['lastname'])
'complete_user_name' => api_get_person_name($sale['firstname'], $sale['lastname']),
'payment_type' => $paymentTypes[$sale['payment_type']]
];
}

@ -7,6 +7,7 @@
<th class="text-center">{{ 'OrderReference'|get_plugin_lang('BuyCoursesPlugin') }}</th>
<th class="text-center">{{ 'OrderStatus'|get_plugin_lang('BuyCoursesPlugin') }}</th>
<th class="text-center">{{ 'OrderDate'|get_plugin_lang('BuyCoursesPlugin') }}</th>
<th class="text-center">{{ 'PaymentMethod'|get_plugin_lang('BuyCoursesPlugin') }}</th>
<th class="text-center">{{ 'Price'|get_plugin_lang('BuyCoursesPlugin') }}</th>
<th class="text-center">{{ 'ProductType'|get_plugin_lang('BuyCoursesPlugin') }}</th>
<th>{{ 'Name'|get_lang }}</th>
@ -28,6 +29,7 @@
{% endif %}
</td>
<td class="text-center">{{ sale.date }}</td>
<td class="text-center">{{ sale.payment_type }}</td>
<td class="text-right">{{ sale.currency ~ ' ' ~ sale.price }}</td>
<td class="text-center">{{ sale.product_type }}</td>
<td>{{ sale.product_name }}</td>

Loading…
Cancel
Save