fixed multiple order and refund related bugs

This commit is contained in:
azhar bhat
2026-10-26 13:17:15 +05:30
parent 10251e3591
commit ce7960ab60
7 changed files with 49 additions and 20 deletions

View File

@@ -3084,6 +3084,8 @@ class AdminOrdersControllerCore extends AdminController
$initialPaymentStatus = $this->l('Full Payment');
} elseif (isset($orderHistory[0]['id_order_state']) && ($orderHistory[0]['id_order_state'] == Configuration::get('PS_OS_PARTIAL_PAYMENT_ACCEPTED'))) {
$initialPaymentStatus = $this->l('Partial Payment');
} elseif (isset($orderHistory[0]['id_order_state']) && ($orderHistory[0]['id_order_state'] == Configuration::get('PS_OS_ERROR'))) {
$initialPaymentStatus = $this->l('Payment Error');
} else {
$initialPaymentStatus = $this->l('No Payment Received');
}
@@ -3091,7 +3093,7 @@ class AdminOrdersControllerCore extends AdminController
$helper->icon = 'icon-home';
$helper->color = 'color3';
$helper->title = $this->l('Initial Payment Status');
$helper->tooltip = $this->l('Initial Payment Status defines whether the order was fully paid, partially paid, or had no payment received at the time the order was placed.');
$helper->tooltip = $this->l('Initial Payment Status defines whether the order was fully paid, partially paid, had a payment error, or had no payment received at the time the order was placed.');
$helper->value = $initialPaymentStatus;
$this->kpis[] = $helper;
@@ -5810,6 +5812,11 @@ class AdminOrdersControllerCore extends AdminController
}
}
// VAT scoping and tourism tax rows of the new room(s) exist only now, so refresh invoice totals again
if (isset($order_invoice) && Validate::isLoadedObject($order_invoice)) {
$order_invoice->recomputeTotalsFromLines();
}
$order->total_paid = $order->getOrderTotal();
$order->total_paid_tax_incl = $order->total_paid;
$order->total_paid_tax_excl = $order->getOrderTotal(false);