updated Address filter

This commit is contained in:
Frank Schubert
2024-01-23 21:12:46 +01:00
parent 2c5e4b1f5c
commit 76def95fd9
11 changed files with 6576 additions and 55 deletions
+2 -5
View File
@@ -6,9 +6,6 @@
if($f) {
$urlfilter['f'] = $f;
}
if(is_array($filter) && count($filter)) {
$urlfilter["filter"] = $filter;
}
$posturl = self::getUrl("Address", "save", $urlfilter);
?>
<?php include(realpath(dirname(__FILE__)."/../../$mfLayoutPackage")."/header.php"); ?>
@@ -490,7 +487,7 @@
$("#bank-error").hide();
$("#bank-error").text("");
if(data.iban_correct && !data.iban_sus && data.bic_correct) {
if(data.iban_correct && data.bic_correct && (!data.iban_sus || data.iban_sus === "www")) {
bankdata_valid = true;
$('#addressForm').submit();
return;
@@ -502,7 +499,7 @@
$("#bank_account_iban").addClass("invalid");
bank_error.push("Ungültige IBAN!");
}
if(data.iban_sus) {
if(data.iban_sus && data.iban_sus !== "www") {
$("#bank_account_iban").addClass("invalid");
bank_error.push("IBAN verdächtig (" + data.iban_sus + ")!");
}
+20 -20
View File
@@ -60,22 +60,22 @@
<div class="col-2">
<label class="form-label" for="filter_addresstype">Rolle</label>
<select name="filter[addresstype][]" id="filter_addresstype" class="form-control" multiple="multiple">
<option value="systemowner" <?=(in_array("systemowner", $filter["addresstype"])) ? "selected='selected'" : ""?>><?=__("systemowner")?></option>
<option value="productowner" <?=(in_array("productowner", $filter["addresstype"])) ? "selected='selected'" : ""?>><?=__("productowner")?></option>
<option value="netowner" <?=(in_array("netowner", $filter["addresstype"])) ? "selected='selected'" : "netowner"?>><?=__("netowner")?></option>
<option value="salespartner" <?=(in_array("salespartner", $filter["addresstype"])) ? "selected='selected'" : "salespartner"?>><?=__("salespartner")?></option>
<option value="pipeworker" <?=(in_array("pipeworker", $filter["addresstype"])) ? "selected='selected'" : "pipeworker"?>><?=__("pipeworker")?></option>
<option value="lineworker" <?=(in_array("lineworker", $filter["addresstype"])) ? "selected='selected'" : "lineworker"?>><?=__("lineworker")?></option>
<option value="pipeplanner" <?=(in_array("pipeplanner", $filter["addresstype"])) ? "selected='selected'" : "pipeplanner"?>><?=__("pipeplanner")?></option>
<option value="lineplanner" <?=(in_array("lineplanner", $filter["addresstype"])) ? "selected='selected'" : "lineplanner"?>><?=__("lineplanner")?></option>
<option value="netoperator" <?=(in_array("netoperator", $filter["addresstype"])) ? "selected='selected'" : "netoperator"?>><?=__("netoperator")?></option>
<option value="support" <?=(in_array("support", $filter["addresstype"])) ? "selected='selected'" : "support"?>><?=__("support")?></option>
<option value="billing" <?=(in_array("billing", $filter["addresstype"])) ? "selected='selected'" : ""?>><?=__("billing")?></option>
<option value="employee" <?=(in_array("employee", $filter["addresstype"])) ? "selected='selected'" : ""?>><?=__("employee")?></option>
<option value="customer" <?=(in_array("customer", $filter["addresstype"])) ? "selected='selected'" : ""?>><?=__("customer")?></option>
<option value="supplier" <?=(in_array("supplier", $filter["addresstype"])) ? "selected='selected'" : ""?>><?=__("supplier")?></option>
<option value="contact" <?=(in_array("contact", $filter["addresstype"])) ? "selected='selected'" : ""?>><?=__("contact")?></option>
<option value="techcontact" <?=(in_array("techcontact", $filter["addresstype"])) ? "selected='selected'" : ""?>><?=__("techcontact")?></option>
<option value="systemowner" <?=(array_key_exists("addresstype", $filter) && in_array("systemowner", $filter["addresstype"])) ? "selected='selected'" : ""?>><?=__("systemowner")?></option>
<option value="productowner" <?=(array_key_exists("addresstype", $filter) && in_array("productowner", $filter["addresstype"])) ? "selected='selected'" : ""?>><?=__("productowner")?></option>
<option value="netowner" <?=(array_key_exists("addresstype", $filter) && in_array("netowner", $filter["addresstype"])) ? "selected='selected'" : "netowner"?>><?=__("netowner")?></option>
<option value="salespartner" <?=(array_key_exists("addresstype", $filter) && in_array("salespartner", $filter["addresstype"])) ? "selected='selected'" : "salespartner"?>><?=__("salespartner")?></option>
<option value="pipeworker" <?=(array_key_exists("addresstype", $filter) && in_array("pipeworker", $filter["addresstype"])) ? "selected='selected'" : "pipeworker"?>><?=__("pipeworker")?></option>
<option value="lineworker" <?=(array_key_exists("addresstype", $filter) && in_array("lineworker", $filter["addresstype"])) ? "selected='selected'" : "lineworker"?>><?=__("lineworker")?></option>
<option value="pipeplanner" <?=(array_key_exists("addresstype", $filter) && in_array("pipeplanner", $filter["addresstype"])) ? "selected='selected'" : "pipeplanner"?>><?=__("pipeplanner")?></option>
<option value="lineplanner" <?=(array_key_exists("addresstype", $filter) && in_array("lineplanner", $filter["addresstype"])) ? "selected='selected'" : "lineplanner"?>><?=__("lineplanner")?></option>
<option value="netoperator" <?=(array_key_exists("addresstype", $filter) && in_array("netoperator", $filter["addresstype"])) ? "selected='selected'" : "netoperator"?>><?=__("netoperator")?></option>
<option value="support" <?=(array_key_exists("addresstype", $filter) && in_array("support", $filter["addresstype"])) ? "selected='selected'" : "support"?>><?=__("support")?></option>
<option value="billing" <?=(array_key_exists("addresstype", $filter) && in_array("billing", $filter["addresstype"])) ? "selected='selected'" : ""?>><?=__("billing")?></option>
<option value="employee" <?=(array_key_exists("addresstype", $filter) && in_array("employee", $filter["addresstype"])) ? "selected='selected'" : ""?>><?=__("employee")?></option>
<option value="customer" <?=(array_key_exists("addresstype", $filter) && in_array("customer", $filter["addresstype"])) ? "selected='selected'" : ""?>><?=__("customer")?></option>
<option value="supplier" <?=(array_key_exists("addresstype", $filter) && in_array("supplier", $filter["addresstype"])) ? "selected='selected'" : ""?>><?=__("supplier")?></option>
<option value="contact" <?=(array_key_exists("addresstype", $filter) && in_array("contact", $filter["addresstype"])) ? "selected='selected'" : ""?>><?=__("contact")?></option>
<option value="techcontact" <?=(array_key_exists("addresstype", $filter) && in_array("techcontact", $filter["addresstype"])) ? "selected='selected'" : ""?>><?=__("techcontact")?></option>
</select>
</div>
<?php endif; ?>
@@ -209,7 +209,7 @@
<td></td>
<?php endif; ?>
<td>
<a href="<?=self::getUrl("Address", "view", ["id" => $address->id, 'filter' => $filter, 's' => $pagination['start']])?>">
<a href="<?=self::getUrl("Address", "view", ["id" => $address->id, 's' => $pagination['start']])?>">
<?=$address->customer_number?>
<?=($address->spin) ? "<br /><span class='text-pink'>".$address->spin."</span>" : ""?>
</a>
@@ -222,8 +222,8 @@
<br /><span title="Lieferantenkonto"><?=$address->fibu_supplier_number?></span>
<?php endif; ?>
</td>
<td><a href="<?=self::getUrl("Address", "view", ["id" => $address->id, 'filter' => $filter, 's' => $pagination['start']])?>"><?=nl2br($address->company)?></a></td>
<td><a href="<?=self::getUrl("Address", "view", ["id" => $address->id, 'filter' => $filter, 's' => $pagination['start']])?>"><?=$address->getFullName()?></a></td>
<td><a href="<?=self::getUrl("Address", "view", ["id" => $address->id, 's' => $pagination['start']])?>"><?=nl2br($address->company)?></a></td>
<td><a href="<?=self::getUrl("Address", "view", ["id" => $address->id, 's' => $pagination['start']])?>"><?=$address->getFullName()?></a></td>
<td>
<?=$address->street?><br />
<?=$address->zip?> <?=$address->city?>
@@ -232,7 +232,7 @@
<td><?=$address->email?></td>
<td style="text-align: left; letter-spacing: 4px; font-size: 1.1em;">
<a href="<?=self::getUrl("User", "Index", ["filter" => ["address_id" => $address->id]])?>" title="Benutzer anzeigen"><i class="fas fa-users"></i></a>
<a href="<?=self::getUrl("Address", "view", ["id" => $address->id, 'filter' => $filter, 's' => $pagination['start']])?>"><i class="far fa-eyes" title="Anzeigen"></i></a>
<a href="<?=self::getUrl("Address", "view", ["id" => $address->id, 's' => $pagination['start']])?>"><i class="far fa-eyes" title="Anzeigen"></i></a>
<a href="<?=self::getUrl("Address", "edit", ["id" => $address->id, 's' => $pagination['start']])?>"><i class="far fa-edit" title="Bearbeiten"></i></a>
<a href="<?=self::getUrl("Address", "delete", ["id" => $address->id, 's' => $pagination['start']])?>" onclick="if(!confirm('Person/Firma wirklich löschen?')) return false;" class="text-danger" title="Löschen"><i class="fas fa-trash"></i></a>
</td>
+4 -4
View File
@@ -22,8 +22,8 @@
<div class="card">
<div class="card-body">
<a href="<?=self::getUrl("Address","Index", ['filter' => $filter, 's' => $s])?>" class="btn btn-secondary mr-1"><i class="fas fa-list"></i> Zurück zur Übersicht</a>
<a href="<?=self::getUrl("Address","edit", ['id' => $address->id, 'filter' => $filter, 's' => $s, 'f' => "view"])?>" class="btn btn-outline-success"><i class="fas fa-edit"></i> Adresse bearbeiten</a>
<a href="<?=self::getUrl("Address","Index", ['s' => $s])?>" class="btn btn-secondary mr-1"><i class="fas fa-list"></i> Zurück zur Übersicht</a>
<a href="<?=self::getUrl("Address","edit", ['id' => $address->id, 's' => $s, 'f' => "view"])?>" class="btn btn-outline-success"><i class="fas fa-edit"></i> Adresse bearbeiten</a>
</div>
</div>
@@ -270,8 +270,8 @@
<div class="card">
<div class="card-body">
<a href="<?=self::getUrl("Address","Index", ['filter' => $filter, 's' => $s])?>" class="btn btn-secondary mr-1"><i class="fas fa-list"></i> Zurück zur Übersicht</a>
<a href="<?=self::getUrl("Address","edit", ['id' => $address->id, 'filter' => $filter, 's' => $s, 'f' => "view"])?>" class="btn btn-outline-success"><i class="fas fa-edit"></i> Adresse bearbeiten</a>
<a href="<?=self::getUrl("Address","Index", ['s' => $s])?>" class="btn btn-secondary mr-1"><i class="fas fa-list"></i> Zurück zur Übersicht</a>
<a href="<?=self::getUrl("Address","edit", ['id' => $address->id, 's' => $s, 'f' => "view"])?>" class="btn btn-outline-success"><i class="fas fa-edit"></i> Adresse bearbeiten</a>
</div>
</div>
+2 -2
View File
@@ -1293,7 +1293,7 @@
$("#bank-error").hide();
$("#bank-error").text("");
if(data.iban_correct && !data.iban_sus && data.bic_correct) {
if(data.iban_correct && data.bic_correct && (!data.iban_sus || data.iban_sus === "www")) {
bankdata_valid = true;
$('#orderForm').submit();
return;
@@ -1305,7 +1305,7 @@
$("#bank_account_iban").addClass("invalid");
bank_error.push("Ungültige IBAN!");
}
if(data.iban_sus) {
if(data.iban_sus && data.iban_sus !== "www") {
$("#bank_account_iban").addClass("invalid");
bank_error.push("IBAN verdächtig (" + data.iban_sus + ")!");
}