Merge branch 'master' of ssh://172.20.0.1/var/git/espo/backend
This commit is contained in:
@@ -189,6 +189,11 @@
|
||||
"website": "website",
|
||||
"emailAddress": "emailAddress",
|
||||
"phone": "phoneOffice",
|
||||
"billingAddressStreet": "addressStreet",
|
||||
"billingAddressCity": "addressCity",
|
||||
"billingAddressState": "addressState",
|
||||
"billingAddressPostalCode": "addressPostalCode",
|
||||
"billingAddressCountry": "addressCountry",
|
||||
"assignedUser": "assignedUser",
|
||||
"teams": "teams"
|
||||
},
|
||||
|
||||
@@ -17,24 +17,26 @@ class Lead extends \Espo\Services\Record
|
||||
|
||||
$entityManager = $this->getEntityManager();
|
||||
|
||||
if (!empty($recordsData['Account'])) {
|
||||
|
||||
if (!empty($recordsData->Account)) {
|
||||
|
||||
$account = $entityManager->getEntity('Account');
|
||||
$account->set($recordsData['Account']);
|
||||
$account->set(get_object_vars($recordsData->Account));
|
||||
$entityManager->saveEntity($account);
|
||||
$lead->set('createdAccountId', $account->id);
|
||||
}
|
||||
if (!empty($recordsData['Opportunity'])) {
|
||||
if (!empty($recordsData->Opportunity)) {
|
||||
$opportunity = $entityManager->getEntity('Opportunity');
|
||||
$opportunity->set($recordsData['Opportunity']);
|
||||
$opportunity->set(get_object_vars($recordsData->Opportunity));
|
||||
if (isset($account)) {
|
||||
$opportunity->set('accountId', $account->id);
|
||||
}
|
||||
$entityManager->saveEntity($opportunity);
|
||||
$lead->set('createdOpportunityId', $opportunity->id);
|
||||
}
|
||||
if (!empty($recordsData['Contact'])) {
|
||||
if (!empty($recordsData->Contact)) {
|
||||
$contact = $entityManager->getEntity('Contact');
|
||||
$contact->set($recordsData['Contact']);
|
||||
$contact->set(get_object_vars($recordsData->Contact));
|
||||
if (isset($account)) {
|
||||
$contact->set('accountId', $account->id);
|
||||
}
|
||||
@@ -42,10 +44,7 @@ class Lead extends \Espo\Services\Record
|
||||
if (isset($opportunity)) {
|
||||
$entityManager->getRepository('Contact')->relate($contact, 'opportunities', $opportunity);
|
||||
}
|
||||
$lead->set('createdContactId', $contact->id);
|
||||
|
||||
|
||||
|
||||
$lead->set('createdContactId', $contact->id);
|
||||
}
|
||||
|
||||
$lead->set('status', 'Converted');
|
||||
|
||||
@@ -30,7 +30,12 @@
|
||||
"Admin": "Admin",
|
||||
"About": "About",
|
||||
"Log Out": "Log Out",
|
||||
"Preferences": "Preferences"
|
||||
"Preferences": "Preferences",
|
||||
"State": "State",
|
||||
"Street": "Street",
|
||||
"Country": "Country",
|
||||
"City": "City",
|
||||
"PostalCode": "Postal Code"
|
||||
},
|
||||
"boolFilters": {
|
||||
"onlyMy": "Only My",
|
||||
@@ -49,7 +54,13 @@
|
||||
"dateFrom": "Date From",
|
||||
"dateTo": "Date To",
|
||||
"autorefreshInterval": "Auto-refresh Interval",
|
||||
"displayRecords": "Display Records"
|
||||
"displayRecords": "Display Records",
|
||||
"billingAddressCity": "City",
|
||||
"billingAddressCountry": "Country",
|
||||
"billingAddressPostalCode": "Postal Code",
|
||||
"addressCity": "City",
|
||||
"addressCountry": "Country",
|
||||
"addressPostalCode": "Postal Code"
|
||||
},
|
||||
"dashlets": {
|
||||
"Stream": "Stream"
|
||||
|
||||
Reference in New Issue
Block a user