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");
|
||||
}
|
||||
|
||||
@@ -665,7 +665,11 @@
|
||||
<div class="form-group row" id="finish_date_field">
|
||||
<label class="col-lg-2 col-form-label" for="finish_date">Abgeschlossen am</label>
|
||||
<div class="col-lg-4">
|
||||
<input type="text" class="form-control" name="finish_date" id="finish_date" value="<?=($order->finish_date) ? date("d.m.Y", $order->finish_date) : date("d.m.Y")?>" />
|
||||
<?php if($order->shippingdate): ?>
|
||||
<input type="text" class="form-control" name="finish_date" id="finish_date" value="<?=date("d.m.Y", $order->shippingdate)?>" />
|
||||
<?php else: ?>
|
||||
<input type="text" class="form-control" name="finish_date" id="finish_date" value="<?=($order->shippingdate ? $order->shippingdate : $order->finish_date) ? date("d.m.Y", $order->finish_date) : date("d.m.Y")?>" />
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
Reference in New Issue
Block a user