changed default finish_date in Order to shippingdate if available
This commit is contained in:
@@ -2,7 +2,12 @@
|
||||
$term_id = $order->terminations[0]->id;
|
||||
$op = OrderProductModel::getFirst(['order_id' => $order->id, 'termination_id' => $term_id]);
|
||||
|
||||
$billing_start = date('U');
|
||||
if($order->finish_date) {
|
||||
$billing_start = $order->finish_date;
|
||||
} else {
|
||||
$billing_start = date('U');
|
||||
}
|
||||
|
||||
if($op->billing_delay) {
|
||||
$billing_start = strtotime("+".$op->billing_delay." months");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user