billing_delay max 6 in order

This commit is contained in:
Frank Schubert
2021-11-16 19:33:18 +01:00
parent 619a924798
commit 18061cba43
2 changed files with 5 additions and 0 deletions

View File

@@ -444,6 +444,7 @@
<div class="col-2">
<label class="form-label" for="billing_delay-<?=$product->id?>" >Verzögerter Verrechnungsstart</label>
<input type="text" class="form-control" name="products[<?=$product->id?>][billing_delay]" id="billing_delay-<?=$product->id?>" value="<?=$product->billing_delay?>" placeholder="Freimonate" />
<small>Max. 6 Monate</small>
</div>
</div>
@@ -521,6 +522,7 @@
<div class="col-2">
<label class="form-label" for="billing_delay-new" >Verzögerter Verrechnungsstart</label>
<input type="text" class="form-control" name="products[new][billing_delay]" id="billing_delay-new" value="" placeholder="Freimonate" />
<small>Max. 6 Monate</small>
</div>
</div>

View File

@@ -529,6 +529,9 @@ class OrderController extends mfBaseController {
$product_data["price"] = Layout::commaToDot($p["price"]);
$product_data["price_setup"] = Layout::commaToDot($p["price_setup"]);
$product_data["billing_delay"] = ($p["billing_delay"]) ? $p["billing_delay"] : 0;
if($product_data["billing_delay"] > 6) {
$product_data["billing_delay"] = 6;
}
$product_data["billing_period"] = $p["billing_period"];