Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In _DB_PREFIX__orders table column advance_paid_amount value is wrong #277

Merged
merged 2 commits into from
Jan 31, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
In ps_orders table advance_paid_amount is wrong in every order advanc…
…e payment for full cart is entered.
sumitwebkul committed Dec 23, 2021
commit 2a34e41b6761a12d4e46d11dc87ee90281cf33bf
2 changes: 1 addition & 1 deletion classes/PaymentModule.php
Original file line number Diff line number Diff line change
@@ -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();