Merge pull request #1273 from vishal-singh-webkul/gli-2342

Fixed: The voucher expiry date not being set correctly while creating voucher for refund request in AdminOrderRefundRequests in back-office
This commit is contained in:
Rohit Jain
2024-10-03 19:15:40 +05:30
committed by GitHub
2 changed files with 2 additions and 2 deletions

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:59:59';
} else {
$cartrule->date_to = date('Y-m-d H:i:s', $now + (3600 * 24 * 365.25)); /* 1 year */
}

View File

@@ -89,7 +89,7 @@ $(document).ready(function() {
dateFormat: 'dd-mm-yy',
altFormat: 'yy-mm-dd',
altField: '#voucher_expiry_date',
minDate: 0,
minDate: +1,
});
$(document).on('change', '#generateDiscount', function() {