Added unit details to customer address in Preorder

This commit is contained in:
Frank Schubert
2022-12-06 16:55:52 +01:00
parent 33ff1273ed
commit cd6a48ff16
6 changed files with 65 additions and 16 deletions

View File

@@ -250,10 +250,48 @@
</div>
</div>
<div class="form-group row">
<label class="col-lg-2 col-form-label" for="street">Straße *</label>
<div class="col-lg-10">
<label class="col-lg-2 col-form-label" for="street">Straße / Hausnummer *</label>
<div class="col-lg-8">
<input type="text" class="form-control" name="street" id="street" value="<?=$preorder->street?>" />
</div>
<div class="col-lg-2">
<input type="text" class="form-control" name="housenumber" id="housenumber" value="<?=$preorder->housenumber?>" />
</div>
</div>
<div class="form-group row">
<label class="col-lg-2 col-form-label" for=""></label>
<div class="col-lg-1">
<div class="form-group row">
<label class="col-lg-6 col-form-label text-right" for="">Block:</label>
<div class="col-lg-6">
<input type="text" class="form-control" name="block" id="block" value="<?=$preorder->block?>" />
</div>
</div>
</div>
<div class="col-lg-1">
<div class="form-group row">
<label class="col-lg-6 col-form-label text-right" for="">Stiege:</label>
<div class="col-lg-6">
<input type="text" class="form-control" name="stiege" id="stiege" value="<?=$preorder->stiege?>" />
</div>
</div>
</div>
<div class="col-lg-1">
<div class="form-group row">
<label class="col-lg-6 col-form-label text-right" for="">Stock:</label>
<div class="col-lg-6">
<input type="text" class="form-control" name="stock" id="stock" value="<?=$preorder->stock?>" />
</div>
</div>
</div>
<div class="col-lg-1">
<div class="form-group row">
<label class="col-lg-6 col-form-label text-right" for="">Tür:</label>
<div class="col-lg-6">
<input type="text" class="form-control" name="tuer" id="tuer" value="<?=$preorder->tuer?>" />
</div>
</div>
</div>
</div>
<div class="form-group row">
<label class="col-lg-2 col-form-label" for="zip">PLZ / Ort *</label>

View File

@@ -153,7 +153,7 @@
<td><?=($preorder->connection_count) ? $preorder->connection_count : 1?></td>
<td>
<?=($preorder->company) ? $preorder->company : $preorder->firstname." ".$preorder->lastname?><br />
<?=$preorder->street?><br />
<?=$preorder->street?><?=($preorder->housenumber) ? " ".$preorder->housenumber : ""?><br />
<?=$preorder->zip?> <?=$preorder->city?>
</td>
<td>

View File

@@ -371,9 +371,9 @@ class PreorderApicontroller extends mfBaseApicontroller {
/*
* get customer data
*/
foreach(['company','uid','firstname','lastname','street','zip','city','phone','email'] as $key) {
foreach(['company','uid','firstname','lastname','street','housenumber','zip','city','phone','email','block','stiege','stock','tuer'] as $key) {
if(property_exists($customer, $key)) {
$preorder_data[$key] = $customer->$key;
$preorder_data[$key] = ($customer->$key) ? $customer->$key : null;
}
}

View File

@@ -73,7 +73,7 @@ class Preorder extends mfBaseModel {
$customer['firstnam'] = ($this->firstname) ? $this->firstname : null;
$customer['lastname'] = ($this->lastname) ? $this->lastname : null;
$customer['street'] = ($this->street) ? $this->street : null;
$customer['housenumber'] = ($this->hausnummer) ? $this->hausnummer : null;
$customer['housenumber'] = ($this->hausnummer) ? $this->housenumber : null;
$customer['zip'] = ($this->plz) ? $this->plz : null;
$customer['city'] = ($this->city) ? $this->city : null;
$customer['bock'] = ($this->block) ? $this->block : null;

View File

@@ -277,16 +277,21 @@ class PreorderController extends mfBaseController {
$data['partner_id'] = null;
}
$data['company'] = $r->company;
$data['uid'] = $r->uid;
$data['firstname'] = $r->firstname;
$data['lastname'] = $r->lastname;
$data['street'] = $r->street;
$data['zip'] = $r->zip;
$data['city'] = $r->city;
$data['phone'] = $r->phone;
$data['email'] = $r->email;
$data['note'] = $r->note;
$data['company'] = (trim($r->company)) ? trim($r->company) : null;
$data['uid'] = (trim($r->uid)) ? trim($r->uid) : null;
$data['firstname'] = (trim($r->firstname)) ? trim($r->firstname) : null;
$data['lastname'] = (trim($r->lastname)) ? trim($r->lastname) : null;
$data['street'] = (trim($r->street)) ? trim($r->street) : null;
$data['housenumber'] = (trim($r->housenumber)) ? trim($r->housenumber) : null;
$data['block'] = (trim($r->block)) ? trim($r->block) : null;
$data['stiege'] = (trim($r->stiege)) ? trim($r->stiege) : null;
$data['stock'] = (trim($r->stock)) ? trim($r->stock) : null;
$data['tuer'] = (trim($r->tuer)) ? trim($r->tuer) : null;
$data['zip'] = (trim($r->zip)) ? trim($r->zip) : null;
$data['city'] = (trim($r->city)) ? trim($r->city) : null;
$data['phone'] = (trim($r->phone)) ? trim($r->phone) : null;
$data['email'] = (trim($r->email)) ? trim($r->email) : null;
$data['note'] = (trim($r->note)) ? trim($r->note) : null;
$data['edit_by'] = $this->me->id;

View File

@@ -2,6 +2,7 @@
class PreorderModel {
public $ucode;
public $status_id;
public $preordercampaign_id;
public $adb_hausnummer_id;
public $adb_wohneinheit_id;
@@ -32,6 +33,11 @@ class PreorderModel {
public $firstname;
public $lastname;
public $street;
public $housenumber;
public $block;
public $stiege;
public $stock;
public $tuer;
public $zip;
public $city;
public $phone;