Merge branch 'fronkdev' into 'master'
Added preorder import Stiftingtal See merge request fronk/thetool!312
This commit is contained in:
@@ -35,7 +35,12 @@
|
||||
<label class="form-label" for="filter_owner">Kundennummer</label>
|
||||
<input type="text" class="form-control" name="filter[customer_number]" id="filter_street" value="<?=(array_key_exists("customer_number", $filter)) ? $filter['customer_number'] : ""?>" />
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-1">
|
||||
<label class="form-label" for="filter_owner">Order ID</label>
|
||||
<input type="text" class="form-control" name="filter[order_id]" id="filter_order_id" value="<?=(array_key_exists("order_id", $filter)) ? $filter['order_id'] : ""?>" />
|
||||
</div>
|
||||
|
||||
<div class="col-1">
|
||||
<label class="form-label" for="filter_owner">Inhaber Name</label>
|
||||
<input type="text" class="form-control" name="filter[owner]" id="filter_street" value="<?=(array_key_exists("owner", $filter)) ? $filter['owner'] : ""?>" />
|
||||
@@ -105,34 +110,79 @@
|
||||
<div class="row">
|
||||
|
||||
<div class="col-6">
|
||||
<div class="card">
|
||||
<div class="card" id="owner-<?=$order_id?>">
|
||||
<div class="card-body">
|
||||
<div>
|
||||
<span class="float-right"><i class="fas fa-fw fa-pencil pointer text-primary" onclick="toggleEdit('owner', <?=$order_id?>, false)"></i></span>
|
||||
<h5 class="m-0">Inhaber</h5>
|
||||
|
||||
</div>
|
||||
<hr class="mt-1" />
|
||||
<span class="text-monospace"><?=$order->owner->customer_number?></span><br />
|
||||
<strong><?=$order->owner->getCompanyOrName()?></strong><br />
|
||||
<?=$order->owner->street?><br />
|
||||
<?=$order->owner->zip?> <?=$order->owner->city?><br />
|
||||
<div class="text">
|
||||
<span class="text-monospace"><?=$order->owner->customer_number?></span><br />
|
||||
<strong><?=$order->owner->getCompanyOrName()?></strong><br />
|
||||
<?=$order->owner->street?><br />
|
||||
<?=$order->owner->zip?> <?=$order->owner->city?><br />
|
||||
</div>
|
||||
<div class="edit hidden">
|
||||
<div class="input-group mb-3">
|
||||
<select
|
||||
name="owner_id-<?=$order_id?>"
|
||||
class="form-control basicAutoComplete"
|
||||
autocomplete="off"
|
||||
id="owner_id-<?=$order_id?>"
|
||||
data-url="<?=self::getUrl('Address','api')?>?do=findAddress&autocomplete=1"
|
||||
placeholder="Tippen zum Suchen... (Bestandskunden)"
|
||||
data-noresults-text="Keine Suchergebnisse"
|
||||
data-val="<?=$order->owner_id?>"
|
||||
data-ov="<?=$order->owner_id?>"
|
||||
>
|
||||
<option></option>
|
||||
</select>
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-primary" onclick="saveAddress('owner', <?=$order_id?>)"><i class="fas fa-check"></i></button>
|
||||
<button class="btn btn-secondary" onclick="toggleEdit('owner', <?=$order_id?>, false)"><i class="fas fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card" id="billingaddress-<?=$order_id?>">
|
||||
<div class="card-body">
|
||||
<div>
|
||||
<span class="float-right"><i class="fas fa-fw fa-pencil pointer text-primary" onclick="toggleEdit('billingaddress', <?=$order_id?>, false)"></i></span>
|
||||
<h5 class="m-0">Rechnungsempfänger</h5>
|
||||
<hr class="mt-1" />
|
||||
</div>
|
||||
<?php if($order->billingaddress_id): ?>
|
||||
<?=($order->billingaddress->customer_number) ? $order->billingaddress->customer_number."<br />" : ""?>
|
||||
<?=$order->billingaddress->getCompanyOrName()?><br />
|
||||
<?=$order->billingaddress->street?><br />
|
||||
<?=$order->billingaddress->zip?> <?=$order->billingaddress->city?><br />
|
||||
<?php endif; ?>
|
||||
<hr class="mt-1" />
|
||||
<div class="text">
|
||||
<?php if($order->billingaddress_id): ?>
|
||||
<?=($order->billingaddress->customer_number) ? $order->billingaddress->customer_number."<br />" : ""?>
|
||||
<?=$order->billingaddress->getCompanyOrName()?><br />
|
||||
<?=$order->billingaddress->street?><br />
|
||||
<?=$order->billingaddress->zip?> <?=$order->billingaddress->city?><br />
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="edit hidden">
|
||||
<div class="input-group mb-3">
|
||||
<select
|
||||
name="billingaddress_id-<?=$order_id?>"
|
||||
class="form-control basicAutoComplete"
|
||||
autocomplete="off"
|
||||
id="billingaddress_id-<?=$order_id?>"
|
||||
data-url="<?=self::getUrl('Address','api')?>?do=findAddress&autocomplete=1"
|
||||
placeholder="Tippen zum Suchen... (Bestandskunden)"
|
||||
data-noresults-text="Keine Suchergebnisse"
|
||||
data-val="<?=$order->billingaddress_id?>"
|
||||
data-ov="<?=$order->billingaddress_id?>"
|
||||
>
|
||||
<option></option>
|
||||
</select>
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-primary" onclick="saveAddress('billingaddress', <?=$order_id?>)"><i class="fas fa-check"></i></button>
|
||||
<button class="btn btn-secondary" onclick="toggleEdit('billingaddress', <?=$order_id?>, false)"><i class="fas fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -199,7 +249,7 @@
|
||||
<td><input type="checkbox" class="form-control pointer" id="approve-order-<?=$order_id?>-contract-<?=$contract->id?>" onclick="toggleApproval(<?=$order_id?>, 'order')" <?=($contract->approved) ? "checked='checked'" : ""?> /></td>
|
||||
<td class="text-wrap product">
|
||||
<div class="text">
|
||||
<i class="fas fa-fw fa-pencil pointer text-primary" onclick="toggleEdit('contract', <?=$contract->id?>, 'product')"></i> <?=$contract->product_name?>
|
||||
<i class="fas fa-fw fa-pencil pointer text-primary" onclick="toggleEdit('contract', <?=$contract->id?>, 'product')"></i> <span class="value"><?=$contract->product_name?></span>
|
||||
<?php if($contract->termination_id && $contract->termination): ?>
|
||||
<br /><small class="text-pink"><?=$contract->termination->code?> - <?= str_replace("\n", " - ", $contract->termination->getAddress())?></small>
|
||||
<?php endif ?>
|
||||
@@ -208,7 +258,7 @@
|
||||
<div class="input-group mb-3">
|
||||
<select class="edit-control form-control" data-val="<?=$contract->product_id?>" data-ov="<?=$contract->product_id?>"></select>
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-primary"><i class="fas fa-check"></i></button>
|
||||
<button class="btn btn-primary" onclick="saveEdit('contract', <?=$contract->id?>, 'product')"><i class="fas fa-check"></i></button>
|
||||
<button class="btn btn-secondary" onclick="toggleEdit('contract', <?=$contract->id?>, 'product')"><i class="fas fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -216,37 +266,37 @@
|
||||
</td>
|
||||
<td class="matchcode">
|
||||
<div class="text">
|
||||
<i class="fas fa-fw fa-pencil pointer text-primary" onclick="toggleEdit('contract', <?=$contract->id?>, 'matchcode')"></i> <?= htmlentities($contract->matchcode)?>
|
||||
<i class="fas fa-fw fa-pencil pointer text-primary" onclick="toggleEdit('contract', <?=$contract->id?>, 'matchcode')"></i> <span class="value"><?=htmlentities($contract->matchcode)?></span>
|
||||
</div>
|
||||
<div class="edit hidden">
|
||||
<div class="input-group mb-3">
|
||||
<input type="text" class="form-control edit-control" value="<?=$contract->matchcode?>" data-val="<?=htmlentities($contract->matchcode)?>" data-ov="<?=htmlentities($contract->matchcode)?>" />
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-primary"><i class="fas fa-check"></i></button>
|
||||
<button class="btn btn-primary" onclick="saveEdit('contract', <?=$contract->id?>, 'matchcode')"><i class="fas fa-check"></i></button>
|
||||
<button class="btn btn-secondary" onclick="toggleEdit('contract', <?=$contract->id?>, 'matchcode')"><i class="fas fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="price">
|
||||
<div class="text"><i class="fas fa-fw fa-pencil pointer text-primary" onclick="toggleEdit('contract', <?=$contract->id?>, 'price')"></i> € <?=$contract->price?></div>
|
||||
<div class="text"><i class="fas fa-fw fa-pencil pointer text-primary" onclick="toggleEdit('contract', <?=$contract->id?>, 'price')"></i> € <span class="value"><?=$contract->price?></span></div>
|
||||
<div class="edit hidden">
|
||||
<div class="input-group mb-3">
|
||||
<input type="text" class="form-control edit-control" value="<?=$contract->price?>" data-val="<?=$contract->price?>" data-ov="<?=$contract->price?>" />
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-primary"><i class="fas fa-check"></i></button>
|
||||
<button class="btn btn-primary" onclick="saveEdit('contract', <?=$contract->id?>, 'price')"><i class="fas fa-check"></i></button>
|
||||
<button class="btn btn-secondary" onclick="toggleEdit('contract', <?=$contract->id?>, 'price')"><i class="fas fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="price_setup">
|
||||
<div class="text"><i class="fas fa-fw fa-pencil pointer text-primary" onclick="toggleEdit('contract', <?=$contract->id?>, 'price_setup')"></i> € <?=$contract->price_setup?></div>
|
||||
<div class="text"><i class="fas fa-fw fa-pencil pointer text-primary" onclick="toggleEdit('contract', <?=$contract->id?>, 'price_setup')"></i> € <span class="value"><?=$contract->price_setup?></span></div>
|
||||
<div class="edit hidden">
|
||||
<div class="input-group mb-3">
|
||||
<input type="text" class="form-control edit-control" value="<?=$contract->price_setup?>" data-val="<?=$contract->price_setup?>" data-ov="<?=$contract->price_setup?>" />
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-primary"><i class="fas fa-check"></i></button>
|
||||
<button class="btn btn-primary" onclick="saveEdit('contract', <?=$contract->id?>, 'price_setup')"><i class="fas fa-check"></i></button>
|
||||
<button class="btn btn-secondary" onclick="toggleEdit('contract', <?=$contract->id?>, 'price_setup')"><i class="fas fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -255,15 +305,19 @@
|
||||
<td class="billing_period">
|
||||
<div class="text">
|
||||
<i class="fas fa-fw fa-pencil pointer text-primary" onclick="toggleEdit('contract', <?=$contract->id?>, 'billing_period')"></i>
|
||||
<?php if($contract->billing_period == 1): ?>
|
||||
monatlich
|
||||
<?php elseif($contract->billing_period == 24): ?>
|
||||
biennal
|
||||
<?php elseif($contract->billing_period == 36): ?>
|
||||
triennal
|
||||
<?php else: ?>
|
||||
<?=(12 / $contract->billing_period)?>x Jährlich
|
||||
<?php endif; ?>
|
||||
<span class="value">
|
||||
<?php if($contract->billing_period == 1): ?>
|
||||
monatlich
|
||||
<?php elseif($contract->billing_period == 12): ?>
|
||||
Jährlich
|
||||
<?php elseif($contract->billing_period == 24): ?>
|
||||
2-jährlich
|
||||
<?php elseif($contract->billing_period == 36): ?>
|
||||
3-jährlich
|
||||
<?php else: ?>
|
||||
<?=(12 / $contract->billing_period)?>x Jährlich
|
||||
<?php endif; ?>
|
||||
</span>
|
||||
</div>
|
||||
<div class="edit hidden">
|
||||
<div class="input-group mb-3">
|
||||
@@ -274,19 +328,19 @@
|
||||
<option value="36" <?=($contract->billing_period == 36) ? "selected='selected'" : ""?>>3-Jährlich</option>
|
||||
</select>
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-primary"><i class="fas fa-check"></i></button>
|
||||
<button class="btn btn-primary" onclick="saveEdit('contract', <?=$contract->id?>, 'billing_period')"><i class="fas fa-check"></i></button>
|
||||
<button class="btn btn-secondary" onclick="toggleEdit('contract', <?=$contract->id?>, 'billing_period')"><i class="fas fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="billing_delay">
|
||||
<div class="text"><i class="fas fa-fw fa-pencil pointer text-primary" onclick="toggleEdit('contract', <?=$contract->id?>, 'billing_delay')"></i> <?=($contract->billing_delay) ? $contract->billing_delay." Monate" : ""?></div>
|
||||
<div class="text"><i class="fas fa-fw fa-pencil pointer text-primary" onclick="toggleEdit('contract', <?=$contract->id?>, 'billing_delay')"></i> <span class="value"><?=($contract->billing_delay) ? $contract->billing_delay." Monate" : ""?></span></div>
|
||||
<div class="edit hidden">
|
||||
<div class="input-group mb-3">
|
||||
<input type="text" class="form-control edit-control" value="<?=$contract->billing_delay?>" data-val="<?=$contract->billing_delay?>" data-ov="<?=$contract->billing_delay?>" />
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-primary"><i class="fas fa-check"></i></button>
|
||||
<button class="btn btn-primary" onclick="saveEdit('contract', <?=$contract->id?>, 'billing_delay')"><i class="fas fa-check"></i></button>
|
||||
<button class="btn btn-secondary" onclick="toggleEdit('contract', <?=$contract->id?>, 'billing_delay')"><i class="fas fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -309,45 +363,50 @@
|
||||
<th>Rechnungsperiode</th>
|
||||
<th>Verz. Verrechnungsstart</th>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<?php foreach($contracts as $contract): ?>
|
||||
<?php $credit = $contract->getCredit(); if(!$credit) continue; ?>
|
||||
<tr id="credit-<?=$contract->id?>">
|
||||
<td><input type="checkbox" class="form-control pointer" id="approve-credit-<?=$order_id?>-contract-<?=$contract->id?>" onclick="toggleApproval(<?=$order_id?>, 'credit')" <?=($contract->approved) ? "checked='checked'" : ""?> /></td>
|
||||
<td><?=($credit["partner"]) ? $credit["partner"]->getCompanyOrName() : ""?></td>
|
||||
<td class="text-wrap">
|
||||
<?=$contract->product_name?>
|
||||
<td class="crediting_partner_name text value"><?=($credit["partner"]) ? $credit["partner"]->getCompanyOrName() : ""?></td>
|
||||
<td class="text-wrap product text">
|
||||
<span class="value"><?=$contract->product_name?></span>
|
||||
<?php if($contract->termination_id && $contract->termination): ?>
|
||||
<br /><small class="text-pink"><?=$contract->termination->code?> - <?= str_replace("\n", " - ", $contract->termination->getAddress())?></small>
|
||||
<?php endif ?>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td class="matchcode">
|
||||
<td class="crediting_matchcode">
|
||||
<div class="text">
|
||||
<i class="fas fa-fw fa-pencil pointer text-primary" onclick="toggleEdit('credit', <?=$contract->id?>, 'matchcode')"></i> <?=$contract->matchcode?>
|
||||
<i class="fas fa-fw fa-pencil pointer text-primary" onclick="toggleEdit('credit', <?=$contract->id?>, 'matchcode')"></i> <span class="value"><?=$contract->crediting_matchcode?></span>
|
||||
</div>
|
||||
<div class="edit hidden">
|
||||
<div class="input-group mb-3">
|
||||
<input type="text" class="form-control edit-control" value="<?=$contract->matchcode?>" data-val="<?=$contract->matchcode?>" data-ov="<?=$contract->matchcode?>" />
|
||||
<input type="text" class="form-control edit-control" value="<?=$contract->matchcode?>" data-val="<?=$contract->crediting_matchcode?>" data-ov="<?=$contract->crediting_matchcode?>" />
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-primary"><i class="fas fa-check"></i></button>
|
||||
<button class="btn btn-primary" onclick="toggleEdit('credit', <?=$contract->id?>, 'matchcode')"><i class="fas fa-check"></i></button>
|
||||
<button class="btn btn-secondary" onclick="toggleEdit('credit', <?=$contract->id?>, 'matchcode')"><i class="fas fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td><?=($credit["rate_source"] == "rate") ? "€ ".$credit["rate"] : "€ ".$contract->price_nne?> <?=($credit["rate_source"] == "rate") ? "(Prozentrate)" : "(NNE)"?></td>
|
||||
<td>
|
||||
<td class="crediting_partner_rate text value">
|
||||
<?=($credit["rate_source"] == "rate") ? "€ ".$credit["rate"] : "€ ".$contract->price_nne?> <?=($credit["rate_source"] == "rate") ? "(Prozentrate)" : "(NNE)"?>
|
||||
</td>
|
||||
<td class="billing_period text value">
|
||||
<?php if($contract->billing_period == 1): ?>
|
||||
monatlich
|
||||
monatlich
|
||||
<?php elseif($contract->billing_period == 24): ?>
|
||||
biennal
|
||||
3-jährlich
|
||||
<?php elseif($contract->billing_period == 36): ?>
|
||||
triennal
|
||||
3-jährlich
|
||||
<?php else: ?>
|
||||
<?=(12 / $contract->billing_period)?>x Jährlich
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td class=""><?=($contract->billing_delay) ? $contract->billing_delay." Monate" : ""?></td>
|
||||
<td class="billing_delay text value"><?=($contract->billing_delay) ? $contract->billing_delay." Monate" : ""?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
@@ -383,7 +442,9 @@
|
||||
?>
|
||||
|
||||
var products = <?=json_encode($prods)?>;
|
||||
|
||||
|
||||
|
||||
|
||||
function toggleOrderApproval(cbox, order_id, type) {
|
||||
if(!parseInt(order_id) || !order_id) return;
|
||||
|
||||
@@ -413,39 +474,207 @@
|
||||
$("#" + type + "-products-" + order_id + " .checkbox-toggle").prop("checked", false);
|
||||
}
|
||||
}
|
||||
|
||||
function toggleEdit(type, id, control_name) {
|
||||
var textBlock = $("#" + type + "-" + id + " ." + control_name + " .text");
|
||||
var editBlock = $("#" + type + "-" + id + " ." + control_name + " .edit");
|
||||
|
||||
var control = $("#" + type + "-" + id + " ." + control_name + " .edit .edit-control");
|
||||
|
||||
var current_val = control.data("val");
|
||||
var original_val = control.data("ov");
|
||||
|
||||
textBlock.toggle();
|
||||
editBlock.toggle();
|
||||
|
||||
if(type == "owner" || type == "billingaddress") {
|
||||
return;
|
||||
}
|
||||
|
||||
if(control_name == "product") {
|
||||
if(!control.children().length) {
|
||||
products.forEach((product) => {
|
||||
var opt = document.createElement("option");
|
||||
opt.text = product.name;
|
||||
opt.value = product.id;
|
||||
control.append(opt);
|
||||
|
||||
function toggleEdit(type, id, control_name) {
|
||||
if(type === "owner" || type === "billingaddress") {
|
||||
$("#" + type + "-" + id + " .text").toggle();
|
||||
$("#" + type + "-" + id + " .edit").toggle();
|
||||
|
||||
if($("#" + type + "-" + id + " .edit").is(":visible")) {
|
||||
console.log("visible");
|
||||
$("#" + type + "-" + id + " .edit select").autoComplete();
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
var textBlock = $("#" + type + "-" + id + " ." + control_name + " .text");
|
||||
var editBlock = $("#" + type + "-" + id + " ." + control_name + " .edit");
|
||||
|
||||
var control = $("#" + type + "-" + id + " ." + control_name + " .edit .edit-control");
|
||||
|
||||
var current_val = control.data("val");
|
||||
var original_val = control.data("ov");
|
||||
|
||||
textBlock.toggle();
|
||||
editBlock.toggle();
|
||||
|
||||
|
||||
if(control_name == "product") {
|
||||
if(!control.children().length) {
|
||||
products.forEach((product) => {
|
||||
var opt = document.createElement("option");
|
||||
opt.text = product.name;
|
||||
opt.value = product.id;
|
||||
control.append(opt);
|
||||
});
|
||||
console.log(current_val);
|
||||
control.val(current_val);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function saveEdit(type, id, control_name) {
|
||||
var textBlock = $("#" + type + "-" + id + " ." + control_name + " .text");
|
||||
var editBlock = $("#" + type + "-" + id + " ." + control_name + " .edit");
|
||||
|
||||
var control = $("#" + type + "-" + id + " ." + control_name + " .edit .edit-control");
|
||||
control.removeClass("invalid");
|
||||
|
||||
var current_val = control.data("val");
|
||||
var original_val = control.data("ov");
|
||||
|
||||
var new_value = control.val();
|
||||
|
||||
console.log(new_value);
|
||||
|
||||
if(!new_value.length && control_name !== "billing_delay") {
|
||||
control.addClass("invalid");
|
||||
return;
|
||||
}
|
||||
|
||||
var action = "saveContract";
|
||||
if(type === "credit") {
|
||||
var action = "saveCredit";
|
||||
}
|
||||
|
||||
var data = {};
|
||||
data["do"] = action;
|
||||
data["id"] = id;
|
||||
data[control_name] = new_value;
|
||||
|
||||
console.log(data);
|
||||
|
||||
var ctx = {id: id, control_name: control_name};
|
||||
// save
|
||||
$.ajax({
|
||||
url: "<?=self::getUrl("Contractqueue", "api")?>",
|
||||
type: "POST",
|
||||
data: data,
|
||||
context: ctx,
|
||||
success: function (success) {
|
||||
console.log(ctx);
|
||||
const id = ctx.id;
|
||||
const control_name = ctx.control_name;
|
||||
|
||||
var textBlock = $("#" + type + "-" + id + " ." + control_name + " .text");
|
||||
var editBlock = $("#" + type + "-" + id + " ." + control_name + " .edit");
|
||||
|
||||
//console.log(success);
|
||||
if(success.status != "OK") {
|
||||
$("#" + type + "-" + id + " ." + control_name + " .edit .edit-control").addClass("invalid");
|
||||
return;
|
||||
}
|
||||
|
||||
Object.entries(success.result.contract).forEach(item => {
|
||||
const [key, value] = item;
|
||||
console.log(key + ": " + value);
|
||||
var text = $("#contract-" + id + " ." + key + " .text .value");
|
||||
var control = $("#contract-" + id + " ." + key + " .edit .edit-control");
|
||||
|
||||
if (text.length && control.length) {
|
||||
if(key === "billing_period") {
|
||||
switch (parseInt(value)) {
|
||||
case 1:
|
||||
text.text("Monatlich");
|
||||
$("#credit-" + id + " .billing_period.text.value").text("Monatlich");
|
||||
break;
|
||||
case 12:
|
||||
text.text("Jährlich");
|
||||
$("#credit-" + id + " .billing_period.text.value").text("Jährlich");
|
||||
break;
|
||||
case 24:
|
||||
text.text("2-Jährlich");
|
||||
$("#credit-" + id + " .billing_period.text.value").text("2-Jährlich");
|
||||
break;
|
||||
case 36:
|
||||
text.text("3-Jährlich");
|
||||
$("#credit-" + id + " .billing_period.text.value").text("3-Jährlich");
|
||||
break;
|
||||
}
|
||||
} else if(key === "billing_delay") {
|
||||
if (value > 0) {
|
||||
text.text(value + " Monate");
|
||||
$("#credit-" + id + " .billing_delay.text.value").text(value + " Monate");
|
||||
} else {
|
||||
text.text("");
|
||||
$("#credit-" + id + " .billing_delay.text.value").text("");
|
||||
}
|
||||
} else if(key === "product") {
|
||||
var product_name = success.result.contract.product_name;
|
||||
text.text(product_name);
|
||||
$("#credit-" + id + " .product.text .value").text(product_name);
|
||||
} else {
|
||||
text.text(value);
|
||||
}
|
||||
|
||||
control.data("val", value);
|
||||
control.data("ov", value);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Object.entries(success.result.credit).forEach(item => {
|
||||
const [key, value] = item;
|
||||
console.log(key + ": " + value);
|
||||
|
||||
var text = $("#credit-" + id + " ." + key + " .text .value");
|
||||
//var control = $("#credit-" + id + " ." + key + " .edit .edit-control");
|
||||
|
||||
if(key === "crediting_rate") {
|
||||
console.log(success.result.credit.crediting_partner_text);
|
||||
$("#credit-" + id + " .crediting_partner_rate.text.value").text(success.result.credit.crediting_partner_text);
|
||||
} /*else if(key === "crediting_partner_id") {
|
||||
if(!value) {
|
||||
$("#credit-" + id + " .crediting_partner_text.text.value").text("");
|
||||
}
|
||||
$("#credit-" + id + " .crediting_partner_text.text.value").text(value);
|
||||
}*/ else {
|
||||
text.text(value);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
editBlock.hide();
|
||||
textBlock.show();
|
||||
},
|
||||
dataType: "json"
|
||||
});
|
||||
console.log(current_val);
|
||||
control.val(current_val);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function saveAddress(type, id) {
|
||||
var new_value = $("input[name='" + type + "_id-" + id + "'").val();
|
||||
|
||||
$.ajax({
|
||||
url: "<?=self::getUrl("Address", "api")?>",
|
||||
type: "GET",
|
||||
context: id,
|
||||
data: {
|
||||
do: "getAddress",
|
||||
id: new_value
|
||||
},
|
||||
success: function(success) {
|
||||
if(success.status !== "OK") {
|
||||
return;
|
||||
}
|
||||
address = success.result.address;
|
||||
|
||||
|
||||
|
||||
$("#" + type + "-" + id + " .text").html(
|
||||
`<span class="text-monospace">${address.customer_number}</span><br />
|
||||
<strong>${address.name}</strong><br />
|
||||
${address.street}<br />
|
||||
${address.zip} ${address.city}<br />`
|
||||
);
|
||||
$("#" + type + "-" + id + " .text").toggle();
|
||||
$("#" + type + "-" + id + " .edit").toggle();
|
||||
},
|
||||
dataType: "json"
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
<?php include(realpath(dirname(__FILE__)."/../../$mfLayoutPackage")."/footer.php"); ?>
|
||||
@@ -21,7 +21,7 @@
|
||||
<div class="col-lg-12">
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="card-body bg-">
|
||||
<h4 class="header-title mb-2"><?=($network->id) ? "Netzbereich bearbeiten" : "Neuer Netzbereich"?></h4>
|
||||
|
||||
<form class="form-horizontal" method="post" action="<?=self::getUrl("Network", "save")?>">
|
||||
@@ -74,6 +74,19 @@
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="opsystem"></label>
|
||||
<div class="col-lg-10">
|
||||
<label class="form-check-label">
|
||||
<input type="checkbox" name="opsystem" class="form-check-input" value="snopp" id="opsystem" <?=($network->opsystem == "snopp") ? "checked='checked'" : ""?> />
|
||||
Für Betrieb in SNOPP freischalten
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -481,6 +481,7 @@ class AddressController extends mfBaseController {
|
||||
}
|
||||
|
||||
$a = $address->toArray();
|
||||
$a['name'] = $address->getCompanyOrName();
|
||||
|
||||
return ['address' => $a];
|
||||
}
|
||||
|
||||
265
application/Api/v1/OperationaldataApicontroller.php
Normal file
265
application/Api/v1/OperationaldataApicontroller.php
Normal file
@@ -0,0 +1,265 @@
|
||||
<?php
|
||||
|
||||
use application\Api\v1\Modules;
|
||||
|
||||
class OperationaldataApicontroller extends mfBaseApicontroller
|
||||
{
|
||||
//private $filter_gemeinde_ids = [];
|
||||
//private $campaign;
|
||||
|
||||
private $campaign;
|
||||
private $campaigns = [];
|
||||
private $filter_salescluster_ids = [];
|
||||
private $campaigns_by_scluster = [];
|
||||
|
||||
private $allowed_preordertypes = [];
|
||||
private $district_is_city = false;
|
||||
private $hausnummer_add_zusatz = false;
|
||||
private $exist_is_error = false;
|
||||
|
||||
protected function init()
|
||||
{
|
||||
$db = $this->db(ADDRESSDB_DBHOST, ADDRESSDB_DBUSER, ADDRESSDB_DBPASS, ADDRESSDB_DBNAME);
|
||||
}
|
||||
|
||||
protected function registerRoutes()
|
||||
{
|
||||
|
||||
/*
|
||||
* TODO: Load Api Modules automatically in mfBaseApiController
|
||||
*/
|
||||
/*$modules = [];
|
||||
foreach (["Cif", "Activation"] as $moduleName) {
|
||||
$classname = "application\\Api\\v1\\Modules\\Preorder\\" . $moduleName;
|
||||
$modules[$moduleName] = new $classname([
|
||||
"get" => $this->get,
|
||||
"post" => $this->post,
|
||||
"db" => $this->db(),
|
||||
"me" => $this->me
|
||||
]);
|
||||
}*/
|
||||
|
||||
$this->addRoute("/operationaldata/networks", "getNetworks", "GET");
|
||||
$this->addRoute("/operationaldata/preordercampaigns", "getPreorderCampaigns", "GET");
|
||||
$this->addRoute("/operationaldata/buildings", "getBuildingsByCampaign", "GET");
|
||||
|
||||
/*$this->addRoute("/preorder/open", "getOpenPreorders", "GET");
|
||||
$this->addRoute("/preorder/customerInstallationFeedback", [$modules["Cif"], "getCifData"], "GET");
|
||||
$this->addRoute("/preorder/customerInstallationFeedback", [$modules["Cif"], "userSetCif"], "POST");
|
||||
|
||||
$this->addRoute("/preorder/:code/clientInstallationFinished", [$modules["Cif"], "providerSetCif"], "POST");
|
||||
$this->addRoute("/preorder/:code/serviceActivated", [$modules["Activation"], "setServiceActive"], "POST");
|
||||
$this->addRoute("/preorder/:code", "getPreorder", "GET");
|
||||
$this->addRoute("/preorder/:code", "cancelPreorder", "DELETE");
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* is called after User is authenticated by API Key
|
||||
*/
|
||||
protected function authenticated()
|
||||
{
|
||||
$this->registerRoutes();
|
||||
|
||||
if ($this->me->is("preorderaddressreporting")) {
|
||||
return mfResponse::Forbidden();
|
||||
}
|
||||
|
||||
$campaignApiusers = PreordercampaignApiuserModel::search(["worker_id" => $this->me->id]);
|
||||
|
||||
foreach ($campaignApiusers as $campaignApiuser) {
|
||||
$campaign = new Preordercampaign($campaignApiuser->preordercampaign_id);
|
||||
if ($campaign->id) {
|
||||
foreach (PreordercampaignSalesclusterModel::search(['preordercampaign_id' => $campaign->id]) as $campain_scluster) {
|
||||
if (!in_array($campain_scluster->salescluster_id, $this->filter_salescluster_ids)) {
|
||||
$this->filter_salescluster_ids[] = $campain_scluster->salescluster_id;
|
||||
}
|
||||
|
||||
$this->campaigns_by_scluster[$campain_scluster->salescluster_id] = $campaign->id;
|
||||
|
||||
}
|
||||
$this->campaigns[$campaign->id] = $campaign;
|
||||
|
||||
// get allowed preordertypes
|
||||
if (is_array($campaign->types) && count($campaign->types)) {
|
||||
foreach ($campaign->types as $type) {
|
||||
$this->allowed_preordertypes[] = $type->type;
|
||||
}
|
||||
}
|
||||
|
||||
if ($campaign->district_is_city == 1) {
|
||||
$this->district_is_city = true;
|
||||
}
|
||||
if ($campaign->hausnummer_add_zusatz == 1) {
|
||||
$this->hausnummer_add_zusatz = true;
|
||||
}
|
||||
if ($campaign->exist_is_error == 1) {
|
||||
$this->exist_is_error = true;
|
||||
}
|
||||
if ($campaign->require_connectiontype == 1) {
|
||||
$this->require_connectiontype = true;
|
||||
}
|
||||
if ($campaign->allow_unit_update == 1) {
|
||||
$this->allow_unit_update = true;
|
||||
}
|
||||
} else {
|
||||
$this->log->debug(__METHOD__ . ": campaign not found (PreordercampaignApiuser::preordercampaign_id " . $campaignApiuser->preordercampaign_id . ")");
|
||||
$this->log->debug(print_r($campaignApiuser, true));
|
||||
}
|
||||
|
||||
|
||||
foreach (PreordercampaignOriginhostnameModel::search(['preordercampaign_id' => $campaign->id]) as $origin) {
|
||||
$this->addAllowedOrigin($origin->hostname);
|
||||
}
|
||||
}
|
||||
|
||||
$this->allowed_preordertypes = array_unique($this->allowed_preordertypes);
|
||||
}
|
||||
|
||||
protected function getNetworks() {
|
||||
$return = [];
|
||||
|
||||
$my_network_ids = [];
|
||||
|
||||
foreach($this->me->my_networks as $network) {
|
||||
if($network->id && !in_array($network->id, $my_network_ids)) {
|
||||
$my_network_ids[] = $network->id;
|
||||
}
|
||||
}
|
||||
|
||||
$networks = NetworkModel::search(["opsystem" => "snopp"]);
|
||||
|
||||
foreach($networks as $network) {
|
||||
if(!in_array($network->id, $my_network_ids)) continue;
|
||||
|
||||
$name = $network->name;
|
||||
|
||||
if($network->adb_netzgebiet_id) {
|
||||
$cityname = preg_replace('/^Liezen\s+-\s+/', '', $network->adb_netzgebiet->name);
|
||||
$name = "ROC_".$network->adb_netzgebiet->extref."_".$cityname;
|
||||
}
|
||||
|
||||
$net = [];
|
||||
$net["id"] = $network->id;
|
||||
$net["name"] = $name;
|
||||
$net["created"] = $network->create;
|
||||
$net["updated"] = $network->edit;
|
||||
$return[] = $net;
|
||||
}
|
||||
|
||||
return mfResponse::Ok(["networks" => $return]);
|
||||
}
|
||||
|
||||
protected function getPreorderCampaigns() {
|
||||
$return = [];
|
||||
|
||||
foreach($this->campaigns as $campaign) {
|
||||
$c = [];
|
||||
$c["id"] = $campaign->id;
|
||||
$c["name"] = $campaign->name;
|
||||
$c["created"] = $campaign->create;
|
||||
$c["updated"] = $campaign->edit;
|
||||
$return[] = $c;
|
||||
}
|
||||
|
||||
return mfResponse::Ok(["preordercampaigns" => $return]);
|
||||
}
|
||||
|
||||
protected function getBuildingsByCampaign() {
|
||||
$buildings = [];
|
||||
|
||||
if(!array_key_exists("campaign_id", $this->get) || !$this->get["campaign_id"]) {
|
||||
return mfResponse::BadRequest(["message" => "mandatory parameter campaign_id is missing."]);
|
||||
}
|
||||
|
||||
$campaign_id = $this->get["campaign_id"];
|
||||
|
||||
if(!is_numeric($campaign_id) || $campaign_id < 1) {
|
||||
return mfResponse::BadRequest(["message" => "Invalid value for campaign_id"]);
|
||||
}
|
||||
|
||||
$campaign = new Preordercampaign($campaign_id);
|
||||
if(!$campaign) {
|
||||
return mfResponse::NotFound(["message" => "Network not found"]);
|
||||
}
|
||||
|
||||
$adb_netzgebiet_id = $campaign->adb_netzgebiet->id;
|
||||
|
||||
if(!$adb_netzgebiet_id) {
|
||||
return mfResponse::NotFound(["message" => "Network not found"]);
|
||||
}
|
||||
|
||||
$db = $this->db(ADDRESSDB_DBHOST, ADDRESSDB_DBUSER, ADDRESSDB_DBPASS, ADDRESSDB_DBNAME);
|
||||
|
||||
$sql = AddressDB::$wohneinheit_query;
|
||||
$sql .= " WHERE Hausnummer.netzgebiet_id=$adb_netzgebiet_id AND Hausnummer.visibility = 'public'";
|
||||
|
||||
$res = $db->query($sql);
|
||||
if(!$db->num_rows($res)) {
|
||||
return mfResponse::Ok(["buildings" => []]);
|
||||
}
|
||||
|
||||
$b = [];
|
||||
|
||||
while($data = $db->fetch_object($res)) {
|
||||
if(!array_key_exists($data->hausnummer_id, $b)) {
|
||||
$housenumber = $data->hausnummer;
|
||||
if($this->hausnummer_add_zusatz) {
|
||||
if($data->zusatz) {
|
||||
$housenumber .= " (".$data->zusatz.")";
|
||||
}
|
||||
}
|
||||
|
||||
$b[$data->hausnummer_id] = [
|
||||
'id' => $data->hausnummer_id,
|
||||
'oaid' => $data->hausnummer_oaid,
|
||||
'cluster_id' => $data->netzgebiet_extref,
|
||||
'zip' => $data->plz,
|
||||
'city' => $data->gemeinde,
|
||||
"municipality" => "",
|
||||
'district' => $data->ortschaft,
|
||||
'street' => $data->strasse,
|
||||
'housenumber' => $housenumber,
|
||||
'gps_lat' => ($data->gps_lat) ? (float)$data->gps_lat : null,
|
||||
'gps_long' => ($data->gps_long) ? (float)$data->gps_long : null,
|
||||
|
||||
"homes" => []
|
||||
];
|
||||
|
||||
if($this->district_is_city) {
|
||||
$b[$data->hausnummer_id]['city'] = $data->ortschaft;
|
||||
$b[$data->hausnummer_id]['municipality'] = $data->gemeinde;
|
||||
} else {
|
||||
unset($b[$data->hausnummer_id]['municipality']);
|
||||
}
|
||||
}
|
||||
|
||||
$b[$data->hausnummer_id]["homes"][] = [
|
||||
'id' => $data->wohneinheit_id,
|
||||
'oaid' => $data->wohneinheit_oaid,
|
||||
'num' => (int)$data->num,
|
||||
'block' => $data->block,
|
||||
'stiege' => $data->stiege,
|
||||
'stock' => $data->stock,
|
||||
'tuer' => $data->tuer,
|
||||
'zusatz' => $data->zusatz,
|
||||
];
|
||||
|
||||
|
||||
}
|
||||
|
||||
/*foreach($b as $tmp_b) {
|
||||
$homes = array_values($tmp_b["homes"]);
|
||||
return mfResponse::Ok(["Homes" => $homes]);
|
||||
unset($tmp_b["homes"]);
|
||||
$tmp_b["homes"] = array_values($homes);
|
||||
$buildings[] = $tmp_b;
|
||||
|
||||
}*/
|
||||
|
||||
$buildings = array_values($b);
|
||||
|
||||
return mfResponse::Ok(["buildings" => $buildings]);
|
||||
}
|
||||
}
|
||||
@@ -156,7 +156,7 @@ class PreorderApicontroller extends mfBaseApicontroller {
|
||||
foreach(PreorderModel::searchActive($preorder_search) as $preorder) {
|
||||
$return[] = $preorder->getApiArray();
|
||||
}
|
||||
|
||||
$this->requestLog->debug(print_r($return, true));
|
||||
return mfResponse::Ok(["preorders" => $return]);
|
||||
|
||||
}
|
||||
|
||||
@@ -13,7 +13,20 @@ class Contractqueue extends mfBaseModel {
|
||||
private $sla;
|
||||
private $creator;
|
||||
private $editor;
|
||||
|
||||
|
||||
protected function afterSave() {
|
||||
$this->crediting_partner = null;
|
||||
$this->reseller = null;
|
||||
$this->owner = null;
|
||||
$this->billingaddress = null;
|
||||
$this->product = null;
|
||||
$this->orderproduct = null;
|
||||
$this->termination = null;
|
||||
$this->sla = null;
|
||||
$this->creator = null;
|
||||
$this->editor = null;
|
||||
}
|
||||
|
||||
public function generateMatchcode() {
|
||||
$owner_address = $this->getProperty("owner")->street.", ".$this->getProperty("owner")->zip." ".$this->getProperty("owner")->city;
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ class ContractqueueController extends mfBaseController {
|
||||
}
|
||||
}
|
||||
|
||||
$this->layout->set("filter", $filter);
|
||||
$this->layout->set("filter", array_map(fn($a) => htmlentities($a), $filter));
|
||||
$filter = $this->getPreparedFilter($filter);
|
||||
|
||||
// pagination defaults
|
||||
@@ -67,7 +67,7 @@ class ContractqueueController extends mfBaseController {
|
||||
}
|
||||
|
||||
protected function getPreparedFilter($filter) {
|
||||
|
||||
|
||||
return $filter;
|
||||
}
|
||||
|
||||
@@ -108,7 +108,6 @@ class ContractqueueController extends mfBaseController {
|
||||
var_dump($product_attribs);exit;
|
||||
}*/
|
||||
if(is_array($product_attribs) && array_key_exists("crediting_partner", $product_attribs) && $product_attribs["crediting_partner"] && is_object($product_attribs["crediting_partner"])) {
|
||||
|
||||
if($product_attribs["crediting_partner"]->value) {
|
||||
$contract->crediting_partner_id = $product_attribs["crediting_partner"]->value;
|
||||
}
|
||||
@@ -124,6 +123,7 @@ class ContractqueueController extends mfBaseController {
|
||||
if($contract->matchcode) {
|
||||
$primary_matchcode = $contract->matchcode;
|
||||
}
|
||||
$contract->crediting_matchcode = $order->owner->getCompanyOrName().", ".$order->owner->street.", ".$order->owner->zip." ".$order->owner->city;
|
||||
$contracts[] = $contract;
|
||||
}
|
||||
|
||||
@@ -168,4 +168,140 @@ class ContractqueueController extends mfBaseController {
|
||||
$this->layout()->setFlash("Alle Bestellungen importiert", "success");
|
||||
$this->redirect("Contractqueue");
|
||||
}
|
||||
|
||||
protected function apiAction() {
|
||||
if(!$this->me->is(["Admin"])) {
|
||||
$this->redirect("Dashboard");
|
||||
}
|
||||
$do = $this->request->do;
|
||||
$data = [];
|
||||
|
||||
switch($do) {
|
||||
case "saveContract":
|
||||
$return = $this->saveContractApi();
|
||||
break;
|
||||
default:
|
||||
$return = false;
|
||||
}
|
||||
|
||||
if(!is_array($return) || !count($return)) {
|
||||
$data = ["status" => "error"];
|
||||
$this->returnJson($data);
|
||||
}
|
||||
$data['status'] = "OK";
|
||||
$data['result'] = $return;
|
||||
$this->returnJson($data);
|
||||
}
|
||||
|
||||
private function saveContractApi() {
|
||||
$r = $this->request;
|
||||
|
||||
$valid_fields = [
|
||||
"product" => "product_id",
|
||||
"matchcode" => "matchcode",
|
||||
"price" => "price",
|
||||
"price_setup" => "price_setup",
|
||||
"billing_period" => "billing_period",
|
||||
"billing_delay" => "billing_delay"
|
||||
];
|
||||
|
||||
$data = [];
|
||||
foreach($r->get() as $f => $v) {
|
||||
if(array_key_exists($f, $valid_fields)) {
|
||||
$data[$valid_fields[$f]] = $v;
|
||||
}
|
||||
}
|
||||
|
||||
if(!count($data)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$cq = new Contractqueue($r->id);
|
||||
if(!$cq->id) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(array_key_exists("product_id", $data)) {
|
||||
$product = new Product($data["product_id"]);
|
||||
if(!$product->id) {
|
||||
$this->log->error(__METHOD__.": neue product_id nicht gefunden");
|
||||
return false;
|
||||
}
|
||||
$data["product_name"] = $product->name;
|
||||
}
|
||||
|
||||
$cq->update($data);
|
||||
if(!$cq->save()) {
|
||||
return false;
|
||||
}
|
||||
//var_dump($cq->product, $cq->product->attributes);exit;
|
||||
// find reseller / receiver of credit
|
||||
// from product
|
||||
$product_attribs = $cq->product->attributes;
|
||||
/*if($op->id == "8666") {
|
||||
var_dump($product_attribs);exit;
|
||||
}*/
|
||||
|
||||
$cq->crediting_partner_id = null;
|
||||
$cq->crediting_partner_rate = null;
|
||||
|
||||
if(is_array($product_attribs) && array_key_exists("crediting_partner", $product_attribs) && $product_attribs["crediting_partner"] && is_object($product_attribs["crediting_partner"])) {
|
||||
if($product_attribs["crediting_partner"]->value && $product_attribs["crediting_partner"]->value != $cq->crediting_partner_id) {
|
||||
$cq->crediting_partner_id = $product_attribs["crediting_partner"]->value;
|
||||
}
|
||||
if($product_attribs["crediting_rate"]->value) {
|
||||
$crediting_rate_price = round($cq->price / 100 * $product_attribs["crediting_rate"]->value, 4);
|
||||
if($crediting_rate_price != $cq->crediting_partner_rate) {
|
||||
$cq->crediting_partner_rate = $crediting_rate_price;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
// or from netowner if anschluss product
|
||||
if(!$cq->crediting_partner_id && $cq->termination_id && $cq->product->price_nne > 0) {
|
||||
$cq->crediting_partner_id = $cq->termination->building->network->owner_id;
|
||||
}
|
||||
|
||||
if(!$cq->save()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$return = [];
|
||||
$return["product"] = $cq->product_id;
|
||||
$return["product_name"] = $cq->product->name;
|
||||
$return["termination"] = ($cq->termination_id) ? $cq->termination->code." ".str_replace("\n", " - ", $cq->termination->getAddress()) : null;
|
||||
$return["matchcode"] = $cq->matchcode;
|
||||
$return["price"] = $cq->price;
|
||||
$return["price_setup"] = $cq->price_setup;
|
||||
$return["billing_period"] = $cq->billing_period;
|
||||
$return["billing_delay"] = $cq->billing_delay;
|
||||
|
||||
$credit = [];
|
||||
$credit["crediting_rate"] = null;
|
||||
$credit["crediting_partner_id"] = $cq->crediting_partner_id;
|
||||
$credit["crediting_partner_name"] = "";
|
||||
$credit["crediting_rate"] = 0;
|
||||
$credit["crediting_matchcode"] = "";
|
||||
|
||||
|
||||
if($cq->crediting_partner_id) {
|
||||
$credit["crediting_partner_name"] = $cq->crediting_partner->getCompanyOrName();
|
||||
|
||||
if($cq->crediting_partner_rate) {
|
||||
$credit["crediting_rate"] = $cq->crediting_partner_rate;
|
||||
$credit["crediting_partner_name"] = "€ ".number_format($cq->crediting_partner_rate, 4, ",",".")." (Prozentrate)";
|
||||
} else {
|
||||
$credit["crediting_rate"] = $cq->price_nne;
|
||||
$credit["crediting_partner_name"] = "€ ".number_format($cq->crediting_partner_rate, 4, ",",".")." (NNE)";
|
||||
}
|
||||
|
||||
$credit["crediting_matchcode"] = $cq->crediting_matchcode;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
return ["contract" => $return, "credit" => $credit];
|
||||
|
||||
}
|
||||
}
|
||||
@@ -14,6 +14,7 @@ class ContractqueueModel {
|
||||
public $product_name;
|
||||
public $product_info;
|
||||
public $matchcode;
|
||||
public $crediting_matchcode;
|
||||
public $amount;
|
||||
public $sla_id = null;
|
||||
public $product_external;
|
||||
|
||||
@@ -76,6 +76,7 @@ class NetworkController extends mfBaseController {
|
||||
$data['name'] = $r->name;
|
||||
$data['note'] = $r->note;
|
||||
$data['adb_netzgebiet_id'] = ($r->adb_netzgebiet_id) ? $r->adb_netzgebiet_id : null;
|
||||
$data['opsystem'] = ($r->opsystem === "snopp") ? "snopp" : null;
|
||||
|
||||
if($r->sytemowner_action_status) {
|
||||
$data['sytemowner_action_status'] = $r->sytemowner_action_status;
|
||||
|
||||
@@ -4,6 +4,7 @@ class NetworkModel {
|
||||
public $name;
|
||||
public $owner_id ;
|
||||
public $adb_netzgebiet_id;
|
||||
public $opsystem;
|
||||
public $sytemowner_action_status;
|
||||
public $note;
|
||||
|
||||
@@ -141,6 +142,13 @@ class NetworkModel {
|
||||
$where .= " AND adb_netzgebiet_id IN (". implode(",", $adb_netzgebiet_id).")";
|
||||
}
|
||||
}
|
||||
|
||||
if(array_key_exists("opsystem", $filter)) {
|
||||
$opsystem = FronkDB::singleton()->escape($filter['opsystem']);
|
||||
if($opsystem) {
|
||||
$where .= " AND Network.`opsystem` = '$opsystem'";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -60,13 +60,17 @@ class Preorder extends mfBaseModel {
|
||||
|
||||
public function runStatusTrigger() {
|
||||
if(!$this->id) return true;
|
||||
if($this->status_id == $this->_old_data->status_id) return true;
|
||||
if(property_exists($this->_old_data, "status_id") && $this->status_id == $this->_old_data->status_id) return true;
|
||||
|
||||
$this->log->debug(__METHOD__." running");
|
||||
|
||||
$new_status = $this->getProperty("status");
|
||||
if(!property_exists($this->_old_data, "status_id")) {
|
||||
return true;
|
||||
}
|
||||
|
||||
$old_status = new Preorderstatus($this->_old_data->status_id);
|
||||
|
||||
|
||||
if(!$new_status->id || !$old_status->id) return true;
|
||||
$this->log->debug(__METHOD__." status changed from '".($old_status ? $old_status->code : "")."' to '".$new_status->code."'");
|
||||
|
||||
|
||||
@@ -10,9 +10,14 @@ final class CreateContractqueue extends AbstractMigration
|
||||
if($this->getEnvironment() == "thetool") {
|
||||
$table = $this->table("Contractqueue");
|
||||
$table->addColumn("approved", "integer", ["null" => false, "default" => 0]);
|
||||
$table->addColumn("approved_credit", "integer", ["null" => false, "default" => 0]);
|
||||
$table->addColumn("contract_id", "integer", ["null" => true, "default" => null]);
|
||||
$table->addColumn("order_id", "integer", ["null" => false]);
|
||||
$table->addColumn("orderproduct_id", "integer", ["null" => true, "default" => null]);
|
||||
$table->addColumn("crediting_partner_id", "integer", ["null" => true, "default" => null]);
|
||||
$table->addColumn("crediting_partner_rate", "decimal", ["null" => true, "default" => null, "precision" => 10, "scale" => 4]);
|
||||
$table->addColumn("reseller_id", "integer", ["null" => true, "default" => null]);
|
||||
$table->addColumn("reseller_rate", "decimal", ["null" => true, "default" => null, "precision" => 10, "scale" => 4]);
|
||||
$table->addColumn("owner_id", "integer", ["null" => false]);
|
||||
$table->addColumn("billingaddress_id", "integer", ["null" => true, "default" => null]);
|
||||
$table->addColumn("termination_id", "integer", ["null" => true, "default" => null]);
|
||||
@@ -20,6 +25,7 @@ final class CreateContractqueue extends AbstractMigration
|
||||
$table->addColumn("product_name", "string", ["null" => false, "limit" => 255]);
|
||||
$table->addColumn("product_info", "text", ["null" => true, "default" => null]);
|
||||
$table->addColumn("matchcode", "string", ["null" => true, "default" => null, "limit" => 255]);
|
||||
$table->addColumn("crediting_matchcode", "string", ["null" => true, "default" => null, "limit" => 255]);
|
||||
$table->addColumn("amount", "decimal", ["null" => false, "precision" => 9, "scale" => 6]);
|
||||
$table->addColumn("sla_id", "integer", ["null" => true, "default" => null]);
|
||||
$table->addColumn("product_external", "integer", ["null" => false, "default" => 0, "limit" => \Phinx\Db\Adapter\MysqlAdapter::INT_TINY]);
|
||||
@@ -30,6 +36,7 @@ final class CreateContractqueue extends AbstractMigration
|
||||
$table->addColumn("price_nbe", "decimal", ["null" => false, "default" => 0, "precision" => 14, "scale" => 4]);
|
||||
$table->addColumn("billing_delay", "integer", ["null" => false, "default" => 0]);
|
||||
$table->addColumn("billing_period", "integer", ["null" => false, "default" => 1]);
|
||||
$table->addColumn("contract_term", "integer", ["null" => false, "default" => 12]);
|
||||
$table->addColumn("order_date", "integer", ["null" => true, "default" => null]);
|
||||
$table->addColumn("finish_date", "integer", ["null" => true, "default" => null]);
|
||||
$table->addColumn("finish_date_by", "integer", ["null" => true, "default" => null]);
|
||||
|
||||
31
db/migrations/20240402170133_network_add_opsystem.php
Normal file
31
db/migrations/20240402170133_network_add_opsystem.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
|
||||
final class NetworkAddOpsystem extends AbstractMigration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
if($this->getEnvironment() == "thetool") {
|
||||
$table = $this->table("Network");
|
||||
$table->addColumn("opsystem", "enum", ["null" => true, "default" => null, "values" => "snopp", "after" => "adb_netzgebiet_id"]);
|
||||
$table->update();
|
||||
}
|
||||
|
||||
if($this->getEnvironment() == "addressdb") {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
if($this->getEnvironment() == "thetool") {
|
||||
$this->table("Network")->removeColumn("opsystem")->update();
|
||||
}
|
||||
|
||||
if($this->getEnvironment() == "addressdb") {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -103,7 +103,7 @@ class mfBaseApicontroller {
|
||||
|
||||
private function logRequest() {
|
||||
$this->requestLog->debug("==================================================================");
|
||||
$this->requestLog->debug("new API request for ".$_SERVER['REQUEST_URI']. " from ".$_SERVER['REMOTE_ADDR']);
|
||||
$this->requestLog->debug("new API request: ".$_SERVER['REQUEST_METHOD']." ".$_SERVER['REQUEST_URI']. " from ".$_SERVER['REMOTE_ADDR']);
|
||||
$this->requestLogstr = "";
|
||||
foreach($_GET as $key => $value) {
|
||||
$this->requestLogstr .= "; $key='$value'";
|
||||
@@ -157,6 +157,7 @@ class mfBaseApicontroller {
|
||||
foreach(apache_request_headers() as $header => $value) {
|
||||
$this->headers[strtolower($header)] = $value;
|
||||
}
|
||||
|
||||
// GET parameters
|
||||
$get = $params;
|
||||
unset($get['mod']);
|
||||
|
||||
@@ -218,12 +218,7 @@ foreach($netowners as $apiOwner) {
|
||||
continue;
|
||||
}
|
||||
$hausnummer_found_count++;
|
||||
|
||||
if(!property_exists($building->homes, "item") || !is_array($building->homes->item) | !count($building->homes->item)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$rimo_home_count = count($building->homes->item);
|
||||
|
||||
$last_unit_num = 0;
|
||||
$existing_units = [];
|
||||
@@ -234,6 +229,28 @@ foreach($netowners as $apiOwner) {
|
||||
}
|
||||
}
|
||||
|
||||
$plannedTU = $building->plannedTU;
|
||||
$to_create_count = $building->plannedTU - count($existing_units);
|
||||
|
||||
if($plannedTU && $to_create_count > 0) {
|
||||
for($i = 0; $i < $to_create_count; $i++) {
|
||||
$unit = \ADBWohneinheitModel::create([
|
||||
"hausnummer_id" => $hausnummer->id,
|
||||
"num" => ++$last_unit_num
|
||||
]);
|
||||
if(!$unit->save()) {
|
||||
die("Error saving new unit\n".print_r($unit, true));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(!property_exists($building->homes, "item") || !is_array($building->homes->item) | !count($building->homes->item)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$rimo_home_count = count($building->homes->item);
|
||||
|
||||
foreach($building->homes->item as $home) {
|
||||
//print_r($home);//exit;
|
||||
$homes_count++;
|
||||
|
||||
427
scripts/preorder/stiftingtal/import-preorders-from-export-format.php
Executable file
427
scripts/preorder/stiftingtal/import-preorders-from-export-format.php
Executable file
@@ -0,0 +1,427 @@
|
||||
#!/usr/bin/php
|
||||
<?php
|
||||
|
||||
//require 'vendor/autoload.php';
|
||||
require("../../../config/config.php");
|
||||
|
||||
define('FRONKDB_SQLDEBUG',false);
|
||||
error_reporting(E_ALL & ~(E_NOTICE | E_STRICT | E_DEPRECATED));
|
||||
|
||||
require_once(LIBDIR."/mvcfronk/mfRouter/mfRouter.php");
|
||||
require_once(LIBDIR."/mvcfronk/mfBase/mfBaseModel.php");
|
||||
require_once(LIBDIR."/mvcfronk/mfBase/mfBaseController.php");
|
||||
|
||||
$partner_id = 209;
|
||||
$netzgebiet_id = 47;
|
||||
$connectionTypes = [
|
||||
"Einfamilienhaus" => "single-dwelling",
|
||||
"Einfahmilienhaus" => "single-dwelling",
|
||||
"Mehrfamilienhaus" => "multi-dwelling",
|
||||
"Mehrparteienhaus" => "apartment-building",
|
||||
"Wohneinheit in Mehrparteienhaus" => "apartment",
|
||||
"Wohnung" => "apartment",
|
||||
"Geschäft" => "business",
|
||||
"Gewerbebetrieb" => "business",
|
||||
];
|
||||
$preorderTypes = [
|
||||
"Interessensbekundung" => "interest",
|
||||
"Vorsorgeanschluss" => "provision",
|
||||
"Vollanschluss" => "order",
|
||||
"Nachbestellung" => "reorder",
|
||||
];
|
||||
|
||||
$me = new User(1);
|
||||
|
||||
$folder = __DIR__."/import/";
|
||||
$csvname = "Dateneinspielung_Stiftingtal.csv";
|
||||
$filename = $folder.$csvname;
|
||||
|
||||
$adb = FronkDB::singleton(ADDRESSDB_DBHOST, ADDRESSDB_DBUSER, ADDRESSDB_DBPASS, ADDRESSDB_DBNAME);
|
||||
$db = FronkDB::singleton();
|
||||
|
||||
$log = mfLoghandler::singleton();
|
||||
|
||||
$input = fopen($filename, "r");
|
||||
|
||||
$l = 0;
|
||||
$c = 0;
|
||||
$u = 0;
|
||||
$w = 0;
|
||||
while($csv = fgetcsv($input, 0)) {
|
||||
$l++;
|
||||
if($l == 1) continue;
|
||||
|
||||
if(!trim($csv[0])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
//var_dump($csv);exit;
|
||||
|
||||
$campaign_name = trim($csv[0]);
|
||||
$netzgebiet_name = trim($csv[2]);
|
||||
$bestelltyp = trim($csv[6]);
|
||||
$anschlusstyp = trim($csv[8]);
|
||||
$adrcd = trim($csv[9]);
|
||||
$strasse_name = trim($csv[10]);
|
||||
$hausnummer_name = trim($csv[11]);
|
||||
$plz_name = trim($csv[12]);
|
||||
$ort_name = trim($csv[13]);
|
||||
$unit_string = trim($csv[14]);
|
||||
$connection_count = trim($csv[17]);
|
||||
$kunde_firma = trim($csv[18]);
|
||||
$kunde_uid = trim($csv[19]);
|
||||
$kunde_vorname = trim($csv[20]);
|
||||
$kunde_nachname = trim($csv[21]);
|
||||
$kunde_strasse = trim($csv[22]);
|
||||
$kunde_tuer = "";
|
||||
$kunde_plz = trim($csv[23]);
|
||||
$kunde_ort = trim($csv[24]);
|
||||
$kunde_phone = trim($csv[25]);
|
||||
$kunde_email = trim($csv[26]);
|
||||
$partner_name = trim($csv[27]);
|
||||
$tuer = 0;
|
||||
|
||||
$m = [];
|
||||
if(preg_match('@ /\s+(?:tür|top)\s+(\d+)$@i', $kunde_strasse, $m)) {
|
||||
if($m[1]) $kunde_tuer = $m[1];
|
||||
}
|
||||
|
||||
if($unit_string && preg_match('/(?:tür|top)\s+([0-9.,]+[a-z]*)/i', $unit_string, $m)) {
|
||||
$tuer = $m[1];
|
||||
}
|
||||
|
||||
if(!$connection_count) $connection_count = 1;
|
||||
|
||||
if(!$bestelltyp || !$anschlusstyp || !$strasse_name || !$hausnummer_name || !$plz_name || !$ort_name || !$connection_count || (!$kunde_nachname && !$kunde_vorname && !$kunde_firma) || (!$kunde_phone && !$kunde_email)) {
|
||||
echo "incomplete row $l\n";
|
||||
continue;
|
||||
}
|
||||
|
||||
// fehler
|
||||
|
||||
|
||||
$strasse_name = $db->escape($strasse_name);
|
||||
$hausnummer_name = $db->escape($hausnummer_name);
|
||||
|
||||
$strasse_search = [$strasse_name];
|
||||
|
||||
if(strpos($strasse_name, ' ') !== false) $strasse_search[] = str_replace(' ', '-', $strasse_name);
|
||||
if(strpos($strasse_name, '-') !== false) $strasse_search[] = str_replace('-', ' ', $strasse_name);
|
||||
if(strpos($strasse_name, '.') !== false) $strasse_search[] = str_replace('.', '. ', $strasse_name);
|
||||
if(strpos($strasse_name, '.') !== false) $strasse_search[] = str_replace('.', '.-', $strasse_name);
|
||||
if(strpos($strasse_name, '. ') !== false) $strasse_search[] = str_replace('. ', '.', $strasse_name);
|
||||
if(strpos($strasse_name, '. ') !== false) $strasse_search[] = str_replace('. ', '.-', $strasse_name);
|
||||
if(strpos($strasse_name, '.') !== false) $strasse_search[] = str_replace('.-', '.', $strasse_name);
|
||||
if(strpos($strasse_name, '.') !== false) $strasse_search[] = str_replace('.-', '. ', $strasse_name);
|
||||
|
||||
foreach($strasse_search as $search) {
|
||||
if(strpos($search, 'ß') !== false) $strasse_search[] = str_replace('ß', 'ss', $search);
|
||||
if(strpos($search, 'ä') !== false) $strasse_search[] = str_replace('ä', 'ae', $search);
|
||||
if(strpos($search, 'ö') !== false) $strasse_search[] = str_replace('ö', 'oe', $search);
|
||||
if(strpos($search, 'ü') !== false) $strasse_search[] = str_replace('ü', 'ue', $search);
|
||||
|
||||
if(strpos($search, 'ss') !== false) $strasse_search[] = str_replace('ss', 'ß', $search);
|
||||
if(strpos($search, 'ae') !== false) $strasse_search[] = str_replace('ae', 'ä', $search);
|
||||
if(strpos($search, 'oe') !== false) $strasse_search[] = str_replace('oe', 'ö', $search);
|
||||
if(strpos($search, 'ue') !== false) $strasse_search[] = str_replace('ue', 'ü', $search);
|
||||
}
|
||||
|
||||
|
||||
$sql = "SELECT * FROM view_hausnummer WHERE netzgebiet_id = $netzgebiet_id AND strasse IN ('". implode("', '", $strasse_search)."') AND hausnummer='$hausnummer_name'";
|
||||
//echo "$sql\n";
|
||||
/*if(preg_match('/^Tobelbader/i',$strasse_name)) {
|
||||
echo "$sql\n";
|
||||
}*/
|
||||
$res = $adb->query($sql);
|
||||
|
||||
if(!$adb->num_rows($res)) {
|
||||
echo "=== Adresse '$strasse_name $hausnummer_name' nicht gefunden!\n";
|
||||
continue;
|
||||
}
|
||||
|
||||
$data = $adb->fetch_object($res);
|
||||
|
||||
$netzgebiet_id = $data->netzgebiet_id;
|
||||
$hausnummer_id = $data->hausnummer_id;
|
||||
|
||||
if(!$netzgebiet_id || !$hausnummer_id) {
|
||||
echo "=== Netzgebiet oder Hausnummer leer\n";
|
||||
continue;
|
||||
}
|
||||
|
||||
$network = NetworkModel::getFirst(["adb_network_id" => $netzgebiet_id]);
|
||||
if(!$network) {
|
||||
echo "thetool Netzgebiet nicht gefunden (adb netzgebiet id $netzgebiet_id)\n";
|
||||
continue;
|
||||
}
|
||||
$campaign = PreordercampaignModel::getFirst(["network_id" => $network->id]);
|
||||
if(!$campaign) {
|
||||
echo "Kampagne für Network ".$network->id." ".$network->name." nicht gefunden\n";
|
||||
continue;
|
||||
}
|
||||
|
||||
//echo $campaign->name." (".$network->name.")\n";
|
||||
|
||||
//var_dump($data);exit;
|
||||
$hausnummer = new ADBHausnummer($data->hausnummer_id);
|
||||
|
||||
$wohneinheiten = ADBWohneinheitModel::search(["hausnummer_id" => $hausnummer->id]);
|
||||
$unit_count = count($wohneinheiten);
|
||||
if(!$unit_count) {
|
||||
echo "Keine Wohneinheiten gefunden $strasse_name $hausnummer_name\n";
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
$product_search = ['external_id' => $partner_id,
|
||||
'attributename' => "presales",
|
||||
'attributevalue' => ($preorderTypes[$bestelltyp] == "order") ? "activation" : $preorderTypes[$bestelltyp]
|
||||
];
|
||||
$product = ProductModel::getFirst($product_search);
|
||||
|
||||
if(!$product) {
|
||||
echo "Kein product gefunden: $bestelltyp\n";
|
||||
continue;
|
||||
}
|
||||
|
||||
$price = $product->price;
|
||||
$price_setup = $product->price_setup;
|
||||
|
||||
$pdata = [
|
||||
'preordercampaign_id' => $campaign->id,
|
||||
'adb_hausnummer_id' => $hausnummer->id,
|
||||
'status_id' => 1,
|
||||
'connection_type' => $connectionTypes[$anschlusstyp],
|
||||
'connection_count' => 1,
|
||||
'product_id' => null,
|
||||
'setup_product_id' => $product->id,
|
||||
'type' => $preorderTypes[$bestelltyp],
|
||||
'price' => null,
|
||||
'price_setup' => $price_setup,
|
||||
'price_nne' => null,
|
||||
'price_nbe' => null,
|
||||
'billing_delay' => null,
|
||||
'billing_period' => null,
|
||||
'partner_id' => $partner_id,
|
||||
'accept_agb' => 1,
|
||||
'accept_dsgvo' => 1,
|
||||
'accept_marketing' => 1,
|
||||
'accept_withdrawal' => 1,
|
||||
'contact_type' => "owner",
|
||||
'company' => ($kunde_firma) ? $kunde_firma : null,
|
||||
'uid' => ($kunde_uid) ? $kunde_uid : null,
|
||||
'firstname' => $kunde_vorname,
|
||||
'lastname' => $kunde_nachname,
|
||||
'street' => $kunde_strasse,
|
||||
'housenumber' => null,
|
||||
'tuer' => null,
|
||||
'zip' => $kunde_plz,
|
||||
'city' => $kunde_ort,
|
||||
'phone' => $kunde_phone,
|
||||
'email' => $kunde_email,
|
||||
'submit_type' => "import",
|
||||
'create_by' => 1,
|
||||
'edit_by' => 1
|
||||
|
||||
];
|
||||
|
||||
|
||||
|
||||
if($connection_count == 1) {
|
||||
if($unit_count === 1) {
|
||||
//continue;
|
||||
$unit = $wohneinheiten[0];
|
||||
|
||||
// check if wohneinheit in existing preorder
|
||||
if(PreorderModel::getFirst(["adb_wohneinheit_id" => $unit->id])) {
|
||||
echo "=== 1 Wohneinheit schon vergeben $strasse_name $hausnummer_name (unit id ".$unit->id."\n";
|
||||
continue;
|
||||
}
|
||||
|
||||
if(!$unit->oaid) {
|
||||
$unit->oaid = $unit->getNewOAID();
|
||||
$unit->save();
|
||||
}
|
||||
|
||||
//create single preorder
|
||||
$pdata['adb_wohneinheit_id'] = $unit->id;
|
||||
|
||||
$preorder = PreorderModel::create($pdata);
|
||||
$preorder->ucode = $preorder->createUcode();
|
||||
$preorder->oaid = $unit->oaid;
|
||||
if(!$preorder->save()) {
|
||||
var_dump($preorder);exit;
|
||||
}
|
||||
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if($unit_count > 1) {
|
||||
// assume its single-dwelling with erroneously high door count
|
||||
$unit_candidates = [];
|
||||
$fixed_candidate = false;
|
||||
|
||||
foreach($wohneinheiten as $unit) {
|
||||
if(!$unit->tuer) continue;
|
||||
if($unit->tuer > 0) {
|
||||
$unit_candidates[$unit->tuer] = $unit;
|
||||
if($tuer && $unit->tuer == $tuer) {
|
||||
$fixed_candidate = $unit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!count($unit_candidates)) {
|
||||
foreach($wohneinheiten as $unit) {
|
||||
if(!$unit->zusatz) continue;
|
||||
if(preg_match('/Top\s+\d+/i',$unit->zusatz)) {
|
||||
$unit_candidates[$unit->zusatz] = $unit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!count($unit_candidates)) {
|
||||
$unit_candidates = $wohneinheiten;
|
||||
}
|
||||
|
||||
if(count($unit_candidates)) {
|
||||
if($fixed_candidate) {
|
||||
$unit = $fixed_candidate;
|
||||
} else {
|
||||
ksort($unit_candidates, SORT_NUMERIC);
|
||||
$unit = array_shift($unit_candidates);
|
||||
}
|
||||
|
||||
if(PreorderModel::getFirst(["adb_wohneinheit_id" => $unit->id])) {
|
||||
echo "=== 2 Wohneinheit schon vergeben $strasse_name $hausnummer_name (unit id ".$unit->id.")\n";
|
||||
continue;
|
||||
}
|
||||
|
||||
if(!$unit->oaid) {
|
||||
$unit->oaid = $unit->getNewOAID();
|
||||
$unit->save();
|
||||
}
|
||||
|
||||
//create single preorder
|
||||
$pdata['adb_wohneinheit_id'] = $unit->id;
|
||||
|
||||
$preorder = PreorderModel::create($pdata);
|
||||
$preorder->ucode = $preorder->createUcode();
|
||||
$preorder->oaid = $unit->oaid;
|
||||
|
||||
//var_dump($preorder);exit;
|
||||
if(!$preorder->save()) {
|
||||
var_dump($preorder);exit;
|
||||
}
|
||||
|
||||
//echo "Wohneinheit saved\n";
|
||||
continue;
|
||||
}
|
||||
}
|
||||
} elseif($connection_count > 1) {
|
||||
if($unit_count < $connection_count) {
|
||||
/*$mu = [];
|
||||
$mu['preorder'] = $preorder;
|
||||
$mu['unit_count'] = $unit_count;
|
||||
$missing_units[] = $mu;*/
|
||||
echo "=== $strasse_name $hausnummer_name: Nicht genug Wohneinheiten ".count($wohneinheiten)." - need ".$connection_count."\n";
|
||||
continue;
|
||||
}
|
||||
//continue;
|
||||
$available_units = [];
|
||||
|
||||
|
||||
foreach($wohneinheiten as $unit) {
|
||||
if(!PreorderModel::getFirst(["adb_wohneinheit_id" => $unit->id])) {
|
||||
if($unit->tuer || preg_match('/^Top\s+\d+$/', $unit->zusatz)) {
|
||||
$available_units[] = $unit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($connection_count > count($available_units)) {
|
||||
// this usually means this order was created already
|
||||
/*$md = [];
|
||||
$md["unit_count"] = $unit_count;
|
||||
$md["door_count"] = count($available_units);
|
||||
$md["preorder"] = $preorder;
|
||||
$missing_doors[] = $md;*/
|
||||
echo "=== $strasse_name $hausnummer_name: Not enough units with tuer - units total: $unit_count; units with tuer: ".count($available_units)."; need: ".$connection_count."\n";
|
||||
/*foreach($available_units as $u) {
|
||||
echo $u->oaid. " tuer ".$u->tuer."\n";
|
||||
}*/
|
||||
continue;
|
||||
}
|
||||
//continue;
|
||||
|
||||
$topnumbers = [];
|
||||
if(preg_match('/(?:tür|top)\s+\d/i', $unit_string)) {
|
||||
$topnumbers_string = preg_replace('/(tür|top)/i', "", $unit_string);
|
||||
$topnumbers_string = preg_replace('/\s*u\.?/i', ",", $topnumbers_string);
|
||||
|
||||
foreach(explode(",", $topnumbers_string) as $topnumraw) {
|
||||
$topnumbers[] = intval($topnumraw);
|
||||
}
|
||||
|
||||
if(count($topnumbers) < $connection_count) {
|
||||
echo "=== $strasse_name $hausnummer_name: Nicht genug Topnummern für $connection_count Anschlüsse\n";
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
//continue;
|
||||
|
||||
// create new Preorders with available units
|
||||
// then set original Preorder deleted
|
||||
echo "Creating $connection_count new preorders\n";
|
||||
for($i = 0; $i < $connection_count; $i++) {
|
||||
$unit_top_number = false;
|
||||
if(count($topnumbers)) {
|
||||
//echo "$strasse_name $hausnummer_name: Looking for Unit Top $topnumbers[$i]\n";
|
||||
|
||||
foreach($available_units as $topnumUnit) {
|
||||
if($topnumUnit->tuer == $topnumbers[$i]) {
|
||||
$unit = $topnumUnit;
|
||||
}
|
||||
}
|
||||
if(!$unit) {
|
||||
echo "=== $strasse_name $hausnummer_name: Unit mit Topnummer ".$topnumbers[$i]." nicht gefunden.\n";
|
||||
continue;
|
||||
}
|
||||
//var_dump($unit);
|
||||
$unit_top_number = $topnumbers[$i];
|
||||
} else {
|
||||
$unit = $available_units[$i];
|
||||
}
|
||||
//continue;
|
||||
|
||||
|
||||
if(PreorderModel::getFirst(["adb_wohneinheit_id" => $unit->id])) {
|
||||
echo "=== 3 Wohneinheit schon vergeben $strasse_name $hausnummer_name (unit id ".$unit->id."\n";
|
||||
continue;
|
||||
}
|
||||
|
||||
$pdata['adb_wohneinheit_id'] = $unit->id;
|
||||
|
||||
$preorder = PreorderModel::create($pdata);
|
||||
$preorder->ucode = $preorder->createUcode();
|
||||
$preorder->oaid = $unit->oaid;
|
||||
|
||||
//var_dump($preorder);exit;
|
||||
if(!$preorder->save()) {
|
||||
var_dump($preorder);exit;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
echo "=== Not processed: $strasse_name $hausnummer_name -> need $connection_count but have $unit_count units \n";
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
Kampagne,Netzgebiet ID,Netzgebiet,Extref,Bestellcode,OAID,Bestelltyp,Status,Anschlusstyp,GWR Adresscode,Anschluss Strasse,Anschluss Hausnummer,Anschluss PLZ,Anschluss Ort,Anschluss Wohneinheit,GPS Breite,GPS Länge,Anzahl Anschlüsse,Kunde Firma,Kunde UID,Kunde Vorname,Kunde Nachname,Kunde Strasse,Kunde PLZ,Kunde Ort,Kunde Telefon,Kunde Email,Partner,Addon Lehrverrohrung Grundstück,Addon Hausverkabelung,BEP festgelegt,Starterpaket erhalten,Erstellt,Letzte Bearbeitung
|
||||
Stifting,,Stifting,,,,Vollanschluss,,Einfahmilienhaus,,Eckmichlstraße ,11,8010,Graz,,,,1,,,Josef ,Wünscher,Eckmichlstraße 11,8010,Graz,0676/4213308,sepp.wuenscher@gmail.com,Energie Steiermark Technik GmbH,0,0,0,0,,
|
||||
Stifting,,Stifting,,,,Vorsorgeanschluss,,Einfahmilienhaus,,Eckmichlstraße ,20,8010,Graz,,,,1,,,Dragan,Danicic,Eckmichlstraße 20,8010,Graz,0660/1617237,,Energie Steiermark Technik GmbH,0,0,0,0,,
|
||||
Stifting,,Stifting,,,,Vollanschluss,,Einfahmilienhaus,,Eckmichlstraße ,23,8010,Graz,,,,1,,,Franz,Rieger,Eckmichlstraße 23,8010,Graz,0699/10323295,f.rieger1@gmx.at,Energie Steiermark Technik GmbH,0,0,0,0,,
|
||||
Stifting,,Stifting,,,,Vollanschluss,,Einfahmilienhaus,,Eckmichlstraße ,9,8010,Graz,,,,1,,,Andrea,Dillon,Eckmichlstraße 9,8010,Graz,0681/20820604,akdillon@aon.at,Energie Steiermark Technik GmbH,0,0,0,0,,
|
||||
Stifting,,Stifting,,,,Vollanschluss,,Einfahmilienhaus,,Eckmichlstraße,21,8010,Graz,,,,1,,,Lundrim,Arifi ,Eckmichlstraße 21,8010,Graz,0676/6970079,lundrim.arifi@gmail.com,Energie Steiermark Technik GmbH,0,0,0,0,,
|
||||
Stifting,,Stifting,,,,Vollanschluss,,Einfahmilienhaus,,Hauersteig ,1,8044,Graz,,,,1,,,Josef,Mader ,Hauersteig 1,8044,Graz,0664/5755326,jum.mader.graz@aon.at,Energie Steiermark Technik GmbH,0,0,0,0,,
|
||||
Stifting,,Stifting,,,,Vollanschluss,,Einfahmilienhaus,,Hauersteig ,11,8044,Graz,,,,1,,,Angela,Kreil,Hauersteig 11,8044,Graz,0664/4607648,angela.kreil@gmx.at,Energie Steiermark Technik GmbH,0,0,0,0,,
|
||||
Stifting,,Stifting,,,,Vollanschluss,,Einfahmilienhaus,,Hauersteig,11a,8044,Graz,,,,1,,,Charlotte,Yanik-Schaffer,Hauersteig 11a,8044,Graz,0664/8934143,charlotte.yanik-schaffer@gmx.at,Energie Steiermark Technik GmbH,0,0,0,0,,
|
||||
Stifting,,Stifting,,,,Vollanschluss,,Einfahmilienhaus,,Hauersteig ,13,8044,Graz,,,,1,,,Anita,Mekis,Hauersteig 13,8044,Graz,0664/5427659,petermekis@icloud.com,Energie Steiermark Technik GmbH,0,0,0,0,,
|
||||
Stifting,,Stifting,,,,Vollanschluss,,Einfahmilienhaus,,Hauersteig ,15,8044,Graz,,,,1,,,Mustafa,Yanik,Hauersteig 15,8044,Graz,0664/3917686,mustiyanik@gmail.com,Energie Steiermark Technik GmbH,0,0,0,0,,
|
||||
Stifting,,Stifting,,,,Vollanschluss,,Einfahmilienhaus,,Hauersteig ,17,8044,Graz,,,,1,,,Karin,Grabner,Hauersteig 17,8044,Graz,0664/3983434,karingrabner10@gmail.com,Energie Steiermark Technik GmbH,0,0,0,0,,
|
||||
Stifting,,Stifting,,,,Vollanschluss,,Einfahmilienhaus,,Hauersteig ,21,8044,Graz,,,,1,,,Brigitte,Wanz,Hauersteig 21,8044,Graz,0664/5322331,b.wanz@gmx.at,Energie Steiermark Technik GmbH,0,0,0,0,,
|
||||
Stifting,,Stifting,,,,Vollanschluss,,Einfahmilienhaus,,Hauersteig ,23,8044,Graz,,,,1,,,Ernst,Walser,Hauersteig 23,8044,Graz,0664/4608433,office@haustechnikwalser.at,Energie Steiermark Technik GmbH,0,0,0,0,,
|
||||
Stifting,,Stifting,,,,Vollanschluss,,Einfahmilienhaus,,Hauersteig,23b,8044,Graz,,,,1,,,Ernst,Walser,Hauersteig 23b,8044,Graz,0664/4608433,office@haustechnikwalser.at,Energie Steiermark Technik GmbH,0,0,0,0,,
|
||||
Stifting,,Stifting,,,,Vollanschluss,,Einfahmilienhaus,,Hauersteig ,55,8044,Graz,,,,1,,,Gerhard,Walzl,Hauersteig 55,8044,Graz,0664/73537509,gerhardistcool44@gmail.com,Energie Steiermark Technik GmbH,0,0,0,0,,
|
||||
Stifting,,Stifting,,,,Vollanschluss,,Einfahmilienhaus,,Hauersteig ,9,8044,Graz,,,,1,,,Ingo,Schaffer,Hauersteig 9,8044,Graz,0664/4608858,schaffer.ingo@me.com,Energie Steiermark Technik GmbH,0,0,0,0,,
|
||||
Stifting,,Stifting,,,,Vollanschluss,,Einfahmilienhaus,,Lineckerweg ,10,8044,Graz,,,,1,,,Reinhard,Brandner,Lineckerweg 10,8044,Graz,0664/1601455,reinhardbrandner3@gmail.com,Energie Steiermark Technik GmbH,0,0,0,0,,
|
||||
Stifting,,Stifting,,,,Vollanschluss,,Einfahmilienhaus,,Lineckerweg ,GST 1058,8044,Graz,,,,1,,,Evelyn,Vollstuber,Lineckerweg GST 1058,8044,Graz,0664/6483375,evipendl@gmail.com,Energie Steiermark Technik GmbH,0,0,0,0,,
|
||||
Stifting,,Stifting,,,,Vorsorgeanschluss,,Einfahmilienhaus,,Lineckerweg ,38,8044,Graz,,,,1,,,Gerhard,Nierhaus,Lineckerweg 38,8044,Graz,0699/11002490,,Energie Steiermark Technik GmbH,0,0,0,0,,
|
||||
Stifting,,Stifting,,,,Vollanschluss,,Einfahmilienhaus,,Lineckerweg ,50,8044,Graz,,,,1,,,Anna,Mautner,Lineckerweg 50,8044,Graz,0664/4052583,annamautner@hotmail.com,Energie Steiermark Technik GmbH,0,0,0,0,,
|
||||
Stifting,,Stifting,,,,Vollanschluss,,Einfahmilienhaus,,Lineckerweg ,51,8044,Graz,,,,1,,,Erika,Kern,Lineckerweg 51,8044,Graz,0650/3120769,kern.erika@gmx.net,Energie Steiermark Technik GmbH,0,0,0,0,,
|
||||
Stifting,,Stifting,,,,Vollanschluss,,Einfahmilienhaus,,Lineckerweg ,53,8044,Graz,,,,1,,,Willi,Schneider,Lineckerweg 53,8044,Graz,0172/8408282,info@peoplepicture.de,Energie Steiermark Technik GmbH,0,0,0,0,,
|
||||
Stifting,,Stifting,,,,Vollanschluss,,Gewerbebetrieb,,Lineckerweg ,54,8044,Graz,,,,1,Einhunderelf GmbH,,Stefan,Haberler,Lineckerweg 54,8044,Graz,0664/1065858,office@einhundertelf.at,Energie Steiermark Technik GmbH,0,0,0,0,,
|
||||
Stifting,,Stifting,,,,Vorsorgeanschluss,,Einfahmilienhaus,,Mittergrabenweg ,87,8010,Graz,,,,1,,,Jürgen,Stephani,Mittergrabenweg 87,8010,Graz,0664/8770280,,Energie Steiermark Technik GmbH,0,0,0,0,,
|
||||
Stifting,,Stifting,,,,Vollanschluss,,Gewerbebetrieb,,Rohbachhöhe ,20,8010,Graz,,,,1,,,Erika,Sattler,Rohbachhöhe 20,8010,Graz,03163/91021,office@heurigenschenke-sattler.at,Energie Steiermark Technik GmbH,0,0,0,0,,
|
||||
Stifting,,Stifting,,,,Vollanschluss,,Gewerbebetrieb,,Rohrbacherhöhe ,23,8010,Graz,,,,1,Gassner Kalbfleisch GmbH,,Franz,Gasser,Rohrbacherhöhe 23,8010,Graz,0664/1101520,fg@gassnerkalbfleisch.at,Energie Steiermark Technik GmbH,0,0,0,0,,
|
||||
Stifting,,Stifting,,,,Vollanschluss,,Einfahmilienhaus,,Rohrbachhöhe ,10,8010,Graz,,,,1,,,Frederike,Lex,Rohrbachhöhe 10,8010,Graz,0664/3949066,friderike.lex@gmx.at,Energie Steiermark Technik GmbH,0,0,0,0,,
|
||||
Stifting,,Stifting,,,,Vollanschluss,,Einfahmilienhaus,,Rohrbachhöhe ,11,8010,Graz,,,,1,,,Wolfgang,Hasenhütl,Rohrbachhöhe 11,8010,Graz,0676/3335665,aon.913791312.h4senh@aon.at,Energie Steiermark Technik GmbH,0,0,0,0,,
|
||||
Stifting,,Stifting,,,,Vollanschluss,,Einfahmilienhaus,,Rohrbachhöhe ,12,8010,Graz,,,,1,,,David,Leonhartsberger,Rohrbachhöhe 12,8010,Graz,0660/1221144,leonhartsberger.d@gmail.com,Energie Steiermark Technik GmbH,0,0,0,0,,
|
||||
Stifting,,Stifting,,,,Vollanschluss,,Einfahmilienhaus,,Rohrbachhöhe ,13,8010,Graz,,,,1,,,Werner,Unger,Rohrbachhöhe 13,8010,Graz,0664/1090530,werner.unger@icloud.com,Energie Steiermark Technik GmbH,0,0,0,0,,
|
||||
Stifting,,Stifting,,,,Vorsorgeanschluss,,Einfahmilienhaus,,Rohrbachhöhe,8a,8010,Graz,,,,1,,,,,Rohrbachhöhe 8a,8010,Graz,,,Energie Steiermark Technik GmbH,0,0,0,0,,
|
||||
Stifting,,Stifting,,,,Vollanschluss,,Einfahmilienhaus,,Rohrbachhöhe ,9,8010,Graz,,,,1,,,Anton,Neubauer,Rohrbachhöhe 9,8010,Graz,0664/4266252,anton.neubauer58@gmail.com,Energie Steiermark Technik GmbH,0,0,0,0,,
|
||||
Stifting,,Stifting,,,,Vollanschluss,,Einfahmilienhaus,,Schaftal ,11,8044,Kainbach bei Graz,,,,1,,,Moritz,Rieger,Schaftal 11,8044,Kainbach bei Graz,0676/4881864,moritz.rieger@me.com,Energie Steiermark Technik GmbH,0,0,0,0,,
|
||||
Stifting,,Stifting,,,,Vollanschluss,,Einfahmilienhaus,,Schaftal ,12,8044,Kainbach bei Graz,,,,1,,,Daniel,Lackner,Schaftal 12,8044,Kainbach bei Graz,0664/1494439,daniel.lackner93@gmail.com,Energie Steiermark Technik GmbH,0,0,0,0,,
|
||||
Stifting,,Stifting,,,,Vollanschluss,,Einfahmilienhaus,,Schaftal ,13,8044,Kainbach bei Graz,,,,1,,,Christoph,Stipacek,Schaftal 13,8044,Kainbach bei Graz,0650/2106839,christoph.stipcek@gmail.com,Energie Steiermark Technik GmbH,0,0,0,0,,
|
||||
Stifting,,Stifting,,,,Vollanschluss,,Einfahmilienhaus,,Schaftal ,16,8044,Kainbach bei Graz,,,,1,,,Sonja,Zbiba ,Schaftal 16,8044,Kainbach bei Graz,0664/5602574,Zbiba.sonja@gmail.com,Energie Steiermark Technik GmbH,0,0,0,0,,
|
||||
Stifting,,Stifting,,,,Vollanschluss,,Gewerbebetrieb,,Schaftal ,22,8044,Kainbach bei Graz,,,,1,,,Renate,Lackner,Schaftal 22,8044,Kainbach bei Graz,0316/391104,office@gasthaus-griesbauer.at,Energie Steiermark Technik GmbH,0,0,0,0,,
|
||||
Stifting,,Stifting,,,,Vollanschluss,,Einfahmilienhaus,,Schaftal ,23,8044,Kainbach bei Graz,,,,1,,,Dieter,Kari,Schaftal 23,8044,Kainbach bei Graz,0664/1162025,dieter.kari@aon.at,Energie Steiermark Technik GmbH,0,0,0,0,,
|
||||
Stifting,,Stifting,,,,Vollanschluss,,Einfahmilienhaus,,Schaftal ,25,8044,Kainbach bei Graz,,,,1,,,Michael,Jung,Schaftal 25,8044,Kainbach bei Graz,0664/1614846,michael.jung@aon.at,Energie Steiermark Technik GmbH,0,0,0,0,,
|
||||
Stifting,,Stifting,,,,Vollanschluss,,Einfahmilienhaus,,Schaftal ,27,8044,Kainbach bei Graz,,,,1,,,Christian,Brugger ,Schaftal 27,8044,Kainbach bei Graz,0676/5446094,chris.brugger@posteo.at,Energie Steiermark Technik GmbH,0,0,0,0,,
|
||||
Stifting,,Stifting,,,,Vollanschluss,,Einfahmilienhaus,,Schaftal ,29,8044,Kainbach bei Graz,,,,1,,,Peter,Fuchs,Schaftal 29,8044,Kainbach bei Graz,0664/1610198,fuchsi@aon.at,Energie Steiermark Technik GmbH,0,0,0,0,,
|
||||
Stifting,,Stifting,,,,Vollanschluss,,Einfahmilienhaus,,Schaftal ,3,8044,Kainbach bei Graz,,,,1,,,Herbert,Potocnik,Schaftal 3,8044,Kainbach bei Graz,0664/8500043,herbert.potocnik@gmail.com,Energie Steiermark Technik GmbH,0,0,0,0,,
|
||||
Stifting,,Stifting,,,,Vollanschluss,,Einfahmilienhaus,,Schaftal ,31,8044,Kainbach bei Graz,,,,1,,,Franz,Fuchs,Schaftal 31,8044,Kainbach bei Graz,0676/4265043,fuchs.franz1960@gmail.com,Energie Steiermark Technik GmbH,0,0,0,0,,
|
||||
Stifting,,Stifting,,,,Vollanschluss,,Einfahmilienhaus,,Schaftal ,35,8044,Kainbach bei Graz,,,,1,,,Maria,Pint,Schaftal 35,8044,Kainbach bei Graz,0664/5094175,maria.pint@aon.at,Energie Steiermark Technik GmbH,0,0,0,0,,
|
||||
Stifting,,Stifting,,,,Vollanschluss,,Gewerbebetrieb,,Schaftal ,39,8044,Kainbach bei Graz,,,,1,MOKINO Filmproduktion,,Ursula,Berger,Schaftal 39,8044,Kainbach bei Graz,0664/5467410,u.berger@mokino.eu,Energie Steiermark Technik GmbH,0,0,0,0,,
|
||||
Stifting,,Stifting,,,,Vollanschluss,,Einfahmilienhaus,,Schaftal ,41,8044,Kainbach bei Graz,,,,1,,,Matthias,Steiner,Schaftal 41,8044,Kainbach bei Graz,0676/5356073,mat.steiner@mailbox.org,Energie Steiermark Technik GmbH,0,0,0,0,,
|
||||
Stifting,,Stifting,,,,Vollanschluss,,Einfahmilienhaus,,Schaftal ,43,8044,Kainbach bei Graz,,,,1,,,Sylvia,Koch,Schaftal 43,8044,Kainbach bei Graz,0680/3035110,silvia.m.koch@gmail.com,Energie Steiermark Technik GmbH,0,0,0,0,,
|
||||
Stifting,,Stifting,,,,Vollanschluss,,Einfahmilienhaus,,Schaftal ,45,8044,Kainbach bei Graz,,,,1,,,Monika,Maurer,Schaftal 45,8044,Kainbach bei Graz,0664/5129287,kurt.maurer@aon.at,Energie Steiermark Technik GmbH,0,0,0,0,,
|
||||
Stifting,,Stifting,,,,Vollanschluss,,Einfahmilienhaus,,Schaftal ,49,8044,Kainbach bei Graz,,,,1,,,Josef,Prosser,Schaftal 49,8044,Kainbach bei Graz,0680/5048369,romplhelga@gmail.com,Energie Steiermark Technik GmbH,0,0,0,0,,
|
||||
Stifting,,Stifting,,,,Vollanschluss,,Einfahmilienhaus,,Schaftal ,56,8044,Kainbach bei Graz,,,,1,,,Hans,Pammer,Schaftal 56,8044,Kainbach bei Graz,0676/6483530,hans-pommer@gmx.at,Energie Steiermark Technik GmbH,0,0,0,0,,
|
||||
Stifting,,Stifting,,,,Vollanschluss,,Einfahmilienhaus,,Schaftal ,59,8044,Kainbach bei Graz,,,,1,,,Tanja,Wimmer,Schaftal 59,8044,Kainbach bei Graz,0664/1632566,tanja.wimmer83@gmail.com,Energie Steiermark Technik GmbH,0,0,0,0,,
|
||||
Stifting,,Stifting,,,,Vollanschluss,,Gewerbebetrieb,,Schaftal ,8,8044,Kainbach bei Graz,,,,1,Konditorei im Gasthaus Haiden Erwin,,Birgit,Neubauer,Schaftal 8,8044,Kainbach bei Graz,0664/3852476,birgit_neubauer@hotmail.com,Energie Steiermark Technik GmbH,0,0,0,0,,
|
||||
Stifting,,Stifting,,,,Vollanschluss,,Einfahmilienhaus,,Schaftal ,9,8044,Kainbach bei Graz,,,,1,,,Elfriede,Liebmann,Schaftal 9,8044,Kainbach bei Graz,0664/88615527,walter.liebmann@gmail.com,Energie Steiermark Technik GmbH,0,0,0,0,,
|
||||
Stifting,,Stifting,,,,Vollanschluss,,Gewerbebetrieb,,Schaftalstraße,20a,8010,Graz,,,,1,Zsifkovits Gerald und Ralph OG,,Gerald,Zsifkovits,Schaftalstraße 20a,8010,Graz,0664/2301325,gerald.zsifkovits@aon.at,Energie Steiermark Technik GmbH,0,0,0,0,,
|
||||
Stifting,,Stifting,,,,Vollanschluss,,Einfahmilienhaus,,Schaftalstraße ,26,8010,Graz,,,,1,,,Erich,Thanner,Schaftalstraße 26,8010,Graz,0670/2044725,thannererich@gmx.at,Energie Steiermark Technik GmbH,0,0,0,0,,
|
||||
Stifting,,Stifting,,,,Vollanschluss,,Einfahmilienhaus,,Schaftalstraße ,35,8010,Graz,,,,1,,,Gerd,Hauser,Schaftalstraße 35,8010,Graz,0664/1035435,rlb1@aon.at,Energie Steiermark Technik GmbH,0,0,0,0,,
|
||||
Stifting,,Stifting,,,,Vollanschluss,,Gewerbebetrieb,,Schaftalstraße ,39,8010,Graz,,,,1,Frölich und Partner Kg,,Klaus,Fröhlich,Schaftalstraße 39,8010,Graz,0664/3461616,office.froelich-partner.at,Energie Steiermark Technik GmbH,0,0,0,0,,
|
||||
Stifting,,Stifting,,,,Vollanschluss,,Einfahmilienhaus,,Schaftalstraße ,43,8010,Graz,,,,1,,,Karl,Friedl,Schaftalstraße 43,8010,Graz,0680/4442567,karlfriedl1.1@gmail.com,Energie Steiermark Technik GmbH,0,0,0,0,,
|
||||
|
Reference in New Issue
Block a user