resolve issue when paying from nonreal payment gateway

This commit is contained in:
Shreesh Arora
2022-06-14 13:19:46 +05:30
parent 867701c498
commit 5eed6a0b1a

View File

@@ -717,7 +717,7 @@ abstract class PaymentModuleCore extends Module
// Set the order status
$new_history = new OrderHistory();
$new_history->id_order = (int)$order->id;
if ($order->is_advance_payment && $order->advance_paid_amount < $order->total_paid_tax_incl) {
if ($order_status->logable && $order->is_advance_payment && $order->advance_paid_amount < $order->total_paid_tax_incl) {
$new_history->changeIdOrderState((int)Configuration::get('PS_OS_PARTIAL_PAYMENT'), $order, true);
} else {
$new_history->changeIdOrderState((int)$id_order_state, $order, true);