Skip to content

Commit

Permalink
In ps_orders table advance_paid_amount is wrong in every order advanc…
Browse files Browse the repository at this point in the history
…e payment for full cart is entered.
  • Loading branch information
sumitwebkul committed Dec 23, 2021
1 parent 4b300f6 commit 2a34e41
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion classes/PaymentModule.php
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ public function validateOrder($id_cart, $id_order_state, $amount_paid, $payment_

// advance payment information
$order->is_advance_payment = $this->context->cart->is_advance_payment;
$order->advance_paid_amount = $cart_total_paid;
$order->advance_paid_amount = (float)Tools::ps_round((float)$this->context->cart->getOrderTotal(true, Cart::ADVANCE_PAYMENT, $order->product_list, $id_carrier), _PS_PRICE_COMPUTE_PRECISION_);

// Creating order
$result = $order->add();
Expand Down

0 comments on commit 2a34e41

Please sign in to comment.