Skip to content

Commit

Permalink
fixed incorect payment adding when passed im addOrderPaymentDetail fu…
Browse files Browse the repository at this point in the history
…nction
  • Loading branch information
Shreesh Arora committed Feb 7, 2023
1 parent c0ee468 commit 5a06979
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 5a06979

Please sign in to comment.