Order Status changes, Refund issues resolved and order cancellation process impeoved

This commit is contained in:
Sumit Panwar
2023-10-24 17:25:58 +05:30
parent ce93a9826f
commit 5c0d3cb2af
12 changed files with 695 additions and 373 deletions

View File

@@ -1005,11 +1005,9 @@ abstract class PaymentModuleCore extends Module
// Set the order status
$new_history = new OrderHistory();
$new_history->id_order = (int)$order->id;
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);
}
$new_history->changeIdOrderState((int)$id_order_state, $order, true);
$new_history->addWithemail(true, $extra_vars);
// Switch to back order if needed