Skip to content

Commit

Permalink
Merge pull request #10203 from mathsolutions/patch-3
Browse files Browse the repository at this point in the history
Fix for bug #10197 in maintenance branch v2
  • Loading branch information
WebkulOpencart committed Sep 13, 2021
2 parents 24562bf + c1a8bc7 commit 4ec7526
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions upload/admin/controller/sale/order.php
Expand Up @@ -1518,7 +1518,7 @@ public function invoice() {
foreach ($orders as $order_id) {
$order_info = $this->model_sale_order->getOrder($order_id);

$data['text_order'] = sprintf($this->language->get('text_order'), $order_id);
$text_order = sprintf($this->language->get('text_order'), $order_id);

if ($order_info) {
$store_info = $this->model_setting_setting->getSetting('config', $order_info['store_id']);
Expand Down Expand Up @@ -1672,8 +1672,9 @@ public function invoice() {
}

$data['orders'][] = array(
'order_id' => $order_id,
'order_id' => $order_id,
'invoice_no' => $invoice_no,
'text_order' => $text_order,
'date_added' => date($this->language->get('date_format_short'), strtotime($order_info['date_added'])),
'store_name' => $order_info['store_name'],
'store_url' => rtrim($order_info['store_url'], '/'),
Expand Down
2 changes: 1 addition & 1 deletion upload/admin/language/en-gb/sale/order.php
Expand Up @@ -129,4 +129,4 @@
$_['error_warning'] = 'Warning: Please check the form carefully for errors!';
$_['error_permission'] = 'Warning: You do not have permission to modify orders!';
$_['error_action'] = 'Warning: Could not complete this action!';
$_['error_filetype'] = 'Invalid file type!';
$_['error_filetype'] = 'Invalid file type!';
2 changes: 1 addition & 1 deletion upload/admin/view/template/sale/order_invoice.twig
Expand Up @@ -14,7 +14,7 @@
<div class="container">
{% for order in orders %}
<div style="page-break-after: always;">
<h1>{% if order.invoice_no %}{{ text_invoice }} #{{ order.invoice_no }}{% else %}{{ text_order }}{% endif %}</h1>
<h1>{% if order.invoice_no %}{{ text_invoice }} #{{ order.invoice_no }}{% else %}{{ order.text_order }}{% endif %}</h1>
<table class="table table-bordered">
<thead>
<tr>
Expand Down

0 comments on commit 4ec7526

Please sign in to comment.