Merge pull request #523 from shreesh-webkul/payment-spilt

Fixed: incorrect payment amount adding from addOrderPaymentDetail
This commit is contained in:
Rohit Jain
2023-02-11 17:09:43 +05:30
committed by GitHub

View File

@@ -1781,7 +1781,7 @@ class OrderCore extends ObjectModel
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();