WIP Contract linking / productchange

This commit is contained in:
Frank Schubert
2023-01-11 15:53:13 +01:00
parent b47bf6ca0f
commit 25236493ee
15 changed files with 672 additions and 127 deletions
+15 -1
View File
@@ -38,6 +38,7 @@
<div class="card-body">
<input type="hidden" name="id" value="<?=$contract->id?>" />
<input type="hidden" name="origin_contract_id" value="<?=$origin_contract_id?>" />
<input type="hidden" name="f" value="<?=$f?>" />
@@ -77,6 +78,19 @@
</div>
</div>
<div class="form-group row">
<label class="col-lg-2 col-form-label" for="matchcode">Anschluss</label>
<div class="col-lg-10">
<select name="products[<?=$i?>][termination_id]" id="termination_id-<?=$i?>" class="form-control select2">
<option></option>
<?php foreach($terminations as $t): ?>
<option value="<?=$t->id?>" <?=($t->id == $contract->termination_id) ? "selected='selected'" : ""?>><?=$t->code?> - <?=$t->getAddress()?></option>
<?php endforeach; ?>
</select>
</div>
</div>
<div class="form-group row">
<label class="col-lg-2 col-form-label" for="product_name">Individueller Produktname</label>
<div class="col-lg-10">
@@ -254,7 +268,7 @@
* customer autocomplete
*/
// kunde
<?php if($contract->owner_id && is_object(($contract->owner))): ?>
<?php if($contract->owner_id && is_object($contract->owner)): ?>
$('#owner_id').autoComplete('set', { value: <?=$contract->owner_id?>, text: '<?=($contract->owner_id) ? str_replace("'", "\\'", str_replace(["\n", "\r"], " ", $contract->owner->getCompanyOrName()))." (".$contract->owner->zip." ".$contract->owner->city.", ".$contract->owner->street.")".(($contract->owner->customer_number) ? " [".$contract->owner->customer_number."]" : "") : ""?>'});
<?php else: ?>
$('#owner_id').autoComplete();