Skip to main content

Import data from legacy app

Import Partners

Data mapping

Company company;
private Address address;
private Delegat delegat;
String indicatii;
String deliveryAddress;
Integer termenPlata;
List<Document> documents;
Boolean platitorTva;
Boolean tvaLaIncasare;
LocalDate dataInceputTvaInc;
LocalDate dataSfarsitTvaInc;
Boolean splitTva;
LocalDate dataInceputSplitTVA;
LocalDate dataAnulareSplitTVA;
String banca;
String iban;
FidelityCard fidelityCard;
boolean activ = true;
Set<PartnerGrupaInteresMapping> grupeInteres = new HashSet();
boolean notifyAppointment = false;

Add Customer and Supplier role

mantle.party.Party
partyId = id
  isPerson = isEmpty(legacyP.getCodFiscal())
partyTypeEnumId = isPerson ? "PtyPerson" : "PtyOrganization"
disabled = inactiv

mantle.party.Person
firstName = name.remove("^A - ").split(" ")[1+" "+..i]
lastName = name.remove("^A - ").split(" ")[0]
nickname = name

mantle.party.Organization
organizationName = name

mantle.party.PartyIdentification
partyIdTypeEnumId = "PtidTaxId"
idValue = codFiscal

mantle.party.PartyIdentification
partyIdTypeEnumId = "PtidTradeReg"
idValue = regCom

mantle.party.contact.ContactMech
contactMechId = legacyId + "_PHONE"
contactMechTypeEnumId = "CmtTelecomNumber"
mantle.party.contact.TelecomNumber
contactNumber = phone
mantle.party.contact.PartyContactMech
contactMechPurposeId = "PhonePrimary"
fromDate = y2000

mantle.party.contact.ContactMech
contactMechId = legacyId + "_EMAIL"
contactMechTypeEnumId = "CmtEmailAddress"
infoString = email
mantle.party.contact.PartyContactMech
contactMechPurposeId = "EmailPrimary"
fromDate = y2000