WIP Ivt Import 2024-05-02

This commit is contained in:
Frank Schubert
2024-05-06 13:24:25 +02:00
parent df108dca2d
commit 6002876343
17 changed files with 1298 additions and 404 deletions

View File

@@ -78,7 +78,12 @@ class Address extends mfBaseModel {
$name_search = [];
if($this->company) $name_search[] = $this->company;
if($this->lastname) $name_search[] = $this->lastname;
$country = new Country($this->country_id);
if(!$country) {
return false;
}
$fibumerge = XinonFibuMergeModel::getFirst(["old_custnum" => $old_custnum, "name" => $name_search]);
if(!$fibumerge) {
// create fibu merge
@@ -91,6 +96,7 @@ class Address extends mfBaseModel {
"strasse" => $this->street,
"plz" => $this->zip,
"ort" => $this->city,
"land" => $country->isocode,
"create_by" => 1,
"edit_by" => 1
]);