Fixed: The vocher expiry date was not saved correctly while trying to generate voucher from the refund request

This commit is contained in:
vishalsingh.qlo325
2024-09-24 17:27:47 +05:30
parent 589dd8305f
commit fff499a10e

View File

@@ -496,7 +496,7 @@ class AdminOrderRefundRequestsController extends ModuleAdminController
$cartrule->date_from = date('Y-m-d H:i:s', $now);
// generateDiscount
if ($voucher_expiry_date) {
$cartrule->date_to = date('Y-m-d H:i:s', strtotime($voucher_expiry_date));
$cartrule->date_to = date('Y-m-d', strtotime($voucher_expiry_date)).' 23:00:00';
} else {
$cartrule->date_to = date('Y-m-d H:i:s', $now + (3600 * 24 * 365.25)); /* 1 year */
}