firma->firm

This commit is contained in:
Michael Hoennig 2024-11-06 08:56:29 +01:00
parent 162c8bdc35
commit 11e9ecc95a
3 changed files with 6 additions and 4 deletions

View File

@ -50,7 +50,7 @@ components:
anyOf:
- type: object
properties:
firma:
firm:
type: string
nullable: true
name:

View File

@ -1140,8 +1140,10 @@ public abstract class BaseOfficeDataImport extends CsvDataImport {
rec.getString("last_name"));
if (isNotBlank(name))
result.put("name", name);
if (isNotBlank(rec.getString("firma")))
result.put("firm", name);
List.of("firma", "co", "street", "zipcode", "city", "country").forEach(key -> {
List.of("co", "street", "zipcode", "city", "country").forEach(key -> {
if (isNotBlank(rec.getString(key)))
result.put(key, rec.getString(key));
});

View File

@ -55,7 +55,7 @@ class HsOfficeScenarioTests extends ScenarioTest {
.given("tradeName", "Test AG")
.given("contactCaption", "Test AG - Hamburg")
.given("postalAddress", """
"firma": "Test AG",
"firm": "Test AG",
"street": "Shanghai-Allee 1",
"zipcode": "20123",
"city": "Hamburg",
@ -183,7 +183,7 @@ class HsOfficeScenarioTests extends ScenarioTest {
.given("partnerName", "Test AG")
.given("newContactCaption", "Test AG - China")
.given("newPostalAddress", """
"firma": "Test AG",
"firm": "Test AG",
"name": "Fi Zhong-Kha",
"building": "Thi Chi Koh Building",
"street": "No.2 Commercial Second Street",