From 5a06979dab9cd2ddb5ebc4381c9d01ad63e6bc9a Mon Sep 17 00:00:00 2001 From: Shreesh Arora Date: Tue, 7 Feb 2023 11:17:40 +0530 Subject: [PATCH] fixed incorect payment adding when passed im addOrderPaymentDetail function --- classes/order/Order.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/order/Order.php b/classes/order/Order.php index 5ad465fcd..99cbbfe78 100644 --- a/classes/order/Order.php +++ b/classes/order/Order.php @@ -1781,7 +1781,7 @@ public function addOrderPayment($amount_paid, $payment_method = null, $payment_t public function addOrderPaymentDetail(OrderPayment $payment, $amount = null, $order_invoice = null) { if (Validate::isLoadedObject($payment)) { - if (!is_null($amount)) { + if (is_null($amount)) { $amount = $payment->amount; } $order_payment_detail = new OrderPaymentDetail();