updated function definition and optimized code

This commit is contained in:
Shreesh Arora
2022-12-26 17:17:33 +05:30
parent 8fa1e3a307
commit fba475f51c
7 changed files with 59 additions and 67 deletions

View File

@@ -1419,7 +1419,7 @@ class AdminOrdersControllerCore extends AdminController
$order_state['text-color'] = Tools::getBrightness($order_state['color']) < 128 ? 'white' : 'black';
}
$order_payment_detail = $order->getOrderPaymentDetailCollection();
$order_payment_detail = $order->getOrderPaymentDetail();
foreach ($order_payment_detail as &$payment_detail) {
$payment = new OrderPayment($payment_detail['id_order_payment']);
if ($invoice = $payment->getOrderInvoice($order->id)) {