fixed multiple order and refund related bugs

This commit is contained in:
azhar bhat
2026-10-26 13:17:15 +05:30
parent 10251e3591
commit ce7960ab60
7 changed files with 49 additions and 20 deletions

View File

@@ -233,15 +233,17 @@ abstract class PaymentModuleCore extends Module
$full_cart_total = (float)Tools::ps_round((float)$this->context->cart->getOrderTotal(true, Cart::BOTH), _PS_PRICE_COMPUTE_PRECISION_);
$amount_paid = !$dont_touch_amount ? Tools::ps_round((float)$amount_paid, _PS_PRICE_COMPUTE_PRECISION_) : $amount_paid;
$is_advance_payment = false;
if ($amount_paid >= $full_cart_total) {
$is_advance_payment = false;
$cart_total_paid = $full_cart_total;
} else {
} elseif ($this->context->cart->is_advance_payment) {
$is_advance_payment = true;
$cart_total_paid = (float)Tools::ps_round(
(float)$this->context->cart->getOrderTotal(true, Cart::ADVANCE_PAYMENT),
_PS_PRICE_COMPUTE_PRECISION_
);
} else {
$cart_total_paid = $full_cart_total;
}
foreach ($cart_delivery_option as $id_address => $key_carriers) {