updated Address filter
This commit is contained in:
@@ -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 + ")!");
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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 + ")!");
|
||||
}
|
||||
|
||||
@@ -90,8 +90,8 @@ class Address extends mfBaseModel {
|
||||
"strasse" => $this->street,
|
||||
"plz" => $this->zip,
|
||||
"ort" => $this->city,
|
||||
"create_by" => $me->id,
|
||||
"edit_by" => $me->id
|
||||
"create_by" => 1,
|
||||
"edit_by" => 1
|
||||
]);
|
||||
$fibumerge->save();
|
||||
return true;
|
||||
|
||||
@@ -24,9 +24,22 @@ class AddressController extends mfBaseController {
|
||||
$rfilter["addresstype"] = [];
|
||||
}
|
||||
|
||||
$this->layout->set("filter", $rfilter);
|
||||
if($this->request->resetFilter) {
|
||||
unset($_SESSION[MFAPPNAME.'-Address-filter']);
|
||||
}
|
||||
|
||||
$filter = $this->getPreparedFilter($rfilter);
|
||||
$filter = [];
|
||||
if(is_array($this->request->filter)) {
|
||||
$filter = $this->request->filter;
|
||||
$_SESSION[MFAPPNAME.'-Address-filter'] = $filter;
|
||||
} else {
|
||||
if(array_key_exists(MFAPPNAME.'-Address-filter', $_SESSION) && count($_SESSION[MFAPPNAME.'-Address-filter'])) {
|
||||
$filter = $_SESSION[MFAPPNAME.'-Address-filter'];
|
||||
}
|
||||
}
|
||||
|
||||
$this->layout->set("filter", $filter);
|
||||
$filter = $this->getPreparedFilter($filter);
|
||||
|
||||
// pagination defaults
|
||||
$pagination = [];
|
||||
@@ -54,22 +67,6 @@ class AddressController extends mfBaseController {
|
||||
$this->layout()->set("last_bmd_export", $last_export);
|
||||
|
||||
return true;
|
||||
|
||||
|
||||
|
||||
//var_dump($this->request->filter);
|
||||
$default_filter = ['parents_only' => 1];
|
||||
if(is_array($this->request->filter) && count($this->request->filter)) {
|
||||
$filter = array_merge($default_filter, $this->request->filter);
|
||||
} else {
|
||||
$filter = $default_filter;
|
||||
}
|
||||
//var_dump($filter);exit;
|
||||
$addresses = AddressModel::search($filter);
|
||||
|
||||
$this->layout()->set("addresses", $addresses);
|
||||
$this->layout()->set("filter", $filter);
|
||||
$this->layout()->set("request", $this->request);
|
||||
}
|
||||
|
||||
|
||||
@@ -634,16 +631,12 @@ class AddressController extends mfBaseController {
|
||||
if($r->s) {
|
||||
$query['s'] = $r->s;
|
||||
}
|
||||
if($r->filter) {
|
||||
$query["filter"] = $r->filter;
|
||||
}
|
||||
if($r->return != "index") {
|
||||
$query['id'] = $new_id;
|
||||
}
|
||||
|
||||
$qs = http_build_query($query);
|
||||
|
||||
|
||||
$this->layout()->setFlash("Adresse erfolgreich gespeichert.", "success");
|
||||
if($r->return == "index") {
|
||||
$this->redirect("Address", "Index", $qs);
|
||||
|
||||
151
scripts/fibu-check/compare-addresses-from-fibu.php
Normal file
151
scripts/fibu-check/compare-addresses-from-fibu.php
Normal file
@@ -0,0 +1,151 @@
|
||||
#!/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");
|
||||
|
||||
$me = new User(1);
|
||||
|
||||
$folder = __DIR__."/files/";
|
||||
$csvname = "Kontaktliste.csv";
|
||||
$filename = $folder.$csvname;
|
||||
|
||||
$db = FronkDB::singleton();
|
||||
$log = mfLoghandler::singleton();
|
||||
|
||||
$input = fopen($filename, "r");
|
||||
|
||||
$l = 0;
|
||||
while($csv = fgetcsv($input)) {
|
||||
$l++;
|
||||
if($l == 1) continue;
|
||||
|
||||
if(!trim($csv[0])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
//var_dump($csv);exit;
|
||||
|
||||
$fibu_account_number = trim($csv[1]);
|
||||
$fibu_supplier_number = trim($csv[3]);
|
||||
|
||||
$lastname = trim($csv[4]);
|
||||
$firstname = trim($csv[5]);
|
||||
$company = trim($csv[6]);
|
||||
|
||||
$street = trim($csv[7]);
|
||||
$zip = trim($csv[8]);
|
||||
$city = trim($csv[9]);
|
||||
$country = trim($csv[10]);
|
||||
|
||||
$uid = strtoupper(trim($csv[11]));
|
||||
$email = trim($csv[12]);
|
||||
|
||||
$iban = strtoupper(trim($csv[13]));
|
||||
$bic = strtoupper(trim($csv[14]));
|
||||
|
||||
|
||||
if(!$fibu_account_number && !$fibu_supplier_number) {
|
||||
echo "invalid line: ".implode(", ", $csv)."\n";
|
||||
continue;
|
||||
}
|
||||
|
||||
$address = false;
|
||||
$supplier = false;
|
||||
|
||||
if($fibu_account_number) {
|
||||
$address = AddressModel::getFirst(["fibu_account_number" => $fibu_account_number]);
|
||||
if(!$address) {
|
||||
echo "Kunde $fibu_account_number ($company $firstname $lastname) missing in thetool\n";
|
||||
}
|
||||
if(!$address->fibu_primary_account) {
|
||||
$primary = AddressModel::getFirst(["fibu_account_number" => $fibu_account_number, "fibu_primary_account" => 1]);
|
||||
if($primary) $address = $primary;
|
||||
}
|
||||
}
|
||||
|
||||
if($fibu_supplier_number) {
|
||||
$supplier = AddressModel::getFirst(["fibu_supplier_number" => $fibu_supplier_number]);
|
||||
if(!$supplier) {
|
||||
echo "Lieferant $fibu_supplier_number ($company $firstname $lastname) missing in thetool\n";
|
||||
|
||||
$supplier = AddressModel::create([
|
||||
"fibu_supplier_number" => $fibu_supplier_number,
|
||||
"company" => $company,
|
||||
"lastname" => $lastname,
|
||||
"firstname" => $firstname,
|
||||
"street" => $street,
|
||||
"zip" => $zip,
|
||||
"city" => $city,
|
||||
"country" => $country,
|
||||
"uid" => $uid,
|
||||
"email" => $email,
|
||||
"phone" => "",
|
||||
"fax" => "",
|
||||
"mobile" => "",
|
||||
"create_by" => 1,
|
||||
"edit_by" => 1
|
||||
]);
|
||||
if(!$supplier->save()) {
|
||||
die("Error saving supplier $fibu_supplier_number\n");
|
||||
}
|
||||
//var_dump($supplier);exit;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if($supplier) $address = $supplier;
|
||||
if(!$address) continue;
|
||||
|
||||
// check UID
|
||||
if($uid && $address->uid != $uid) {
|
||||
echo "UID weicht ab: ".$address->uid." vs. $uid ($fibu_account_number $fibu_supplier_number)\n";
|
||||
$address->uid = $uid;
|
||||
if($fibu_supplier_number != 330189) {
|
||||
$address->save();
|
||||
}
|
||||
}
|
||||
|
||||
continue;
|
||||
// check bankdata
|
||||
|
||||
$a_iban = strtoupper(trim($address->bank_account_iban));
|
||||
$a_bic = strtoupper(trim($address->bank_account_bic));
|
||||
|
||||
if($supplier) {
|
||||
if(!$iban || !$bic) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if(!$a_iban && !$a_bic) {
|
||||
echo "Bankdaten im tool fehlen\n";
|
||||
continue;
|
||||
}
|
||||
|
||||
$ibans = explode("\n", $iban);
|
||||
$bics = explode("\n", $bic);
|
||||
|
||||
if($ibans) {
|
||||
foreach($ibans as $c => $ib) {
|
||||
if(!array_key_exists($c, $bics)) continue;
|
||||
if($ib == $a_iban && $bics[$c] == $a_bic) {
|
||||
echo "Bankdaten in array gefunden\n";
|
||||
continue 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(($iban && $bic) && ($iban != $a_iban || $bic != $a_bic)) {
|
||||
echo "Bankdaten weichen ab (account: $fibu_account_number, supplier: $fibu_supplier_number) thetool iban/bic: $a_iban/$a_bic vs. $iban/$bic\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
74
scripts/fibu-check/compare-bankdata.php
Normal file
74
scripts/fibu-check/compare-bankdata.php
Normal file
@@ -0,0 +1,74 @@
|
||||
#!/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");
|
||||
|
||||
$me = new User(1);
|
||||
|
||||
$folder = __DIR__."/files/";
|
||||
$csvname = "bankdaten-liste.csv";
|
||||
$filename = $folder.$csvname;
|
||||
|
||||
$db = FronkDB::singleton();
|
||||
$log = mfLoghandler::singleton();
|
||||
|
||||
$input = fopen($filename, "r");
|
||||
|
||||
$l = 0;
|
||||
while($csv = fgetcsv($input, 0, ";")) {
|
||||
$l++;
|
||||
if($l == 1) continue;
|
||||
|
||||
if(!trim($csv[0])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
//var_dump($csv);exit;
|
||||
|
||||
$fibu_supplier_number = trim($csv[0]);
|
||||
$iban = trim($csv[1]);
|
||||
|
||||
$supplier = AddressModel::getFirst(["fibu_supplier_number" => $fibu_supplier_number]);
|
||||
if(!$supplier) {
|
||||
echo "Supplier not found $fibu_supplier_number\n";
|
||||
}
|
||||
|
||||
echo $supplier->getCompanyOrName()."\n";
|
||||
|
||||
$result = IbanValidator::validate($iban);
|
||||
if(is_array($result) && $result) {
|
||||
var_dump($result);
|
||||
|
||||
if(!$result["iban_correct"]) {
|
||||
echo "IBAN incorrect: $iban\n";
|
||||
continue;
|
||||
}
|
||||
if($result["iban_sus"] && $result["iban_sus"] != "www") {
|
||||
echo "IBAN suspicious: $iban\n";
|
||||
}
|
||||
|
||||
if(is_array($result["bic"]) && count($result["bic"])) {
|
||||
$bic = array_shift($result["bic"]);
|
||||
|
||||
if($supplier->bank_account_iban != $iban || $supplier->bank_account_bic != $bic) {
|
||||
$supplier->bank_account_iban = $iban;
|
||||
$supplier->bank_account_bic = $bic;
|
||||
$supplier->save();
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
echo "Bic nicht gefunden: $iban\n";
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
1
scripts/fibu-check/files/.~lock.Kontaktliste.csv#
Normal file
1
scripts/fibu-check/files/.~lock.Kontaktliste.csv#
Normal file
@@ -0,0 +1 @@
|
||||
,fronk,fronk-nb,23.01.2024 21:03,file:///home/fronk/.config/libreoffice/4;
|
||||
6269
scripts/fibu-check/files/Kontaktliste.csv
Normal file
6269
scripts/fibu-check/files/Kontaktliste.csv
Normal file
File diff suppressed because it is too large
Load Diff
36
scripts/fibu-check/files/bankdaten-liste.csv
Normal file
36
scripts/fibu-check/files/bankdaten-liste.csv
Normal file
@@ -0,0 +1,36 @@
|
||||
Worxx Fibukonto Lieferant;IBAN
|
||||
330083;AT153846000010360287
|
||||
330025;AT126000000007501818
|
||||
330139;AT253800000000018036
|
||||
330197;AT422081507000000500
|
||||
330012;AT682081500041151259
|
||||
330028;AT173807100000001917
|
||||
330022;DE46100400000592222400
|
||||
330051;AT503620000000258707
|
||||
330091;AT963400000000026864
|
||||
330042;CZ2803000000000206315868
|
||||
330085;AT033800000000836239
|
||||
330086;AT653800000000050005
|
||||
330029;AT141500000711137802
|
||||
330211;
|
||||
330071;AT911100002883352300
|
||||
330011;AT331200010002969961
|
||||
330102;AT451100002883040400
|
||||
330075;AT023818700000047100
|
||||
330077;AT453818700000024307
|
||||
330004;AT391200050660059006
|
||||
330027;AT373837400000000042
|
||||
330176;AT692081527300008888
|
||||
330062;AT883805600000072785
|
||||
330260;AT313807500005505037
|
||||
330064;AT191200052496481505
|
||||
330038;DE08741400480351857800
|
||||
330237;AT055600021253030655
|
||||
330271;AT173800000005190996
|
||||
330100;AT402081500001852698
|
||||
330063;AT724501000004101051
|
||||
330110;
|
||||
330060;AT263818700000196048
|
||||
330296;
|
||||
330268;AT871952000200553030
|
||||
330093;AT704232030054360002
|
||||
|
Reference in New Issue
Block a user