Merge branch 'ticket-14273-voucher' into develop
This commit is contained in:
commit
4af87fd2ec
@ -121,11 +121,10 @@ class Ant_Refund_Discount extends Module
|
||||
$end = new DateTime($item->date_to);
|
||||
$interval = $start->diff($end);
|
||||
|
||||
$newStart = new DateTime();
|
||||
$newEnd = new DateTime();
|
||||
$newEnd->add($interval);
|
||||
$voucher->date_from = date('Y-m-d H:i:s', $newStart->format('Y-m-d H:i:s'));
|
||||
$voucher->date_to = date('Y-m-d H:i:s', $newEnd->format('Y-m-d H:i:s'));
|
||||
$newDate = new DateTime('now');
|
||||
$voucher->date_from = $newDate->format('Y-m-d H:i:s');
|
||||
$newDate->add($interval);
|
||||
$voucher->date_to = $newDate->format('Y-m-d H:i:s');
|
||||
|
||||
if (!$voucher->validateFieldsLang(false) OR !$voucher->add()) {
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user