Added price_nne/_nbe to OrderProduct
This commit is contained in:
@@ -391,7 +391,7 @@
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<label class="form-label" for="amount-<?=$product->id?>">Anzahl/Menge</label>
|
||||
<input type="text" class="form-control" name="products[<?=$product->id?>][amount]" id="amount-<?=$product->id?>" value="<?=$product->formatAmount()?>" placeholder="Anzahl/Menge" />
|
||||
<input type="number" class="form-control" name="products[<?=$product->id?>][amount]" id="amount-<?=$product->id?>" value="<?=$product->formatAmount()?>" placeholder="Anzahl/Menge" />
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<label class="form-label" for="billing_period-<?=$product->id?>">Verrechungsperiode</label>
|
||||
@@ -409,6 +409,7 @@
|
||||
<input type="text" class="form-control" name="products[<?=$product->id?>][price_setup]" id="price_setup-<?=$product->id?>" value="<?=$this::dotToComma($product->price_setup)?>" placeholder="Preis Setup" />
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<?php if(
|
||||
@@ -437,15 +438,23 @@
|
||||
|
||||
<div class="row mt-1 mb-2">
|
||||
<!-- line 2 -->
|
||||
<div class="col-10">
|
||||
<div class="col-8">
|
||||
<label class="form-label" for="description-<?=$product->id?>" >Zusatztext</label>
|
||||
<textarea class="form-control" name="products[<?=$product->id?>][description]" id="description-<?=$product->id?>" placeholder="Zusatztext"><?=$product->description?></textarea>
|
||||
</div>
|
||||
<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" />
|
||||
<input type="number" 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 class="col-1">
|
||||
<label class="form-label" for="price_nne-<?=$product->id?>">Preis NNE</label>
|
||||
<input type="text" class="form-control" name="products[<?=$product->id?>][price_nne]" id="price_nne-<?=$product->id?>" value="<?=$this::dotToComma($product->price_nne)?>" placeholder="NNE" />
|
||||
</div>
|
||||
<div class="col-1">
|
||||
<label class="form-label" for="price_nbe-<?=$product->id?>">Preis NBE</label>
|
||||
<input type="text" class="form-control" name="products[<?=$product->id?>][price_nbe]" id="price_nne-<?=$product->id?>" value="<?=$this::dotToComma($product->price_nbe)?>" placeholder="NBE" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -478,7 +487,7 @@
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<label class="form-label" for="amount-new">Anzahl/Menge</label>
|
||||
<input type="text" class="form-control" name="products[new][amount]" id="amount-new" value="" placeholder="Anzahl/Menge (Standard: 1)" />
|
||||
<input type="number" class="form-control" name="products[new][amount]" id="amount-new" value="" placeholder="Anzahl/Menge (Standard: 1)" />
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<label class="form-label" for="billing_period-new" >Verrechungsperiode</label>
|
||||
@@ -497,6 +506,8 @@
|
||||
<input type="text" class="form-control" name="products[new][price_setup]" id="price_setup-new" value="" placeholder="Preis Setup" />
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row mt-1 mb-2 hidden" id="termination_id-new-line">
|
||||
@@ -514,17 +525,26 @@
|
||||
|
||||
<div class="row mt-1 mb-2">
|
||||
<!-- line 2 -->
|
||||
<div class="col-10">
|
||||
<div class="col-8">
|
||||
<label class="form-label" for="description-new" >Zusatztext</label>
|
||||
<textarea class="form-control" name="products[new][description]" id="description-new" placeholder="Zusatztext"></textarea>
|
||||
</div>
|
||||
|
||||
<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" />
|
||||
<input type="number" class="form-control" name="products[new][billing_delay]" id="billing_delay-new" value="" placeholder="Freimonate" />
|
||||
<small>Max. 6 Monate</small>
|
||||
</div>
|
||||
|
||||
<div class="col-1">
|
||||
<label class="form-label" for="price_nne-new">Preis NNE</label>
|
||||
<input type="text" class="form-control" name="products[new][price_nne]" id="price_nne-new" value="" placeholder="NNE" />
|
||||
</div>
|
||||
<div class="col-1">
|
||||
<label class="form-label" for="price_nbe-new">Preis NBE</label>
|
||||
<input type="text" class="form-control" name="products[new][price_nbe]" id="price_nbe-new" value="" placeholder="NBE" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -800,6 +820,8 @@
|
||||
$('#billing_period-' + id).val(p.billing_period);
|
||||
$('#price-' + id).val(p.price);
|
||||
$('#price_setup-' + id).val(p.price_setup);
|
||||
$('#price_nne-' + id).val(p.price_nne);
|
||||
$('#price_nbe-' + id).val(p.price_nbe);
|
||||
|
||||
console.log(p.attributes);
|
||||
console.log("form_id: " + id);
|
||||
|
||||
@@ -544,6 +544,9 @@ class OrderController extends mfBaseController {
|
||||
$product_data["description"] = $p["description"];
|
||||
$product_data["price"] = Layout::commaToDot($p["price"]);
|
||||
$product_data["price_setup"] = Layout::commaToDot($p["price_setup"]);
|
||||
$product_data["price_nne"] = Layout::commaToDot($p["price_nne"]);
|
||||
$product_data["price_nbe"] = Layout::commaToDot($p["price_nbe"]);
|
||||
|
||||
$product_data["billing_delay"] = ($p["billing_delay"]) ? $p["billing_delay"] : 0;
|
||||
if($product_data["billing_delay"] > 6) {
|
||||
$product_data["billing_delay"] = 6;
|
||||
|
||||
@@ -9,6 +9,8 @@ class OrderProductModel {
|
||||
public $description;
|
||||
public $price;
|
||||
public $price_setup;
|
||||
public $price_nne;
|
||||
public $price_nbe;
|
||||
public $billing_delay;
|
||||
public $billing_period;
|
||||
public $note;
|
||||
|
||||
@@ -238,7 +238,6 @@ class ProductController extends mfBaseController {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if(is_array($product->attributes) && count($product->attributes)) {
|
||||
$attributes = $product->attributes;
|
||||
$product->data->attributes = [];
|
||||
|
||||
Reference in New Issue
Block a user