import-debitor-relationship (into intermediate data structure) #22

Merged
hsh-michaelhoennig merged 5 commits from import-debitor-relationship into master 2024-03-12 10:13:37 +01:00
Showing only changes of commit 7e1b645e97 - Show all commits

View File

@ -224,8 +224,8 @@ public class ImportOfficeData extends ContextBasedTest {
debitors.forEach( (id, debitor) -> { debitors.forEach( (id, debitor) -> {
final var debitorRel = HsOfficeRelationshipEntity.builder() final var debitorRel = HsOfficeRelationshipEntity.builder()
.relType(HsOfficeRelationshipType.DEBITOR) .relType(HsOfficeRelationshipType.DEBITOR)
.relAnchor(debitor.getPartner().getPerson()) .relAnchor(debitor.getPartner().getPartnerRole().getRelHolder())
.relHolder(debitor.getPartner().getPerson()) // just 1 debitor/partner in legacy hsadmin .relHolder(debitor.getPartner().getPartnerRole().getRelHolder()) // just 1 debitor/partner in legacy hsadmin
.contact(debitor.getBillingContact()) .contact(debitor.getBillingContact())
.build(); .build();
if (debitorRel.getRelAnchor() != null && debitorRel.getRelHolder() != null && if (debitorRel.getRelAnchor() != null && debitorRel.getRelHolder() != null &&