Skip to content

Commit

Permalink
Merge pull request #523 from shreesh-webkul/payment-spilt
Browse files Browse the repository at this point in the history
Fixed: incorrect payment amount adding from addOrderPaymentDetail
  • Loading branch information
rohit053 committed Feb 11, 2023
2 parents f3c984d + 5a06979 commit d68f74d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion classes/order/Order.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit d68f74d

Please sign in to comment.