diff --git a/include/utils/utils.php b/include/utils/utils.php index 059700648740c3d959cc426371c592b5397714ae..6f59325c7d279265ecf839de2e683f47a80c3273 100755 --- a/include/utils/utils.php +++ b/include/utils/utils.php @@ -2570,19 +2570,19 @@ function getDuplicatesPreventionMessage($moduleName, $duplicateRecordsList) { $currentUserModel = Users_Record_Model::getCurrentUserModel(); if ($currentUserModel->isAdminUser()) { $url = "index.php?parent=Settings&module=LayoutEditor&sourceModule=$moduleName&mode=showDuplicationHandling"; - $here = '<a href="'.$url.'" target="_blank">'.vtranslate('LBL_CLICK_HERE', $moduleName).'</a>'; + $here = '<a href="'.$url.'" target="_blank" style="color:#15c !important">'.vtranslate('LBL_CLICK_HERE', $moduleName).'</a>'; $message .= vtranslate('LBL_DUPLICATION_FAILURE_FOR_ADMIN', $moduleName, $here); } else { $message .= vtranslate('LBL_DUPLICATION_FAILURE_FOR_NON_ADMIN', $moduleName); } $message .= '<br><br>'; - $message .= vtranslate('LBL_DUPLICATE_RECORD_LISTS',$moduleName,$singleModuleName) . '<br>'; + $message .= vtranslate('LBL_DUPLICATE_RECORD_LISTS', $moduleName, $singleModuleName).'<br>'; for ($i=0; $i<$duplicateRecordsCount && $i<5; $i++) { $dupliRecordId = $duplicateRecordsList[$i]; $dupliRecordModel = new Vtiger_Record_Model(); - $dupliRecordModel->setId($dupliRecordId)->setModule($moduleName); - $message .= '<a href="'.$dupliRecordModel->getDetailViewUrl().'" target="_blank">'.Vtiger_Functions::getCRMRecordLabel($dupliRecordId).'</a><br>'; + $dupliRecordModel->setId($dupliRecordId)->setModuleFromInstance($moduleModel); + $message .= '<a href="'.$dupliRecordModel->getDetailViewUrl().'" target="_blank" style="color:#15c !important">'.Vtiger_Functions::getCRMRecordLabel($dupliRecordId).'</a><br>'; } if ($duplicateRecordsCount === 6) { @@ -2614,7 +2614,7 @@ function getDuplicatesPreventionMessage($moduleName, $duplicateRecordsList) { } $listViewUrl = $moduleModel->getListViewUrl().'&search_params='.json_encode(array($searchParams)); - $message .= "<a href='$listViewUrl' target='_blank'>+".vtranslate('LBL_MORE', $moduleName).'</a>'; + $message .= "<a href='$listViewUrl' target='_blank' style='color:#15c !important'>+". strtolower(vtranslate('LBL_MORE', $moduleName)).'</a>'; } return $message; diff --git a/languages/en_us/Vtiger.php b/languages/en_us/Vtiger.php index 719b42c171860b9ce79270d172f423d450b67eb3..d23309a6ee2105d7228f336ac38d9a32702350f3 100644 --- a/languages/en_us/Vtiger.php +++ b/languages/en_us/Vtiger.php @@ -1335,7 +1335,7 @@ $languageStrings = array( 'LBL_DUPLICATION_FAILURE_FROM_WEBFORMS' => 'The following %s could not be saved from "%s" webform, as another %s exists with the same values.', 'LBL_DUPLICATION_FAILURE_FOR_ADMIN' => 'You can %s to modify duplicate prevention rules.', 'LBL_DUPLICATION_FAILURE_FOR_NON_ADMIN' => 'Contact your administrator for revising the duplicate rules', - 'LBL_DUPLICATE_RECORD_LISTS' =>'Duplicate %s :', + 'LBL_DUPLICATE_RECORD_LISTS' =>'Duplicate %s(s) :', 'LBL_COLUMNS_ADDED'=>'of %s columns added', 'LBL_SHOW_ALL'=>'Show all', 'LBL_LanguageEditor_WEBTITLE' => 'Labels Editor', diff --git a/layouts/v7/modules/Calendar/resources/Calendar.js b/layouts/v7/modules/Calendar/resources/Calendar.js index e2075c0ee39b3ec2c34848911c5675ee4462cadd..83175bb3a0baf8e98c60701edc8ad7530b015ba5 100644 --- a/layouts/v7/modules/Calendar/resources/Calendar.js +++ b/layouts/v7/modules/Calendar/resources/Calendar.js @@ -80,6 +80,7 @@ Vtiger.Class("Calendar_Calendar_Js", { app.helper.hideProgress(); app.helper.hideModal(); if (!err && res['created']) { + jQuery('.vt-notification').remove(); thisInstance.updateListView(); thisInstance.updateCalendarView("Event"); } else { @@ -137,6 +138,7 @@ Vtiger.Class("Calendar_Calendar_Js", { }; app.request.post({'data': requestParams}).then(function (e, res) { + jQuery('.vt-notification').remove(); if (e) { app.event.trigger('post.save.failed', e); } else if (res && res['valid'] === true && res['markedascompleted'] === true) { @@ -1042,14 +1044,17 @@ Vtiger.Class("Calendar_Calendar_Js", { var formData = jQuery(form).serialize(); app.helper.showProgress(); app.request.post({data: formData}).then(function (err, data) { + app.helper.hideProgress(); if (!err) { - app.helper.showSuccessNotification({"message": ''}); + jQuery('.vt-notification').remove(); + app.helper.hideModal(); + var message = typeof formData.record !== 'undefined' ? app.vtranslate('JS_EVENT_UPDATED') : app.vtranslate('JS_RECORD_CREATED'); + app.helper.showSuccessNotification({"message": message}); thisInstance.showEventOnCalendar(data); } else { - app.helper.showErrorNotification({"message": err}); + app.event.trigger('post.save.failed', err); + jQuery("button[name='saveButton']").removeAttr('disabled'); } - app.helper.hideModal(); - app.helper.hideProgress(); }); } }; @@ -1204,6 +1209,7 @@ Vtiger.Class("Calendar_Calendar_Js", { app.request.post({'data': postData}).then(function (e, resp) { app.helper.hideProgress(); if (!e) { + jQuery('.vt-notification').remove(); if (!resp['ispermitted']) { revertFunc(); app.helper.showErrorNotification({ @@ -1221,6 +1227,7 @@ Vtiger.Class("Calendar_Calendar_Js", { } } else { app.event.trigger('post.save.failed', e); + thisInstance.updateAllEventsOnCalendar(); } }); }, @@ -1355,14 +1362,16 @@ Vtiger.Class("Calendar_Calendar_Js", { jQuery.extend(formData, extraParams); app.helper.showProgress(); app.request.post({data: formData}).then(function (err, data) { + app.helper.hideProgress(); if (!err) { + jQuery('.vt-notification').remove(); app.helper.showSuccessNotification({"message": ''}); + app.event.trigger("post.QuickCreateForm.save", data, jQuery(form).serializeFormData()); + app.helper.hideModal(); } else { - app.helper.showErrorNotification({"message": err}); + app.event.trigger('post.save.failed', err); + jQuery("button[name='saveButton']").removeAttr("disabled"); } - app.event.trigger("post.QuickCreateForm.save", data, jQuery(form).serializeFormData()); - app.helper.hideModal(); - app.helper.hideProgress(); }); }, validateAndUpdateEvent: function (modalContainer, isRecurring) { diff --git a/layouts/v7/modules/Documents/resources/Documents.js b/layouts/v7/modules/Documents/resources/Documents.js index 8dce6caceb9a46c4a8f9e57d26160b65e60fdb59..2421d6bb34ae0e152c61e1cd22ff5c9531d527d5 100644 --- a/layouts/v7/modules/Documents/resources/Documents.js +++ b/layouts/v7/modules/Documents/resources/Documents.js @@ -389,6 +389,7 @@ Vtiger.Class('Documents_Index_Js', { app.request.post({'data':formData}).then(function(e,res) { app.helper.hideProgress(); if (e === null) { + jQuery('.vt-notification').remove(); app.helper.hideModal(); app.helper.showSuccessNotification({ 'message' : app.vtranslate('JS_DOCUMENT_CREATED') diff --git a/layouts/v7/modules/Leads/ConvertLeadError.tpl b/layouts/v7/modules/Leads/ConvertLeadError.tpl index 7dae11fcb483bb8a79dc3bd96c548727778e029c..c0ec6497af344cceee6cf91767437795fe1ecafb 100644 --- a/layouts/v7/modules/Leads/ConvertLeadError.tpl +++ b/layouts/v7/modules/Leads/ConvertLeadError.tpl @@ -28,15 +28,13 @@ </span> {/if} </span> - {if !$IS_DUPICATES_FAILURE} - <hr> - <div class="small" align="right" nowrap="nowrap"> - {if $CURRENT_USER->isAdminUser()} - <a href="index.php?parent=Settings&module=Leads&view=MappingDetail">{vtranslate('LBL_LEADS_FIELD_MAPPING', $MODULE)}</a><br> - {/if} - <a href="javascript:window.history.back();">{vtranslate('LBL_GO_BACK', $MODULE)}</a><br> - </div> - {/if} + <hr> + <div class="small" align="right" nowrap="nowrap"> + {if !$IS_DUPICATES_FAILURE && $CURRENT_USER->isAdminUser()} + <a href="index.php?parent=Settings&module=Leads&view=MappingDetail">{vtranslate('LBL_LEADS_FIELD_MAPPING', $MODULE)}</a><br> + {/if} + <a href="javascript:window.history.back();">{vtranslate('LBL_GO_BACK', $MODULE)}</a><br> + </div> </div> </div> {/strip} diff --git a/layouts/v7/modules/Potentials/ConvertPotentialError.tpl b/layouts/v7/modules/Potentials/ConvertPotentialError.tpl index 2b11aa3a1f12c1b33174b672e0f7d99fd010a300..8a1c28c0fe8e7358c268a689facae1defdf6bf57 100644 --- a/layouts/v7/modules/Potentials/ConvertPotentialError.tpl +++ b/layouts/v7/modules/Potentials/ConvertPotentialError.tpl @@ -1,55 +1,41 @@ {*+********************************************************************************** - * The contents of this file are subject to the vtiger CRM Public License Version 1.1 - * ("License"); You may not use this file except in compliance with the License - * The Original Code is: vtiger CRM Open Source - * The Initial Developer of the Original Code is vtiger. - * Portions created by vtiger are Copyright (C) vtiger. - * All Rights Reserved. - ************************************************************************************} -{* modules/Potentials/views/SaveConvertPotential.php *} +* The contents of this file are subject to the vtiger CRM Public License Version 1.1 +* ("License"); You may not use this file except in compliance with the License +* The Original Code is: vtiger CRM Open Source +* The Initial Developer of the Original Code is vtiger. +* Portions created by vtiger are Copyright (C) vtiger. +* All Rights Reserved. +*************************************************************************************} {strip} - <table border="0" cellpadding="5" cellspacing="0" width="100%" height="450px"> - <tr> - <td align="center"> - <div style="border: 3px solid rgb(153, 153, 153); background-color: rgb(255, 255, 255); width: 80%; position: relative; z-index: 10000000; padding :10px;"> - <table border="0" cellpadding="5" cellspacing="0" width="98%"> - <tbody> - <tr> - <td rowspan="2" width="11%"><img src="{vimage_path('denied.gif')}" ></td> - <td style="border-bottom: 1px solid rgb(204, 204, 204);" nowrap="nowrap" width="70%"> - <span class="genHeaderSmall"> - {if $IS_DUPICATES_FAILURE} - <span>{$EXCEPTION}</span> - {else} - {assign var=SINGLE_MODULE value="SINGLE_$MODULE"} - {vtranslate('LBL_FOLLOWING_ARE_POSSIBLE_REASONS', $MODULE)} - <ul> - <li>{vtranslate('LBL_POTENTIALS_FIELD_MAPPING_INCOMPLETE', $MODULE)}</li> - <li>{vtranslate('LBL_MANDATORY_FIELDS_ARE_EMPTY', $MODULE)}</li> - {if $EXCEPTION} - <li>{$EXCEPTION}</li> - {/if} - </ul> - {/if} - </span> - </span> - </td> - </tr> - {if !$IS_DUPICATES_FAILURE} - <tr> - <td class="small" align="right" nowrap="nowrap"> - {if $CURRENT_USER->isAdminUser()} - <a href="index.php?parent=Settings&module=Leads&view=MappingDetail">{vtranslate('LBL_LEADS_FIELD_MAPPING', $MODULE)}</a><br> - {/if} - <a href="javascript:window.history.back();">{vtranslate('LBL_GO_BACK', $MODULE)}</a><br> - </td> - </tr> + <div class="row" style="border: 3px solid rgb(153, 153, 153); background-color: rgb(255, 255, 255);position: relative; z-index: 10000000; padding: 10px; width: 80%; margin: 0 auto; margin-top: 5%;"> + <div class ="col-lg-1 col-sm-2 col-md-1" style="float: left;"><img src="{vimage_path('denied.gif')}" ></div> + <div class ="col-lg-11 col-sm-10 col-md-11" nowrap="nowrap"> + <span class="genHeaderSmall"> + {if $IS_DUPICATES_FAILURE} + <span>{$EXCEPTION}</span> + {else} + {assign var=SINGLE_MODULE value="SINGLE_$MODULE"} + <span class="genHeaderSmall">{vtranslate($SINGLE_MODULE, $MODULE)} {vtranslate('CANNOT_CONVERT', $MODULE)} + <br> + <ul> {vtranslate('LBL_FOLLOWING_ARE_POSSIBLE_REASONS', $MODULE)}: + <li>{vtranslate('LBL_POTENTIALS_FIELD_MAPPING_INCOMPLETE', $MODULE)}</li> + <li>{vtranslate('LBL_MANDATORY_FIELDS_ARE_EMPTY', $MODULE)}</li> + {if $EXCEPTION} + <li>{$EXCEPTION}</li> {/if} - </tbody> - </table> - </div> - </td> - </tr> - </table> + </ul> + </span> + {/if} + </span> + <hr> + <div class="small" align="right" nowrap="nowrap"> + {if !$IS_DUPICATES_FAILURE && $CURRENT_USER->isAdminUser()} + <a href="index.php?parent=Settings&module=Potentials&view=MappingDetail">{vtranslate('LBL_POTENTIALS_FIELD_MAPPING', $MODULE)}</a><br> + {/if} + <a href="javascript:window.history.back();">{vtranslate('LBL_GO_BACK', $MODULE)}</a><br> + </div> + </div> + </div> {/strip} + diff --git a/layouts/v7/modules/Settings/LayoutEditor/Index.tpl b/layouts/v7/modules/Settings/LayoutEditor/Index.tpl index 962bd6fea0d46c917bd9d6c057e673615be3f6be..36dfbaa1c118f6294054dec2ebdf244fb47abcad 100644 --- a/layouts/v7/modules/Settings/LayoutEditor/Index.tpl +++ b/layouts/v7/modules/Settings/LayoutEditor/Index.tpl @@ -21,14 +21,9 @@ <div class="col-sm-6"> <select class="select2 col-sm-6" name="layoutEditorModules"> <option value=''>{vtranslate('LBL_SELECT_OPTION', $QUALIFIED_MODULE)}</option> - {foreach item=MODULE_NAME from=$SUPPORTED_MODULES} + {foreach item=MODULE_NAME key=TRANSLATED_MODULE_NAME from=$SUPPORTED_MODULES} <option value="{$MODULE_NAME}" {if $MODULE_NAME eq $SELECTED_MODULE_NAME} selected {/if}> - {* Calendar needs to be shown as TODO so we are translating using Layout editor specific translations*} - {if $MODULE_NAME eq 'Calendar'} - {vtranslate($MODULE_NAME, $QUALIFIED_MODULE)} - {else} - {vtranslate($MODULE_NAME, $MODULE_NAME)} - {/if} + {$TRANSLATED_MODULE_NAME} </option> {/foreach} </select> diff --git a/layouts/v7/modules/Vtiger/resources/Detail.js b/layouts/v7/modules/Vtiger/resources/Detail.js index b04f654d3730bef53da92f94f86b03d56c651b82..49c49fd7275124e390ee2c7bc7f3a25e5544f7d4 100644 --- a/layouts/v7/modules/Vtiger/resources/Detail.js +++ b/layouts/v7/modules/Vtiger/resources/Detail.js @@ -208,6 +208,7 @@ Vtiger.Class("Vtiger_Detail_Js",{ app.request.post({data:reqParams}).then( function(error,data) { if(error === null){ + jQuery('.vt-notification').remove(); app.helper.hideModal(); app.helper.showSuccessNotification({message:app.vtranslate('JS_RECORDS_TRANSFERRED_SUCCESSFULLY')}); } else { @@ -1808,6 +1809,7 @@ Vtiger.Class("Vtiger_Detail_Js",{ function(err,data) { app.helper.hideProgress(); if (err == null) { + jQuery('.vt-notification').remove(); detailViewElement.removeClass('hide'); currentTarget.show(); detailViewElement.html(translatedValue); diff --git a/layouts/v7/modules/Vtiger/resources/List.js b/layouts/v7/modules/Vtiger/resources/List.js index 4f4dc1af0ef94191bfa362f1e3000f7cf11bf0fa..c67c4d2e446425b5ce7dc448aa965ec3cc92bb33 100644 --- a/layouts/v7/modules/Vtiger/resources/List.js +++ b/layouts/v7/modules/Vtiger/resources/List.js @@ -1312,7 +1312,7 @@ Vtiger.Class("Vtiger_List_Js", { form_update_data += key + '=' + newData[key] + '&'; } form_update_data = form_update_data.slice(0, -1); - app.request.post(postParams).then(function (err, data) { + app.request.post({data: form_update_data}).then(function (err, data) { app.helper.hideProgress(); if (data) { jQuery('.vt-notification').remove(); @@ -1601,13 +1601,17 @@ Vtiger.Class("Vtiger_List_Js", { var data = jQuery.extend(formData, listSelectParams); app.helper.showProgress(); app.request.post({'data': data}).then(function (err, data) { + app.helper.hideProgress(); if (err == null) { - app.helper.hideProgress(); + jQuery('.vt-notification').remove(); app.helper.hideModal(); listInstance.loadListViewRecords().then(function (e) { listInstance.clearList(); app.helper.showSuccessNotification({message: app.vtranslate('JS_RECORDS_TRANSFERRED_SUCCESSFULLY')}); }); + } else { + app.event.trigger('post.save.failed', err); + jQuery(form).find("button[name='saveButton']").removeAttr('disabled'); } }); } diff --git a/layouts/v7/modules/Vtiger/resources/MergeRecords.js b/layouts/v7/modules/Vtiger/resources/MergeRecords.js index 525c9f427cee79d7343dd9ca64c6b2fc4b85d23a..774288f011df5a4846fbd4d6679a9b5f8becbf88 100644 --- a/layouts/v7/modules/Vtiger/resources/MergeRecords.js +++ b/layouts/v7/modules/Vtiger/resources/MergeRecords.js @@ -38,6 +38,7 @@ Vtiger.Class('Vtiger_MergeRecords_Js',{},{ app.request.post({'data':formData}).then(function(error,data){ app.helper.hideProgress(); if (error === null) { + jQuery('.vt-notification').remove(); app.helper.hidePageContentOverlay(); app.event.trigger('post.MergeRecords',formData); aDeferred.resolve(); diff --git a/modules/Accounts/actions/TransferOwnership.php b/modules/Accounts/actions/TransferOwnership.php index 154e2a5ae5a6885c5791958cf49d77aabf12b5bc..689877ac7072b3c21acdc09c16b0fc757838a6d5 100644 --- a/modules/Accounts/actions/TransferOwnership.php +++ b/modules/Accounts/actions/TransferOwnership.php @@ -34,10 +34,14 @@ class Accounts_TransferOwnership_Action extends Vtiger_Action_Controller { array_push($relatedModuleRecordIds, $recordId); } array_merge($relatedModuleRecordIds, $recordIds); - $moduleModel->transferRecordsOwnership($transferOwnerId, $relatedModuleRecordIds); - + + $result = $moduleModel->transferRecordsOwnership($transferOwnerId, $relatedModuleRecordIds); $response = new Vtiger_Response(); - $response->setResult(true); + if ($result === true) { + $response->setResult(true); + } else { + $response->setError($result); + } $response->emit(); } diff --git a/modules/Calendar/actions/DragDropAjax.php b/modules/Calendar/actions/DragDropAjax.php index abea61c22b119ec74fe3f82192efb324e00e93ca..546572090cd7d291a9f7b1e875e73e13274fd393 100755 --- a/modules/Calendar/actions/DragDropAjax.php +++ b/modules/Calendar/actions/DragDropAjax.php @@ -35,102 +35,107 @@ class Calendar_DragDropAjax_Action extends Calendar_SaveAjax_Action { $actionname = 'EditView'; $response = new Vtiger_Response(); - if(isPermitted($moduleName, $actionname, $recordId) === 'no'){ - $result = array('ispermitted'=>false,'error'=>false); - $response->setResult($result); - $response->emit(); - } else { - $result = array('ispermitted'=>true,'error'=>false); - $record = Vtiger_Record_Model::getInstanceById($recordId, $moduleName); - $record->set('mode','edit'); - - $startDateTime[] = $record->get('date_start'); - $startDateTime[] = $record->get('time_start'); - $startDateTime = implode(' ',$startDateTime); - - $oldDateTime[] = $record->get('due_date'); - $oldDateTime[] = $record->get('time_end'); - $oldDateTime = implode(' ',$oldDateTime); - $resultDateTime = $this->changeDateTime($oldDateTime,$dayDelta,$minuteDelta,$secondsDelta); - $interval = strtotime($resultDateTime) - strtotime($startDateTime); - - if(!empty($recurringEditMode) && $recurringEditMode != 'current') { - $recurringRecordsList = $record->getRecurringRecordsList(); - foreach($recurringRecordsList as $parent=>$childs) { - $parentRecurringId = $parent; - $childRecords = $childs; - } - if($recurringEditMode == 'future') { - $parentKey = array_keys($childRecords, $recordId); - $childRecords = array_slice($childRecords, $parentKey[0]); - } - foreach($childRecords as $childId) { - $recordModel = Vtiger_Record_Model::getInstanceById($childId, 'Events'); - $recordModel->set('mode','edit'); + try { + if(isPermitted($moduleName, $actionname, $recordId) === 'no'){ + $result = array('ispermitted'=>false,'error'=>false); + $response->setResult($result); + } else { + $result = array('ispermitted'=>true,'error'=>false); + $record = Vtiger_Record_Model::getInstanceById($recordId, $moduleName); + $record->set('mode','edit'); - $startDateTime = ''; - $startDateTime[] = $recordModel->get('date_start'); - $startDateTime[] = $recordModel->get('time_start'); - $startDateTime = implode(' ',$startDateTime); - $dueDate = strtotime($startDateTime) + $interval; - $formatDate = date("Y-m-d H:i:s", $dueDate); - $parts = explode(' ',$formatDate); - $startDateTime = new DateTime($startDateTime); + $startDateTime[] = $record->get('date_start'); + $startDateTime[] = $record->get('time_start'); + $startDateTime = implode(' ',$startDateTime); + + $oldDateTime[] = $record->get('due_date'); + $oldDateTime[] = $record->get('time_end'); + $oldDateTime = implode(' ',$oldDateTime); + $resultDateTime = $this->changeDateTime($oldDateTime,$dayDelta,$minuteDelta,$secondsDelta); + $interval = strtotime($resultDateTime) - strtotime($startDateTime); - $recordModel->set('due_date',$parts[0]); + if(!empty($recurringEditMode) && $recurringEditMode != 'current') { + $recurringRecordsList = $record->getRecurringRecordsList(); + foreach($recurringRecordsList as $parent=>$childs) { + $parentRecurringId = $parent; + $childRecords = $childs; + } + if($recurringEditMode == 'future') { + $parentKey = array_keys($childRecords, $recordId); + $childRecords = array_slice($childRecords, $parentKey[0]); + } + foreach($childRecords as $childId) { + $recordModel = Vtiger_Record_Model::getInstanceById($childId, 'Events'); + $recordModel->set('mode','edit'); + + $startDateTime = ''; + $startDateTime[] = $recordModel->get('date_start'); + $startDateTime[] = $recordModel->get('time_start'); + $startDateTime = implode(' ',$startDateTime); + $dueDate = strtotime($startDateTime) + $interval; + $formatDate = date("Y-m-d H:i:s", $dueDate); + $parts = explode(' ',$formatDate); + $startDateTime = new DateTime($startDateTime); + + $recordModel->set('due_date',$parts[0]); + if(activitytype != 'Task') { + $recordModel->set('time_end',$parts[1]); + } + + $endDateTime = ''; + $endDateTime[] = $recordModel->get('due_date'); + $endDateTime[] = $recordModel->get('time_end'); + $endDateTime = implode(' ',$endDateTime); + $endDateTime = new DateTime($endDateTime); + + if($startDateTime <= $endDateTime) { + $this->setRecurrenceInfo($recordModel); + $recordModel->save(); + } else { + $result['error'] = true; + } + } + $result['recurringRecords'] = true; + } else { + $oldDateTime = ''; + $oldDateTime[] = $record->get('due_date'); + $oldDateTime[] = $record->get('time_end'); + $oldDateTime = implode(' ',$oldDateTime); + $resultDateTime = $this->changeDateTime($oldDateTime,$dayDelta,$minuteDelta,$secondsDelta); + $parts = explode(' ',$resultDateTime); + $record->set('due_date',$parts[0]); if(activitytype != 'Task') { - $recordModel->set('time_end',$parts[1]); + $record->set('time_end',$parts[1]); } - $endDateTime = ''; - $endDateTime[] = $recordModel->get('due_date'); - $endDateTime[] = $recordModel->get('time_end'); + $startDateTime = ''; + $startDateTime[] = $record->get('date_start'); + $startDateTime[] = $record->get('time_start'); + $startDateTime = implode(' ',$startDateTime); + $startDateTime = new DateTime($startDateTime); + + $endDateTime[] = $record->get('due_date'); + $endDateTime[] = $record->get('time_end'); $endDateTime = implode(' ',$endDateTime); $endDateTime = new DateTime($endDateTime); - + //Checking if startDateTime is less than or equal to endDateTime if($startDateTime <= $endDateTime) { - $this->setRecurrenceInfo($recordModel); - $recordModel->save(); + $this->setRecurrenceInfo($record); + $record->save(); } else { $result['error'] = true; } - } - $result['recurringRecords'] = true; - } else { - $oldDateTime = ''; - $oldDateTime[] = $record->get('due_date'); - $oldDateTime[] = $record->get('time_end'); - $oldDateTime = implode(' ',$oldDateTime); - $resultDateTime = $this->changeDateTime($oldDateTime,$dayDelta,$minuteDelta,$secondsDelta); - $parts = explode(' ',$resultDateTime); - $record->set('due_date',$parts[0]); - if(activitytype != 'Task') { - $record->set('time_end',$parts[1]); + $result['recurringRecords'] = false; } - $startDateTime = ''; - $startDateTime[] = $record->get('date_start'); - $startDateTime[] = $record->get('time_start'); - $startDateTime = implode(' ',$startDateTime); - $startDateTime = new DateTime($startDateTime); - - $endDateTime[] = $record->get('due_date'); - $endDateTime[] = $record->get('time_end'); - $endDateTime = implode(' ',$endDateTime); - $endDateTime = new DateTime($endDateTime); - //Checking if startDateTime is less than or equal to endDateTime - if($startDateTime <= $endDateTime) { - $this->setRecurrenceInfo($record); - $record->save(); - } else { - $result['error'] = true; - } - $result['recurringRecords'] = false; + $response->setResult($result); } - - $response->setResult($result); - $response->emit(); + } catch (DuplicateException $e) { + $response->setError($e->getMessage(), $e->getDuplicationMessage(), $e->getMessage()); + } catch (Exception $e) { + $response->setError($e->getMessage()); } + $response->emit(); } function setRecurrenceInfo($recordModel) { @@ -181,99 +186,103 @@ class Calendar_DragDropAjax_Action extends Calendar_SaveAjax_Action { $actionname = 'EditView'; $response = new Vtiger_Response(); - if(isPermitted($moduleName, $actionname, $recordId) === 'no'){ - $result = array('ispermitted'=>false); - $response->setResult($result); - $response->emit(); - } - else{ - $result = array('ispermitted'=>true); - $record = Vtiger_Record_Model::getInstanceById($recordId, $moduleName); - $record->set('mode','edit'); - - $oldStartDateTime[] = $record->get('date_start'); - $oldStartDateTime[] = $record->get('time_start'); - $oldStartDateTime = implode(' ',$oldStartDateTime); - $resultDateTime = $this->changeDateTime($oldStartDateTime, $dayDelta, $minuteDelta, $secondsDelta); - $startDateInterval = strtotime($resultDateTime) - strtotime($oldStartDateTime); - - $oldEndDateTime[] = $record->get('due_date'); - $oldEndDateTime[] = $record->get('time_end'); - $oldEndDateTime = implode(' ', $oldEndDateTime); - $resultDateTime = $this->changeDateTime($oldEndDateTime, $dayDelta, $minuteDelta, $secondsDelta); - $endDateInterval = strtotime($resultDateTime) - strtotime($oldEndDateTime); - - if (!empty($recurringEditMode) && $recurringEditMode != 'current') { - $recurringRecordsList = $record->getRecurringRecordsList(); - foreach ($recurringRecordsList as $parent => $childs) { - $parentRecurringId = $parent; - $childRecords = $childs; - } - if ($recurringEditMode == 'future') { - $parentKey = array_keys($childRecords, $recordId); - $childRecords = array_slice($childRecords, $parentKey[0]); - } - foreach ($childRecords as $childId) { - $recordModel = Vtiger_Record_Model::getInstanceById($childId, 'Events'); - $recordModel->set('mode', 'edit'); - - $startDateTime = ''; - $startDateTime[] = $recordModel->get('date_start'); - $startDateTime[] = $recordModel->get('time_start'); - $startDateTime = implode(' ', $startDateTime); - $startDate = strtotime($startDateTime) + $startDateInterval; - $formatStartDate = date("Y-m-d H:i:s", $startDate); - $parts = explode(' ', $formatStartDate); - $startDateTime = new DateTime($startDateTime); - - $recordModel->set('date_start', $parts[0]); - if (activitytype != 'Task') - $recordModel->set('time_start', $parts[1]); - - $endDateTime = ''; - $endDateTime[] = $recordModel->get('due_date'); - $endDateTime[] = $recordModel->get('time_end'); - $endDateTime = implode(' ', $endDateTime); - $endDate = strtotime($endDateTime) + $endDateInterval; - $formatEndDate = date("Y-m-d H:i:s", $endDate); - $endDateParts = explode(' ', $formatEndDate); - $endDateTime = new DateTime($endDateTime); - $recordModel->set('due_date', $endDateParts[0]); - if (activitytype != 'Task') - $recordModel->set('time_end', $endDateParts[1]); - - $this->setRecurrenceInfo($recordModel); - $recordModel->save(); - } - $result['recurringRecords'] = true; + try { + if(isPermitted($moduleName, $actionname, $recordId) === 'no'){ + $result = array('ispermitted'=>false); + $response->setResult($result); } else { - $oldStartDateTime = ''; + $result = array('ispermitted'=>true); + $record = Vtiger_Record_Model::getInstanceById($recordId, $moduleName); + $record->set('mode','edit'); + $oldStartDateTime[] = $record->get('date_start'); $oldStartDateTime[] = $record->get('time_start'); - $oldStartDateTime = implode(' ', $oldStartDateTime); - $resultDateTime = $this->changeDateTime($oldStartDateTime,$dayDelta,$minuteDelta,$secondsDelta); - $parts = explode(' ',$resultDateTime); - $record->set('date_start',$parts[0]); - $record->set('time_start',$parts[1]); + $oldStartDateTime = implode(' ',$oldStartDateTime); + $resultDateTime = $this->changeDateTime($oldStartDateTime, $dayDelta, $minuteDelta, $secondsDelta); + $startDateInterval = strtotime($resultDateTime) - strtotime($oldStartDateTime); - $oldEndDateTime = ''; $oldEndDateTime[] = $record->get('due_date'); $oldEndDateTime[] = $record->get('time_end'); - $oldEndDateTime = implode(' ',$oldEndDateTime); - $resultDateTime = $this->changeDateTime($oldEndDateTime,$dayDelta,$minuteDelta,$secondsDelta); - $parts = explode(' ',$resultDateTime); - $record->set('due_date',$parts[0]); - if(activitytype != 'Task') { - $record->set('time_end',$parts[1]); - } + $oldEndDateTime = implode(' ', $oldEndDateTime); + $resultDateTime = $this->changeDateTime($oldEndDateTime, $dayDelta, $minuteDelta, $secondsDelta); + $endDateInterval = strtotime($resultDateTime) - strtotime($oldEndDateTime); + + if (!empty($recurringEditMode) && $recurringEditMode != 'current') { + $recurringRecordsList = $record->getRecurringRecordsList(); + foreach ($recurringRecordsList as $parent => $childs) { + $parentRecurringId = $parent; + $childRecords = $childs; + } + if ($recurringEditMode == 'future') { + $parentKey = array_keys($childRecords, $recordId); + $childRecords = array_slice($childRecords, $parentKey[0]); + } + foreach ($childRecords as $childId) { + $recordModel = Vtiger_Record_Model::getInstanceById($childId, 'Events'); + $recordModel->set('mode', 'edit'); + + $startDateTime = ''; + $startDateTime[] = $recordModel->get('date_start'); + $startDateTime[] = $recordModel->get('time_start'); + $startDateTime = implode(' ', $startDateTime); + $startDate = strtotime($startDateTime) + $startDateInterval; + $formatStartDate = date("Y-m-d H:i:s", $startDate); + $parts = explode(' ', $formatStartDate); + $startDateTime = new DateTime($startDateTime); + + $recordModel->set('date_start', $parts[0]); + if (activitytype != 'Task') + $recordModel->set('time_start', $parts[1]); + + $endDateTime = ''; + $endDateTime[] = $recordModel->get('due_date'); + $endDateTime[] = $recordModel->get('time_end'); + $endDateTime = implode(' ', $endDateTime); + $endDate = strtotime($endDateTime) + $endDateInterval; + $formatEndDate = date("Y-m-d H:i:s", $endDate); + $endDateParts = explode(' ', $formatEndDate); + $endDateTime = new DateTime($endDateTime); + $recordModel->set('due_date', $endDateParts[0]); + if (activitytype != 'Task') + $recordModel->set('time_end', $endDateParts[1]); + + $this->setRecurrenceInfo($recordModel); + $recordModel->save(); + } + $result['recurringRecords'] = true; + } else { + $oldStartDateTime = ''; + $oldStartDateTime[] = $record->get('date_start'); + $oldStartDateTime[] = $record->get('time_start'); + $oldStartDateTime = implode(' ', $oldStartDateTime); + $resultDateTime = $this->changeDateTime($oldStartDateTime,$dayDelta,$minuteDelta,$secondsDelta); + $parts = explode(' ',$resultDateTime); + $record->set('date_start',$parts[0]); + $record->set('time_start',$parts[1]); + + $oldEndDateTime = ''; + $oldEndDateTime[] = $record->get('due_date'); + $oldEndDateTime[] = $record->get('time_end'); + $oldEndDateTime = implode(' ',$oldEndDateTime); + $resultDateTime = $this->changeDateTime($oldEndDateTime,$dayDelta,$minuteDelta,$secondsDelta); + $parts = explode(' ',$resultDateTime); + $record->set('due_date',$parts[0]); + if(activitytype != 'Task') { + $record->set('time_end',$parts[1]); + } - $this->setRecurrenceInfo($record); - $record->save(); - $result['recurringRecords'] = false; + $this->setRecurrenceInfo($record); + $record->save(); + $result['recurringRecords'] = false; + } } $response->setResult($result); - $response->emit(); + } catch (DuplicateException $e) { + $response->setError($e->getMessage(), $e->getDuplicationMessage(), $e->getMessage()); + } catch (Exception $e) { + $response->setError($e->getMessage()); } + $response->emit(); } /* * * Function adds days and minutes to datetime string diff --git a/modules/Calendar/actions/Save.php b/modules/Calendar/actions/Save.php index e1c4a2eed30d2af4bd92da766e44aee78a96f6ce..e68fee373508e042c68a16156dc11e4eeda01f94 100644 --- a/modules/Calendar/actions/Save.php +++ b/modules/Calendar/actions/Save.php @@ -34,40 +34,70 @@ class Calendar_Save_Action extends Vtiger_Save_Action { } public function process(Vtiger_Request $request) { - $recordModel = $this->saveRecord($request); - $loadUrl = $recordModel->getDetailViewUrl(); - - if ($request->get('returntab_label')) { - $loadUrl = 'index.php?'.$request->getReturnURL(); - } else if($request->get('relationOperation')) { - $parentModuleName = $request->get('sourceModule'); - $parentRecordId = $request->get('sourceRecord'); - $parentRecordModel = Vtiger_Record_Model::getInstanceById($parentRecordId, $parentModuleName); - //TODO : Url should load the related list instead of detail view of record - $loadUrl = $parentRecordModel->getDetailViewUrl(); - } else if ($request->get('returnToList')) { - $moduleModel = $recordModel->getModule(); - $listViewUrl = $moduleModel->getListViewUrl(); - - if ($recordModel->get('visibility') === 'Private') { - $loadUrl = $listViewUrl; - } else { - $userId = $recordModel->get('assigned_user_id'); - $sharedType = $moduleModel->getSharedType($userId); - if ($sharedType === 'selectedusers') { - $currentUserModel = Users_Record_Model::getCurrentUserModel(); - $sharedUserIds = Calendar_Module_Model::getCaledarSharedUsers($userId); - if (!array_key_exists($currentUserModel->id, $sharedUserIds)) { + try { + $recordModel = $this->saveRecord($request); + $loadUrl = $recordModel->getDetailViewUrl(); + + if ($request->get('returntab_label')) { + $loadUrl = 'index.php?'.$request->getReturnURL(); + } else if($request->get('relationOperation')) { + $parentModuleName = $request->get('sourceModule'); + $parentRecordId = $request->get('sourceRecord'); + $parentRecordModel = Vtiger_Record_Model::getInstanceById($parentRecordId, $parentModuleName); + //TODO : Url should load the related list instead of detail view of record + $loadUrl = $parentRecordModel->getDetailViewUrl(); + } else if ($request->get('returnToList')) { + $moduleModel = $recordModel->getModule(); + $listViewUrl = $moduleModel->getListViewUrl(); + + if ($recordModel->get('visibility') === 'Private') { + $loadUrl = $listViewUrl; + } else { + $userId = $recordModel->get('assigned_user_id'); + $sharedType = $moduleModel->getSharedType($userId); + if ($sharedType === 'selectedusers') { + $currentUserModel = Users_Record_Model::getCurrentUserModel(); + $sharedUserIds = Calendar_Module_Model::getCaledarSharedUsers($userId); + if (!array_key_exists($currentUserModel->id, $sharedUserIds)) { + $loadUrl = $listViewUrl; + } + } else if ($sharedType === 'private') { $loadUrl = $listViewUrl; } - } else if ($sharedType === 'private') { - $loadUrl = $listViewUrl; } + } else if ($request->get('returnmodule') && $request->get('returnview')){ + $loadUrl = 'index.php?'.$request->getReturnURL(); } - } else if ($request->get('returnmodule') && $request->get('returnview')){ - $loadUrl = 'index.php?'.$request->getReturnURL(); + header("Location: $loadUrl"); + } catch (DuplicateException $e) { + $mode = ''; + if ($request->getModule() === 'Events') { + $mode = 'Events'; + } + + $requestData = $request->getAll(); + unset($requestData['action']); + unset($requestData['__vtrftk']); + + if ($request->isAjax()) { + $response = new Vtiger_Response(); + $response->setError($e->getMessage(), $e->getDuplicationMessage(), $e->getMessage()); + $response->emit(); + } else { + $requestData['view'] = 'Edit'; + $requestData['mode'] = $mode; + $requestData['module'] = 'Calendar'; + $requestData['duplicateRecords'] = $e->getDuplicateRecordIds(); + + global $vtiger_current_version; + $viewer = new Vtiger_Viewer(); + $viewer->assign('REQUEST_DATA', $requestData); + $viewer->assign('REQUEST_URL', "index.php?module=Calendar&view=Edit&mode=$mode&record=".$request->get('record')); + $viewer->view('RedirectToEditView.tpl', 'Vtiger'); + } + } catch (Exception $e) { + throw new Exception($e->getMessage()); } - header("Location: $loadUrl"); } /** diff --git a/modules/Calendar/actions/SaveAjax.php b/modules/Calendar/actions/SaveAjax.php index 5f28f72a64e4c2ecde547edce5a9ad0dacefde9a..dba7505ba4d3b48106b4531a6dcc9732daa72808 100644 --- a/modules/Calendar/actions/SaveAjax.php +++ b/modules/Calendar/actions/SaveAjax.php @@ -34,95 +34,101 @@ class Calendar_SaveAjax_Action extends Vtiger_SaveAjax_Action { } public function process(Vtiger_Request $request) { - $user = Users_Record_Model::getCurrentUserModel(); - - vglobal('VTIGER_TIMESTAMP_NO_CHANGE_MODE', $request->get('_timeStampNoChangeMode',false)); - $recordModel = $this->saveRecord($request); - vglobal('VTIGER_TIMESTAMP_NO_CHANGE_MODE', false); - - $fieldModelList = $recordModel->getModule()->getFields(); - $result = array(); - foreach ($fieldModelList as $fieldName => $fieldModel) { - $recordFieldValue = $recordModel->get($fieldName); - if(is_array($recordFieldValue) && $fieldModel->getFieldDataType() == 'multipicklist') { - $recordFieldValue = implode(' |##| ', $recordFieldValue); - } - $fieldValue = $displayValue = Vtiger_Util_Helper::toSafeHTML($recordFieldValue); - if ($fieldModel->getFieldDataType() !== 'currency' && $fieldModel->getFieldDataType() !== 'datetime' && $fieldModel->getFieldDataType() !== 'date') { - $displayValue = $fieldModel->getDisplayValue($fieldValue, $recordModel->getId()); - } - $result[$fieldName] = array(); - if($fieldName == 'date_start') { - $timeStart = $recordModel->get('time_start'); - $dateTimeFieldInstance = new DateTimeField($fieldValue . ' ' . $timeStart); - - $fieldValue = $fieldValue.' '.$timeStart; - - $userDateTimeString = $dateTimeFieldInstance->getDisplayDateTimeValue(); - $dateTimeComponents = explode(' ',$userDateTimeString); - $dateComponent = $dateTimeComponents[0]; - //Conveting the date format in to Y-m-d . since full calendar expects in the same format - $dataBaseDateFormatedString = DateTimeField::__convertToDBFormat($dateComponent, $user->get('date_format')); - $result[$fieldName]['calendar_display_value'] = $dataBaseDateFormatedString.' '. $dateTimeComponents[1]; - $displayValue = $fieldModel->getDisplayValue($fieldValue); - } else if($fieldName == 'due_date') { - $timeEnd = $recordModel->get('time_end'); - $dateTimeFieldInstance = new DateTimeField($fieldValue . ' ' . $timeEnd); - - $fieldValue = $fieldValue.' '.$timeEnd; - - $userDateTimeString = $dateTimeFieldInstance->getDisplayDateTimeValue(); - $dateTimeComponents = explode(' ',$userDateTimeString); - $dateComponent = $dateTimeComponents[0]; - //Conveting the date format in to Y-m-d . since full calendar expects in the same format - $dataBaseDateFormatedString = DateTimeField::__convertToDBFormat($dateComponent, $user->get('date_format')); - $result[$fieldName]['calendar_display_value'] = $dataBaseDateFormatedString.' '. $dateTimeComponents[1]; - $displayValue = $fieldModel->getDisplayValue($fieldValue); + $response = new Vtiger_Response(); + try { + $user = Users_Record_Model::getCurrentUserModel(); + + vglobal('VTIGER_TIMESTAMP_NO_CHANGE_MODE', $request->get('_timeStampNoChangeMode',false)); + $recordModel = $this->saveRecord($request); + vglobal('VTIGER_TIMESTAMP_NO_CHANGE_MODE', false); + + $fieldModelList = $recordModel->getModule()->getFields(); + $result = array(); + foreach ($fieldModelList as $fieldName => $fieldModel) { + $recordFieldValue = $recordModel->get($fieldName); + if(is_array($recordFieldValue) && $fieldModel->getFieldDataType() == 'multipicklist') { + $recordFieldValue = implode(' |##| ', $recordFieldValue); + } + $fieldValue = $displayValue = Vtiger_Util_Helper::toSafeHTML($recordFieldValue); + if ($fieldModel->getFieldDataType() !== 'currency' && $fieldModel->getFieldDataType() !== 'datetime' && $fieldModel->getFieldDataType() !== 'date') { + $displayValue = $fieldModel->getDisplayValue($fieldValue, $recordModel->getId()); + } + $result[$fieldName] = array(); + if($fieldName == 'date_start') { + $timeStart = $recordModel->get('time_start'); + $dateTimeFieldInstance = new DateTimeField($fieldValue . ' ' . $timeStart); + + $fieldValue = $fieldValue.' '.$timeStart; + + $userDateTimeString = $dateTimeFieldInstance->getDisplayDateTimeValue(); + $dateTimeComponents = explode(' ',$userDateTimeString); + $dateComponent = $dateTimeComponents[0]; + //Conveting the date format in to Y-m-d . since full calendar expects in the same format + $dataBaseDateFormatedString = DateTimeField::__convertToDBFormat($dateComponent, $user->get('date_format')); + $result[$fieldName]['calendar_display_value'] = $dataBaseDateFormatedString.' '. $dateTimeComponents[1]; + $displayValue = $fieldModel->getDisplayValue($fieldValue); + } else if($fieldName == 'due_date') { + $timeEnd = $recordModel->get('time_end'); + $dateTimeFieldInstance = new DateTimeField($fieldValue . ' ' . $timeEnd); + + $fieldValue = $fieldValue.' '.$timeEnd; + + $userDateTimeString = $dateTimeFieldInstance->getDisplayDateTimeValue(); + $dateTimeComponents = explode(' ',$userDateTimeString); + $dateComponent = $dateTimeComponents[0]; + //Conveting the date format in to Y-m-d . since full calendar expects in the same format + $dataBaseDateFormatedString = DateTimeField::__convertToDBFormat($dateComponent, $user->get('date_format')); + $result[$fieldName]['calendar_display_value'] = $dataBaseDateFormatedString.' '. $dateTimeComponents[1]; + $displayValue = $fieldModel->getDisplayValue($fieldValue); + } + $result[$fieldName]['value'] = $fieldValue; + $result[$fieldName]['display_value'] = decode_html($displayValue); } - $result[$fieldName]['value'] = $fieldValue; - $result[$fieldName]['display_value'] = decode_html($displayValue); - } - $result['_recordLabel'] = $recordModel->getName(); - $result['_recordId'] = $recordModel->getId(); - $result['calendarModule'] = $request->get('calendarModule'); - $result['sourceModule'] = $request->get('calendarModule'); - - // Handled to save follow up event - $followupMode = $request->get('followup'); - - if($followupMode == 'on') { - //Start Date and Time values - $startTime = Vtiger_Time_UIType::getTimeValueWithSeconds($request->get('followup_time_start')); - $startDateTime = Vtiger_Datetime_UIType::getDBDateTimeValue($request->get('followup_date_start') . " " . $startTime); - list($startDate, $startTime) = explode(' ', $startDateTime); - - $subject = $request->get('subject'); - if($startTime != '' && $startDate != ''){ - $recordModel->set('eventstatus', 'Planned'); - $recordModel->set('subject','[Followup] '.$subject); - $recordModel->set('date_start',$startDate); - $recordModel->set('time_start',$startTime); - - $currentUser = Users_Record_Model::getCurrentUserModel(); - $activityType = $recordModel->get('activitytype'); - if($activityType == 'Call') { - $minutes = $currentUser->get('callduration'); - } else { - $minutes = $currentUser->get('othereventduration'); + $result['_recordLabel'] = $recordModel->getName(); + $result['_recordId'] = $recordModel->getId(); + $result['calendarModule'] = $request->get('calendarModule'); + $result['sourceModule'] = $request->get('calendarModule'); + + // Handled to save follow up event + $followupMode = $request->get('followup'); + + if($followupMode == 'on') { + //Start Date and Time values + $startTime = Vtiger_Time_UIType::getTimeValueWithSeconds($request->get('followup_time_start')); + $startDateTime = Vtiger_Datetime_UIType::getDBDateTimeValue($request->get('followup_date_start') . " " . $startTime); + list($startDate, $startTime) = explode(' ', $startDateTime); + + $subject = $request->get('subject'); + if($startTime != '' && $startDate != ''){ + $recordModel->set('eventstatus', 'Planned'); + $recordModel->set('subject','[Followup] '.$subject); + $recordModel->set('date_start',$startDate); + $recordModel->set('time_start',$startTime); + + $currentUser = Users_Record_Model::getCurrentUserModel(); + $activityType = $recordModel->get('activitytype'); + if($activityType == 'Call') { + $minutes = $currentUser->get('callduration'); + } else { + $minutes = $currentUser->get('othereventduration'); + } + $dueDateTime = date('Y-m-d H:i:s', strtotime("$startDateTime+$minutes minutes")); + list($endDate, $endTime) = explode(' ', $dueDateTime); + + $recordModel->set('due_date',$endDate); + $recordModel->set('time_end',$endTime); + $recordModel->set('mode', 'create'); + $recordModel->save(); } - $dueDateTime = date('Y-m-d H:i:s', strtotime("$startDateTime+$minutes minutes")); - list($endDate, $endTime) = explode(' ', $dueDateTime); - - $recordModel->set('due_date',$endDate); - $recordModel->set('time_end',$endTime); - $recordModel->set('mode', 'create'); - $recordModel->save(); } + $response->setEmitType(Vtiger_Response::$EMIT_JSON); + $response->setResult($result); + } catch (DuplicateException $e) { + $response->setError($e->getMessage(), $e->getDuplicationMessage(), $e->getMessage()); + } catch (Exception $e) { + $response->setError($e->getMessage()); } - $response = new Vtiger_Response(); - $response->setEmitType(Vtiger_Response::$EMIT_JSON); - $response->setResult($result); $response->emit(); } diff --git a/modules/Calendar/actions/SaveFollowupAjax.php b/modules/Calendar/actions/SaveFollowupAjax.php index 382c4c5c53fad85f2668bcb79cb84ada3d07268c..59d321a794824bc05a5cba30c96e8f45fd231607 100755 --- a/modules/Calendar/actions/SaveFollowupAjax.php +++ b/modules/Calendar/actions/SaveFollowupAjax.php @@ -78,13 +78,19 @@ class Calendar_SaveFollowupAjax_Action extends Calendar_SaveAjax_Action { $recordModel->set('due_date', $followupEndDate); $recordModel->set('time_end', $followupEndTime); - - $recordModel->save(); - - $response = new Vtiger_Response(); - $result = array('created'=>true); - $response->setResult($result); - $response->emit(); + + $response = new Vtiger_Response(); + try { + $recordModel->set('id',null); + $recordModel->save(); + $result = array('created'=>true); + $response->setResult($result); + } catch (DuplicateException $e) { + $response->setError($e->getMessage(), $e->getDuplicationMessage(), $e->getMessage()); + } catch (Exception $e) { + $response->setError($e->getMessage()); + } + $response->emit(); } public function markAsHeldCompleted(Vtiger_Request $request) { @@ -120,8 +126,14 @@ class Calendar_SaveFollowupAjax_Action extends Calendar_SaveAjax_Action { } $_REQUEST['mode'] = 'edit'; $this->setRecurrenceInfo($recordModel); - $recordModel->save(); - $response->setResult($result); + try { + $recordModel->save(); + $response->setResult($result); + } catch (DuplicateException $e) { + $response->setError($e->getMessage(), $e->getDuplicationMessage(), $e->getMessage()); + } catch (Exception $e) { + $response->setError($e->getMessage()); + } $response->emit(); } diff --git a/modules/Calendar/models/Record.php b/modules/Calendar/models/Record.php index 15959ab602376b7b6d5e41be12778dfbbacd697b..f6483113b22096f870466972ef96cefb97e39db7 100644 --- a/modules/Calendar/models/Record.php +++ b/modules/Calendar/models/Record.php @@ -59,9 +59,13 @@ class Calendar_Record_Model extends Vtiger_Record_Model { * Function returns recurring information for EditView * @return <Array> - which contains recurring Information */ - public function getRecurrenceInformation() { + public function getRecurrenceInformation($request = false) { $recurringObject = $this->getRecurringObject(); + if ($request && !$request->get('id') && $request->get('repeat_frequency')) { + $recurringObject = getrecurringObjValue(); + } + if ($recurringObject) { $recurringData['recurringcheck'] = 'Yes'; $recurringData['repeat_frequency'] = $recurringObject->getRecurringFrequency(); diff --git a/modules/Calendar/views/Edit.php b/modules/Calendar/views/Edit.php index 0b9c3c369f0fb5da48f46676e32f26d0d3c03b62..d663bf46def546190db3d274cd2616e9f527a792 100644 --- a/modules/Calendar/views/Edit.php +++ b/modules/Calendar/views/Edit.php @@ -157,7 +157,7 @@ Class Calendar_Edit_View extends Vtiger_Edit_View { $viewer->assign('USER_CHANGED_END_DATE_TIME',$userChangedEndDateTime); $viewer->assign('FOLLOW_UP_DATE',$followUpDate); $viewer->assign('FOLLOW_UP_TIME',$followUpTime); - $viewer->assign('RECURRING_INFORMATION', $recordModel->getRecurrenceInformation()); + $viewer->assign('RECURRING_INFORMATION', $recordModel->getRecurrenceInformation($request)); $viewer->assign('TOMORROWDATE', Vtiger_Date_UIType::getDisplayDateValue(date('Y-m-d', time()+86400))); $viewer->assign('RECORD_STRUCTURE_MODEL', $recordStructureInstance); diff --git a/modules/Calendar/views/Import.php b/modules/Calendar/views/Import.php index 85db9b8b9bfe6fc7d4588b52b801c1a29a5b6561..c6e42b6c2ecce8cbf42315396fb6f1cb1301040e 100644 --- a/modules/Calendar/views/Import.php +++ b/modules/Calendar/views/Import.php @@ -56,6 +56,7 @@ class Calendar_Import_View extends Vtiger_Import_View { $requiredFields[$module] = array_diff($moduleRequiredFields, $skipFields[$module]); $totalCount[$module] = 0; $skipCount[$module] = 0; + $duplicatesCount[$module] = 0; } $ical = new iCal(); @@ -89,9 +90,6 @@ class Calendar_Import_View extends Vtiger_Import_View { if(strtotime($dueDate) < strtotime($currentDate)) $activityFieldsList['eventstatus'] = 'Held'; } - if (!$activityFieldsList['time_end']) { - $activityFieldsList['time_end'] = ''; - } $recordModel = Vtiger_Record_Model::getCleanInstance($moduleName); $recordModel->setData($activityFieldsList); @@ -109,24 +107,31 @@ class Calendar_Import_View extends Vtiger_Import_View { if($skipRecord === true) { continue; } - $recordModel->save(); + try { + $recordModel->save(); - $lastImport = new iCalLastImport(); - $lastImport->setFields(array('userid' => $userId, 'entitytype' => $todoModule, 'crmid' => $recordModel->getId())); - $lastImport->save(); + $lastImport = new iCalLastImport(); + $lastImport->setFields(array('userid' => $userId, 'entitytype' => $todoModule, 'crmid' => $recordModel->getId())); + $lastImport->save(); - if(!empty($icalActivities[$i]['VALARM'])) { - $recordModel->setActivityReminder(0, '', ''); + if(!empty($icalActivities[$i]['VALARM'])) { + $recordModel->setActivityReminder(0, '', ''); + } + } catch (Exception $e) { + $duplicatesCount[$module]++; } } - $importedEvents = $totalCount[$eventModule] - $skipCount[$eventModule]; - $importedTasks = $totalCount[$todoModule] - $skipCount[$todoModule]; + $importedEvents = $totalCount[$eventModule] - $skipCount[$eventModule] - $duplicatesCount[$eventModule]; + $importedTasks = $totalCount[$todoModule] - $skipCount[$todoModule] - $duplicatesCount[$todoModule]; $viewer->assign('SUCCESS_EVENTS', $importedEvents); $viewer->assign('SKIPPED_EVENTS', $skipCount[$eventModule]); + $viewer->assign('DUPLICATE_EVENTS', $duplicatesCount[$eventModule]); + $viewer->assign('SUCCESS_TASKS', $importedTasks); $viewer->assign('SKIPPED_TASKS', $skipCount[$todoModule]); + $viewer->assign('DUPLICATE_TASKS', $duplicatesCount[$todoModule]); } else { $viewer->assign('ERROR_MESSAGE', $request->get('error_message')); diff --git a/modules/Documents/models/Module.php b/modules/Documents/models/Module.php index 260d755c766aa330be5dcb295ca4b8e52b153ba1..535d1c5e9ab55546ed2408949f6ec1125939c557 100644 --- a/modules/Documents/models/Module.php +++ b/modules/Documents/models/Module.php @@ -191,5 +191,8 @@ class Documents_Module_Model extends Vtiger_Module_Model { } return $relatedListFields; } + + public function isFieldsDuplicateCheckAllowed() { + return false; + } } -?> diff --git a/modules/Events/actions/Save.php b/modules/Events/actions/Save.php index 07afd6256a00627a4ace413458217ec0840c3cbb..08fff50c1e40444c8c5561e530f43ef7e5813b19 100644 --- a/modules/Events/actions/Save.php +++ b/modules/Events/actions/Save.php @@ -84,7 +84,24 @@ class Events_Save_Action extends Calendar_Save_Action { $focus = CRMEntity::getInstance('Events'); //get all the stored data to this object $focus->column_fields = new TrackableObject($recordModel->getData()); - Calendar_RepeatEvents::repeatFromRequest($focus, $recurObjDb); + try { + Calendar_RepeatEvents::repeatFromRequest($focus, $recurObjDb); + } catch (DuplicateException $e) { + $requestData = $request->getAll(); + $requestData['view'] = 'Edit'; + $requestData['mode'] = 'Events'; + $requestData['module'] = 'Events'; + $requestData['duplicateRecords'] = $e->getDuplicateRecordIds(); + + global $vtiger_current_version; + $viewer = new Vtiger_Viewer(); + $viewer->assign('REQUEST_DATA', $requestData); + $viewer->assign('REQUEST_URL', 'index.php?module=Calendar&view=Edit&mode=Events&record='.$request->get('record')); + $viewer->view('RedirectToEditView.tpl', 'Vtiger'); + exit(); + } catch (Exception $ex) { + throw new Exception($ex->getMessage()); + } } return $recordModel; } diff --git a/modules/Events/actions/SaveAjax.php b/modules/Events/actions/SaveAjax.php index e7bc75922bb75e0d98481d637e048468761939ae..b935de2e8c38360fef61f08b7be1d75e829c93ca 100644 --- a/modules/Events/actions/SaveAjax.php +++ b/modules/Events/actions/SaveAjax.php @@ -34,95 +34,101 @@ class Events_SaveAjax_Action extends Events_Save_Action { } public function process(Vtiger_Request $request) { - $user = Users_Record_Model::getCurrentUserModel(); - - vglobal('VTIGER_TIMESTAMP_NO_CHANGE_MODE', $request->get('_timeStampNoChangeMode', false)); - $recordModel = $this->saveRecord($request); - vglobal('VTIGER_TIMESTAMP_NO_CHANGE_MODE', false); - - $fieldModelList = $recordModel->getModule()->getFields(); - $result = array(); - foreach ($fieldModelList as $fieldName => $fieldModel) { - $recordFieldValue = $recordModel->get($fieldName); - if (is_array($recordFieldValue) && $fieldModel->getFieldDataType() == 'multipicklist') { - $recordFieldValue = implode(' |##| ', $recordFieldValue); - } - $fieldValue = $displayValue = Vtiger_Util_Helper::toSafeHTML($recordFieldValue); - if ($fieldModel->getFieldDataType() !== 'currency' && $fieldModel->getFieldDataType() !== 'datetime' && $fieldModel->getFieldDataType() !== 'date') { - $displayValue = $fieldModel->getDisplayValue($fieldValue, $recordModel->getId()); - } - $result[$fieldName] = array(); - if ($fieldName == 'date_start') { - $timeStart = $recordModel->get('time_start'); - $dateTimeFieldInstance = new DateTimeField($fieldValue . ' ' . $timeStart); - - $fieldValue = $fieldValue . ' ' . $timeStart; - - $userDateTimeString = $dateTimeFieldInstance->getDisplayDateTimeValue(); - $dateTimeComponents = explode(' ', $userDateTimeString); - $dateComponent = $dateTimeComponents[0]; - //Conveting the date format in to Y-m-d . since full calendar expects in the same format - $dataBaseDateFormatedString = DateTimeField::__convertToDBFormat($dateComponent, $user->get('date_format')); - $result[$fieldName]['calendar_display_value'] = $dataBaseDateFormatedString . ' ' . $dateTimeComponents[1]; - $displayValue = $fieldModel->getDisplayValue($fieldValue); - } else if ($fieldName == 'due_date') { - $timeEnd = $recordModel->get('time_end'); - $dateTimeFieldInstance = new DateTimeField($fieldValue . ' ' . $timeEnd); - - $fieldValue = $fieldValue . ' ' . $timeEnd; - - $userDateTimeString = $dateTimeFieldInstance->getDisplayDateTimeValue(); - $dateTimeComponents = explode(' ', $userDateTimeString); - $dateComponent = $dateTimeComponents[0]; - //Conveting the date format in to Y-m-d . since full calendar expects in the same format - $dataBaseDateFormatedString = DateTimeField::__convertToDBFormat($dateComponent, $user->get('date_format')); - $result[$fieldName]['calendar_display_value'] = $dataBaseDateFormatedString . ' ' . $dateTimeComponents[1]; - $displayValue = $fieldModel->getDisplayValue($fieldValue); + $response = new Vtiger_Response(); + try { + $user = Users_Record_Model::getCurrentUserModel(); + + vglobal('VTIGER_TIMESTAMP_NO_CHANGE_MODE', $request->get('_timeStampNoChangeMode', false)); + $recordModel = $this->saveRecord($request); + vglobal('VTIGER_TIMESTAMP_NO_CHANGE_MODE', false); + + $fieldModelList = $recordModel->getModule()->getFields(); + $result = array(); + foreach ($fieldModelList as $fieldName => $fieldModel) { + $recordFieldValue = $recordModel->get($fieldName); + if (is_array($recordFieldValue) && $fieldModel->getFieldDataType() == 'multipicklist') { + $recordFieldValue = implode(' |##| ', $recordFieldValue); + } + $fieldValue = $displayValue = Vtiger_Util_Helper::toSafeHTML($recordFieldValue); + if ($fieldModel->getFieldDataType() !== 'currency' && $fieldModel->getFieldDataType() !== 'datetime' && $fieldModel->getFieldDataType() !== 'date') { + $displayValue = $fieldModel->getDisplayValue($fieldValue, $recordModel->getId()); + } + $result[$fieldName] = array(); + if ($fieldName == 'date_start') { + $timeStart = $recordModel->get('time_start'); + $dateTimeFieldInstance = new DateTimeField($fieldValue . ' ' . $timeStart); + + $fieldValue = $fieldValue . ' ' . $timeStart; + + $userDateTimeString = $dateTimeFieldInstance->getDisplayDateTimeValue(); + $dateTimeComponents = explode(' ', $userDateTimeString); + $dateComponent = $dateTimeComponents[0]; + //Conveting the date format in to Y-m-d . since full calendar expects in the same format + $dataBaseDateFormatedString = DateTimeField::__convertToDBFormat($dateComponent, $user->get('date_format')); + $result[$fieldName]['calendar_display_value'] = $dataBaseDateFormatedString . ' ' . $dateTimeComponents[1]; + $displayValue = $fieldModel->getDisplayValue($fieldValue); + } else if ($fieldName == 'due_date') { + $timeEnd = $recordModel->get('time_end'); + $dateTimeFieldInstance = new DateTimeField($fieldValue . ' ' . $timeEnd); + + $fieldValue = $fieldValue . ' ' . $timeEnd; + + $userDateTimeString = $dateTimeFieldInstance->getDisplayDateTimeValue(); + $dateTimeComponents = explode(' ', $userDateTimeString); + $dateComponent = $dateTimeComponents[0]; + //Conveting the date format in to Y-m-d . since full calendar expects in the same format + $dataBaseDateFormatedString = DateTimeField::__convertToDBFormat($dateComponent, $user->get('date_format')); + $result[$fieldName]['calendar_display_value'] = $dataBaseDateFormatedString . ' ' . $dateTimeComponents[1]; + $displayValue = $fieldModel->getDisplayValue($fieldValue); + } + $result[$fieldName]['value'] = $fieldValue; + $result[$fieldName]['display_value'] = decode_html($displayValue); } - $result[$fieldName]['value'] = $fieldValue; - $result[$fieldName]['display_value'] = decode_html($displayValue); - } - $result['_recordLabel'] = $recordModel->getName(); - $result['_recordId'] = $recordModel->getId(); - $result['calendarModule'] = $request->get('calendarModule'); - $result['sourceModule'] = $request->get('calendarModule'); - - // Handled to save follow up event - $followupMode = $request->get('followup'); - - if ($followupMode == 'on') { - //Start Date and Time values - $startTime = Vtiger_Time_UIType::getTimeValueWithSeconds($request->get('followup_time_start')); - $startDateTime = Vtiger_Datetime_UIType::getDBDateTimeValue($request->get('followup_date_start') . " " . $startTime); - list($startDate, $startTime) = explode(' ', $startDateTime); - - $subject = $request->get('subject'); - if ($startTime != '' && $startDate != '') { - $recordModel->set('eventstatus', 'Planned'); - $recordModel->set('subject', '[Followup] ' . $subject); - $recordModel->set('date_start', $startDate); - $recordModel->set('time_start', $startTime); - - $currentUser = Users_Record_Model::getCurrentUserModel(); - $activityType = $recordModel->get('activitytype'); - if ($activityType == 'Call') { - $minutes = $currentUser->get('callduration'); - } else { - $minutes = $currentUser->get('othereventduration'); + $result['_recordLabel'] = $recordModel->getName(); + $result['_recordId'] = $recordModel->getId(); + $result['calendarModule'] = $request->get('calendarModule'); + $result['sourceModule'] = $request->get('calendarModule'); + + // Handled to save follow up event + $followupMode = $request->get('followup'); + + if ($followupMode == 'on') { + //Start Date and Time values + $startTime = Vtiger_Time_UIType::getTimeValueWithSeconds($request->get('followup_time_start')); + $startDateTime = Vtiger_Datetime_UIType::getDBDateTimeValue($request->get('followup_date_start') . " " . $startTime); + list($startDate, $startTime) = explode(' ', $startDateTime); + + $subject = $request->get('subject'); + if ($startTime != '' && $startDate != '') { + $recordModel->set('eventstatus', 'Planned'); + $recordModel->set('subject', '[Followup] ' . $subject); + $recordModel->set('date_start', $startDate); + $recordModel->set('time_start', $startTime); + + $currentUser = Users_Record_Model::getCurrentUserModel(); + $activityType = $recordModel->get('activitytype'); + if ($activityType == 'Call') { + $minutes = $currentUser->get('callduration'); + } else { + $minutes = $currentUser->get('othereventduration'); + } + $dueDateTime = date('Y-m-d H:i:s', strtotime("$startDateTime+$minutes minutes")); + list($endDate, $endTime) = explode(' ', $dueDateTime); + + $recordModel->set('due_date', $endDate); + $recordModel->set('time_end', $endTime); + $recordModel->set('mode', 'create'); + $recordModel->save(); } - $dueDateTime = date('Y-m-d H:i:s', strtotime("$startDateTime+$minutes minutes")); - list($endDate, $endTime) = explode(' ', $dueDateTime); - - $recordModel->set('due_date', $endDate); - $recordModel->set('time_end', $endTime); - $recordModel->set('mode', 'create'); - $recordModel->save(); } + $response->setEmitType(Vtiger_Response::$EMIT_JSON); + $response->setResult($result); + } catch (DuplicateException $e) { + $response->setError($e->getMessage(), $e->getDuplicationMessage(), $e->getMessage()); + } catch (Exception $e) { + $response->setError($e->getMessage()); } - $response = new Vtiger_Response(); - $response->setEmitType(Vtiger_Response::$EMIT_JSON); - $response->setResult($result); $response->emit(); } diff --git a/modules/HelpDesk/actions/ConvertFAQ.php b/modules/HelpDesk/actions/ConvertFAQ.php index 07df6736f200227af5e7f76c4250cb638f4b0f38..91f35af30dcaeadd9431e9ecbfce2228d49f6f68 100644 --- a/modules/HelpDesk/actions/ConvertFAQ.php +++ b/modules/HelpDesk/actions/ConvertFAQ.php @@ -30,8 +30,25 @@ class HelpDesk_ConvertFAQ_Action extends Vtiger_Action_Controller { $answer = $faqRecordModel->get('faq_answer'); if ($answer) { - $faqRecordModel->save(); - header("Location: ".$faqRecordModel->getDetailViewUrl()); + try { + $faqRecordModel->save(); + header("Location: ".$faqRecordModel->getDetailViewUrl()); + } catch (DuplicateException $e) { + $requestData = $request->getAll(); + unset($requestData['__vtrftk']); + unset($requestData['action']); + unset($requestData['record']); + $requestData['view'] = 'Edit'; + $requestData['module'] = 'HelpDesk'; + $requestData['duplicateRecords'] = $e->getDuplicateRecordIds(); + + global $vtiger_current_version; + $viewer = new Vtiger_Viewer(); + $viewer->assign('REQUEST_DATA', $requestData); + $viewer->assign('REQUEST_URL', $faqRecordModel->getEditViewUrl()."&parentId=$recordId&parentModule=$moduleName"); + $viewer->view('RedirectToEditView.tpl', 'Vtiger'); + } catch (Exception $e) { + } } else { header("Location: ".$faqRecordModel->getEditViewUrl()."&parentId=$recordId&parentModule=$moduleName"); } diff --git a/modules/Inventory/actions/MassSave.php b/modules/Inventory/actions/MassSave.php index 3e5a7ac6f8b0f32f2b2843e7a08dffdcad13d45a..c6537bace7c39520df528343a6a806c940e3b5e8 100644 --- a/modules/Inventory/actions/MassSave.php +++ b/modules/Inventory/actions/MassSave.php @@ -11,19 +11,25 @@ class Inventory_MassSave_Action extends Vtiger_MassSave_Action { public function process(Vtiger_Request $request) { - vglobal('VTIGER_TIMESTAMP_NO_CHANGE_MODE', $request->get('_timeStampNoChangeMode',false)); - $moduleName = $request->getModule(); - $recordModels = $this->getRecordModelsFromRequest($request); - foreach($recordModels as $recordId => $recordModel) { - if(Users_Privileges_Model::isPermitted($moduleName, 'Save', $recordId)) { - //Inventory line items getting wiped out - $_REQUEST['ajxaction'] = 'DETAILVIEW'; - $recordModel->save(); + $response = new Vtiger_Response(); + try { + vglobal('VTIGER_TIMESTAMP_NO_CHANGE_MODE', $request->get('_timeStampNoChangeMode',false)); + $moduleName = $request->getModule(); + $recordModels = $this->getRecordModelsFromRequest($request); + foreach($recordModels as $recordId => $recordModel) { + if(Users_Privileges_Model::isPermitted($moduleName, 'Save', $recordId)) { + //Inventory line items getting wiped out + $_REQUEST['ajxaction'] = 'DETAILVIEW'; + $recordModel->save(); + } } + vglobal('VTIGER_TIMESTAMP_NO_CHANGE_MODE', false); + $response->setResult(true); + } catch (DuplicateException $e) { + $response->setError($e->getMessage(), $e->getDuplicationMessage(), $e->getMessage()); + } catch (Exception $e) { + $response->setError($e->getMessage()); } - vglobal('VTIGER_TIMESTAMP_NO_CHANGE_MODE', false); - $response = new Vtiger_Response(); - $response->setResult(true); $response->emit(); } } diff --git a/modules/Inventory/models/Record.php b/modules/Inventory/models/Record.php index ed8a5836fbafb8082a6b1f8b3308a6f6e8d509ec..e4c3c82ec6b89c0de4d2a0e25ae4a362d5cdddab 100644 --- a/modules/Inventory/models/Record.php +++ b/modules/Inventory/models/Record.php @@ -68,7 +68,7 @@ class Inventory_Record_Model extends Vtiger_Record_Model { } function getProducts() { - $numOfCurrencyDecimalPlaces = getCurrencyDecimalPlaces(); + $numOfCurrencyDecimalPlaces = getCurrencyDecimalPlaces(); $relatedProducts = getAssociatedProducts($this->getModuleName(), $this->getEntity()); $productsCount = count($relatedProducts); @@ -695,4 +695,271 @@ class Inventory_Record_Model extends Vtiger_Record_Model { } return array(); } + + public function convertRequestToProducts(Vtiger_Request $request) { + $requestData = $request->getAll(); + $noOfDecimalPlaces = getCurrencyDecimalPlaces(); + $totalProductsCount = $requestData['totalProductCount']; + + $productIdsList = array(); + $relatedProducts = array(); + for ($i=1; $i<=$totalProductsCount; $i++) { + $productId = $requestData["hdnProductId$i"]; + $productIdsList[] = $productId; + $itemRecordModel = Vtiger_Record_Model::getInstanceById($productId); + + $productData = array(); + $productData["hdnProductId$i"] = $productId; + $productData["productName$i"] = $itemRecordModel->getName(); + $productData["comment$i"] = $requestData["comment$i"]; + $productData["qtyInStock$i"] = $itemRecordModel->get('qtyinstock'); + $productData["qty$i"] = $requestData["qty$i"]; + $productData["listPrice$i"] = number_format($requestData["listPrice$i"], $noOfDecimalPlaces, '.', ''); + $productData["unitPrice$i"] = number_format($requestData["listPrice$i"], $noOfDecimalPlaces, '.', ''); + $productData["purchaseCost$i"] = number_format($purchaseCost, $noOfDecimalPlaces, '.', ''); + $productData["productDescription$i"]= $requestData["productDescription$i"]; + + $margin = (float)$requestData["margin$i"]; + if (is_numeric($margin)) { + $productData["margin$i"] = number_format($margin, $noOfDecimalPlaces, '.', ''); + } + + $productTotal = $requestData["qty$i"] * $requestData["listPrice$i"]; + $productData["productTotal$i"] = number_format($productTotal, $noOfDecimalPlaces, '.', ''); + + $subQtysList = array(); + $subProducts = $requestData["subproduct_ids$i"]; + $subProducts = split(',', rtrim($subProducts, ',')); + + foreach ($subProducts as $subProductInfo) { + list($subProductId, $subProductQty) = explode(':', $subProductInfo); + if ($subProductId) { + $subProductName = getProductName($subProductId); + $subQtysList[$subProductId] = array('name' => $subProductName, 'qty' => $subProductQty); + } + } + $productData["subproduct_ids$i"]= $requestData["subproduct_ids$i"]; + $productData["subprod_qty_list$i"] = $subQtysList; + + //individual disount calculation + $discountType = $productData["discount_type$i"] = $requestData["discount_type$i"]; + $productData["discount_percent$i"] = 0; + $productData["discount_amount$i"] = 0; + $discountTotal = 0; + + if ($discountType === 'percentage') { + $productData["discount_percent$i"] = $requestData["discount_percentage$i"]; + $productData["checked_discount_percent$i"] = 'checked'; + $discountTotal = $productTotal * $productData["discount_percent$i"] / 100; + } elseif ($discountType === 'amount') { + $productData["discount_amount$i"] = $requestData["discount_amount$i"]; + $productData["checked_discount_amount$i"] = 'checked'; + $discountTotal = $productData["discount_amount$i"]; + } else { + $productData["checked_discount_zero$i"] = 'checked'; + } + $productData["discountTotal$i"] = number_format($discountTotal, $noOfDecimalPlaces, '.', ''); + + //individual taxes calculation + $taxType = $requestData['taxtype']; + $itemTaxDetails = $itemRecordModel->getTaxClassDetails(); + $regionsList = array(); + foreach ($itemTaxDetails as $taxInfo) { + $regionsInfo = array('default' => $taxInfo['percentage']); + if ($taxInfo['productregions']) { + foreach ($taxInfo['productregions'] as $list) { + if (is_array($list['list'])) { + foreach (array_fill_keys($list['list'], $list['value']) as $key => $value) { + $regionsInfo[$key] = $value; + } + } + } + } + $regionsList[$taxInfo['taxid']] = $regionsInfo; + } + + $taxTotal = 0; + $totalAfterDiscount = $productTotal-$discountTotal; + $netPrice = $totalAfterDiscount; + $taxDetails = array(); + + foreach ($itemTaxDetails as &$taxInfo) { + $taxId = $taxInfo['taxid']; + $taxName = $taxInfo['taxname']; + $taxValue = 0; + $taxAmount = 0; + + $taxValue = $taxInfo['percentage']; + if ($taxType == 'individual') { + $selectedRegionId = $requestData['region_id']; + $taxValue = $requestData[$taxName.'_percentage'.$i]; + if ($selectedRegionId) { + $regionsList[$taxId][$selectedRegionId] = $taxValue; + } else { + $regionsList[$taxId]['default'] = $taxValue; + } + + $taxAmount = $totalAfterDiscount * $taxValue / 100; + } + + $taxInfo['amount'] = $taxAmount; + $taxInfo['percentage'] = $taxValue; + $taxInfo['regionsList'] = $regionsList[$taxInfo['taxid']]; + $taxDetails[$taxId] = $taxInfo; + } + + $taxTotal = 0; + foreach ($taxDetails as $taxId => $taxInfo) { + $taxAmount = $taxInfo['amount']; + if ($taxInfo['compoundon']) { + $amount = $totalAfterDiscount; + foreach ($taxInfo['compoundon'] as $compTaxId) { + $amount = $amount + $taxDetails[$compTaxId]['amount']; + } + $taxAmount = $amount * $taxInfo['percentage'] / 100; + } + $taxTotal = $taxTotal + $taxAmount; + + $taxDetails[$taxId]['amount'] = $taxAmount; + $relatedProducts[$i]['taxTotal'.$i] = number_format($taxTotal, $numOfCurrencyDecimalPlaces, '.', ''); + } + + $productData["taxTotal$i"] = number_format($taxTotal, $noOfDecimalPlaces, '.', ''); + $productData["totalAfterDiscount$i"]= number_format($totalAfterDiscount, $noOfDecimalPlaces, '.', ''); + $productData["netPrice$i"] = number_format($totalAfterDiscount + $taxTotal, $noOfDecimalPlaces, '.', ''); + + $productData['taxes'] = $taxDetails; + $relatedProducts[$i] = $productData; + } + + //Final details started + $finalDetails = array(); + $finalDetails['hdnSubTotal'] = number_format($requestData['subtotal'], $noOfDecimalPlaces, '.', ''); + + //final discount calculation + $discountTotalFinal = 0; + $finalDiscountType = $finalDetails['discount_type_final'] = $requestData['discount_type_final']; + if ($finalDiscountType === 'percentage') { + $finalDetails['discount_percentage_final'] = $requestData['discount_percentage_final']; + $finalDetails['checked_discount_percentage_final'] = 'checked'; + $discountTotalFinal = $finalDetails['discount_percentage_final']; + } else if ($finalDetails === 'amount') { + $finalDetails['discount_percentage_final'] = $requestData['discount_amount_final']; + $finalDetails['checked_discount_amount_final'] = 'checked'; + $discountTotalFinal = $finalDetails['discount_percentage_final']; + } + $finalDetails['discountTotal_final'] = number_format($discountTotalFinal, $noOfDecimalPlaces, '.', ''); + + //group taxes calculation + $taxDetails = array(); + $taxTotal = 0; + $allTaxes = getAllTaxes('available'); + foreach ($allTaxes as $taxInfo) { + if ($taxInfo['method'] === 'Deducted') { + continue; + } + + $taxName = $taxInfo['taxname']; + if ($taxType == 'group') { + $taxPercent = $requestData[$taxName.'_group_percentage']; + } else { + $taxPercent = $taxInfo['percentage']; + } + if ($taxPercent == '' || $taxPercent == 'NULL') { + $taxPercent = 0; + } + + $taxInfo['percentage'] = $taxPercent; + $taxInfo['amount'] = $requestData[$taxName.'_group_amount'];; + $taxInfo['regions'] = Zend_Json::decode(html_entity_decode($taxInfo['regions'])); + $taxInfo['compoundon'] = Zend_Json::decode(html_entity_decode($taxInfo['compoundon'])); + $taxDetails[$taxInfo['taxid']] = $taxInfo; + + $taxTotal = $taxTotal + $taxInfo['amount']; + } + + $finalDetails['taxtype'] = $taxType; + $finalDetails['taxes'] = $taxDetails; + $finalDetails['tax_totalamount']= number_format($taxTotal, $noOfDecimalPlaces, '.', ''); + $finalDetails['adjustment'] = number_format($requestData['adjustment'], $noOfDecimalPlaces, '.', ''); + $finalDetails['grandTotal'] = number_format($requestData['total'], $noOfDecimalPlaces, '.', ''); + $finalDetails['preTaxTotal'] = number_format($requestData['pre_tax_total'], $noOfDecimalPlaces, '.', ''); + $finalDetails['shipping_handling_charge'] = number_format($requestData['shipping_handling_charge'], $noOfDecimalPlaces, ',', ''); + $finalDetails['adjustment'] = $requestData['adjustmentType'].number_format($requestData['adjustment'], $noOfDecimalPlaces, '.', ''); + + //charge value setting to related products array + $selectedChargesAndItsTaxes = $requestData['charges']; + foreach ($selectedChargesAndItsTaxes as $chargeId => $chargeInfo) { + $selectedChargesAndItsTaxes[$chargeId] = Zend_Json::decode(html_entity_decode($chargeInfo)); + } + $finalDetails['chargesAndItsTaxes'] = $selectedChargesAndItsTaxes; + + $allChargeTaxes = array(); + foreach ($selectedChargesAndItsTaxes as $chargeId => $chargeInfo) { + if (is_array($chargeInfo['taxes'])) { + $allChargeTaxes = array_merge($allChargeTaxes, array_keys($chargeInfo['taxes'])); + } else { + $selectedChargesAndItsTaxes[$chargeId]['taxes'] = array(); + } + } + + $shippingTaxes = array(); + $allShippingTaxes = getAllTaxes('all', 'sh'); + foreach ($allShippingTaxes as $shTaxInfo) { + $shippingTaxes[$shTaxInfo['taxid']] = $shTaxInfo; + } + + $totalAmount = 0; + foreach ($selectedChargesAndItsTaxes as $chargeId => $chargeInfo) { + foreach ($chargeInfo['taxes'] as $taxId => $taxPercent) { + $amount = $calculatedOn = $chargeInfo['value']; + + if ($shippingTaxes[$taxId]['method'] === 'Compound') { + $compoundTaxes = Zend_Json::decode(html_entity_decode($shippingTaxes[$taxId]['compoundon'])); + if (is_array($compoundTaxes)) { + foreach ($compoundTaxes as $comTaxId) { + if ($shippingTaxes[$comTaxId]) { + $calculatedOn += ((float) $amount * (float) $chargeInfo['taxes'][$comTaxId]) / 100; + } + } + } + } + $totalAmount += ((float) $calculatedOn * (float) $taxPercent) / 100; + } + } + $finalDetails['shtax_totalamount'] = number_format($totalAmount, $noOfDecimalPlaces, '.', ''); + + //deduct tax values setting to related products + $deductedTaxesTotalAmount = 0; + $deductTaxes = $this->getDeductTaxes(); + foreach ($deductTaxes as $taxId => $taxInfo) { + $taxAmount = ($totalAfterDiscount * (float) $taxInfo['percentage']) / 100; + $deductTaxes[$taxId]['amount'] = number_format($taxAmount, $noOfDecimalPlaces, '.', ''); + if ($taxInfo['selected']) { + $deductedTaxesTotalAmount = $deductedTaxesTotalAmount + $taxAmount; + } + } + $finalDetails['deductTaxes'] = $deductTaxes; + $finalDetails['deductTaxesTotalAmount'] = number_format($deductedTaxesTotalAmount, $noOfDecimalPlaces, '.', ''); + + $imageFieldModel = $this->getModule()->getField('image'); + if ($productIdsList && $imageFieldModel && $imageFieldModel->isViewable()) { + $imageDetailsList = Products_Record_Model::getProductsImageDetails($productIdsList); + + for ($i = 1; $i <= $totalProductsCount; $i++) { + $product = $relatedProducts[$i]; + $productId = $product["hdnProductId$i"]; + $imageDetails = $imageDetailsList[$productId]; + if ($imageDetails) { + $relatedProducts[$i]["productImage$i"] = $imageDetails[0]['path'] . '_' . $imageDetails[0]['orgname']; + } + } + } + + if ($relatedProducts[1]) { + $relatedProducts[1]['final_details'] = $finalDetails; + } + return $relatedProducts; + } + } diff --git a/modules/Inventory/views/Edit.php b/modules/Inventory/views/Edit.php index ca3ad04650081bad225d353aebc88bcd3c14205c..89255efa2852f799bb5870f3ec9d402b80766f9b 100644 --- a/modules/Inventory/views/Edit.php +++ b/modules/Inventory/views/Edit.php @@ -22,7 +22,16 @@ Class Inventory_Edit_View extends Vtiger_Edit_View { } $viewer->assign('MODE', ''); - if(!empty($record) && $request->get('isDuplicate') == true) { + $viewer->assign('IS_DUPLICATE', false); + if ($request->has('totalProductCount')) { + if($record) { + $recordModel = Vtiger_Record_Model::getInstanceById($record); + } else { + $recordModel = Vtiger_Record_Model::getCleanInstance($moduleName); + } + $relatedProducts = $recordModel->convertRequestToProducts($request); + $taxes = $relatedProducts[1]['final_details']['taxes']; + } else if(!empty($record) && $request->get('isDuplicate') == true) { $recordModel = Inventory_Record_Model::getInstanceById($record, $moduleName); $currencyInfo = $recordModel->getCurrencyInfo(); $taxes = $recordModel->getProductTaxes(); @@ -38,6 +47,7 @@ Class Inventory_Edit_View extends Vtiger_Edit_View { } } } + $viewer->assign('IS_DUPLICATE', true); } elseif (!empty($record)) { $recordModel = Inventory_Record_Model::getInstanceById($record, $moduleName); $currencyInfo = $recordModel->getCurrencyInfo(); diff --git a/modules/Invoice/actions/MassSave.php b/modules/Invoice/actions/MassSave.php index f22d666cad555a06eba809c6633ab43ba6b853d2..386d4653233bb7eabb0e1955bf0be1cf752de214 100644 --- a/modules/Invoice/actions/MassSave.php +++ b/modules/Invoice/actions/MassSave.php @@ -11,20 +11,26 @@ class Invoice_MassSave_Action extends Inventory_MassSave_Action { public function process(Vtiger_Request $request) { - vglobal('VTIGER_TIMESTAMP_NO_CHANGE_MODE', $request->get('_timeStampNoChangeMode',false)); - $moduleName = $request->getModule(); - $recordModels = $this->getRecordModelsFromRequest($request); + $response = new Vtiger_Response(); + try { + vglobal('VTIGER_TIMESTAMP_NO_CHANGE_MODE', $request->get('_timeStampNoChangeMode',false)); + $moduleName = $request->getModule(); + $recordModels = $this->getRecordModelsFromRequest($request); - foreach($recordModels as $recordId => $recordModel) { - if(Users_Privileges_Model::isPermitted($moduleName, 'Save', $recordId)) { - //Inventory line items getting wiped out - $_REQUEST['action'] = 'MassEditSave'; - $recordModel->save(); + foreach($recordModels as $recordId => $recordModel) { + if(Users_Privileges_Model::isPermitted($moduleName, 'Save', $recordId)) { + //Inventory line items getting wiped out + $_REQUEST['action'] = 'MassEditSave'; + $recordModel->save(); + } } + vglobal('VTIGER_TIMESTAMP_NO_CHANGE_MODE', false); + $response->setResult(true); + } catch (DuplicateException $e) { + $response->setError($e->getMessage(), $e->getDuplicationMessage(), $e->getMessage()); + } catch (Exception $e) { + $response->setError($e->getMessage()); } - vglobal('VTIGER_TIMESTAMP_NO_CHANGE_MODE', false); - $response = new Vtiger_Response(); - $response->setResult(true); $response->emit(); } diff --git a/modules/Leads/views/SaveConvertLead.php b/modules/Leads/views/SaveConvertLead.php index 5c6cc0eeaae93c0c8e507e988a882685f776a252..ba5fd0bbf4950d068507a064b0f6b0656d285b81 100644 --- a/modules/Leads/views/SaveConvertLead.php +++ b/modules/Leads/views/SaveConvertLead.php @@ -21,9 +21,6 @@ class Leads_SaveConvertLead_View extends Vtiger_View_Controller { } } - public function preProcess(Vtiger_Request $request) { - } - public function process(Vtiger_Request $request) { $recordId = $request->get('record'); $modules = $request->get('modules'); @@ -35,7 +32,7 @@ class Leads_SaveConvertLead_View extends Vtiger_View_Controller { $entityValues['transferRelatedRecordsTo'] = $request->get('transferModule'); $entityValues['assignedTo'] = vtws_getWebserviceEntityId(vtws_getOwnerType($assignId), $assignId); $entityValues['leadId'] = vtws_getWebserviceEntityId($request->getModule(), $recordId); - $entityValues['imageAttachmentId'] = $request->get('imageAttachmentId'); + $entityValues['imageAttachmentId'] = $request->get('imageAttachmentId'); $recordModel = Vtiger_Record_Model::getInstanceById($recordId, $request->getModule()); $convertLeadFields = $recordModel->getConvertLeadFields(); @@ -46,20 +43,20 @@ class Leads_SaveConvertLead_View extends Vtiger_View_Controller { $entityValues['entities'][$module]['create'] = true; $entityValues['entities'][$module]['name'] = $module; - // Converting lead should save records source as CRM instead of WEBSERVICE - $entityValues['entities'][$module]['source'] = 'CRM'; + // Converting lead should save records source as CRM instead of WEBSERVICE + $entityValues['entities'][$module]['source'] = 'CRM'; foreach ($convertLeadFields[$module] as $fieldModel) { $fieldName = $fieldModel->getName(); $fieldValue = $request->get($fieldName); //Potential Amount Field value converting into DB format if ($fieldModel->getFieldDataType() === 'currency') { - if($fieldModel->get('uitype') == 72){ - // Some of the currency fields like Unit Price, Totoal , Sub-total - doesn't need currency conversion during save - $fieldValue = Vtiger_Currency_UIType::convertToDBFormat($fieldValue, null, true); - } else { - $fieldValue = Vtiger_Currency_UIType::convertToDBFormat($fieldValue); - } + if($fieldModel->get('uitype') == 72){ + // Some of the currency fields like Unit Price, Totoal , Sub-total - doesn't need currency conversion during save + $fieldValue = Vtiger_Currency_UIType::convertToDBFormat($fieldValue, null, true); + } else { + $fieldValue = Vtiger_Currency_UIType::convertToDBFormat($fieldValue); + } } elseif ($fieldModel->getFieldDataType() === 'date') { $fieldValue = DateTimeField::convertToDBFormat($fieldValue); } elseif ($fieldModel->getFieldDataType() === 'reference' && $fieldValue) { @@ -100,19 +97,26 @@ class Leads_SaveConvertLead_View extends Vtiger_View_Controller { function showError($request, $exception=false) { $viewer = $this->getViewer($request); - if($exception != false) { + $moduleName = $request->getModule(); + + $isDupicatesFailure = false; + if ($exception != false) { $viewer->assign('EXCEPTION', $exception->getMessage()); + if ($exception instanceof DuplicateException) { + $isDupicatesFailure = true; + $viewer->assign('EXCEPTION', $exception->getDuplicationMessage()); + } } - $moduleName = $request->getModule(); $currentUser = Users_Record_Model::getCurrentUserModel(); + $viewer->assign('IS_DUPICATES_FAILURE', $isDupicatesFailure); $viewer->assign('CURRENT_USER', $currentUser); $viewer->assign('MODULE', $moduleName); $viewer->view('ConvertLeadError.tpl', $moduleName); } - - public function validateRequest(Vtiger_Request $request) { - $request->validateWriteAccess(); - } + + public function validateRequest(Vtiger_Request $request) { + $request->validateWriteAccess(); + } } diff --git a/modules/Migration/schema/701_to_710.php b/modules/Migration/schema/701_to_710.php index 0283d4c6899e4d7bd31bf3f7785e8a13d76ec036..412e854af255ef3c7bd3521f25506f55c674f680 100644 --- a/modules/Migration/schema/701_to_710.php +++ b/modules/Migration/schema/701_to_710.php @@ -32,6 +32,38 @@ if (defined('VTIGER_UPGRADE')) { } //END::Workflow task's template path + //START::Duplication Prevention + $vtigerFieldColumns = $db->getColumnNames('vtiger_field'); + if (!in_array('isunique', $vtigerFieldColumns)) { + $db->pquery('ALTER TABLE vtiger_field ADD COLUMN isunique BOOLEAN DEFAULT 0'); + } + + $vtigerTabColumns = $db->getColumnNames('vtiger_tab'); + if (!in_array('issyncable', $vtigerTabColumns)) { + $db->pquery('ALTER TABLE vtiger_tab ADD COLUMN issyncable BOOLEAN DEFAULT 0'); + } + if (!in_array('allowduplicates', $vtigerTabColumns)) { + $db->pquery('ALTER TABLE vtiger_tab ADD COLUMN allowduplicates BOOLEAN DEFAULT 1'); + } + if (!in_array('sync_action_for_duplicates', $vtigerTabColumns)) { + $db->pquery('ALTER TABLE vtiger_tab ADD COLUMN sync_action_for_duplicates INT(1) DEFAULT 1'); + } + + //Start - Enable prevention for Accounts module + $accounts = 'Accounts'; + $db->pquery('UPDATE vtiger_field SET isunique=? WHERE fieldname=? AND tabid=(SELECT tabid FROM vtiger_tab WHERE name=?)', array(1, 'accountname', $accounts)); + $db->pquery('UPDATE vtiger_tab SET allowduplicates=? WHERE name=?', array(0, $accounts)); + //End - Enable prevention for Accounts module + + $db->pquery('UPDATE vtiger_tab SET issyncable=1', array()); + $em = new VTEventsManager($db); + $em->registerHandler('vtiger.entity.beforesave', 'modules/Vtiger/handlers/CheckDuplicateHandler.php', 'CheckDuplicateHandler'); + + $em = new VTEventsManager($db); + $em->registerHandler('vtiger.entity.beforerestore', 'modules/Vtiger/handlers/CheckDuplicateHandler.php', 'CheckDuplicateHandler'); + echo '<br>Succecssfully handled duplications<br>'; + //END::Duplication Prevention + //Update existing package modules Install_Utils_Model::installModules(); } \ No newline at end of file diff --git a/modules/Potentials/views/SaveConvertPotential.php b/modules/Potentials/views/SaveConvertPotential.php index 5e4110362ba3f6a90c4a6f51d7801db7ebbce22c..1df540874d30954f3064cb992f3061b2191b7d65 100644 --- a/modules/Potentials/views/SaveConvertPotential.php +++ b/modules/Potentials/views/SaveConvertPotential.php @@ -22,10 +22,6 @@ class Potentials_SaveConvertPotential_View extends Vtiger_View_Controller { } } - public function preProcess(Vtiger_Request $request) { - return true; - } - public function process(Vtiger_Request $request) { $recordId = $request->get('record'); $modules = $request->get('modules'); @@ -94,13 +90,20 @@ class Potentials_SaveConvertPotential_View extends Vtiger_View_Controller { function showError($request, $exception=false) { $viewer = $this->getViewer($request); + $moduleName = $request->getModule(); + + $isDupicatesFailure = false; if($exception != false) { $viewer->assign('EXCEPTION', $exception->getMessage()); + if ($exception instanceof DuplicateException) { + $isDupicatesFailure = true; + $viewer->assign('EXCEPTION', $exception->getDuplicationMessage()); + } } - $moduleName = $request->getModule(); $currentUser = Users_Record_Model::getCurrentUserModel(); + $viewer->assign('IS_DUPICATES_FAILURE', $isDupicatesFailure); $viewer->assign('CURRENT_USER', $currentUser); $viewer->assign('MODULE', $moduleName); $viewer->view('ConvertPotentialError.tpl', $moduleName); diff --git a/modules/Settings/LayoutEditor/actions/Field.php b/modules/Settings/LayoutEditor/actions/Field.php index 2c1dc460c0cde9eb76404a887273edd68f94b0c0..a5dcaaf3a99d77f29e4b78fa60b4b82f1fbf4c35 100644 --- a/modules/Settings/LayoutEditor/actions/Field.php +++ b/modules/Settings/LayoutEditor/actions/Field.php @@ -18,6 +18,7 @@ class Settings_LayoutEditor_Field_Action extends Settings_Vtiger_Index_Action { $this->exposeMethod('delete'); $this->exposeMethod('move'); $this->exposeMethod('unHide'); + $this->exposeMethod('updateDuplicateHandling'); } public function add(Vtiger_Request $request) { @@ -191,7 +192,23 @@ class Settings_LayoutEditor_Field_Action extends Settings_Vtiger_Index_Action { $response->emit(); } - + + public function updateDuplicateHandling(Vtiger_Request $request) { + $response = new Vtiger_Response(); + try { + $sourceModule = $request->get('sourceModule'); + $moduleModel = Settings_LayoutEditor_Module_Model::getInstanceByName($sourceModule); + + $fieldIdsList = $request->get('fieldIdsList'); + $result = $moduleModel->updateDuplicateHandling($request->get('rule'), $fieldIdsList, $request->get('syncActionId')); + + $response->setResult($result); + } catch (Exception $e) { + $response->setError($e->getCode(), $e->getMessage()); + } + $response->emit(); + } + public function validateRequest(Vtiger_Request $request) { $request->validateWriteAccess(); } diff --git a/modules/Settings/LayoutEditor/models/Module.php b/modules/Settings/LayoutEditor/models/Module.php index 2c497895c3bba968a5194d5a4e6ed8425d0d712d..65b7fc565f8b168a5c3582424a160ea95d23c80b 100644 --- a/modules/Settings/LayoutEditor/models/Module.php +++ b/modules/Settings/LayoutEditor/models/Module.php @@ -363,6 +363,7 @@ class Settings_LayoutEditor_Module_Model extends Vtiger_Module_Model { for($i=0; $i<$numOfRows; $i++) { $moduleName = $db->query_result($result, $i, 'name'); $modulesList[$moduleName] = vtranslate($moduleName, $moduleName); + //Calendar needs to be shown as TODO so we are translating using Layout editor specific translations if ($moduleName == 'Calendar') { $modulesList[$moduleName] = vtranslate($moduleName, 'Settings:LayoutEditor'); } @@ -457,4 +458,30 @@ class Settings_LayoutEditor_Module_Model extends Vtiger_Module_Model { $result = $db->pquery('SELECT 1 FROM vtiger_relatedlists WHERE relationfieldid=?',array($fieldModel->getId())); return ($db->num_rows($result) > 0) ? self::MANY_TO_ONE : self::ONE_TO_ONE; } + + public function updateDuplicateHandling($rule, $fieldIdsList = array(), $syncActionId = 1) { + $db = PearDatabase::getInstance(); + $tabId = $this->getId(); + + if (!$fieldIdsList) { + $fieldIdsList = array(0); + } + + //Fields Info + if (count($fieldIdsList) < 4) {//Maximum 3 fields are allowed + $query = 'UPDATE vtiger_field SET isunique = CASE WHEN fieldid IN ('. generateQuestionMarks($fieldIdsList).') THEN 1 ELSE 0 END WHERE tabid=?'; + $params = array_merge($fieldIdsList, array($tabId)); + $db->pquery($query, $params); + } + + if (!$syncActionId) { + $syncActionId = 1; + } + + //Rule + $db->pquery('UPDATE vtiger_tab SET allowduplicates=?, sync_action_for_duplicates=? WHERE tabid=?', array($rule, $syncActionId, $tabId)); + Vtiger_Cache::flushModuleCache($this->getName()); + return true; + } + } diff --git a/modules/Settings/LayoutEditor/views/Index.php b/modules/Settings/LayoutEditor/views/Index.php index 716d84d07a56c82f0e79817d774b6564697a5d34..1579cc71d7601c515444615b32039938b7e9a662 100644 --- a/modules/Settings/LayoutEditor/views/Index.php +++ b/modules/Settings/LayoutEditor/views/Index.php @@ -16,10 +16,36 @@ class Settings_LayoutEditor_Index_View extends Settings_Vtiger_Index_View { $this->exposeMethod('showFieldLayout'); $this->exposeMethod('showRelatedListLayout'); $this->exposeMethod('showFieldEdit'); + $this->exposeMethod('showDuplicationHandling'); } public function process(Vtiger_Request $request) { $mode = $request->getMode(); + switch($mode) { + case 'showRelatedListLayout' : $selectedTab = 'relatedListTab'; break; + case 'showDuplicationHandling' : $selectedTab = 'duplicationTab'; break; + default : $selectedTab = 'detailViewTab'; + if (!$mode) { + $mode = 'showFieldLayout'; + } + break; + } + + $sourceModule = $request->get('sourceModule'); + $supportedModulesList = Settings_LayoutEditor_Module_Model::getSupportedModules(); + $supportedModulesList = array_flip($supportedModulesList); + ksort($supportedModulesList); + + $viewer = $this->getViewer($request); + $viewer->assign('MODE', $mode); + $viewer->assign('SELECTED_TAB', $selectedTab); + $viewer->assign('SUPPORTED_MODULES', $supportedModulesList); + $viewer->assign('REQUEST_INSTANCE', $request); + + if ($sourceModule) { + $viewer->assign('SELECTED_MODULE_NAME', $sourceModule); + } + if($this->isMethodExposed($mode)) { $this->invokeExposedMethod($mode, $request); }else { @@ -86,7 +112,11 @@ class Settings_LayoutEditor_Index_View extends Settings_Vtiger_Index_View { $sourceModuleModel = Vtiger_Module_Model::getInstance($sourceModule); $this->setModuleInfo($request, $sourceModuleModel, $cleanFieldModel); - $viewer->view('Index.tpl',$qualifiedModule); + if ($request->isAjax() && !$request->get('showFullContents')) { + $viewer->view('FieldsList.tpl', $qualifiedModule); + } else { + $viewer->view('Index.tpl', $qualifiedModule); + } } public function showRelatedListLayout(Vtiger_Request $request) { @@ -131,7 +161,12 @@ class Settings_LayoutEditor_Index_View extends Settings_Vtiger_Index_View { $viewer->assign('HIDDEN_TAB_EXISTS', $hiddenRelationTabExists); $viewer->assign('MODULE_MODEL', $moduleModel); $viewer->assign('QUALIFIED_MODULE', $qualifiedModule); - $viewer->view('RelatedList.tpl', $qualifiedModule); + + if ($request->isAjax() && !$request->get('showFullContents')) { + $viewer->view('RelatedList.tpl', $qualifiedModule); + } else { + $viewer->view('Index.tpl', $qualifiedModule); + } } public function showFieldEdit(Vtiger_Request $request) { @@ -169,6 +204,40 @@ class Settings_LayoutEditor_Index_View extends Settings_Vtiger_Index_View { $viewer->view('FieldCreate.tpl', $qualifiedModule); } + public function showDuplicationHandling(Vtiger_Request $request) { + $qualifiedModule = $request->getModule(false); + $sourceModuleName = $request->get('sourceModule'); + $moduleModel = Vtiger_Module_Model::getInstance($sourceModuleName); + $blocks = $moduleModel->getBlocks(); + + $fields = array(); + foreach ($blocks as $blockId => $blockModel) { + $blockFields = $blockModel->getFields(); + foreach ($blockFields as $key => $fieldModel) { + if ($fieldModel->isEditable() + && $fieldModel->get('displaytype') != 5 + && !in_array($fieldModel->get('uitype'), array(28, 30, 53, 56, 69, 83)) + && !in_array($fieldModel->getFieldDataType(), array('text', 'multireference'))) { + $fields[$blockModel->get('label')][$fieldModel->getName()] = $fieldModel; + } + } + } + + $viewer = $this->getViewer($request); + $viewer->assign('FIELDS', $fields); + $viewer->assign('SOURCE_MODULE', $sourceModuleName); + $viewer->assign('QUALIFIED_MODULE', $qualifiedModule); + $viewer->assign('SOURCE_MODULE_MODEL', $moduleModel); + $viewer->assign('ACTIONS', Vtiger_Module_Model::getSyncActionsInDuplicatesCheck()); + $viewer->assign('USER_MODEL', Users_Record_Model::getCurrentUserModel()); + + if ($request->isAjax() && !$request->get('showFullContents')) { + $viewer->view('DuplicateHandling.tpl', $qualifiedModule); + } else { + $viewer->view('Index.tpl', $qualifiedModule); + } + } + /** * Function to get the list of Script models to be included * @param Vtiger_Request $request diff --git a/modules/Settings/MailConverter/handlers/MailScannerAction.php b/modules/Settings/MailConverter/handlers/MailScannerAction.php index 2954f5da739e8d6db973037b04cb7ebf50ac1d54..8b8bdd4439adf48420058d7714b95b89882604f7 100644 --- a/modules/Settings/MailConverter/handlers/MailScannerAction.php +++ b/modules/Settings/MailConverter/handlers/MailScannerAction.php @@ -222,11 +222,16 @@ class Vtiger_MailScannerAction { $contact->column_fields['assigned_user_id'] = $mailscannerrule->assigned_to; $contact->column_fields['description'] = $description; $contact->column_fields['source'] = $this->recordSource; - $contact->save('Contacts'); - $this->__SaveAttachements($mailrecord, 'Contacts', $contact); + try { + $contact->save('Contacts'); - return $contact->id; + $this->__SaveAttachements($mailrecord, 'Contacts', $contact); + return $contact->id; + } catch (Exception $e) { + //TODO - Review + return false; + } } /** @@ -249,11 +254,17 @@ class Vtiger_MailScannerAction { $lead->column_fields['assigned_user_id'] = $mailscannerrule->assigned_to; $lead->column_fields['description'] = $description; $lead->column_fields['source'] = $this->recordSource; - $lead->save('Leads'); - $this->__SaveAttachements($mailrecord, 'Leads', $lead); + try { + $lead->save('Leads'); + + $this->__SaveAttachements($mailrecord, 'Leads', $lead); - return $lead->id; + return $lead->id; + } catch (Exception $e) { + //TODO - Review + return false; + } } /** @@ -275,11 +286,16 @@ class Vtiger_MailScannerAction { $account->column_fields['assigned_user_id'] = $mailscannerrule->assigned_to; $account->column_fields['description'] = $description; $account->column_fields['source'] = $this->recordSource; - $account->save('Accounts'); - $this->__SaveAttachements($mailrecord, 'Accounts', $account); + try { + $account->save('Accounts'); + $this->__SaveAttachements($mailrecord, 'Accounts', $account); - return $account->id; + return $account->id; + } catch (Exception $e) { + //TODO - Review + return false; + } } /** @@ -315,18 +331,24 @@ class Vtiger_MailScannerAction { $ticket->column_fields['parent_id'] = $linktoid; $ticket->column_fields['source'] = $this->recordSource; - $ticket->save('HelpDesk'); - // Associate any attachement of the email to ticket - $this->__SaveAttachements($mailrecord, 'HelpDesk', $ticket); + try { + $ticket->save('HelpDesk'); + + // Associate any attachement of the email to ticket + $this->__SaveAttachements($mailrecord, 'HelpDesk', $ticket); - if($contactLinktoid) - $relatedTo = $contactLinktoid; - else - $relatedTo = $linktoid; - $this->linkMail($mailscanner, $mailrecord, $relatedTo); + if($contactLinktoid) + $relatedTo = $contactLinktoid; + else + $relatedTo = $linktoid; + $this->linkMail($mailscanner, $mailrecord, $relatedTo); - return $ticket->id; + return $ticket->id; + } catch (Exception $e) { + //TODO - Review + return false; + } } /** diff --git a/modules/Vtiger/actions/MassSave.php b/modules/Vtiger/actions/MassSave.php index 7ebd215891f0c7f327f6de0415041017b3c9d65f..6ce2075707368ff59dfdd4462472ab6521e69d0c 100644 --- a/modules/Vtiger/actions/MassSave.php +++ b/modules/Vtiger/actions/MassSave.php @@ -21,24 +21,30 @@ class Vtiger_MassSave_Action extends Vtiger_Mass_Action { } public function process(Vtiger_Request $request) { - vglobal('VTIGER_TIMESTAMP_NO_CHANGE_MODE', $request->get('_timeStampNoChangeMode',false)); - $moduleName = $request->getModule(); - $moduleModel = Vtiger_Module_Model::getInstance($moduleName); - $recordModels = $this->getRecordModelsFromRequest($request); - $allRecordSave= true; - foreach($recordModels as $recordId => $recordModel) { - if(Users_Privileges_Model::isPermitted($moduleName, 'Save', $recordId)) { - $recordModel->save(); + $response = new Vtiger_Response(); + try { + vglobal('VTIGER_TIMESTAMP_NO_CHANGE_MODE', $request->get('_timeStampNoChangeMode',false)); + $moduleName = $request->getModule(); + $moduleModel = Vtiger_Module_Model::getInstance($moduleName); + $recordModels = $this->getRecordModelsFromRequest($request); + $allRecordSave= true; + foreach($recordModels as $recordId => $recordModel) { + if(Users_Privileges_Model::isPermitted($moduleName, 'Save', $recordId)) { + $recordModel->save(); + } else { + $allRecordSave= false; + } + } + vglobal('VTIGER_TIMESTAMP_NO_CHANGE_MODE', false); + if($allRecordSave) { + $response->setResult(true); } else { - $allRecordSave= false; + $response->setResult(false); } - } - vglobal('VTIGER_TIMESTAMP_NO_CHANGE_MODE', false); - $response = new Vtiger_Response(); - if($allRecordSave) { - $response->setResult(true); - } else { - $response->setResult(false); + } catch (DuplicateException $e) { + $response->setError($e->getMessage(), $e->getDuplicationMessage(), $e->getMessage()); + } catch (Exception $e) { + $response->setError($e->getMessage()); } $response->emit(); } diff --git a/modules/Vtiger/actions/ProcessDuplicates.php b/modules/Vtiger/actions/ProcessDuplicates.php index 9ac98421660dafdd49ed009578f76ab6001ece08..74e98275d20d547e197bf6ea2d134e9861026038 100644 --- a/modules/Vtiger/actions/ProcessDuplicates.php +++ b/modules/Vtiger/actions/ProcessDuplicates.php @@ -24,37 +24,48 @@ class Vtiger_ProcessDuplicates_Action extends Vtiger_Action_Controller { } function process (Vtiger_Request $request) { + global $skipDuplicateCheck; $moduleName = $request->getModule(); $moduleModel = Vtiger_Module_Model::getInstance($moduleName); $records = $request->get('records'); $primaryRecord = $request->get('primaryRecord'); $primaryRecordModel = Vtiger_Record_Model::getInstanceById($primaryRecord, $moduleName); - $fields = $moduleModel->getFields(); - foreach($fields as $field) { - $fieldValue = $request->get($field->getName()); - if($field->isEditable()) { - if($field->uitype==71){ - $fieldValue = CurrencyField::convertToUserFormat($fieldValue); + $response = new Vtiger_Response(); + try { + $skipDuplicateCheckOldValue = $skipDuplicateCheck; + $skipDuplicateCheck = true; + + $fields = $moduleModel->getFields(); + foreach($fields as $field) { + $fieldValue = $request->get($field->getName()); + if($field->isEditable()) { + if($field->uitype == 71) { + $fieldValue = CurrencyField::convertToUserFormat($fieldValue); + } + $primaryRecordModel->set($field->getName(), $fieldValue); } - $primaryRecordModel->set($field->getName(), $fieldValue); } - } - $primaryRecordModel->set('mode', 'edit'); - $primaryRecordModel->save(); + $primaryRecordModel->set('mode', 'edit'); + $primaryRecordModel->save(); - $deleteRecords = array_diff($records, array($primaryRecord)); - foreach($deleteRecords as $deleteRecord) { - $recordPermission = Users_Privileges_Model::isPermitted($moduleName, 'Delete', $deleteRecord); - if($recordPermission) { - $primaryRecordModel->transferRelationInfoOfRecords(array($deleteRecord)); - $record = Vtiger_Record_Model::getInstanceById($deleteRecord); - $record->delete(); + $deleteRecords = array_diff($records, array($primaryRecord)); + foreach($deleteRecords as $deleteRecord) { + $recordPermission = Users_Privileges_Model::isPermitted($moduleName, 'Delete', $deleteRecord); + if($recordPermission) { + $primaryRecordModel->transferRelationInfoOfRecords(array($deleteRecord)); + $record = Vtiger_Record_Model::getInstanceById($deleteRecord); + $record->delete(); + } } - } + $skipDuplicateCheck = $skipDuplicateCheckOldValue; - $response = new Vtiger_Response(); - $response->setResult(true); + $response->setResult(true); + } catch (DuplicateException $e) { + $response->setError($e->getMessage(), $e->getDuplicationMessage(), $e->getMessage()); + } catch (Exception $e) { + $response->setError($e->getMessage()); + } $response->emit(); } diff --git a/modules/Vtiger/actions/Save.php b/modules/Vtiger/actions/Save.php index 635a47a8c24adbc8b8c13c0f2e2ec3e8b53b713f..b05191ac42ac28b785528207dc0f2fcf86ee33aa 100644 --- a/modules/Vtiger/actions/Save.php +++ b/modules/Vtiger/actions/Save.php @@ -36,27 +36,55 @@ class Vtiger_Save_Action extends Vtiger_Action_Controller { } public function process(Vtiger_Request $request) { - $recordModel = $this->saveRecord($request); - if ($request->get('returntab_label')){ - $loadUrl = 'index.php?'.$request->getReturnURL(); - } else if($request->get('relationOperation')) { - $parentModuleName = $request->get('sourceModule'); - $parentRecordId = $request->get('sourceRecord'); - $parentRecordModel = Vtiger_Record_Model::getInstanceById($parentRecordId, $parentModuleName); - //TODO : Url should load the related list instead of detail view of record - $loadUrl = $parentRecordModel->getDetailViewUrl(); - } else if ($request->get('returnToList')) { - $loadUrl = $recordModel->getModule()->getListViewUrl(); - } else if ($request->get('returnmodule') && $request->get('returnview')) { - $loadUrl = 'index.php?'.$request->getReturnURL(); - } else { - $loadUrl = $recordModel->getDetailViewUrl(); - } - $appName = $request->get('appName'); - if(strlen($appName) > 0){ - $loadUrl = $loadUrl.$appName; + try { + $recordModel = $this->saveRecord($request); + if ($request->get('returntab_label')){ + $loadUrl = 'index.php?'.$request->getReturnURL(); + } else if($request->get('relationOperation')) { + $parentModuleName = $request->get('sourceModule'); + $parentRecordId = $request->get('sourceRecord'); + $parentRecordModel = Vtiger_Record_Model::getInstanceById($parentRecordId, $parentModuleName); + //TODO : Url should load the related list instead of detail view of record + $loadUrl = $parentRecordModel->getDetailViewUrl(); + } else if ($request->get('returnToList')) { + $loadUrl = $recordModel->getModule()->getListViewUrl(); + } else if ($request->get('returnmodule') && $request->get('returnview')) { + $loadUrl = 'index.php?'.$request->getReturnURL(); + } else { + $loadUrl = $recordModel->getDetailViewUrl(); + } + //append App name to callback url + //Special handling for vtiger7. + $appName = $request->get('appName'); + if(strlen($appName) > 0){ + $loadUrl = $loadUrl.$appName; + } + header("Location: $loadUrl"); + } catch (DuplicateException $e) { + $requestData = $request->getAll(); + $moduleName = $request->getModule(); + unset($requestData['action']); + unset($requestData['__vtrftk']); + + if ($request->isAjax()) { + $response = new Vtiger_Response(); + $response->setError($e->getMessage(), $e->getDuplicationMessage(), $e->getMessage()); + $response->emit(); + } else { + $requestData['view'] = 'Edit'; + $requestData['duplicateRecords'] = $e->getDuplicateRecordIds(); + $moduleModel = Vtiger_Module_Model::getInstance($moduleName); + + global $vtiger_current_version; + $viewer = new Vtiger_Viewer(); + + $viewer->assign('REQUEST_DATA', $requestData); + $viewer->assign('REQUEST_URL', $moduleModel->getCreateRecordUrl().'&record='.$request->get('record')); + $viewer->view('RedirectToEditView.tpl', 'Vtiger'); + } + } catch (Exception $e) { + throw new Exception($e->getMessage()); } - header("Location: $loadUrl"); } /** @@ -66,12 +94,12 @@ class Vtiger_Save_Action extends Vtiger_Action_Controller { */ public function saveRecord($request) { $recordModel = $this->getRecordModelFromRequest($request); - if($request->get('imgDeleted')) { - $imageIds = $request->get('imageid'); - foreach($imageIds as $imageId) { - $status = $recordModel->deleteImage($imageId); - } - } + if($request->get('imgDeleted')) { + $imageIds = $request->get('imageid'); + foreach($imageIds as $imageId) { + $status = $recordModel->deleteImage($imageId); + } + } $recordModel->save(); if($request->get('relationOperation')) { $parentModuleName = $request->get('sourceModule'); @@ -86,7 +114,7 @@ class Vtiger_Save_Action extends Vtiger_Action_Controller { $relationModel = Vtiger_Relation_Model::getInstance($parentModuleModel, $relatedModule); $relationModel->addRelation($parentRecordId, $relatedRecordId); } - $this->savedRecordId = $recordModel->getId(); + $this->savedRecordId = $recordModel->getId(); return $recordModel; } diff --git a/modules/Vtiger/actions/SaveAjax.php b/modules/Vtiger/actions/SaveAjax.php index 113e88669d05d1bfec83963e9c9267c1beb510b4..a4f1ba290cb345c98b5eab5c56a7e55e651e4cf6 100644 --- a/modules/Vtiger/actions/SaveAjax.php +++ b/modules/Vtiger/actions/SaveAjax.php @@ -11,52 +11,61 @@ class Vtiger_SaveAjax_Action extends Vtiger_Save_Action { public function process(Vtiger_Request $request) { - vglobal('VTIGER_TIMESTAMP_NO_CHANGE_MODE', $request->get('_timeStampNoChangeMode',false)); - $recordModel = $this->saveRecord($request); - vglobal('VTIGER_TIMESTAMP_NO_CHANGE_MODE', false); + $fieldToBeSaved = $request->get('field'); + $response = new Vtiger_Response(); + try { + vglobal('VTIGER_TIMESTAMP_NO_CHANGE_MODE', $request->get('_timeStampNoChangeMode',false)); + $recordModel = $this->saveRecord($request); + vglobal('VTIGER_TIMESTAMP_NO_CHANGE_MODE', false); - $fieldModelList = $recordModel->getModule()->getFields(); - $result = array(); - $picklistColorMap = array(); - foreach ($fieldModelList as $fieldName => $fieldModel) { - $recordFieldValue = $recordModel->get($fieldName); - if(is_array($recordFieldValue) && $fieldModel->getFieldDataType() == 'multipicklist') { - foreach ($recordFieldValue as $picklistValue) { - $picklistColorMap[$picklistValue] = Settings_Picklist_Module_Model::getPicklistColorByValue($fieldName, $picklistValue); + $fieldModelList = $recordModel->getModule()->getFields(); + $result = array(); + $picklistColorMap = array(); + foreach ($fieldModelList as $fieldName => $fieldModel) { + $recordFieldValue = $recordModel->get($fieldName); + if(is_array($recordFieldValue) && $fieldModel->getFieldDataType() == 'multipicklist') { + foreach ($recordFieldValue as $picklistValue) { + $picklistColorMap[$picklistValue] = Settings_Picklist_Module_Model::getPicklistColorByValue($fieldName, $picklistValue); + } + $recordFieldValue = implode(' |##| ', $recordFieldValue); + } + if($fieldModel->getFieldDataType() == 'picklist') { + $picklistColorMap[$recordFieldValue] = Settings_Picklist_Module_Model::getPicklistColorByValue($fieldName, $recordFieldValue); + } + $fieldValue = $displayValue = Vtiger_Util_Helper::toSafeHTML($recordFieldValue); + if ($fieldModel->getFieldDataType() !== 'currency' && $fieldModel->getFieldDataType() !== 'datetime' && $fieldModel->getFieldDataType() !== 'date' && $fieldModel->getFieldDataType() !== 'double') { + $displayValue = $fieldModel->getDisplayValue($fieldValue, $recordModel->getId()); + } + if ($fieldModel->getFieldDataType() == 'currency') { + $displayValue = Vtiger_Currency_UIType::transformDisplayValue($fieldValue); + } + if(!empty($picklistColorMap)) { + $result[$fieldName] = array('value' => $fieldValue, 'display_value' => $displayValue, 'colormap' => $picklistColorMap); + } else { + $result[$fieldName] = array('value' => $fieldValue, 'display_value' => $displayValue); } - $recordFieldValue = implode(' |##| ', $recordFieldValue); - } - if($fieldModel->getFieldDataType() == 'picklist') { - $picklistColorMap[$recordFieldValue] = Settings_Picklist_Module_Model::getPicklistColorByValue($fieldName, $recordFieldValue); - } - $fieldValue = $displayValue = Vtiger_Util_Helper::toSafeHTML($recordFieldValue); - if ($fieldModel->getFieldDataType() !== 'currency' && $fieldModel->getFieldDataType() !== 'datetime' && $fieldModel->getFieldDataType() !== 'date' && $fieldModel->getFieldDataType() !== 'double') { - $displayValue = $fieldModel->getDisplayValue($fieldValue, $recordModel->getId()); - } - if ($fieldModel->getFieldDataType() == 'currency') { - $displayValue = Vtiger_Currency_UIType::transformDisplayValue($fieldValue); } - if(!empty($picklistColorMap)) { - $result[$fieldName] = array('value' => $fieldValue, 'display_value' => $displayValue, 'colormap' => $picklistColorMap); - } else { - $result[$fieldName] = array('value' => $fieldValue, 'display_value' => $displayValue); + + //Handling salutation type + if ($request->get('field') === 'firstname' && in_array($request->getModule(), array('Contacts', 'Leads'))) { + $salutationType = $recordModel->getDisplayValue('salutationtype'); + $firstNameDetails = $result['firstname']; + $firstNameDetails['display_value'] = $salutationType. " " .$firstNameDetails['display_value']; + if ($salutationType != '--None--') $result['firstname'] = $firstNameDetails; } - } - //Handling salutation type - if ($request->get('field') === 'firstname' && in_array($request->getModule(), array('Contacts', 'Leads'))) { - $salutationType = $recordModel->getDisplayValue('salutationtype'); - $firstNameDetails = $result['firstname']; - $firstNameDetails['display_value'] = $salutationType. " " .$firstNameDetails['display_value']; - if ($salutationType != '--None--') $result['firstname'] = $firstNameDetails; + // removed decode_html to eliminate XSS vulnerability + $result['_recordLabel'] = decode_html($recordModel->getName()); + $result['_recordId'] = $recordModel->getId(); + $response->setEmitType(Vtiger_Response::$EMIT_JSON); + $response->setResult($result); + } catch (DuplicateException $e) { + $response->setError($e->getMessage(), $e->getDuplicationMessage(), $e->getMessage()); + } catch (DisplayException $e) { + $response->setError(null, $e->getDisplayMessage(), $e->getMessage()); + } catch (Exception $e) { + $response->setError($e->getMessage()); } - - // removed decode_html to eliminate XSS vulnerability - $result['_recordLabel'] = decode_html($recordModel->getName()); - $result['_recordId'] = $recordModel->getId(); - $response = new Vtiger_Response(); - $response->setEmitType(Vtiger_Response::$EMIT_JSON); - $response->setResult($result); $response->emit(); } diff --git a/modules/Vtiger/handlers/CheckDuplicateHandler.php b/modules/Vtiger/handlers/CheckDuplicateHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..5247a637bcdad8336a4133dce2ad13cdcd82cd87 --- /dev/null +++ b/modules/Vtiger/handlers/CheckDuplicateHandler.php @@ -0,0 +1,240 @@ +<?php +/* +********************************************************************************** + * The contents of this file are subject to the vtiger CRM Public License Version 1.1 + * ("License"); You may not use this file except in compliance with the License + * The Original Code is: vtiger CRM Open Source + * The Initial Developer of the Original Code is vtiger. + * Portions created by vtiger are Copyright (C) vtiger. + * All Rights Reserved. + * ***********************************************************************************/ + +require_once 'include/events/VTEventHandler.inc'; + +class CheckDuplicateHandler extends VTEventHandler { + + function handleEvent($eventName, $entityData) { + if ($eventName == 'vtiger.entity.beforesave') { + $this->triggerCheckDuplicateHandler($entityData); + } else if ($eventName == 'vtiger.entity.beforerestore') { + $this->triggerCheckDuplicateHandler($entityData); + } + } + + public function triggerCheckDuplicateHandler($entityData) { + global $skipDuplicateCheck; + $fieldValues = $entityData->getData(); + + $moduleName = $entityData->getModuleName(); + if ($moduleName == 'Activity') { + $moduleName = ($fieldValues['activitytype'] == 'Task') ? 'Calendar' : 'Events'; + } + + $moduleModel = Vtiger_Module_Model::getInstance($moduleName); + if (!$moduleModel->allowDuplicates && !$skipDuplicateCheck) { + $fields = $moduleModel->getFields(); + + if ($moduleName == 'Events') { + $moduleModel = Vtiger_Module_Model::getInstance('Calendar'); + } + + $baseTableName = $moduleModel->get('basetable'); + $baseTableId = $moduleModel->get('basetableid'); + $crmentityTable = 'vtiger_crmentity'; + $tabIndexes = $entityData->focus->tab_name_index; + + $uniqueFields = array(); + $tablesList = array(); + foreach ($fields as $fieldName => $fieldModel) { + if ($fieldModel->isUniqueField() && $fieldModel->isEditable()) { + $uniqueFields[$fieldName] = $fieldModel; + + if (in_array($moduleName, array('Events', 'Calendar')) && in_array($fieldName, array('date_start', 'due_date'))) { + $timeField = 'time_start'; + if ($fieldName === 'due_date') { + $timeField = 'time_end'; + } + $uniqueFields[$timeField] = $fields[$timeField]; + } + + $fieldTableName = $fieldModel->get('table'); + if (!in_array($fieldTableName, array($baseTableName, $crmentityTable)) && $tabIndexes && $tabIndexes[$fieldTableName]) { + $tablesList[$fieldTableName] = $tabIndexes[$fieldTableName]; + } + } + } + + if (count($uniqueFields) > 0) { + $checkDuplicates = false; + $uniqueFieldsData = array(); + foreach ($uniqueFields as $fieldName => $fieldModel) { + $fieldDataType = $fieldModel->getFieldDataType(); + $fieldValue = $fieldValues[$fieldName]; + + switch ($fieldDataType) { + case 'reference' : if ($fieldValue == 0) { + $fieldValue = ''; + } + break; + case 'date' : + case 'currency' : + case 'multipicklist': if ($fieldValue) { + $fieldValue = $fieldModel->getDBInsertValue($fieldValue); + } + break; + } + + if ($fieldValue !== '' && $fieldValue !== NULL) { + if ($fieldDataType == 'currency') { + $countedDigits = 8; + if ($fieldModel->isCustomField()) { + $countedDigits = 5; + } + $fieldValue = round($fieldValue, $countedDigits); + } + + $uniqueFieldsData[$fieldName] = $fieldValue; + $checkDuplicates = true; + } + } + + if ($checkDuplicates) { + $db = PearDatabase::getInstance(); + $recordId = $entityData->getId(); + + $query = "SELECT $crmentityTable.crmid, $crmentityTable.label FROM $crmentityTable INNER JOIN $baseTableName ON $baseTableName.$baseTableId = $crmentityTable.crmid"; + foreach ($tablesList as $tableName => $tabIndex) { + if ($moduleName == 'Calendar' || $moduleName == 'Events') { + $query .= " LEFT JOIN $tableName ON $tableName.$tabIndex = $baseTableName.$baseTableId"; + } else { + //INNER JOIN used instead of LEFT JOIN because all fields should be match + $query .= " INNER JOIN $tableName ON $tableName.$tabIndex = $baseTableName.$baseTableId"; + } + } + $query .= " WHERE $crmentityTable.deleted = ?"; + + $params = array(0); + $conditions = array(); + foreach ($uniqueFields as $fieldName => $fieldModel) { + $fieldTableName = $fieldModel->get('table'); + $fieldColumnName = $fieldModel->get('column'); + + // For Calendar Start Date & Time or End Date & Time we need to concat date and time fields to search + if (in_array($moduleName, array('Events', 'Calendar')) && in_array($fieldName, array('date_start', 'due_date', 'time_start', 'time_end'))) { + if (in_array($fieldName, array('time_start', 'time_end'))) { + continue; + } + + $dateFieldColumnName = 'date_start'; + $timeFieldColumnName = 'time_start'; + if ($fieldName == 'due_date') { + $dateFieldColumnName = 'due_date'; + $timeFieldColumnName = 'time_end'; + } + + $condition = "CONCAT($fieldTableName.$dateFieldColumnName,' ',$fieldTableName.$timeFieldColumnName) = ?"; + array_push($conditions, $condition); + $params[] = trim(implode(" ", array($uniqueFieldsData[$dateFieldColumnName], $uniqueFieldsData[$timeFieldColumnName]))); + continue; + } + + $fieldValue = $uniqueFieldsData[$fieldName]; + if (isset($fieldValue)) { + array_push($conditions, "$fieldTableName.$fieldColumnName = ?"); + } else { + $fieldValue = ''; + array_push($conditions, "($fieldTableName.$fieldColumnName = ? OR $fieldTableName.$fieldColumnName IS NULL)"); + } + $params[] = $fieldValue; + + if ($fieldModel->get('uitype') == 72) { + array_push($conditions, "$fieldTableName.currency_id = ?"); + $currencyIdDetails = split('curname', $_REQUEST['base_currency']); + $params[] = $currencyIdDetails[1]; + } + } + + if (count($conditions) > 0) { + $conditionGlue = ($moduleModel->duplicateCondition == 'all') ? 'AND' : 'OR'; + $conditionsSql = implode(" $conditionGlue ", $conditions); + $query .= " AND ($conditionsSql)"; + } + + if ($recordId) { + $query .= " AND $crmentityTable.crmid != ?"; + $params[] = $recordId; + } + + if ($moduleName == 'Events') { + $query .= " AND $baseTableName.activitytype NOT IN (?, ?)"; + array_push($params, 'Task', 'Emails'); + } else if ($moduleName == 'Calendar') { + $query .= " AND $baseTableName.activitytype = ?"; + array_push($params, 'Task'); + } else { + $query .= " AND $crmentityTable.setype = ?"; + array_push($params, $moduleName); + + if ($moduleName == 'Leads' || $moduleName == 'Potentials') { + $query .= " AND $baseTableName.converted = 0"; + } + } + $query .= ' LIMIT 6'; + + $result = $db->pquery($query, $params); + + $duplicateRecordsList = array(); + while ($result && $row = $db->fetch_array($result)) { + $duplicateRecordsList[$row['crmid']] = $row['label']; + } + + if (count($duplicateRecordsList) > 0) { + $exception = new DuplicateException(vtranslate('LBL_DUPLICATES_DETECTED')); + $exception->setModule($moduleName) + ->setDuplicateRecordLabels($duplicateRecordsList) + ->setDuplicateRecordIds(array_keys($duplicateRecordsList)); + throw $exception; + } + } + } + } + } +} + +class DuplicateException extends Exception { + + private $duplicateRecordIds; + public function setDuplicateRecordIds(array $duplicateRecordIds) { + $this->duplicateRecordIds = $duplicateRecordIds; + return $this; + } + + public function getDuplicateRecordIds() { + return $this->duplicateRecordIds; + } + + private $duplicateRecordLabels; + public function setDuplicateRecordLabels(array $duplicateRecordLabels) { + $this->duplicateRecordLabels = $duplicateRecordLabels; + return $this; + } + + public function getDuplicateRecordLabels() { + return $this->duplicateRecordLabels; + } + + private $module; + public function setModule($module) { + $this->module = $module; + return $this; + } + + public function getModule() { + return $this->module; + } + + public function getDuplicationMessage() { + $moduleName = $this->getModule(); + $duplicateRecordsList = $this->getDuplicateRecordIds(); + return getDuplicatesPreventionMessage($moduleName, $duplicateRecordsList); + } +} \ No newline at end of file diff --git a/modules/Vtiger/models/Field.php b/modules/Vtiger/models/Field.php index c84a1483d590f5e09578da71ff3e8dd21ca33252..dea6331f1ad960e05fa95b4e421713af95377e1d 100644 --- a/modules/Vtiger/models/Field.php +++ b/modules/Vtiger/models/Field.php @@ -1340,4 +1340,8 @@ class Vtiger_Field_Model extends Vtiger_Field { } return $picklistColors; } + + public function isUniqueField() { + return $this->isunique; + } } diff --git a/modules/Vtiger/models/Module.php b/modules/Vtiger/models/Module.php index a7cfb474d2ccfe07a600a6eaaf4b8acd0acae22b..ed27e611ba88895504e30696a730f3f6c46a819c 100644 --- a/modules/Vtiger/models/Module.php +++ b/modules/Vtiger/models/Module.php @@ -1696,14 +1696,22 @@ class Vtiger_Module_Model extends Vtiger_Module { public function transferRecordsOwnership($transferOwnerId, $relatedModuleRecordIds){ + $moduleName = $this->getName(); foreach($relatedModuleRecordIds as $recordId) { - $recordModel = Vtiger_Record_Model::getInstanceById($recordId); - $recordModel->set('assigned_user_id', $transferOwnerId); - $recordModel->set('mode', 'edit'); - // Transferring ownership with related module as Inventory modules, removes line item details. - // So setting $_REQUEST['ajxaction'] to DETAILVIEW - $_REQUEST['ajxaction'] = 'DETAILVIEW'; - $recordModel->save(); + if(Users_Privileges_Model::isPermitted($moduleName, 'Save', $recordId)) { + try { + $recordModel = Vtiger_Record_Model::getInstanceById($recordId); + $recordModel->set('assigned_user_id', $transferOwnerId); + $recordModel->set('mode', 'edit'); + // Transferring ownership with related module as Inventory modules, removes line item details. + // So setting $_REQUEST['ajxaction'] to DETAILVIEW + $_REQUEST['ajxaction'] = 'DETAILVIEW'; + $recordModel->save(); + } catch (DuplicateException $e) { + return $e->getDuplicationMessage(); + } catch (Exception $e) { + } + } } } @@ -1965,4 +1973,17 @@ class Vtiger_Module_Model extends Vtiger_Module { return true; } + + public static function getSyncActionsInDuplicatesCheck() { + return array( 1 => 'LBL_PREFER_LATEST_RECORD', + 2 => 'LBL_PREFER_INTERNAL_RECORD', +// 3 => 'LBL_PREFER_VTIGER_RECORD', + 4 => 'LBL_PREFER_EXTERNAL_RECORD'); + } + + + public function isFieldsDuplicateCheckAllowed() { + return true; + } + } diff --git a/modules/Vtiger/views/Edit.php b/modules/Vtiger/views/Edit.php index 84c30b0299b244d772733a9aa2ee1f3e4c086889..365ec5271c4d7529bb640bd3d7c80e5517b1cbe8 100644 --- a/modules/Vtiger/views/Edit.php +++ b/modules/Vtiger/views/Edit.php @@ -63,8 +63,16 @@ Class Vtiger_Edit_View extends Vtiger_Index_View { $viewer->assign('RECORD',$recordModel); } + $duplicateRecordsList = array(); + $duplicateRecords = $request->get('duplicateRecords'); + if (is_array($duplicateRecords)) { + $duplicateRecordsList = $duplicateRecords; + } + + $viewer = $this->getViewer($request); + $viewer->assign('DUPLICATE_RECORDS', $duplicateRecordsList); parent::preProcess($request, $display); - } + } public function process(Vtiger_Request $request) { $viewer = $this->getViewer ($request); diff --git a/modules/com_vtiger_workflow/tasks/VTCreateEntityTask.inc b/modules/com_vtiger_workflow/tasks/VTCreateEntityTask.inc index f9fb860dd9a3378a285654027eb43009a6113bdd..5647bb580e449d620f88bb8f3cc49296f5639a98 100644 --- a/modules/com_vtiger_workflow/tasks/VTCreateEntityTask.inc +++ b/modules/com_vtiger_workflow/tasks/VTCreateEntityTask.inc @@ -178,15 +178,26 @@ class VTCreateEntityTask extends VTTask { // To handle cyclic process $newEntity->_from_workflow = true; $newEntity->column_fields['source'] = 'WORKFLOW'; - - //If the module triggering workflow and new entity we are creating are same, Then it might end up in infinite loop. - //So we need to call saveentity than save in order to avoid workflow triggering for new entity - if($moduleName == $entityType) { //TODO: Need to check for conditions as well, If new entity satisfies current workflow conditions and triggers same workflow - $newEntity->saveentity($entityType); - } else{ - $newEntity->save($entityType); + try { + + //If the module triggering workflow and new entity we are creating are same, Then it might end up in infinite loop. + //So we need to call saveentity than save in order to avoid workflow triggering for new entity + if($moduleName == $entityType) { //TODO: Need to check for conditions as well, If new entity satisfies current workflow conditions and triggers same workflow + $newEntity->saveentity($entityType); + } else{ + $newEntity->save($entityType); + } + relateEntities($focus, $moduleName, $recordId, $entityType, $newEntity->id); + } catch (DuplicateException $e) { + $workFlowManager = new VTWorkflowManager($adb); + $workFlow = $workFlowManager->retrieve($this->workflowId); + + $mailBody = vtranslate('LBL_DUPLICATION_FAILURE_FROM_WORKFLOWS', $entityType, vtranslate('SINGLE_'.$entityType, $entityType), + decode_html($workFlow->workflowname), vtranslate('SINGLE_'.$entityType, $entityType)); + sendMailToUserOnDuplicationPrevention($entityType, $newEntity->column_fields, $mailBody); + } catch (Exception $e) { } - relateEntities($focus, $moduleName, $recordId, $entityType, $newEntity->id); + $util->revertUser(); } $util->revertUser(); diff --git a/modules/com_vtiger_workflow/tasks/VTCreateEventTask.inc b/modules/com_vtiger_workflow/tasks/VTCreateEventTask.inc index 8073b96d1ff9dd610cffb05151cf9380876fd4d6..d7ae89b5d6e12323caeca5437b12426760f0ebee 100644 --- a/modules/com_vtiger_workflow/tasks/VTCreateEventTask.inc +++ b/modules/com_vtiger_workflow/tasks/VTCreateEventTask.inc @@ -52,7 +52,8 @@ class VTCreateEventTask extends VTTask{ $userId = vtws_getWebserviceEntityId('Users', Users::getActiveAdminId()); } - $moduleName = $entityData->getModuleName(); + $moduleName = 'Events'; + $parentModuleName = $entityData->getModuleName(); $adminUser = $this->getAdmin(); $startDate = $this->calculateDate($entityData, $this->startDays, @@ -108,7 +109,7 @@ class VTCreateEventTask extends VTTask{ $fields['visibility'] = ucfirst($sharedType); $id = $entityData->getId(); - if($moduleName=='Contacts'){ + if($parentModuleName=='Contacts'){ $fields['contact_id'] = $id; }else{ $data = vtws_describe('Calendar', $adminUser); @@ -120,12 +121,12 @@ class VTCreateEventTask extends VTTask{ } $refersTo = $parentIdField['type']['refersTo']; - if(in_array($moduleName, $refersTo)){ + if(in_array($parentModuleName, $refersTo)){ $fields['parent_id'] = $id; } } - $entityModuleHandler = vtws_getModuleHandlerFromName('Events', $current_user); + $entityModuleHandler = vtws_getModuleHandlerFromName($moduleName, $current_user); $handlerMeta = $entityModuleHandler->getMeta(); $moduleFields = $handlerMeta->getModuleFields(); foreach ($moduleFields as $name => $fieldModel) { @@ -173,48 +174,59 @@ class VTCreateEventTask extends VTTask{ unset($fields['recurringtype']); } - $fields['source'] = 'WORKFLOW'; - $event = vtws_create('Events', $fields, $adminUser); - $eventIdDetails = vtws_getIdComponents($event['id']); - $entityIdDetails = vtws_getIdComponents($id); + try { + $fields['source'] = 'WORKFLOW'; + $event = vtws_create($moduleName, $fields, $adminUser); + $eventIdDetails = vtws_getIdComponents($event['id']); + $entityIdDetails = vtws_getIdComponents($id); - relateEntities(CRMEntity::getInstance($moduleName), $moduleName, $entityIdDetails[1], 'Calendar', $eventIdDetails[1]); + relateEntities(CRMEntity::getInstance($parentModuleName), $parentModuleName, $entityIdDetails[1], 'Calendar', $eventIdDetails[1]); - $handler = vtws_getModuleHandlerFromName('Events', $adminUser); - $meta = $handler->getMeta(); - $recordValues = DataTransform::sanitizeForInsert($event,$meta); - list($typeId, $id) = vtws_getIdComponents($event['id']); - $event = CRMEntity::getInstance('Events'); - $event->id = $id; - foreach($recordValues as $recordFieldname => $recordFieldValue){ - $event->column_fields[$recordFieldname] = $recordFieldValue; - } - $event->column_fields['id'] = $event->id; - - if($this->recurringcheck && !empty($startDate) && - ($this->calendar_repeat_limit_date)) { - // Added this to relate these events to parent module. - $_REQUEST['createmode'] = 'link'; - $_REQUEST['return_module'] = $moduleName; - $_REQUEST['return_id'] = $entityIdDetails[1]; - - //repeatFromRequest calling getrecurringObjValue(), api expecting UserTimeZone values, so converting to UserTimeZone values - $startDateObj = DateTimeField::convertToUserTimeZone($startDate . ' ' . self::convertToDBFormat($this->startTime)); - $_REQUEST['date_start'] = $startDateObj->format('Y-m-d'); - $_REQUEST['time_start'] = $startDateObj->format('H:i'); - $endDateObj = DateTimeField::convertToUserTimeZone($endDate . ' ' . self::convertToDBFormat($this->endTime)); - $_REQUEST['due_date'] = $endDateObj->format('Y-m-d'); - $_REQUEST['time_end'] = $endDateObj->format('H:i'); - //comparing date_start with recurring dates, which are in the format of Y-m-d always - $event->column_fields['date_start'] = $startDateObj->format('Y-m-d'); - $event->column_fields['due_date'] = $endDateObj->format('Y-m-d'); - - include_once 'modules/Calendar/RepeatEvents.php'; - Calendar_RepeatEvents::repeatFromRequest($event, false); + $handler = vtws_getModuleHandlerFromName($moduleName, $adminUser); + $meta = $handler->getMeta(); + $recordValues = DataTransform::sanitizeForInsert($event,$meta); + list($typeId, $id) = vtws_getIdComponents($event['id']); + $event = CRMEntity::getInstance($moduleName); + $event->id = $id; + foreach($recordValues as $recordFieldname => $recordFieldValue){ + $event->column_fields[$recordFieldname] = $recordFieldValue; + } + $event->column_fields['id'] = $event->id; + + if($this->recurringcheck && !empty($startDate) && + ($this->calendar_repeat_limit_date)) { + // Added this to relate these events to parent module. + $_REQUEST['createmode'] = 'link'; + $_REQUEST['return_module'] = $parentModuleName; + $_REQUEST['return_id'] = $entityIdDetails[1]; + + //repeatFromRequest calling getrecurringObjValue(), api expecting UserTimeZone values, so converting to UserTimeZone values + $startDateObj = DateTimeField::convertToUserTimeZone($startDate . ' ' . self::convertToDBFormat($this->startTime)); + $_REQUEST['date_start'] = $startDateObj->format('Y-m-d'); + $_REQUEST['time_start'] = $startDateObj->format('H:i'); + $endDateObj = DateTimeField::convertToUserTimeZone($endDate . ' ' . self::convertToDBFormat($this->endTime)); + $_REQUEST['due_date'] = $endDateObj->format('Y-m-d'); + $_REQUEST['time_end'] = $endDateObj->format('H:i'); + //comparing date_start with recurring dates, which are in the format of Y-m-d always + $event->column_fields['date_start'] = $startDateObj->format('Y-m-d'); + $event->column_fields['due_date'] = $endDateObj->format('Y-m-d'); - $_REQUEST['createmode'] = ''; + include_once 'modules/Calendar/RepeatEvents.php'; + Calendar_RepeatEvents::repeatFromRequest($event, false); + $_REQUEST['createmode'] = ''; + + } + } catch (DuplicateException $e) { + $workFlowManager = new VTWorkflowManager($adb); + $workFlow = $workFlowManager->retrieve($this->workflowId); + + $mailBody = vtranslate('LBL_DUPLICATION_FAILURE_FROM_WORKFLOWS', $moduleName, vtranslate('SINGLE_'.$moduleName, $moduleName), + decode_html($workFlow->workflowname), vtranslate('SINGLE_'.$moduleName, $moduleName)); + sendMailToUserOnDuplicationPrevention($moduleName, $fields, $mailBody); + } catch (Exception $e) { } + global $current_user; $current_user = $this->originalUser; } diff --git a/modules/com_vtiger_workflow/tasks/VTCreateTodoTask.inc b/modules/com_vtiger_workflow/tasks/VTCreateTodoTask.inc index be456c0c36aaea475821f9d7328b9bc99b2e7f4d..7f1018b6cf091edf632a93cbd5c4c8c4d878aacc 100644 --- a/modules/com_vtiger_workflow/tasks/VTCreateTodoTask.inc +++ b/modules/com_vtiger_workflow/tasks/VTCreateTodoTask.inc @@ -35,7 +35,8 @@ class VTCreateTodoTask extends VTTask{ } public function doTask($entityData){ - if(!vtlib_isModuleActive('Calendar')) { + $moduleName = 'Calendar'; + if(!vtlib_isModuleActive($moduleName)) { return; } global $adb, $current_user; @@ -115,13 +116,13 @@ class VTCreateTodoTask extends VTTask{ 'visibility'=>'Private', 'eventstatus'=>'' ); - $moduleName = $entityData->getModuleName(); + $parentModuleName = $entityData->getModuleName(); $adminUser = $this->getAdmin(); $id = $entityData->getId(); - if($moduleName=='Contacts'){ + if($parentModuleName=='Contacts'){ $fields['contact_id'] = $id; }else{ - $data = vtws_describe('Calendar', $adminUser); + $data = vtws_describe($moduleName, $adminUser); $fieldInfo = $data['fields']; foreach($fieldInfo as $field){ if($field['name']=='parent_id'){ @@ -130,12 +131,12 @@ class VTCreateTodoTask extends VTTask{ } $refersTo = $parentIdField['type']['refersTo']; - if(in_array($moduleName, $refersTo)){ + if(in_array($parentModuleName, $refersTo)){ $fields['parent_id'] = $id; } } - $entityModuleHandler = vtws_getModuleHandlerFromName('Calendar', $current_user); + $entityModuleHandler = vtws_getModuleHandlerFromName($moduleName, $current_user); $handlerMeta = $entityModuleHandler->getMeta(); $mandatoryFields = $handlerMeta->getMandatoryFields(); $moduleFields = $handlerMeta->getModuleFields(); @@ -169,12 +170,22 @@ class VTCreateTodoTask extends VTTask{ } } - $fields['source'] = 'WORKFLOW'; - $todo = vtws_create('Calendar', $fields, $adminUser); - $todoIdDetails = vtws_getIdComponents($todo['id']); - $entityIdDetails = vtws_getIdComponents($id); - - relateEntities(CRMEntity::getInstance($moduleName), $moduleName, $entityIdDetails[1], 'Calendar', $todoIdDetails[1]); + try { + $fields['source'] = 'WORKFLOW'; + $todo = vtws_create($moduleName, $fields, $adminUser); + $todoIdDetails = vtws_getIdComponents($todo['id']); + $entityIdDetails = vtws_getIdComponents($id); + + relateEntities(CRMEntity::getInstance($parentModuleName), $parentModuleName, $entityIdDetails[1], $moduleName, $todoIdDetails[1]); + } catch (DuplicateException $e) { + $workFlowManager = new VTWorkflowManager($adb); + $workFlow = $workFlowManager->retrieve($this->workflowId); + + $mailBody = vtranslate('LBL_DUPLICATION_FAILURE_FROM_WORKFLOWS', $moduleName, vtranslate('SINGLE_'.$moduleName, $moduleName), + decode_html($workFlow->workflowname), vtranslate('SINGLE_'.$moduleName, $moduleName)); + sendMailToUserOnDuplicationPrevention($moduleName, $fields, $mailBody); + } catch (Exception $e) { + } global $current_user; $current_user = $this->originalUser; diff --git a/pkg/vtiger/modules/Google/modules/Google/handlers/Vtiger.php b/pkg/vtiger/modules/Google/modules/Google/handlers/Vtiger.php index b48f230ae1cee5c2119638c4741b4c3bd110c65f..8e018df161f4046f31705c57fe508687f427158b 100644 --- a/pkg/vtiger/modules/Google/modules/Google/handlers/Vtiger.php +++ b/pkg/vtiger/modules/Google/modules/Google/handlers/Vtiger.php @@ -82,6 +82,7 @@ class Google_Vtiger_Handler extends vtigerCRMHandler { $updatedRecords = $recordDetails['updated']; $deletedRecords = $recordDetails['deleted']; $recordDetails['skipped'] = array(); + $updateDuplicateRecords = array(); if (count($createdRecords) > 0) { $createdRecords = $this->translateReferenceFieldNamesToIds($createdRecords, $user); @@ -96,11 +97,28 @@ class Google_Vtiger_Handler extends vtigerCRMHandler { try { $createdRecords[$index] = vtws_create($record['module'], $record, $this->user); - } catch (Exception $ex) { - $recordDetails['skipped'][] = array('record' => $createdRecords[$index], - 'messageidentifier' => '', - 'message' => $ex->getMessage()); - continue; + } catch (DuplicateException $e) { + $skipped = true; + $duplicateRecordIds = $e->getDuplicateRecordIds(); + $duplicatesResult = $this->triggerSyncActionForDuplicate($record, $duplicateRecordIds); + + if ($duplicatesResult) { + $updateDuplicateRecords[$index] = $duplicatesResult; + $skipped = false; + } + if ($skipped) { + $recordDetails['skipped'][] = array('record' => $createdRecords[$index], + 'messageidentifier' => '', + 'message' => $e->getMessage()); + } + unset($createdRecords[$index]); + continue; + } catch (Exception $e) { + $recordDetails['skipped'][] = array('record' => $createdRecords[$index], + 'messageidentifier' => '', + 'message' => $e->getMessage()); + unset($createdRecords[$index]); + continue; } } @@ -148,13 +166,34 @@ class Google_Vtiger_Handler extends vtigerCRMHandler { } else { $this->assignToChangedRecords[$index] = $record; } + } catch (DuplicateException $e) { + $skipped = true; + $duplicateRecordIds = $e->getDuplicateRecordIds(); + $duplicatesResult = $this->triggerSyncActionForDuplicate($record, $duplicateRecordIds); + + if ($duplicatesResult) { + $updateDuplicateRecords[$index] = $duplicatesResult; + $skipped = false; + } + if ($skipped) { + $recordDetails['skipped'][] = array('record' => $updatedRecords[$index], + 'messageidentifier' => '', + 'message' => $e->getMessage()); + } + unset($updatedRecords[$index]); + continue; } catch (Exception $e) { $recordDetails['skipped'][] = array('record' => $updatedRecords[$index], 'messageidentifier' => '', 'message' => $e->getMessage()); + unset($updatedRecords[$index]); continue; } } + foreach ($updateDuplicateRecords as $index => $record) { + $updatedRecords[$index] = $record; + } + $hasDeleteAccess = null; $deletedCrmIds = array(); foreach ($deletedRecords as $index => $record) { @@ -187,7 +226,7 @@ class Google_Vtiger_Handler extends vtigerCRMHandler { } catch (Exception $e) { $recordDetails['skipped'][] = array('record' => $deletedRecords[$index], 'messageidentifier' => '', - 'message' => $ex->getMessage()); + 'message' => $e->getMessage()); continue; } } diff --git a/pkg/vtiger/modules/Google/modules/Google/models/Contacts.php b/pkg/vtiger/modules/Google/modules/Google/models/Contacts.php index 559f4e0dde023fe780508604f89a10910c4e74d8..fba79a4aeded700e37e45f5dcf7660cc2861e0fe 100644 --- a/pkg/vtiger/modules/Google/modules/Google/models/Contacts.php +++ b/pkg/vtiger/modules/Google/modules/Google/models/Contacts.php @@ -168,38 +168,42 @@ class Google_Contacts_Model extends WSAPP_SyncRecordModel { $db = PearDatabase::getInstance(); $result = $db->pquery("SELECT crmid FROM vtiger_crmentity WHERE label = ? AND deleted = ? AND setype = ?", array($orgName, 0, 'Accounts')); if($db->num_rows($result) < 1) { - $accountModel = Vtiger_Module_Model::getInstance('Accounts'); - $recordModel = Vtiger_Record_Model::getCleanInstance('Accounts'); - - $fieldInstances = Vtiger_Field_Model::getAllForModule($accountModel); - foreach($fieldInstances as $blockInstance) { - foreach($blockInstance as $fieldInstance) { - $fieldName = $fieldInstance->getName(); - $fieldValue = $recordModel->get($fieldName); - if(empty($fieldValue)) { - $defaultValue = $fieldInstance->getDefaultFieldValue(); - if($defaultValue) { - $recordModel->set($fieldName, decode_html($defaultValue)); - } - if($fieldInstance->isMandatory() && !$defaultValue) { - $randomValue = Vtiger_Util_Helper::getDefaultMandatoryValue($fieldInstance->getFieldDataType()); - if($fieldInstance->getFieldDataType() == 'picklist' || $fieldInstance->getFieldDataType() == 'multipicklist') { - $picklistValues = $fieldInstance->getPicklistValues(); - $randomValue = reset($picklistValues); - } - $recordModel->set($fieldName, $randomValue); - } - } - } - } - $recordModel->set('mode', ''); - $recordModel->set('accountname', $orgName); - $recordModel->set('assigned_user_id', $userId); - $recordModel->set('source', 'GOOGLE'); - if($description) { - $recordModel->set('description', $description); - } - $recordModel->save(); + try { + $accountModel = Vtiger_Module_Model::getInstance('Accounts'); + $recordModel = Vtiger_Record_Model::getCleanInstance('Accounts'); + + $fieldInstances = Vtiger_Field_Model::getAllForModule($accountModel); + foreach($fieldInstances as $blockInstance) { + foreach($blockInstance as $fieldInstance) { + $fieldName = $fieldInstance->getName(); + $fieldValue = $recordModel->get($fieldName); + if(empty($fieldValue)) { + $defaultValue = $fieldInstance->getDefaultFieldValue(); + if($defaultValue) { + $recordModel->set($fieldName, decode_html($defaultValue)); + } + if($fieldInstance->isMandatory() && !$defaultValue) { + $randomValue = Vtiger_Util_Helper::getDefaultMandatoryValue($fieldInstance->getFieldDataType()); + if($fieldInstance->getFieldDataType() == 'picklist' || $fieldInstance->getFieldDataType() == 'multipicklist') { + $picklistValues = $fieldInstance->getPicklistValues(); + $randomValue = reset($picklistValues); + } + $recordModel->set($fieldName, $randomValue); + } + } + } + } + $recordModel->set('mode', ''); + $recordModel->set('accountname', $orgName); + $recordModel->set('assigned_user_id', $userId); + $recordModel->set('source', 'GOOGLE'); + if($description) { + $recordModel->set('description', $description); + } + $recordModel->save(); + } catch (Exception $e) { + //TODO - Review + } } return $orgName; } diff --git a/pkg/vtiger/modules/Google/modules/Google/views/List.php b/pkg/vtiger/modules/Google/modules/Google/views/List.php index 16a245f2a38b1d58ad3f16b8dc1d34215967c7e2..3570e508fd0562dd7289f9744a3b579ffb71d00a 100644 --- a/pkg/vtiger/modules/Google/modules/Google/views/List.php +++ b/pkg/vtiger/modules/Google/modules/Google/views/List.php @@ -60,7 +60,7 @@ class Google_List_View extends Vtiger_PopupAjax_View { $oauth2 = new Google_Oauth2_Connector($sourceModule); if ($request->has('oauth_verifier')) { try { - $oauth->getHttpClient($sourceModule); + $oauth2->getHttpClient($sourceModule); } catch (Exception $e) { $viewer->assign('DENY', true); } @@ -168,7 +168,8 @@ class Google_List_View extends Vtiger_PopupAjax_View { * @return array */ public function getSyncRecordsCount($syncRecords) { - $countRecords = array('vtiger' => array('update' => 0, 'create' => 0, 'delete' => 0), 'google' => array('update' => 0, 'create' => 0, 'delete' => 0)); + $countRecords = array( 'vtiger' => array('update' => 0, 'create' => 0, 'delete' => 0), + 'google' => array('update' => 0, 'create' => 0, 'delete' => 0)); foreach ($syncRecords as $key => $records) { if ($key == 'push') { $pushRecord = false; diff --git a/pkg/vtiger/modules/MailManager/layouts/v7/modules/MailManager/resources/List.js b/pkg/vtiger/modules/MailManager/layouts/v7/modules/MailManager/resources/List.js index b4db3b16eba124ed7dca00ed38fa385387d545eb..03030ec0f9ceb0f3c6da1cc93978dc493e0b7d8d 100644 --- a/pkg/vtiger/modules/MailManager/layouts/v7/modules/MailManager/resources/List.js +++ b/pkg/vtiger/modules/MailManager/layouts/v7/modules/MailManager/resources/List.js @@ -1348,15 +1348,22 @@ Vtiger_List_Js("MailManager_List_Js", {}, { } app.request.post({data:formData}).then(function(err,data){ - app.event.trigger("post.QuickCreateForm.save",data,jQuery(form).serializeFormData()); - if(err === null) { - app.helper.hideModal(); - app.helper.showSuccessNotification({"message":''}); - invokeParams.callbackFunction(data, err); - }else{ - app.helper.showErrorNotification({"message":err}); - } - }); + if(err === null) { + if (!data.error) { + jQuery('.vt-notification').remove(); + app.event.trigger("post.QuickCreateForm.save",data,jQuery(form).serializeFormData()); + app.helper.hideModal(); + app.helper.showSuccessNotification({"message":app.vtranslate('JS_RECORD_CREATED')}); + invokeParams.callbackFunction(data, err); + } else { + jQuery("button[name='saveButton']").removeAttr('disabled'); + app.event.trigger('post.save.failed', data); + } + }else{ + app.event.trigger("post.QuickCreateForm.save",data,jQuery(form).serializeFormData()); + app.helper.showErrorNotification({"message":err}); + } + }); } }; form.vtValidate(params); diff --git a/pkg/vtiger/modules/MailManager/modules/MailManager/views/Relation.php b/pkg/vtiger/modules/MailManager/modules/MailManager/views/Relation.php index 1c6287be77f447db2712df64e9235504291d38ca..08806c44ec57e1612c3a5dea3875fc0d0e50f9f9 100755 --- a/pkg/vtiger/modules/MailManager/modules/MailManager/views/Relation.php +++ b/pkg/vtiger/modules/MailManager/modules/MailManager/views/Relation.php @@ -339,6 +339,8 @@ class MailManager_Relation_View extends MailManager_Abstract_View { $viewer->assign('FOLDER', $foldername); $response->setResult( array( 'ui' => $viewer->view( 'Relationship.tpl', 'MailManager', true ) ) ); + } catch (DuplicateException $e) { + $response->setResult(array('ui' => '', 'error' => $e, 'title' => $e->getMessage(), 'message' => $e->getDuplicationMessage())); } catch(Exception $e) { $response->setResult( array( 'ui' => '', 'error' => $e )); } diff --git a/pkg/vtiger/modules/Projects/Project/layouts/v7/modules/Project/ShowChart.tpl b/pkg/vtiger/modules/Projects/Project/layouts/v7/modules/Project/ShowChart.tpl index 0aad47ce08fb5fde95c6e20f420563701dbacd16..c485a4ac5c7c2c9b3adee9effdaf87418ead30fc 100644 --- a/pkg/vtiger/modules/Projects/Project/layouts/v7/modules/Project/ShowChart.tpl +++ b/pkg/vtiger/modules/Projects/Project/layouts/v7/modules/Project/ShowChart.tpl @@ -17,7 +17,6 @@ {/foreach} </style> {if !empty($PROJECT_TASKS['tasks'])} - <h3> {vtranslate('LBL_PROGRESS_CHART',$MODULE)} </h3> <div class="pull-right" style="margin-right: 5px;"> <span style="margin: 2px;"> <button class="btn textual zoomOut" title="zoom out"> diff --git a/pkg/vtiger/modules/Projects/Project/layouts/v7/modules/Project/resources/Detail.js b/pkg/vtiger/modules/Projects/Project/layouts/v7/modules/Project/resources/Detail.js index 44fc0a9337b525787664051ec1d1bdd4c9972bd4..f4cb45167391cbe164ac67335e0d18268eede29f 100644 --- a/pkg/vtiger/modules/Projects/Project/layouts/v7/modules/Project/resources/Detail.js +++ b/pkg/vtiger/modules/Projects/Project/layouts/v7/modules/Project/resources/Detail.js @@ -385,11 +385,16 @@ Vtiger_Detail_Js("Project_Detail_Js",{ form = jQuery(form); if(form.attr('id') == 'projectTaskQuickEditForm') { app.helper.showProgress(); - thisInstance.saveTask(form).then(function() { + thisInstance.saveTask(form).then(function(err, data) { app.helper.hideProgress(); - app.helper.hideModal(); - // to reload chart - jQuery('[data-label-key=Chart]').click(); + if (err === null) { + jQuery('.vt-notification').remove(); + app.helper.hideModal(); + // to reload chart + jQuery('[data-label-key=Chart]').click(); + } else { + app.event.trigger('post.save.failed', err); + } }); } }, @@ -421,8 +426,13 @@ Vtiger_Detail_Js("Project_Detail_Js",{ } app.helper.showProgress(); app.request.post({data: params}).then( - function(error, data) { + function(error, data) { app.helper.hideProgress(); + if (error === null) { + jQuery('.vt-notification').remove(); + } else { + app.event.trigger('post.save.failed', error); + } } ); } @@ -515,7 +525,7 @@ Vtiger_Detail_Js("Project_Detail_Js",{ app.request.post({data: formData}).then( function(error, data) { //TODO: App Message should be shown - aDeferred.resolve(data); + aDeferred.resolve(error, data); }, function(textStatus, errorThrown) { aDeferred.reject(textStatus, errorThrown); diff --git a/pkg/vtiger/modules/Projects/ProjectTask/modules/ProjectTask/actions/SaveTask.php b/pkg/vtiger/modules/Projects/ProjectTask/modules/ProjectTask/actions/SaveTask.php index bb71a866178f8a899757780f4a8035d168e079c5..e4a9dc27a6481eff85e439ed7b0564bcb81ea20f 100644 --- a/pkg/vtiger/modules/Projects/ProjectTask/modules/ProjectTask/actions/SaveTask.php +++ b/pkg/vtiger/modules/Projects/ProjectTask/modules/ProjectTask/actions/SaveTask.php @@ -11,10 +11,15 @@ class ProjectTask_SaveTask_Action extends Vtiger_Save_Action { public function process(Vtiger_Request $request) { - $recordModel = $this->saveRecord($request); - $response = new Vtiger_Response(); - $response->setResult(array('record'=>$recordModel->getId(), 'module'=>$recordModel->getModuleName())); + try { + $recordModel = $this->saveRecord($request); + $response->setResult(array('record' => $recordModel->getId(), 'module' => $recordModel->getModuleName())); + } catch (DuplicateException $e) { + $response->setError($e->getMessage(), $e->getDuplicationMessage(), $e->getMessage()); + } catch (Exception $e) { + $response->setError($e->getMessage()); + } $response->emit(); } diff --git a/pkg/vtiger/modules/RecycleBin/layouts/v7/modules/RecycleBin/resources/List.js b/pkg/vtiger/modules/RecycleBin/layouts/v7/modules/RecycleBin/resources/List.js index 44632d0c1bd85a20dd2a167f5c51ac404d796183..c846201f6acb9d1f2048fbebabb55673701e2429 100644 --- a/pkg/vtiger/modules/RecycleBin/layouts/v7/modules/RecycleBin/resources/List.js +++ b/pkg/vtiger/modules/RecycleBin/layouts/v7/modules/RecycleBin/resources/List.js @@ -69,17 +69,24 @@ Vtiger_List_Js("RecycleBin_List_Js", { app.helper.showConfirmationBox({'message': message}).then( function (e) { var sourceModule = jQuery('#sourceModule').val(); - var restoreURL = url + '&viewname=' + cvId + '&selected_ids=' + selectedIds + '&excluded_ids=' + excludedIds + '&mode=restoreRecords&sourceModule=' + sourceModule; + var restoreURL = url + '&viewname=' + cvId + '&selected_ids=' + selectedIds + '&excluded_ids=' + excludedIds + '&mode=restoreRecords&sourceModule=' + sourceModule+"&search_params="+JSON.stringify(listInstance.getListSearchParams()); app.helper.showProgress(); - app.request.post({url: restoreURL}).then( - function (error, data) { - if (data) { - app.helper.hideProgress(); - var instance = new RecycleBin_List_Js(); - instance.recycleBinActionPostOperations(data); - } + app.request.post({url: restoreURL}).then(function (error, data) { + app.helper.hideProgress(); + if (error === null) { + jQuery('.vt-notification').remove(); + var moduleLabel = data.modulelabel; + if (!moduleLabel) { + moduleLabel = app.vtranslate('SINGLE_' + sourceModule); } - ); + var instance = new RecycleBin_List_Js(); + instance.recycleBinActionPostOperations(data); + var successNote = app.vtranslate('JS_RECORDS_RESTORED', selectedIdsArray.length, moduleLabel); + app.helper.showSuccessNotification({'message': successNote}); + } else { + app.event.trigger('post.save.failed', error); + } + }); }, function (error, err) { }) @@ -119,19 +126,20 @@ Vtiger_List_Js("RecycleBin_List_Js", { } app.helper.showProgress(); app.request.post({data: postData}).then( - function (error, data) { - if (data) { - app.helper.hideProgress(); - var instance = new RecycleBin_List_Js(); - instance.recycleBinActionPostOperations(data); - } + function (error, data) { + if (data) { + app.helper.hideProgress(); + var instance = new RecycleBin_List_Js(); + instance.recycleBinActionPostOperations(data); } + } ); }, function (error, err) { }); }, restoreAction: function (recordId, restoreExternalFile) { + var aDeferred = jQuery.Deferred(); var recordId = RecycleBin_List_Js.convertToJsonString(recordId); var listInstance = Vtiger_List_Js.getInstance(); var sourceModule = jQuery('#sourceModule').val(); @@ -152,13 +160,19 @@ Vtiger_List_Js("RecycleBin_List_Js", { app.helper.showProgress(); app.request.post({data: postData}).then( function (error, data) { - if (data) { - app.helper.hideProgress(); + app.helper.hideProgress(); + if (error === null) { + jQuery('.vt-notification').remove(); var instance = new RecycleBin_List_Js(); instance.recycleBinActionPostOperations(data); + aDeferred.resolve(data); + } else { + app.event.trigger('post.save.failed', error); + aDeferred.resolve(data); } } ); + return aDeferred.promise(); }, /** * Function to restore a record diff --git a/pkg/vtiger/modules/RecycleBin/modules/RecycleBin/actions/RecycleBinAjax.php b/pkg/vtiger/modules/RecycleBin/modules/RecycleBin/actions/RecycleBinAjax.php index 5dc5ae5691ed8c106a7acf8a8ec8b40164f756e6..0d8b141f3d770279e786e63ff180dc202d269624 100644 --- a/pkg/vtiger/modules/RecycleBin/modules/RecycleBin/actions/RecycleBinAjax.php +++ b/pkg/vtiger/modules/RecycleBin/modules/RecycleBin/actions/RecycleBinAjax.php @@ -60,10 +60,18 @@ class RecycleBin_RecycleBinAjax_Action extends Vtiger_Mass_Action { $response = new Vtiger_Response(); if ($recordIds) { - $recycleBinModule->restore($sourceModule, $recordIds); + try { + $recycleBinModule->restore($sourceModule, $recordIds); + $response->setResult(array(true)); + } catch (DuplicateException $e) { + $response->setError($e->getMessage(), $e->getDuplicationMessage(), $e->getMessage()); + } catch (Exception $e) { + $response->setError($e->getMessage()); + } + } else { $response->setResult(array(true)); } - + $response->emit(); } diff --git a/pkg/vtiger/modules/WSAPP/modules/WSAPP/Handlers/OutlookVtigerCRMHandler.php b/pkg/vtiger/modules/WSAPP/modules/WSAPP/Handlers/OutlookVtigerCRMHandler.php index d87a08051b3f93d0be3df721bc5a6b776746dfa5..3798bb7e8ffc64a8a6b3061ea81474c592f66749 100644 --- a/pkg/vtiger/modules/WSAPP/modules/WSAPP/Handlers/OutlookVtigerCRMHandler.php +++ b/pkg/vtiger/modules/WSAPP/modules/WSAPP/Handlers/OutlookVtigerCRMHandler.php @@ -52,8 +52,13 @@ class OutlookVtigerCRMHandler extends vtigerCRMHandler{ * array of records */ foreach ($createRecord as $key => $record) { - $result = vtws_create($record['module'], $record, $user); - $entityNameIds[$refFieldValue] = $result['id']; + try { + $result = vtws_create($record['module'], $record, $user); + $entityNameIds[$refFieldValue] = $result['id']; + } catch (Exception $e) { + unset($entityNameIds[$refFieldValue]); + continue; + } } $recordInfo[$referenceFieldName] = $entityNameIds[$refFieldValue]; } @@ -183,7 +188,12 @@ class OutlookVtigerCRMHandler extends vtigerCRMHandler{ if($record['module'] == "Events" && isset($record['attendees'])){ $record = $this->relateEventandContacts($record); } - $createdRecords[$index] = vtws_create($record['module'], $record, $this->user); + try { + $createdRecords[$index] = vtws_create($record['module'], $record, $this->user); + } catch (Exception $e) { + unset($createdRecords[$index]); + continue; + } } if (count($updatedRecords) > 0) { diff --git a/pkg/vtiger/modules/WSAPP/modules/WSAPP/Handlers/vtigerCRMHandler.php b/pkg/vtiger/modules/WSAPP/modules/WSAPP/Handlers/vtigerCRMHandler.php index 88283528f1082eabd9dd6c389e6bde4c693d5422..e2c00c4075536225a26b6b76b49b639950171ec0 100644 --- a/pkg/vtiger/modules/WSAPP/modules/WSAPP/Handlers/vtigerCRMHandler.php +++ b/pkg/vtiger/modules/WSAPP/modules/WSAPP/Handlers/vtigerCRMHandler.php @@ -53,8 +53,7 @@ class vtigerCRMHandler extends SyncHandler { $createdRecords = $recordDetails['created']; $updatedRecords = $recordDetails['updated']; $deletedRecords = $recordDetails['deleted']; - $recordDetails['skipped'] = array(); - + $updateDuplicateRecords = array(); if (count($createdRecords) > 0) { $createdRecords = $this->translateReferenceFieldNamesToIds($createdRecords, $user); @@ -63,13 +62,30 @@ class vtigerCRMHandler extends SyncHandler { } foreach ($createdRecords as $index => $record) { try { - $createdRecords[$index] = vtws_create($record['module'], $record, $this->user); - } catch (Exception $ex) { - $recordDetails['skipped'][] = array('record' => $createdRecords[$index], - 'messageidentifier' => '', - 'message' => $ex->getMessage()); - continue; - } + $createdRecords[$index] = vtws_create($record['module'], $record, $this->user); + } catch (DuplicateException $e) { + $skipped = true; + $duplicateRecordIds = $e->getDuplicateRecordIds(); + $duplicatesResult = $this->triggerSyncActionForDuplicate($record, $duplicateRecordIds); + + if ($duplicatesResult) { + $updateDuplicateRecords[$index] = $duplicatesResult; + $skipped = false; + } + if ($skipped) { + $recordDetails['skipped'][] = array('record' => $createdRecords[$index], + 'messageidentifier' => '', + 'message' => $e->getMessage()); + } + unset($createdRecords[$index]); + continue; + } catch (Exception $e) { + $recordDetails['skipped'][] = array('record' => $createdRecords[$index], + 'messageidentifier' => '', + 'message' => $e->getMessage()); + unset($createdRecords[$index]); + continue; + } } if (count($updatedRecords) > 0) { @@ -107,13 +123,35 @@ class vtigerCRMHandler extends SyncHandler { } else { $this->assignToChangedRecords[$index] = $record; } + } catch (DuplicateException $e) { + $skipped = true; + $duplicateRecordIds = $e->getDuplicateRecordIds(); + $duplicatesResult = $this->triggerSyncActionForDuplicate($record, $duplicateRecordIds); + + if ($duplicatesResult) { + $updateDuplicateRecords[$index] = $duplicatesResult; + $skipped = false; + } + if ($skipped) { + $recordDetails['skipped'][] = array('record' => $updatedRecords[$index], + 'messageidentifier' => '', + 'message' => $e->getMessage()); + } + unset($updatedRecords[$index]); + continue; } catch (Exception $e) { $recordDetails['skipped'][] = array('record' => $updatedRecords[$index], 'messageidentifier' => '', - 'message' => $ex->getMessage()); + 'message' => $e->getMessage()); + unset($updatedRecords[$index]); continue; } } + + foreach ($updateDuplicateRecords as $index => $record) { + $updatedRecords[$index] = $record; + } + $hasDeleteAccess = null; $deletedCrmIds = array(); foreach ($deletedRecords as $index => $record) { @@ -146,7 +184,8 @@ class vtigerCRMHandler extends SyncHandler { } catch (Exception $e) { $recordDetails['skipped'][] = array('record' => $deletedRecords[$index], 'messageidentifier' => '', - 'message' => $ex->getMessage()); + 'message' => $e->getMessage()); + unset($deletedRecords[$index]); continue; } } @@ -429,6 +468,63 @@ class vtigerCRMHandler extends SyncHandler { public function isClientUserAndGroupSyncType() { return ($this->clientSyncType == 'userandgroup') ? true : false; } + + public function triggerSyncActionForDuplicate($recordData, $duplicateRecordIds) { + $db = PearDatabase::getInstance(); + $result = array(); + $user = $this->user; + $moduleName = $recordData['module']; + $moduleModel = Vtiger_Module_Model::getInstance($moduleName); + + if ($moduleModel && $moduleModel->isSyncable) { + $webSeviceModuleModel = VtigerWebserviceObject::fromName($db, $moduleName); + $moduleId = $webSeviceModuleModel->getEntityId(); + + $recordId = $recordData['id']; + $recordIdComponents = vtws_getIdComponents($recordId); + if (count($recordIdComponents) == 2 && in_array($moduleId, $recordIdComponents)) { + return array(); } + $elemId = reset($duplicateRecordIds); + $recordId = vtws_getId($moduleId, $elemId); + try { + $vtigerRecordData = vtws_retrieve($recordId, $user); + } catch (Exception $e) { + return $result; + } + global $skipDuplicateCheck; + $skipDuplicateCheck = true; + switch ($moduleModel->syncActionForDuplicate) { + case 1 : //Prefer latest record + $finalRecordData = $vtigerRecordData; + if ($recordData['modifiedtime'] > $vtigerRecordData['modifiedtime']) { + $finalRecordData = $recordData; + $finalRecordData['id'] = $recordId; + $finalRecordData = vtws_revise($finalRecordData, $user); + } + $result = $finalRecordData; + break; +// case 3 : //Prefer Vtiger Record +// $result = $vtigerRecordData; +// break; + case 4 : //Prefer external record + $recordData['id'] = $recordId; + foreach ($recordData as $fieldName => $fieldValue) { + if (!$fieldValue) { + unset($recordData[$fieldName]); + } + } + $result = vtws_revise($recordData, $user); + break; + case 2 : //Prefer internal record + default : $result = array(); + break; + } + $skipDuplicateCheck = false; + } + return $result; + } + +} ?> diff --git a/pkg/vtiger/modules/WSAPP/modules/WSAPP/SyncServer.php b/pkg/vtiger/modules/WSAPP/modules/WSAPP/SyncServer.php index 7fabd50ccaa29cefc5f033768333aea868e29d15..7a7ddbc32de0904dab306f4576c88d80d191c2d1 100644 --- a/pkg/vtiger/modules/WSAPP/modules/WSAPP/SyncServer.php +++ b/pkg/vtiger/modules/WSAPP/modules/WSAPP/SyncServer.php @@ -141,7 +141,7 @@ class SyncServer { else if ($mode == $this->update) $this->idmap_update($appid, $serverid, $clientid, $clientModifiedTime,$serverModifiedTime,$serverAppId); else if($mode==$this->save){ - $result = $db->pquery("SELECT * FROM vtiger_wsapp_recordmapping WHERE appid=? and serverid=? and clientid=?",array($appid,$serverid,$clientid)); + $result = $db->pquery("SELECT 1 FROM vtiger_wsapp_recordmapping WHERE appid=? and serverid=? and clientid=?",array($appid,$serverid,$clientid)); if($db->num_rows($result)<=0) $this->idmap_create($appid, $serverid, $clientid, $clientModifiedTime,$serverModifiedTime,$serverAppId); else @@ -319,7 +319,7 @@ class SyncServer { $nextSyncDeleteRecords = $this->destHandler->getAssignToChangedRecords(); foreach($result['created'] as $clientRecordId=>$record){ - $this->idmap_put($appid, $record['id'], $clientRecordId,$clientModifiedTimeList[$clientRecordId],$record['modifiedtime'],$serverAppId,$this->create); + $this->idmap_put($appid, $record['id'], $clientRecordId,$clientModifiedTimeList[$clientRecordId],$record['modifiedtime'],$serverAppId); $responseRecord = $record; $responseRecord['_id'] = $record['id']; $responseRecord['id'] = $clientRecordId; @@ -328,7 +328,7 @@ class SyncServer { $response['created'][] = $responseRecord; } foreach($result['updated'] as $clientRecordId=>$record){ - $this->idmap_put($appid, $record['id'], $clientRecordId,$clientModifiedTimeList[$clientRecordId],$record['modifiedtime'],$serverAppId,$this->update); + $this->idmap_put($appid, $record['id'], $clientRecordId,$clientModifiedTimeList[$clientRecordId],$record['modifiedtime'],$serverAppId); $responseRecord = $record; $responseRecord['_id'] = $record['id']; $responseRecord['id'] = $clientRecordId; @@ -452,7 +452,7 @@ class SyncServer { $serverAppId = $this->appid_with_key($serverKey); //$lookups = $this->idmap_get_clientmap($appid, array_values($createDetails)); foreach ($createDetails as $clientid => $serverDetails) { - $this->idmap_put( $appid, $serverDetails['serverid'], $clientid,$serverDetails['modifiedtime'],$serverDetails['_modifiedtime'],$serverAppId,$this->create); + $this->idmap_put( $appid, $serverDetails['serverid'], $clientid,$serverDetails['modifiedtime'],$serverDetails['_modifiedtime'],$serverAppId); } foreach($updatedDetails as $clientid=>$serverDetails){ $this->idmap_updateMapDetails( $appid, $clientid,$serverDetails['modifiedtime'],$serverDetails['_modifiedtime'],$this->update); diff --git a/pkg/vtiger/modules/WSAPP/modules/WSAPP/WorkFlowHandlers/WSAPPAssignToTracker.php b/pkg/vtiger/modules/WSAPP/modules/WSAPP/WorkFlowHandlers/WSAPPAssignToTracker.php index 82bf44e9f41e11a1d006d7145bb4743442b1ee23..5dd586ac627a0f219951456803771d4a780d3e70 100644 --- a/pkg/vtiger/modules/WSAPP/modules/WSAPP/WorkFlowHandlers/WSAPPAssignToTracker.php +++ b/pkg/vtiger/modules/WSAPP/modules/WSAPP/WorkFlowHandlers/WSAPPAssignToTracker.php @@ -19,15 +19,15 @@ class WSAPPAssignToTracker extends VTEventHandler{ } function handleEvent($eventName, $entityData) { + $user = Users::getActiveAdminUser(); global $current_user; + $current_user = $user; $db = PearDatabase::getInstance(); $moduleName = $entityData->getModuleName(); - //Specific to VAS if ($moduleName == 'Users') { return; } - //END $recordId = $entityData->getId(); $vtEntityDelta = new VTEntityDelta (); diff --git a/pkg/vtiger/modules/Webforms/modules/Webforms/capture.php b/pkg/vtiger/modules/Webforms/modules/Webforms/capture.php index d63fde131a84b7b6674ec138609843f24be462fb..1c3e1995489a77d4529117da8e78a6208d189f22 100644 --- a/pkg/vtiger/modules/Webforms/modules/Webforms/capture.php +++ b/pkg/vtiger/modules/Webforms/modules/Webforms/capture.php @@ -115,6 +115,15 @@ class Webform_Capture { $this->sendResponse($returnURL, 'ok'); return; + } catch (DuplicateException $e) { + $sourceModule = $webform->getTargetModule(); + $mailBody = vtranslate('LBL_DUPLICATION_FAILURE_FROM_WEBFORMS', $sourceModule, vtranslate('SINGLE_'.$sourceModule, $sourceModule), $webform->getName(), vtranslate('SINGLE_'.$sourceModule, $sourceModule)); + + $userModel = Users_Record_Model::getInstanceFromPreferenceFile($user->id); + sendMailToUserOnDuplicationPrevention($sourceModule, $parameters, $mailBody, $userModel); + + $this->sendResponse($returnURL, false, $e->getMessage()); + return; } catch (Exception $e) { $this->sendResponse($returnURL, false, $e->getMessage()); return; diff --git a/pkg/vtiger/translations/Arabic_ar_ae/modules/Calendar.php b/pkg/vtiger/translations/Arabic_ar_ae/modules/Calendar.php index 878697d7484facf8302d1574d5a4faf7527a95d8..fa0e7035ceaf4d9daaad5927c720a1e92f45266c 100644 --- a/pkg/vtiger/translations/Arabic_ar_ae/modules/Calendar.php +++ b/pkg/vtiger/translations/Arabic_ar_ae/modules/Calendar.php @@ -175,6 +175,9 @@ $languageStrings = array( 'LBL_NOVEMBER' => 'تشرين الثاني / نوÙمبر', 'LBL_DECEMBER' => 'كانون الأول / ديسمبر', 'LBL_CLICK_HERE_TO_VIEW' => 'انقر هنا لعرض', + + 'LBL_TOTAL_EVENTS_DUPLICATED' => 'عدد الأØداث المكررة تخطي', + 'LBL_TOTAL_TASKS_DUPLICATED' => 'عدد المهام المكررة تخطي', ); $jsLanguageStrings = array( 'LBL_ADD_EVENT_TASK' => 'إضاÙØ© Øدث / القيام', diff --git a/pkg/vtiger/translations/Arabic_ar_ae/modules/Settings/LayoutEditor.php b/pkg/vtiger/translations/Arabic_ar_ae/modules/Settings/LayoutEditor.php index a085e4197ac35aa1a32a811d4f9a064dd127910d..6dde519212fadaf86d6d2a30a68e6bf7bacd353d 100644 --- a/pkg/vtiger/translations/Arabic_ar_ae/modules/Settings/LayoutEditor.php +++ b/pkg/vtiger/translations/Arabic_ar_ae/modules/Settings/LayoutEditor.php @@ -136,6 +136,20 @@ $languageStrings = array( 'LBL_DETAIL_HEADER' => 'سجل رأس', 'LBL_HEADER_FIELD' => 'رأس رأي', + 'LBL_DUPLICATE_HANDLING' => 'منع مكررة', + 'LBL_DUPLICATE_CHECK' => 'تمكين الاختيار مكررة', + 'LBL_DUPLICATION_INFO_MESSAGE' => 'تكرار ميزة منع يمنع Ùقط السجلات المكررة الجديدة من الØصول على إنشاؤها من قبل المستخدمين والتطبيقات الخارجية. السجلات التي تم إنشاؤها من استيراد', + 'LBL_SELECT_FIELDS_FOR_DUPLICATION' => 'Øدد الØقول Ùريدة من نوعها التي يتم إلى يتم ÙØص سجلات مكررة', + 'LBL_SELECT_FIELDS' => 'الØقول Øدد', + 'LBL_MAX_3_FIELDS' => 'ماكس 3 الØقول', + 'LBL_SELECT_RULE' => 'Øدد قاعدة لمعالجة التكرارات', + 'LBL_ALLOW_DUPLICATES' => 'Ø§Ù„Ø³Ù…Ø§Ø Ø§Ù„ØªÙƒØ±Ø§Ø±Ø§Øª', + 'LBL_DO_NOT_ALLOW_DUPLICATES' => 'لا ØªØ³Ù…Ø Ø§Ù„Ù…ÙƒØ±Ø±Ø§Øª', + 'LBL_DUPLICATES_IN_SYNC_MESSAGE' => 'العمل على اتخاذ إذا تم العثور على سجل مكررة بينما المزامنة مع تطبيق خارجي', + 'LBL_PREFER_LATEST_RECORD' => 'تÙضل Ø£Øدث سجل', + 'LBL_PREFER_INTERNAL_RECORD' => 'تÙضل السجل الداخلي', + 'LBL_PREFER_EXTERNAL_RECORD' => 'تÙضل سجل خارجية', + 'LBL_SYNC_TOOLTIP_MESSAGE' => 'تÙضل Ø£Øدث سجل - سيتم الاØتÙاظ بيانات السجل المعدلة مؤخرا <BR> تÙضل السجل الداخلي - القائمة سجل سيتم الاØتÙاظ كما هو <BR> تÙضل سجل خارجية - بيانات من تطبيق خارجي سيتم نسخ', ); $jsLanguageStrings = array( 'JS_BLOCK_VISIBILITY_SHOW' => 'إظهار كتلة تمكين', @@ -196,4 +210,7 @@ $jsLanguageStrings = array( 'JS_NAME_FIELDS_APPEAR_IN_HEADER_BY_DEFAULT' => 'اسم الØقول تظهر ÙÙŠ رأس اÙتراضيا', 'JS_FIELD_IS_HEADER_ENABLED_FOR_VTIGER7' => 'هذا المجال هو رأس تمكين Vtiger7 سو٠يظهر ÙÙŠ عرض موجز', + 'JS_DUPLICATE_HANDLING_SUCCESS_MESSAGE' => 'تØديث Ø¨Ù†Ø¬Ø§Ø Ù„Ù„Ù†Ø¸Ø± ÙÙŠ الØقول المØددة ÙÙŠ الوقاية من التكرارات', + 'JS_DUPLICATE_HANDLING_FAILURE_MESSAGE' => 'لم تنظر الØقول المØددة ÙÙŠ الوقاية من التكرارات', + 'JS_DUPLICATE_CHECK_DISABLED' => 'تم تعطيل الاختيار مكررة', ); \ No newline at end of file diff --git a/pkg/vtiger/translations/Arabic_ar_ae/modules/Vtiger.php b/pkg/vtiger/translations/Arabic_ar_ae/modules/Vtiger.php index 7a0f7080938608489423b2c2425089ee62717ce2..aab4416d8f3d2f46552a870803643d07af3f3453 100644 --- a/pkg/vtiger/translations/Arabic_ar_ae/modules/Vtiger.php +++ b/pkg/vtiger/translations/Arabic_ar_ae/modules/Vtiger.php @@ -1215,6 +1215,16 @@ Vtiger الاتصالات جوجل اتصالات(مجموعة مختارة Ù…Ø 'LBL_SLA_INFORMATION' => 'جيش تØرير السودان من المعلومات', 'LBL_DELETE_USER_CONFIRMATION' => 'عندما يتم Øذ٠العضو لذلك، سيتم وضع علامة المستخدم بأنه "غير Ùعال"ØŒ ويمكن تعيين أي سجلات جديدة إلى المستخدم، والمستخدم لن يكون قادرا على تسجيل الدخول. هل أنت متأكد أنك تريد ØØ°ÙØŸ', + + 'LBL_DUPLICATES' => 'التكرارات', + 'LBL_DUPLICATES_DETECTED' => 'تكرار (Ù‚) الكش٠عن!', + 'LBL_DUPLICATES_FOUND_MESSAGE' => 'لا يمكن ØÙظ هذه الصورة٪ منذ مكررة٪ s موجودة ÙÙŠ vtiger إدارة مع مطابقة القيم ل٪ s.', + 'LBL_VTIGER_NOTIFICATION' => 'رسالة من: نظام vtiger إدارة الإخطارات', + 'LBL_DUPLICATION_FAILURE_FROM_WORKFLOWS' => 'لا يمكن ØÙظ التالية٪ s من "Ùª الصورة" سير العمل', + 'LBL_DUPLICATION_FAILURE_FROM_WEBFORMS' => 'لا يمكن ØÙظ التالية٪ s من "Ùª ليالي" نموذج ويب', + 'LBL_DUPLICATION_FAILURE_FOR_ADMIN' => 'يمكنك٪ s إلى تعديل قواعد الوقاية مكررة.', + 'LBL_DUPLICATION_FAILURE_FOR_NON_ADMIN' => 'اتصل بالمسؤول لتعديل قواعد مكررة', + 'LBL_DUPLICATE_RECORD_LISTS' => 'مكررة٪ Ù‚ (Ù‚):', ); $jsLanguageStrings = array( 'JS_EMAIL_SERVER_CONFIGURATION' => 'يرجى تكوين إعدادات ملقم البريد الصادر الخاص بك من صÙØØ© الاعدادات', @@ -1676,4 +1686,5 @@ $jsLanguageStrings = array( 'JS_UPLOAD_SUCCESSFUL' => 'المل٠الذي تم تØميله بنجاØ', 'JS_UPLOAD_FAILED' => 'تØميل مل٠Ùشل', + 'JS_DUPLICATES_DETECTED' => 'تكرار (Ù‚) الكش٠عن!', ); \ No newline at end of file diff --git a/pkg/vtiger/translations/BrazilianLanguagePack_bz_bz/modules/Calendar.php b/pkg/vtiger/translations/BrazilianLanguagePack_bz_bz/modules/Calendar.php index 0aa1e4d6aee30a9669179d3b65f7068eec3f6efb..eaa2660b2ae64e0af83cc5a7712e593ea1e6b166 100644 --- a/pkg/vtiger/translations/BrazilianLanguagePack_bz_bz/modules/Calendar.php +++ b/pkg/vtiger/translations/BrazilianLanguagePack_bz_bz/modules/Calendar.php @@ -147,6 +147,9 @@ $languageStrings = array( 'LBL_NOVEMBER' => 'Novembro', 'LBL_DECEMBER' => 'Dezembro', 'LBL_CLICK_HERE_TO_VIEW' => 'Clique aqui para ver', + + 'LBL_TOTAL_EVENTS_DUPLICATED' => 'N.º de eventos duplicados ignorada', + 'LBL_TOTAL_TASKS_DUPLICATED' => 'Número de tarefas duplicadas ignorada', ); $jsLanguageStrings = array( 'LBL_ADD_EVENT_TASK' => 'Add Event / Tarefa' , diff --git a/pkg/vtiger/translations/BrazilianLanguagePack_bz_bz/modules/Settings/LayoutEditor.php b/pkg/vtiger/translations/BrazilianLanguagePack_bz_bz/modules/Settings/LayoutEditor.php index 9f9cd3a9f7881ab0c5da4598d2568bc4c6fe6ff4..d406566d22d96f677f98dc45a21e39b96588bd2b 100644 --- a/pkg/vtiger/translations/BrazilianLanguagePack_bz_bz/modules/Settings/LayoutEditor.php +++ b/pkg/vtiger/translations/BrazilianLanguagePack_bz_bz/modules/Settings/LayoutEditor.php @@ -136,6 +136,20 @@ $languageStrings = array( 'LBL_DETAIL_HEADER' => 'O registo de cabeçalho', 'LBL_HEADER_FIELD' => 'Cabeçalho De Vista', + 'LBL_DUPLICATE_HANDLING' => 'Prevenção duplicado', + 'LBL_DUPLICATE_CHECK' => 'Ativar verificação de duplicata', + 'LBL_DUPLICATION_INFO_MESSAGE' => 'Duplicar recurso de prevenção só impede novos registros duplicados de ficar criado por usuários e aplicações externas. Registros criados a partir de Importação', + 'LBL_SELECT_FIELDS_FOR_DUPLICATION' => 'Selecione os campos exclusivos no qual estão a ser verificados os registros duplicados', + 'LBL_SELECT_FIELDS' => 'selecionar campos', + 'LBL_MAX_3_FIELDS' => 'Max 3 campos', + 'LBL_SELECT_RULE' => 'Select regra de duplicatas de manipulação', + 'LBL_ALLOW_DUPLICATES' => 'permitir duplicatas', + 'LBL_DO_NOT_ALLOW_DUPLICATES' => 'Não permita que Duplicatas', + 'LBL_DUPLICATES_IN_SYNC_MESSAGE' => 'Ação a ser tomada se o registro duplicado for encontrado durante a sincronização com aplicação externa', + 'LBL_PREFER_LATEST_RECORD' => 'Prefere último disco', + 'LBL_PREFER_INTERNAL_RECORD' => 'Prefere registro interno', + 'LBL_PREFER_EXTERNAL_RECORD' => 'Prefere registro externo', + 'LBL_SYNC_TOOLTIP_MESSAGE' => 'Prefere último disco - dados de registro Mais recentemente modificados serão mantidos <br> preferem registro interno - registro existente será mantido como é <br> preferem registro externa - Dados da aplicação externa será copiado', ); $jsLanguageStrings = array( 'JS_BLOCK_VISIBILITY_SHOW' => 'Programa bloco habilitado' , @@ -196,4 +210,7 @@ Tem certeza de que deseja excluir este campo?', 'JS_NAME_FIELDS_APPEAR_IN_HEADER_BY_DEFAULT' => 'Campos de nome aparecer no Cabeçalho padrão', 'JS_FIELD_IS_HEADER_ENABLED_FOR_VTIGER7' => 'Esse Campo de Cabeçalho é habilitado para Vtiger7, Ele será exibido no modo de Exibição de Resumo', + 'JS_DUPLICATE_HANDLING_SUCCESS_MESSAGE' => 'Com sucesso atualizado para considerar campos selecionados na prevenção duplicatas', + 'JS_DUPLICATE_HANDLING_FAILURE_MESSAGE' => 'Falha ao considerar campos selecionados na prevenção duplicatas', + 'JS_DUPLICATE_CHECK_DISABLED' => 'verificação duplicada é desativado', ); \ No newline at end of file diff --git a/pkg/vtiger/translations/BrazilianLanguagePack_bz_bz/modules/Vtiger.php b/pkg/vtiger/translations/BrazilianLanguagePack_bz_bz/modules/Vtiger.php index 4690eb69636f88a0da6273670427ad7ff9a25080..f7502404ef1998422bf60be20564105c2e95a8bb 100644 --- a/pkg/vtiger/translations/BrazilianLanguagePack_bz_bz/modules/Vtiger.php +++ b/pkg/vtiger/translations/BrazilianLanguagePack_bz_bz/modules/Vtiger.php @@ -1074,6 +1074,16 @@ fora Vtiger.', 'LBL_SLA_INFORMATION' => 'SLA Informações', 'LBL_TO_USE_SWITCH_TO_NEW_LOOK' => 'Para usar o <b>%s</b>, recomendamos que você mude para olhar novo.', 'LBL_DELETE_USER_CONFIRMATION' => 'Quando um usuário é excluÃdo, o usuário será marcado como "inativo" e não há novos registros pode ser atribuÃdo ao usuário, eo usuário não será capaz de login. Tem certeza de que deseja excluir?', + + 'LBL_DUPLICATES' => 'duplicados', + 'LBL_DUPLICATES_DETECTED' => 'Duplicar (s) detectado!', + 'LBL_DUPLICATES_FOUND_MESSAGE' => 'Este%s não pode ser salvo desde duplicado%s existe no Vtiger com valores correspondentes em%s.', + 'LBL_VTIGER_NOTIFICATION' => 'Mensagem de: Vtiger Sistema de Notificações', + 'LBL_DUPLICATION_FAILURE_FROM_WORKFLOWS' => 'A seguir%s não pôde ser salvo de fluxo de trabalho "%s"', + 'LBL_DUPLICATION_FAILURE_FROM_WEBFORMS' => 'A seguir%s não pôde ser salvo de "%s" webform', + 'LBL_DUPLICATION_FAILURE_FOR_ADMIN' => 'Pode%s para modificar regras de prevenção duplicados.', + 'LBL_DUPLICATION_FAILURE_FOR_NON_ADMIN' => 'Contacte o administrador para revisão das regras duplicadas', + 'LBL_DUPLICATE_RECORD_LISTS' => 'Duplicar%s (s):', ); $jsLanguageStrings = array( 'JS_EMAIL_SERVER_CONFIGURATION' => 'Please configure your outgoing server settings from the settings page', @@ -1477,4 +1487,6 @@ $jsLanguageStrings = array( 'JS_UPLOAD_SUCCESSFUL' => 'Arquivo enviado com sucesso', 'JS_UPLOAD_FAILED' => 'Carregar arquivo falhou', + + 'JS_DUPLICATES_DETECTED' => 'Duplicar (s) detectado!', ); \ No newline at end of file diff --git a/pkg/vtiger/translations/BritishLanguagePack_br_br/modules/Calendar.php b/pkg/vtiger/translations/BritishLanguagePack_br_br/modules/Calendar.php index 233ceda0f44bf84b41d5a636e25d5dad27d1647e..bb11a0bc2cf186ed027aad6bd338b91a7097cd8d 100644 --- a/pkg/vtiger/translations/BritishLanguagePack_br_br/modules/Calendar.php +++ b/pkg/vtiger/translations/BritishLanguagePack_br_br/modules/Calendar.php @@ -147,6 +147,9 @@ $languageStrings = array( 'LBL_NOVEMBER' => 'November', 'LBL_DECEMBER' => 'December', 'LBL_CLICK_HERE_TO_VIEW' => 'Click here to view', + + 'LBL_TOTAL_EVENTS_DUPLICATED' => 'No. of duplicate Events skipped', + 'LBL_TOTAL_TASKS_DUPLICATED' => 'No. of duplicate Tasks skipped', ); $jsLanguageStrings = array( 'LBL_ADD_EVENT_TASK' => 'Add Event / To Do' , diff --git a/pkg/vtiger/translations/BritishLanguagePack_br_br/modules/Settings/LayoutEditor.php b/pkg/vtiger/translations/BritishLanguagePack_br_br/modules/Settings/LayoutEditor.php index 31d927962f009e7b157c02d1455310651e965123..04fd7bd565121f3a9e318b611afb4abc05c5591e 100644 --- a/pkg/vtiger/translations/BritishLanguagePack_br_br/modules/Settings/LayoutEditor.php +++ b/pkg/vtiger/translations/BritishLanguagePack_br_br/modules/Settings/LayoutEditor.php @@ -147,8 +147,21 @@ $languageStrings = array( 'LBL_DETAIL_HEADER' => 'Record header', 'LBL_HEADER_FIELD' => 'Header View', + 'LBL_DUPLICATE_HANDLING' => 'Duplicate Prevention', + 'LBL_DUPLICATE_CHECK' => 'Enable duplicate check', + 'LBL_DUPLICATION_INFO_MESSAGE' => 'Duplicate prevention feature only prevents new duplicate records from getting created by users and external applications. Records created from Import', + 'LBL_SELECT_FIELDS_FOR_DUPLICATION' => 'Select the unique fields on which duplicate records are to be checked', + 'LBL_SELECT_FIELDS' => 'Select Fields', + 'LBL_MAX_3_FIELDS' => 'Max 3 Fields', + 'LBL_SELECT_RULE' => 'Select rule for handling duplicates', + 'LBL_ALLOW_DUPLICATES' => 'Allow Duplicates', + 'LBL_DO_NOT_ALLOW_DUPLICATES' => 'Do not allow Duplicates', + 'LBL_DUPLICATES_IN_SYNC_MESSAGE' => 'Action to take if duplicate record is found while syncing with external application', + 'LBL_PREFER_LATEST_RECORD' => 'Prefer latest record', + 'LBL_PREFER_INTERNAL_RECORD' => 'Prefer internal record', + 'LBL_PREFER_EXTERNAL_RECORD' => 'Prefer external record', + 'LBL_SYNC_TOOLTIP_MESSAGE' => 'Prefer latest record - Most recently modified record data will be retained<br>Prefer internal record - Existing record will be retained as it is<br>Prefer external record - Data from the external application will be copied', ); - $jsLanguageStrings = array( 'JS_BLOCK_VISIBILITY_SHOW' => 'Block show enabled', 'JS_BLOCK_VISIBILITY_HIDE' => 'Block hide enabled', @@ -208,4 +221,7 @@ $jsLanguageStrings = array( 'JS_NAME_FIELDS_APPEAR_IN_HEADER_BY_DEFAULT' => 'Name fields appear in Header by default', 'JS_FIELD_IS_HEADER_ENABLED_FOR_VTIGER7' => 'This Field is Header enabled for Vtiger7, It will appear in Summary View', -); + 'JS_DUPLICATE_HANDLING_SUCCESS_MESSAGE' => 'Successfully updated to consider selected fields in duplicates prevention', + 'JS_DUPLICATE_HANDLING_FAILURE_MESSAGE' => 'Failed to consider selected fields in duplicates prevention', + 'JS_DUPLICATE_CHECK_DISABLED' => 'Duplicate check is disabled', +); \ No newline at end of file diff --git a/pkg/vtiger/translations/BritishLanguagePack_br_br/modules/Vtiger.php b/pkg/vtiger/translations/BritishLanguagePack_br_br/modules/Vtiger.php index 52c33fd77cb77b9ec3eb58cba7b231c05223aedc..b797a06e6ba21c98fdd4d757621cc9b6156697e9 100644 --- a/pkg/vtiger/translations/BritishLanguagePack_br_br/modules/Vtiger.php +++ b/pkg/vtiger/translations/BritishLanguagePack_br_br/modules/Vtiger.php @@ -1071,6 +1071,16 @@ $languageStrings = array( 'LBL_SLA_INFORMATION' => 'SLA Information', 'LBL_TO_USE_SWITCH_TO_NEW_LOOK' => 'To use <b>%s</b>, we recommend you to Switch to new look.', 'LBL_DELETE_USER_CONFIRMATION' => 'When a User is deleted, user will be marked as "Inactive" and no new records can be assigned to the User, and the user will not be able to login. Are you sure you want to delete?', + + 'LBL_DUPLICATES' => 'Duplicates', + 'LBL_DUPLICATES_DETECTED' => 'Duplicate(s) detected!', + 'LBL_DUPLICATES_FOUND_MESSAGE' => 'This %s cannot be saved since duplicate %s exists in Vtiger with matching values for %s.', + 'LBL_VTIGER_NOTIFICATION' => 'Message from : Vtiger System Notifications', + 'LBL_DUPLICATION_FAILURE_FROM_WORKFLOWS' => 'The following %s could not be saved from "%s" workflow', + 'LBL_DUPLICATION_FAILURE_FROM_WEBFORMS' => 'The following %s could not be saved from "%s" webform', + 'LBL_DUPLICATION_FAILURE_FOR_ADMIN' => 'You can %s to modify duplicate prevention rules.', + 'LBL_DUPLICATION_FAILURE_FOR_NON_ADMIN' => 'Contact your administrator for revising the duplicate rules', + 'LBL_DUPLICATE_RECORD_LISTS' => 'Duplicate %s(s) :', ); $jsLanguageStrings = array( 'JS_EMAIL_SERVER_CONFIGURATION' => 'Please configure your outgoing server settings from the settings page', @@ -1479,4 +1489,5 @@ $jsLanguageStrings = array( 'JS_UPLOAD_SUCCESSFUL' => 'File Uploaded Successfuly', 'JS_UPLOAD_FAILED' => 'File Upload Failed', + 'JS_DUPLICATES_DETECTED' => 'Duplicate(s) detected!', ); \ No newline at end of file diff --git a/pkg/vtiger/translations/Deutsch/modules/Calendar.php b/pkg/vtiger/translations/Deutsch/modules/Calendar.php index 3c7c23f1338209e0ddf4c03fe68dde85d32222fa..1b4c7ed9084bba11411184412bbe3589f51f999b 100644 --- a/pkg/vtiger/translations/Deutsch/modules/Calendar.php +++ b/pkg/vtiger/translations/Deutsch/modules/Calendar.php @@ -147,6 +147,9 @@ $languageStrings = array( 'LBL_NOVEMBER' => 'November', 'LBL_DECEMBER' => 'Dezember', 'LBL_CLICK_HERE_TO_VIEW' => 'Klicke hier, um anzusehen', + + 'LBL_TOTAL_EVENTS_DUPLICATED' => 'Anzahl der doppelten Ereignisse übersprungen', + 'LBL_TOTAL_TASKS_DUPLICATED' => 'Anzahl der doppelten Aufgaben übersprungen', ); $jsLanguageStrings = array( 'LBL_ADD_EVENT_TASK' => 'Add Event / Aufgabe' , diff --git a/pkg/vtiger/translations/Deutsch/modules/Settings/LayoutEditor.php b/pkg/vtiger/translations/Deutsch/modules/Settings/LayoutEditor.php index 89d5d6f67f3a1b267f6a91e5bf9a5ab687e99a0a..8edf290331d10c69e50d2d4cf76210a9d0bfe7d0 100644 --- a/pkg/vtiger/translations/Deutsch/modules/Settings/LayoutEditor.php +++ b/pkg/vtiger/translations/Deutsch/modules/Settings/LayoutEditor.php @@ -136,6 +136,20 @@ $languageStrings = array( 'LBL_DETAIL_HEADER' => 'Datensatz-header', 'LBL_HEADER_FIELD' => 'Header Anzeigen', + 'LBL_DUPLICATE_HANDLING' => 'doppelte Prävention', + 'LBL_DUPLICATE_CHECK' => 'Aktivieren Dublettenprüfung', + 'LBL_DUPLICATION_INFO_MESSAGE' => 'Duplizieren Prävention Funktion verhindert, dass nur neue doppelte Datensätze aus von Nutzern und externen Anwendungen erstellt zu werden. Aufzeichnungen von Import erstellt', + 'LBL_SELECT_FIELDS_FOR_DUPLICATION' => 'Wählen Sie die einzigartigen Felder, auf denen doppelte Datensätze überprüft werden', + 'LBL_SELECT_FIELDS' => 'Felder auswählen', + 'LBL_MAX_3_FIELDS' => 'Max 3 Felder', + 'LBL_SELECT_RULE' => 'Wählen Sie Regel für die Handhabung von Duplikaten', + 'LBL_ALLOW_DUPLICATES' => 'Fachnutzung', + 'LBL_DO_NOT_ALLOW_DUPLICATES' => 'Lassen Sie keine Dubletten', + 'LBL_DUPLICATES_IN_SYNC_MESSAGE' => 'Maßnahmen zu ergreifen, wenn doppelte Datensatz gefunden wird, während die Synchronisierung mit externer Anwendung', + 'LBL_PREFER_LATEST_RECORD' => 'Bevorzugen neuesten Rekords', + 'LBL_PREFER_INTERNAL_RECORD' => 'Bevorzugen internen Rekord', + 'LBL_PREFER_EXTERNAL_RECORD' => 'Bevorzugen externen Rekord', + 'LBL_SYNC_TOOLTIP_MESSAGE' => 'Bevorzugen neuesten Rekord - Zuletzt geändert Aufzeichnungsdaten werden beibehalten Die interne Aufzeichnung bevorzugen - Bestehende Datensatz wird beibehalten, wie es <br> bevorzugen externe Platte ist - Daten aus der externen Anwendung kopiert werden', ); $jsLanguageStrings = array( 'JS_BLOCK_VISIBILITY_SHOW' => 'Block Karte aktiviert' , @@ -196,4 +210,7 @@ Sind Sie sicher, dass Sie zum löschen dieses Feld?', 'JS_NAME_FIELDS_APPEAR_IN_HEADER_BY_DEFAULT' => 'Name Felder im Header standardmäßig', 'JS_FIELD_IS_HEADER_ENABLED_FOR_VTIGER7' => 'Dieses Feld ist Kopfzeile aktiviert Vtiger7, erscheint Es in der Zusammenfassung', + 'JS_DUPLICATE_HANDLING_SUCCESS_MESSAGE' => 'Erfolgreich aktualisierte ausgewählte Felder in Duplikaten Prävention zu berücksichtigen', + 'JS_DUPLICATE_HANDLING_FAILURE_MESSAGE' => 'Fehler beim ausgewählten Feldern in Duplikaten Prävention berücksichtigen', + 'JS_DUPLICATE_CHECK_DISABLED' => 'Dublettenprüfung ist deaktiviert', ); \ No newline at end of file diff --git a/pkg/vtiger/translations/Deutsch/modules/Vtiger.php b/pkg/vtiger/translations/Deutsch/modules/Vtiger.php index c4b372838ae1ca80f89685187a01e3216ebc7476..d853c55a4f349794cf39d033b31bc378ff5d41a2 100644 --- a/pkg/vtiger/translations/Deutsch/modules/Vtiger.php +++ b/pkg/vtiger/translations/Deutsch/modules/Vtiger.php @@ -1071,6 +1071,16 @@ außerhalb Vtiger.', 'LBL_SLA_INFORMATION' => 'SLA Informationen', 'LBL_TO_USE_SWITCH_TO_NEW_LOOK' => 'Zur Nutzung <b>%s</b>, empfehlen wir Ihnen, sich an neue Look wechseln.', 'LBL_DELETE_USER_CONFIRMATION' => 'Wenn ein Benutzer gelöscht wird, wird der Benutzer als "inaktiv" markiert werden und keine neuen Datensätze können dem Benutzer zugeordnet werden, und der Benutzer nicht anmelden können. Sind Sie sicher, dass Sie löschen möchten?', + + 'LBL_DUPLICATES' => 'Dubletten', + 'LBL_DUPLICATES_DETECTED' => 'Duplizieren (n) erkannt!', + 'LBL_DUPLICATES_FOUND_MESSAGE' => 'Dieses%s kann nicht gespeichert werden, da doppelte%s in vtiger existiert mit Werten für%s entspricht.', + 'LBL_VTIGER_NOTIFICATION' => 'Nachricht von: vtiger Systemnachrichten', + 'LBL_DUPLICATION_FAILURE_FROM_WORKFLOWS' => 'Das folgende%s konnte nicht von „%s“ Workflow gespeichert werden', + 'LBL_DUPLICATION_FAILURE_FROM_WEBFORMS' => 'Das folgende%s konnte nicht von „%s“ webform gespeichert werden', + 'LBL_DUPLICATION_FAILURE_FOR_ADMIN' => 'Sie können%s doppelte Verhütungsvorschriften ändern.', + 'LBL_DUPLICATION_FAILURE_FOR_NON_ADMIN' => 'Kontaktieren Sie Ihren Administrator für die Ãœberarbeitung der doppelten Regeln', + 'LBL_DUPLICATE_RECORD_LISTS' => 'Duplizieren%s (e):', ); $jsLanguageStrings = array( 'JS_EMAIL_SERVER_CONFIGURATION' => 'Please configure your outgoing server settings from the settings page', @@ -1480,4 +1490,6 @@ $jsLanguageStrings = array( 'JS_UPLOAD_SUCCESSFUL' => 'Datei hochgeladen Erfolgreicher', 'JS_UPLOAD_FAILED' => 'File Upload fehlgeschlagen', + + 'JS_DUPLICATES_DETECTED' => 'Duplizieren (n) erkannt!', ); \ No newline at end of file diff --git a/pkg/vtiger/translations/Dutch/modules/Calendar.php b/pkg/vtiger/translations/Dutch/modules/Calendar.php index b5c157849a8380252b878723d37814edd7bdc3cb..a60468747ae68fb17413f1ca6c907cc57fc878a5 100644 --- a/pkg/vtiger/translations/Dutch/modules/Calendar.php +++ b/pkg/vtiger/translations/Dutch/modules/Calendar.php @@ -147,6 +147,9 @@ $languageStrings = array( 'LBL_NOVEMBER' => 'November', 'LBL_DECEMBER' => 'December', 'LBL_CLICK_HERE_TO_VIEW' => 'Klik hier om te bekijken', + + 'LBL_TOTAL_EVENTS_DUPLICATED' => 'Aantal dubbele Events overgeslagen', + 'LBL_TOTAL_TASKS_DUPLICATED' => 'Aantal dubbele Taken overgeslagen', ); $jsLanguageStrings = array( 'LBL_ADD_EVENT_TASK' => 'Voeg Event / Taak' , diff --git a/pkg/vtiger/translations/Dutch/modules/Settings/LayoutEditor.php b/pkg/vtiger/translations/Dutch/modules/Settings/LayoutEditor.php index 32ed6f240307a46800dfe6a234364f44ef6e2f42..9bf8f36beb2efa8baf233d34a1fc94f9aef20e14 100644 --- a/pkg/vtiger/translations/Dutch/modules/Settings/LayoutEditor.php +++ b/pkg/vtiger/translations/Dutch/modules/Settings/LayoutEditor.php @@ -136,6 +136,20 @@ $languageStrings = array( 'LBL_DETAIL_HEADER' => 'Record kop', 'LBL_HEADER_FIELD' => 'Header Bekijken', + 'LBL_DUPLICATE_HANDLING' => 'Duplicate Prevention', + 'LBL_DUPLICATE_CHECK' => 'Enable dubbele check', + 'LBL_DUPLICATION_INFO_MESSAGE' => 'Dubbele preventie functie alleen voorkomt dat nieuwe dubbele records van het krijgen van door gebruikers en externe applicaties. Records gemaakt op basis van Import', + 'LBL_SELECT_FIELDS_FOR_DUPLICATION' => 'Selecteer de unieke velden waarop dubbele records moeten worden gecontroleerd', + 'LBL_SELECT_FIELDS' => 'Velden selecteren', + 'LBL_MAX_3_FIELDS' => 'Max 3 Fields', + 'LBL_SELECT_RULE' => 'Selecteer de regel voor de behandeling duplicaten', + 'LBL_ALLOW_DUPLICATES' => 'laat duplicaten', + 'LBL_DO_NOT_ALLOW_DUPLICATES' => 'Sta niet toe dat duplicaten', + 'LBL_DUPLICATES_IN_SYNC_MESSAGE' => 'Actie wanneer dubbele record wordt gevonden tijdens het synchroniseren met een externe applicatie', + 'LBL_PREFER_LATEST_RECORD' => 'Liever laatste plaat', + 'LBL_PREFER_INTERNAL_RECORD' => 'Liever interne registratie', + 'LBL_PREFER_EXTERNAL_RECORD' => 'Liever externe opnemen', + 'LBL_SYNC_TOOLTIP_MESSAGE' => 'Liever laatste plaat - Meest recent gewijzigde record gegevens zullen worden bewaard <br> liever interne registratie - bestaande record zal worden behouden zoals het is <br> liever externe opname - De gegevens van de externe applicatie wordt gekopieerd', ); $jsLanguageStrings = array( 'JS_BLOCK_VISIBILITY_SHOW' => 'Blok Toon ingeschakeld' , @@ -196,4 +210,7 @@ Bent u zeker dat u op dit gebied?', 'JS_NAME_FIELDS_APPEAR_IN_HEADER_BY_DEFAULT' => 'De naam velden weergegeven in de Koptekst standaard', 'JS_FIELD_IS_HEADER_ENABLED_FOR_VTIGER7' => 'Dit Veld is Kop ingeschakeld voor Vtiger7, Het zal verschijnen in de overzichtsweergave', + 'JS_DUPLICATE_HANDLING_SUCCESS_MESSAGE' => 'Bijgewerkt naar geselecteerde velden in duplo preventie te overwegen', + 'JS_DUPLICATE_HANDLING_FAILURE_MESSAGE' => 'Kan geselecteerde velden in duplo preventie te overwegen', + 'JS_DUPLICATE_CHECK_DISABLED' => 'Dubbele controle is uitgeschakeld', ); \ No newline at end of file diff --git a/pkg/vtiger/translations/Dutch/modules/Vtiger.php b/pkg/vtiger/translations/Dutch/modules/Vtiger.php index 036f6ccdb31ebefda3b8c527f0278dd4fe2fb128..621d8f836ede09277a28b3945c208325850ac6c0 100644 --- a/pkg/vtiger/translations/Dutch/modules/Vtiger.php +++ b/pkg/vtiger/translations/Dutch/modules/Vtiger.php @@ -1073,6 +1073,16 @@ buiten Vtiger.', 'LBL_SLA_INFORMATION' => 'SLA Informatie', 'LBL_TO_USE_SWITCH_TO_NEW_LOOK' => 'Om gebruik te maken <b>%s</b>, raden wij u aan om te schakelen naar de nieuwe look.', 'LBL_DELETE_USER_CONFIRMATION' => 'Wanneer een gebruiker is verwijderd, zal de gebruiker worden gemarkeerd als "inactief" en er geen nieuwe records kunnen worden toegewezen aan de gebruiker, en de gebruiker zal niet in staat om in te loggen. Weet je zeker dat je wilt verwijderen?', + + 'LBL_DUPLICATES' => 'duplicaten', + 'LBL_DUPLICATES_DETECTED' => 'Duplicate (s) gedetecteerd!', + 'LBL_DUPLICATES_FOUND_MESSAGE' => 'Deze%s kan niet worden opgeslagen, omdat dubbele%s bestaat in Vtiger met bijpassende waarden voor%s.', + 'LBL_VTIGER_NOTIFICATION' => 'Bericht van: Vtiger Systeemnotificaties', + 'LBL_DUPLICATION_FAILURE_FROM_WORKFLOWS' => 'De volgende%s kon niet worden gered van de "%s" workflow', + 'LBL_DUPLICATION_FAILURE_FROM_WEBFORMS' => 'De volgende%s kon niet worden gered van de "%s" webformulier', + 'LBL_DUPLICATION_FAILURE_FOR_ADMIN' => 'U kunt%s om dubbele preventie regels te wijzigen.', + 'LBL_DUPLICATION_FAILURE_FOR_NON_ADMIN' => 'Neem contact op met uw beheerder voor de herziening van de dubbele regels', + 'LBL_DUPLICATE_RECORD_LISTS' => 'Dupliceren%s (s):', ); $jsLanguageStrings = array( 'JS_EMAIL_SERVER_CONFIGURATION' => 'Configureer a.u.b. uw uitgaande server instellingen op de instellingenpagina', @@ -1484,4 +1494,6 @@ $jsLanguageStrings = array( 'JS_UPLOAD_SUCCESSFUL' => 'Geüpload Successfuly', 'JS_UPLOAD_FAILED' => 'File Upload is mislukt', + + 'JS_DUPLICATES_DETECTED' => 'Duplicate (s) gedetecteerd!', ); \ No newline at end of file diff --git a/pkg/vtiger/translations/French/modules/Calendar.php b/pkg/vtiger/translations/French/modules/Calendar.php index 952527148d24ad28d9e80194f52347fd8bb8b40c..591b7953f033a31e1a1f45cae1d01c0d541f8687 100644 --- a/pkg/vtiger/translations/French/modules/Calendar.php +++ b/pkg/vtiger/translations/French/modules/Calendar.php @@ -147,6 +147,9 @@ $languageStrings = array( 'LBL_NOVEMBER' => 'Novembre', 'LBL_DECEMBER' => 'Décembre', 'LBL_CLICK_HERE_TO_VIEW' => 'Cliquez ici pour afficher', + + 'LBL_TOTAL_EVENTS_DUPLICATED' => 'Nombre de dupliquer des événements ignorés', + 'LBL_TOTAL_TASKS_DUPLICATED' => 'Nombre de tâches en double sautée', ); $jsLanguageStrings = array( 'LBL_ADD_EVENT_TASK' => 'Add Event / Tâche' , diff --git a/pkg/vtiger/translations/French/modules/Settings/LayoutEditor.php b/pkg/vtiger/translations/French/modules/Settings/LayoutEditor.php index 55719c3e3b677c6cd743de90aa3527eca3b88c12..7a85e96ab3f2223bbe49fd8d425b6e03ae907051 100644 --- a/pkg/vtiger/translations/French/modules/Settings/LayoutEditor.php +++ b/pkg/vtiger/translations/French/modules/Settings/LayoutEditor.php @@ -136,6 +136,20 @@ $languageStrings = array( 'LBL_DETAIL_HEADER' => 'Enregistrement d\'en-tête', 'LBL_HEADER_FIELD' => 'Vue D\'En-Tête', + 'LBL_DUPLICATE_HANDLING' => 'prévention double', + 'LBL_DUPLICATE_CHECK' => 'Activer la vérification en double', + 'LBL_DUPLICATION_INFO_MESSAGE' => "En double fonction de prévention empêche que les nouveaux enregistrements en double d'obtenir créé par les utilisateurs et les applications externes. Les documents créés à partir d'importation", + 'LBL_SELECT_FIELDS_FOR_DUPLICATION' => 'Sélectionnez les champs uniques sur lesquels les doublons sont à vérifier', + 'LBL_SELECT_FIELDS' => 'Sélectionner les champs', + 'LBL_MAX_3_FIELDS' => 'Max 3 champs', + 'LBL_SELECT_RULE' => 'Sélectionnez la règle des doublons de manipulation', + 'LBL_ALLOW_DUPLICATES' => 'Autoriser les doublons', + 'LBL_DO_NOT_ALLOW_DUPLICATES' => 'Ne pas laisser Doublons', + 'LBL_DUPLICATES_IN_SYNC_MESSAGE' => "Mesures à prendre si l'enregistrement en double est trouvé lors de la synchronisation avec l'application externe", + 'LBL_PREFER_LATEST_RECORD' => 'Préférez dernier disque', + 'LBL_PREFER_INTERNAL_RECORD' => 'Préférez enregistrement interne', + 'LBL_PREFER_EXTERNAL_RECORD' => 'Préférez enregistrement externe', + 'LBL_SYNC_TOOLTIP_MESSAGE' => 'Préférez dernier disque - Plus récemment, des données d'enregistrement modifiés seront conservés <br> Préférer enregistrement interne - enregistrement existant sera conservé comme il est <br> Préférez enregistrement externe - Les données de l'application externe seront copiés', ); $jsLanguageStrings = array( 'JS_BLOCK_VISIBILITY_SHOW' => 'Spectacle de bloc activé' , @@ -196,4 +210,7 @@ Si vous n\'êtes pas sûr et que vous souhaitez être en mesure d\'afficher ces 'JS_NAME_FIELDS_APPEAR_IN_HEADER_BY_DEFAULT' => 'Nom de champs apparaissent dans l\'en-Tête par défaut', 'JS_FIELD_IS_HEADER_ENABLED_FOR_VTIGER7' => 'Ce Champ d\'en-Tête activé pour Vtiger7, Il apparaîtra à l\'Affichage du Résumé', + 'JS_DUPLICATE_HANDLING_SUCCESS_MESSAGE' => 'Mis à jour avec succès à considérer les champs sélectionnés dans la prévention des doublons', + 'JS_DUPLICATE_HANDLING_FAILURE_MESSAGE' => "Impossible d'examiner les champs sélectionnés dans la prévention des doublons", + 'JS_DUPLICATE_CHECK_DISABLED' => 'vérification des doublons est désactivée', ); \ No newline at end of file diff --git a/pkg/vtiger/translations/French/modules/Vtiger.php b/pkg/vtiger/translations/French/modules/Vtiger.php index c8e70fa0d2938df633da437854a7bfc95da2469e..9a1decaa058be760024202c41d54e4f05470e718 100644 --- a/pkg/vtiger/translations/French/modules/Vtiger.php +++ b/pkg/vtiger/translations/French/modules/Vtiger.php @@ -1074,6 +1074,16 @@ en dehors de Vtiger.', 'LBL_SLA_INFORMATION' => 'SLA de l\'Information', 'LBL_TO_USE_SWITCH_TO_NEW_LOOK' => 'Pour utiliser <b>%s</b>, nous vous recommandons de passer à nouveau look.', 'LBL_DELETE_USER_CONFIRMATION' => "Lorsqu'un utilisateur est supprimé, l'utilisateur sera marqué comme «inactif» et aucun de nouveaux enregistrements peuvent être affectés à l'utilisateur, et l'utilisateur ne sera pas capable de se connecter. Etes-vous sûr que vous voulez supprimer?", + + 'LBL_DUPLICATES' => 'Duplicates', + 'LBL_DUPLICATES_DETECTED' => 'Double (s) détectée!', + 'LBL_DUPLICATES_FOUND_MESSAGE' => 'Ce%s ne peut pas être enregistré depuis s en double% existe en Vtiger avec des valeurs correspondant à %s.', + 'LBL_VTIGER_NOTIFICATION' => 'Message de: Vtiger Notifications du système', + 'LBL_DUPLICATION_FAILURE_FROM_WORKFLOWS' => "%s suivant n'a pas pu être sauvé de « % de » flux de travail", + 'LBL_DUPLICATION_FAILURE_FROM_WEBFORMS' => "%s suivant n'a pas pu être sauvé de « %s » formulaire en ligne", + 'LBL_DUPLICATION_FAILURE_FOR_ADMIN' => 'Vous pouvez%s de modifier les règles de prévention en double.', + 'LBL_DUPLICATION_FAILURE_FOR_NON_ADMIN' => 'Contactez votre administrateur pour la révision des règles en double', + 'LBL_DUPLICATE_RECORD_LISTS' => '%s en double (s):', ); $jsLanguageStrings = array( 'JS_EMAIL_SERVER_CONFIGURATION' => 'Please configure your outgoing server settings from the settings page', @@ -1484,4 +1494,6 @@ $jsLanguageStrings = array( 'JS_UPLOAD_SUCCESSFUL' => 'Fichier téléchargé avec succès', 'JS_UPLOAD_FAILED' => 'File Upload Failed', + + 'JS_DUPLICATES_DETECTED' => 'Double (s) détectée!', ); \ No newline at end of file diff --git a/pkg/vtiger/translations/Hungarian/modules/Calendar.php b/pkg/vtiger/translations/Hungarian/modules/Calendar.php index db7b1646dff6483b400930d6e21958f4353864d2..db75ce15d6641c793a18af149c8ce1e7736f26ec 100644 --- a/pkg/vtiger/translations/Hungarian/modules/Calendar.php +++ b/pkg/vtiger/translations/Hungarian/modules/Calendar.php @@ -147,6 +147,9 @@ $languageStrings = array( 'LBL_NOVEMBER' => 'November', 'LBL_DECEMBER' => 'December', 'LBL_CLICK_HERE_TO_VIEW' => 'Ide kattintva megtekintheti', + + 'LBL_TOTAL_EVENTS_DUPLICATED' => 'Nem ismétlÅ‘dÅ‘ események kimarad', + 'LBL_TOTAL_TASKS_DUPLICATED' => 'Nem ismétlÅ‘dÅ‘ feladatok kimarad', ); $jsLanguageStrings = array( 'LBL_ADD_EVENT_TASK' => 'Esemény / Feladat', diff --git a/pkg/vtiger/translations/Hungarian/modules/Settings/LayoutEditor.php b/pkg/vtiger/translations/Hungarian/modules/Settings/LayoutEditor.php index c8620afeb4d4c33cc7a62427d6ddf9406e774470..2a21be60a14e39cacc77dfa1ade8f105fe17228c 100644 --- a/pkg/vtiger/translations/Hungarian/modules/Settings/LayoutEditor.php +++ b/pkg/vtiger/translations/Hungarian/modules/Settings/LayoutEditor.php @@ -136,6 +136,20 @@ $languageStrings = array( 'LBL_DETAIL_HEADER' => 'Rekord fejlécét', 'LBL_HEADER_FIELD' => 'Fejléc Megtekintése', + 'LBL_DUPLICATE_HANDLING' => 'IsmétlÅ‘dÅ‘ megelÅ‘zése', + 'LBL_DUPLICATE_CHECK' => 'Engedélyezze duplikáció', + 'LBL_DUPLICATION_INFO_MESSAGE' => 'IsmétlÅ‘dÅ‘ elleni funkció csak megakadályozza az új ismétlÅ‘dÅ‘ rekordok a szerzés a felhasználók által létrehozott és külsÅ‘ alkalmazásokhoz. Records létrehozott Import', + 'LBL_SELECT_FIELDS_FOR_DUPLICATION' => 'Válassza ki az egyedi mezÅ‘ket, amelyek ismétlÅ‘dÅ‘ rekordokat kell ellenÅ‘rizni', + 'LBL_SELECT_FIELDS' => 'Select Fields', + 'LBL_MAX_3_FIELDS' => 'Max 3 Fields', + 'LBL_SELECT_RULE' => 'Válassza szabály kezelési ismétlÅ‘dések', + 'LBL_ALLOW_DUPLICATES' => 'Hagyjuk ismétlÅ‘dések', + 'LBL_DO_NOT_ALLOW_DUPLICATES' => 'Ne engedje, hogy másolatokat', + 'LBL_DUPLICATES_IN_SYNC_MESSAGE' => 'Kell tennie, ha duplikált rekord talált szinkronizálása közben külsÅ‘ alkalmazást', + 'LBL_PREFER_LATEST_RECORD' => 'Inkább legújabb rekord', + 'LBL_PREFER_INTERNAL_RECORD' => 'Inkább belsÅ‘ rekord', + 'LBL_PREFER_EXTERNAL_RECORD' => 'Inkább külsÅ‘ rekord', + 'LBL_SYNC_TOOLTIP_MESSAGE' => 'Inkább legújabb rekord - Legutóbb módosÃtott rekord adatok megmaradnak katalógusa Inkább belsÅ‘ rekord - MeglévÅ‘ rekord megmaradnak, ez katalógusa Inkább külsÅ‘ rekord - Az adatok a külsÅ‘ alkalmazás lesz másolva', ); $jsLanguageStrings = array( 'JS_BLOCK_VISIBILITY_SHOW' => 'Blokk Térkép engedélyezve', @@ -196,4 +210,7 @@ Biztos, hogy törölni akarod ezt a mezÅ‘t?', 'JS_NAME_FIELDS_APPEAR_IN_HEADER_BY_DEFAULT' => 'Név mezÅ‘ jelenik meg a Fejlécben alapértelmezés szerint', 'JS_FIELD_IS_HEADER_ENABLED_FOR_VTIGER7' => 'Ez a MezÅ‘ Fejlécében engedélyezett Vtiger7, Ez jelenik meg Összefoglaló Megtekintése', + 'JS_DUPLICATE_HANDLING_SUCCESS_MESSAGE' => 'Sikeresen frissÃtve vizsgálni kiválasztott mezÅ‘k ismétlÅ‘dések megelÅ‘zés', + 'JS_DUPLICATE_HANDLING_FAILURE_MESSAGE' => 'Elmulasztotta figyelembe venni a kiválasztott mezÅ‘k ismétlÅ‘dések megelÅ‘zés', + 'JS_DUPLICATE_CHECK_DISABLED' => 'IsmétlÅ‘dÅ‘ deaktivált', ); \ No newline at end of file diff --git a/pkg/vtiger/translations/Hungarian/modules/Vtiger.php b/pkg/vtiger/translations/Hungarian/modules/Vtiger.php index 1dbc08324d1be901aab5af5a64efcafc5a370db8..f165ed861413712946c60d65be533de636d1d8b1 100644 --- a/pkg/vtiger/translations/Hungarian/modules/Vtiger.php +++ b/pkg/vtiger/translations/Hungarian/modules/Vtiger.php @@ -1080,6 +1080,16 @@ kÃvül Vtiger.', 'LBL_SLA_INFORMATION' => 'SLA Információk', 'LBL_TO_USE_SWITCH_TO_NEW_LOOK' => 'A <b>%s</ b>, azt ajánljuk, hogy kapcsolja ki a új megjelenés.', 'LBL_DELETE_USER_CONFIRMATION' => 'Amikor egy felhasználó törlésre kerül, a felhasználó lesz megjelölve, mint "inaktÃv", és új rekordokat lehet rendelni a felhasználó, és a felhasználó nem lesz képes bejelentkezni. Biztos vagy benne, hogy törölni akarod?', + + 'LBL_DUPLICATES' => 'ismétlÅ‘dések', + 'LBL_DUPLICATES_DETECTED' => 'IsmétlÅ‘dÅ‘ (ek) észlelt!', + 'LBL_DUPLICATES_FOUND_MESSAGE' => 'Ez a%s nem lehet menteni, mert az ismétlÅ‘dÅ‘%s létezik Vtiger illÅ‘ értékeket%s.', + 'LBL_VTIGER_NOTIFICATION' => 'Ãœzenet: Vtiger rendszer értesÃtések', + 'LBL_DUPLICATION_FAILURE_FROM_WORKFLOWS' => 'A következÅ‘%s nem lehetett menteni a „%s†workflow', + 'LBL_DUPLICATION_FAILURE_FROM_WEBFORMS' => 'A következÅ‘%s nem lehetett menteni a „%s†webform', + 'LBL_DUPLICATION_FAILURE_FOR_ADMIN' => 'Akkor%s módosÃtani ismétlÅ‘dÅ‘ megelÅ‘zési szabályokat.', + 'LBL_DUPLICATION_FAILURE_FOR_NON_ADMIN' => 'Kérje a rendszergazda felülvizsgálata az ismétlÅ‘dÅ‘ szabályok', + 'LBL_DUPLICATE_RECORD_LISTS' => 'IsmétlÅ‘dÅ‘%s (s):', ); $jsLanguageStrings = array( 'JS_EMAIL_SERVER_CONFIGURATION' => 'Kérjük, hogy állÃtsd be a kimenÅ‘ email szerver (SMTP) beállÃtásait a BeállÃtások oldalon', @@ -1485,4 +1495,6 @@ $jsLanguageStrings = array( 'JS_UPLOAD_SUCCESSFUL' => 'Felküldött sikeresen', 'JS_UPLOAD_FAILED' => 'Fájl feltöltés sikertelen', + + 'JS_DUPLICATES_DETECTED' => 'IsmétlÅ‘dÅ‘ (ek) észlelt!', ); \ No newline at end of file diff --git a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Calendar.php b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Calendar.php index e2c5040a9f838931520d9874a6b18f88473c531e..20f6b6a966cd4aa0ed07552dc48d343e941be096 100644 --- a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Calendar.php +++ b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Calendar.php @@ -147,6 +147,9 @@ $languageStrings = array( 'LBL_NOVEMBER' => 'Novembre', 'LBL_DECEMBER' => 'Dicembre', 'LBL_CLICK_HERE_TO_VIEW' => 'Clicca qui per vedere', + + 'LBL_TOTAL_EVENTS_DUPLICATED' => 'Numero di eventi duplicati saltato', + 'LBL_TOTAL_TASKS_DUPLICATED' => 'Numero di Task duplicati saltato', ); $jsLanguageStrings = array( 'LBL_ADD_EVENT_TASK' => 'Add Event / Compito' , diff --git a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/LayoutEditor.php b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/LayoutEditor.php index b5c3bfd252bf8d911ba4b9572a09fd1586224f2b..acb7644f9ad0cfd7c57dfe9bbcf7735f9b38d65a 100644 --- a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/LayoutEditor.php +++ b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Settings/LayoutEditor.php @@ -136,6 +136,20 @@ $languageStrings = array( 'LBL_DETAIL_HEADER' => 'Record di intestazione', 'LBL_HEADER_FIELD' => 'La Visualizzazione Dell\'Intestazione', + 'LBL_DUPLICATE_HANDLING' => 'Prevenzione Duplicate', + 'LBL_DUPLICATE_CHECK' => 'Abilita controllo duplicato', + 'LBL_DUPLICATION_INFO_MESSAGE' => 'Duplicare funzione di prevenzione impedisce solo i nuovi record duplicati da sempre creati dagli utenti e le applicazioni esterne. Record creati da Import', + 'LBL_SELECT_FIELDS_FOR_DUPLICATION' => 'Selezionare i campi unici sui quali devono essere controllati i record duplicati', + 'LBL_SELECT_FIELDS' => 'selezionare i campi', + 'LBL_MAX_3_FIELDS' => 'Max 3 campi', + 'LBL_SELECT_RULE' => 'Selezionare regola per i duplicati di movimentazione', + 'LBL_ALLOW_DUPLICATES' => 'Consenti duplicati', + 'LBL_DO_NOT_ALLOW_DUPLICATES' => 'Non consentire duplicati', + 'LBL_DUPLICATES_IN_SYNC_MESSAGE' => "Azione da intraprendere in caso di rilevamento record duplicato durante la sincronizzazione con l'applicazione esterna", + 'LBL_PREFER_LATEST_RECORD' => 'Preferisco ultimo disco', + 'LBL_PREFER_INTERNAL_RECORD' => 'Preferisco record interno', + 'LBL_PREFER_EXTERNAL_RECORD' => 'Preferisco record esterno', + 'LBL_SYNC_TOOLTIP_MESSAGE' => "Preferisco ultimo disco - registrare i dati di recente modificate saranno mantenute <br> Preferisco record interno - esistente record sarà trattenuto in quanto è <br> Preferisco record esterno - Dati dall'applicazione esterna verranno copiati", ); $jsLanguageStrings = array( 'JS_BLOCK_VISIBILITY_SHOW' => 'Visualizza blocco attivato' , @@ -196,4 +210,7 @@ Sei sicuro di voler eliminare questo campo?', 'JS_NAME_FIELDS_APPEAR_IN_HEADER_BY_DEFAULT' => 'Nome campo visualizzato nell\'Intestazione di default', 'JS_FIELD_IS_HEADER_ENABLED_FOR_VTIGER7' => 'Questo Campo di Intestazione è abilitato per Vtiger7, verrà visualizzato nella Visualizzazione di Riepilogo', + 'JS_DUPLICATE_HANDLING_SUCCESS_MESSAGE' => 'Con successo aggiornato a prendere in considerazione i campi selezionati nella prevenzione duplicati', + 'JS_DUPLICATE_HANDLING_FAILURE_MESSAGE' => 'Impossibile prendere in considerazione i campi selezionati nella prevenzione duplicati', + 'JS_DUPLICATE_CHECK_DISABLED' => 'assegno duplicato è disattivato', ); \ No newline at end of file diff --git a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Vtiger.php b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Vtiger.php index 57d578e18aec8a2ddd6e21ddf4d7f0267e8aaa47..09df59de2bb4d4f9230c327c07572b4ece1a3bf2 100644 --- a/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Vtiger.php +++ b/pkg/vtiger/translations/ItalianLanguagePack_it_it/modules/Vtiger.php @@ -1075,6 +1075,16 @@ al di fuori di Vtiger.', 'LBL_SLA_INFORMATION' => 'SLA Informazioni', 'LBL_TO_USE_SWITCH_TO_NEW_LOOK' => 'Per utilizzare il <b>%s</b>, si consiglia di passare a nuovo look.', 'LBL_DELETE_USER_CONFIRMATION' => "Quando viene cancellato un utente, l'utente verrà contrassegnato come inattivo e non nuovi record possono essere assegnati all'Utente, e l'utente non sarà in grado di effettuare il login. Sei sicuro di voler eliminare?", + + 'LBL_DUPLICATES' => 'duplicati', + 'LBL_DUPLICATES_DETECTED' => 'Duplicate (s) rilevata!', + 'LBL_DUPLICATES_FOUND_MESSAGE' => 'Questo%s non può essere salvato in quanto duplicato%s esiste in Vtiger con corrispondenti valori per%s.', + 'LBL_VTIGER_NOTIFICATION' => 'Messaggio da: Vtiger Sistema Notifiche', + 'LBL_DUPLICATION_FAILURE_FROM_WORKFLOWS' => 'La seguente%s non può essere salvato da "%s" del flusso di lavoro', + 'LBL_DUPLICATION_FAILURE_FROM_WEBFORMS' => 'La seguente%s non può essere salvato da "%s" modulo web', + 'LBL_DUPLICATION_FAILURE_FOR_ADMIN' => 'È possibile%s per modificare le regole di prevenzione duplicati.', + 'LBL_DUPLICATION_FAILURE_FOR_NON_ADMIN' => "Contattare l'amministratore per la revisione delle regole duplicati", + 'LBL_DUPLICATE_RECORD_LISTS' => 'Duplicate%s (s):', ); $jsLanguageStrings = array( 'JS_EMAIL_SERVER_CONFIGURATION' => 'Please configure your outgoing server settings from the settings page', @@ -1480,4 +1490,5 @@ $jsLanguageStrings = array( 'JS_UPLOAD_SUCCESSFUL' => 'Caricato con successo File', 'JS_UPLOAD_FAILED' => 'File Upload non riuscito', + 'JS_DUPLICATES_DETECTED' => 'Duplicate (s) rilevata!', ); \ No newline at end of file diff --git a/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Calendar.php b/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Calendar.php index 4d049ac699c998aae1ed1c04036b3ecc019d29d2..42ffa394f8f3b7497f56ee66ebc67bea8d04eb54 100644 --- a/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Calendar.php +++ b/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Calendar.php @@ -147,6 +147,9 @@ $languageStrings = array( 'LBL_NOVEMBER' => 'Noviembre', 'LBL_DECEMBER' => 'De diciembre de', 'LBL_CLICK_HERE_TO_VIEW' => 'Haga clic aquà para ver', + + 'LBL_TOTAL_EVENTS_DUPLICATED' => 'Número de eventos duplicados saltado', + 'LBL_TOTAL_TASKS_DUPLICATED' => 'Número de tareas duplicadas saltado', ); $jsLanguageStrings = array( 'LBL_ADD_EVENT_TASK' => 'Agregar Evento / Tarea' , diff --git a/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Settings/LayoutEditor.php b/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Settings/LayoutEditor.php index 8a41d820f28c93b8647ae55d0bf873e072cfad30..8b10a8dfed1543afecefb6e661b52ece05d5e9d0 100644 --- a/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Settings/LayoutEditor.php +++ b/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Settings/LayoutEditor.php @@ -136,6 +136,20 @@ $languageStrings = array( 'LBL_DETAIL_HEADER' => 'Registro de encabezado', 'LBL_HEADER_FIELD' => 'Encabezado De La Vista', + 'LBL_DUPLICATE_HANDLING' => 'Prevención duplicado', + 'LBL_DUPLICATE_CHECK' => 'Habilitar comprobación de duplicados', + 'LBL_DUPLICATION_INFO_MESSAGE' => 'Duplicar función de prevención sólo previene nuevos registros duplicados de conseguir creado por los usuarios y aplicaciones externas. Los registros creados a partir de importación', + 'LBL_SELECT_FIELDS_FOR_DUPLICATION' => 'Seleccione los campos únicos en los que se van a comprobar los registros duplicados', + 'LBL_SELECT_FIELDS' => 'Seleccionar campos', + 'LBL_MAX_3_FIELDS' => 'Max 3 campos', + 'LBL_SELECT_RULE' => 'Seleccione la regla de duplicados de manipulación', + 'LBL_ALLOW_DUPLICATES' => 'Permitir Duplicados', + 'LBL_DO_NOT_ALLOW_DUPLICATES' => 'No permita que Duplicados', + 'LBL_DUPLICATES_IN_SYNC_MESSAGE' => 'Acción a realizar si no se encuentra registro duplicado, mientras que la sincronización con la aplicación externa', + 'LBL_PREFER_LATEST_RECORD' => 'Prefiero último disco', + 'LBL_PREFER_INTERNAL_RECORD' => 'Prefiero registro interno', + 'LBL_PREFER_EXTERNAL_RECORD' => 'Prefiero registro externo', + 'LBL_SYNC_TOOLTIP_MESSAGE' => 'Prefiero último disco - datos de registro Más recientemente modificados serán retenidos <br> prefieren registro interno - existente registro será retenido, ya que es <br> prefieren registro externo - Los datos de la aplicación externa será copiado', ); $jsLanguageStrings = array( 'JS_BLOCK_VISIBILITY_SHOW' => 'Mostrar bloque abierto' , @@ -196,4 +210,7 @@ Está seguro de que desea eliminar este campo?', 'JS_NAME_FIELDS_APPEAR_IN_HEADER_BY_DEFAULT' => 'Nombre de los campos aparecen en la Cabecera por defecto', 'JS_FIELD_IS_HEADER_ENABLED_FOR_VTIGER7' => 'Este Campo es Encabezado habilitado para Vtiger7, aparecerá en la Vista de Resumen', + 'JS_DUPLICATE_HANDLING_SUCCESS_MESSAGE' => 'Se ha actualizado correctamente a considerar los campos seleccionados en la prevención de duplicados', + 'JS_DUPLICATE_HANDLING_FAILURE_MESSAGE' => 'No tuvo en cuenta los campos seleccionados en la prevención de duplicados', + 'JS_DUPLICATE_CHECK_DISABLED' => 'comprobación de duplicados está desactivada', ); \ No newline at end of file diff --git a/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Vtiger.php b/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Vtiger.php index f55c2e13ec931b2e9a42f808856e0addf4fe3617..c67bb5002697fac8121d98fe1924b4521a14edb1 100644 --- a/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Vtiger.php +++ b/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Vtiger.php @@ -1072,6 +1072,16 @@ fuera de Vtiger.', 'LBL_SLA_INFORMATION' => 'SLA Información', 'LBL_TO_USE_SWITCH_TO_NEW_LOOK' => 'To use <b>%s</b>, we recommend you to Switch to new look.', 'LBL_DELETE_USER_CONFIRMATION' => 'Cuando se elimina un usuario, el usuario será marcado como "inactivo" y no hay nuevos registros pueden ser asignados al usuario, y el usuario no será capaz de iniciar sesión. ¿Estas seguro que quieres borrarlo?', + + 'LBL_DUPLICATES' => 'duplicados', + 'LBL_DUPLICATES_DETECTED' => 'Duplicar (s) detectado!', + 'LBL_DUPLICATES_FOUND_MESSAGE' => 'Esto%s no se puede guardar desde duplicado%s existe en VTiger a juego con los valores de%s.', + 'LBL_VTIGER_NOTIFICATION' => 'Mensaje: VTiger Sistema de Notificaciones', + 'LBL_DUPLICATION_FAILURE_FROM_WORKFLOWS' => 'El siguiente%s no pudo ser salvado de flujo de trabajo "%s"', + 'LBL_DUPLICATION_FAILURE_FROM_WEBFORMS' => 'El siguiente%s no pudo ser salvado de formulario web "%s"', + 'LBL_DUPLICATION_FAILURE_FOR_ADMIN' => 'Puede%s para modificar las normas de prevención de duplicados.', + 'LBL_DUPLICATION_FAILURE_FOR_NON_ADMIN' => 'Póngase en contacto con el administrador para obtener la revisión de las reglas duplicadas', + 'LBL_DUPLICATE_RECORD_LISTS' => 'Duplicar%s (s):', ); $jsLanguageStrings = array( 'JS_EMAIL_SERVER_CONFIGURATION' => 'Por favor configura el servidor de salida desde la página de configuración ', @@ -1462,4 +1472,6 @@ $jsLanguageStrings = array( 'JS_UPLOAD_SUCCESSFUL' => 'Archivo subido exitosamente', 'JS_UPLOAD_FAILED' => 'Cargar archivo Error', + + 'JS_DUPLICATES_DETECTED' => 'Duplicar (s) detectado!', ); \ No newline at end of file diff --git a/pkg/vtiger/translations/PolishLanguagePack_pl_pl/modules/Calendar.php b/pkg/vtiger/translations/PolishLanguagePack_pl_pl/modules/Calendar.php index 031b5b5efe6385300121788dc69729b54a4052bd..73e8ea16be042391778eb28a5866ca9edc4080f0 100644 --- a/pkg/vtiger/translations/PolishLanguagePack_pl_pl/modules/Calendar.php +++ b/pkg/vtiger/translations/PolishLanguagePack_pl_pl/modules/Calendar.php @@ -168,6 +168,9 @@ $languageStrings = array( 'LBL_NOVEMBER' => 'Listopad', 'LBL_DECEMBER' => 'GrudzieÅ„', 'LBL_CLICK_HERE_TO_VIEW' => 'Kliknij tutaj, aby wyÅ›wietlić', + + 'LBL_TOTAL_EVENTS_DUPLICATED' => 'Ilość duplikatów Wydarzenia pomijane', + 'LBL_TOTAL_TASKS_DUPLICATED' => 'Ilość Duplikaty pomijane', ); $jsLanguageStrings = array( diff --git a/pkg/vtiger/translations/PolishLanguagePack_pl_pl/modules/Settings/LayoutEditor.php b/pkg/vtiger/translations/PolishLanguagePack_pl_pl/modules/Settings/LayoutEditor.php index 9ce5c9c3ba6388c2bb6c86f4cd9ceb4c86747ebb..5efc2f83f438d9dd9dfbbc16894f864a140fdf4b 100755 --- a/pkg/vtiger/translations/PolishLanguagePack_pl_pl/modules/Settings/LayoutEditor.php +++ b/pkg/vtiger/translations/PolishLanguagePack_pl_pl/modules/Settings/LayoutEditor.php @@ -135,6 +135,20 @@ $languageStrings = array( 'LBL_DETAIL_HEADER' => 'Rekord nagłówka', 'LBL_HEADER_FIELD' => 'Widok Nagłówka', + 'LBL_DUPLICATE_HANDLING' => 'Zapobieganie duplikat', + 'LBL_DUPLICATE_CHECK' => 'WÅ‚Ä…cz sprawdzanie zduplikowanych', + 'LBL_DUPLICATION_INFO_MESSAGE' => 'Powielać funkcji zapobiegania tylko zapobiega powstawaniu nowych zduplikowane rekordy z coraz tworzone przez użytkowników i aplikacji zewnÄ™trznych. Rekordy utworzone z importu', + 'LBL_SELECT_FIELDS_FOR_DUPLICATION' => 'Wybierz unikalne pól, na których majÄ… być sprawdzane zduplikowane rekordy', + 'LBL_SELECT_FIELDS' => 'Wybierz Fields', + 'LBL_MAX_3_FIELDS' => 'Max 3 Fields', + 'LBL_SELECT_RULE' => 'Wybierz reguÅ‚a duplikatów obsÅ‚ugi', + 'LBL_ALLOW_DUPLICATES' => 'Pozostawić duplikaty', + 'LBL_DO_NOT_ALLOW_DUPLICATES' => 'Nie dopuszczać duplikaty', + 'LBL_DUPLICATES_IN_SYNC_MESSAGE' => 'DziaÅ‚ania należy podjąć, jeÅ›li duplikat rekord zostanie znaleziony podczas synchronizacji z zewnÄ™trznej aplikacji', + 'LBL_PREFER_LATEST_RECORD' => 'WolÄ™ ostatni rekord', + 'LBL_PREFER_INTERNAL_RECORD' => 'WolÄ™ rekord wewnÄ™trznego', + 'LBL_PREFER_EXTERNAL_RECORD' => 'WolÄ™ rekord zewnÄ™trznego', + 'LBL_SYNC_TOOLTIP_MESSAGE' => 'WolÄ™ najnowszÄ… pÅ‚ytÄ™ - Ostatnio zmodyfikowane rejestrować dane zostanÄ… zachowane NajwiÄ™ksza wolÄ… wewnÄ™trzny rekord - IstniejÄ…cy rekord zostanie zachowana, ponieważ jest NajwiÄ™ksza wolÄ… rekord zewnÄ™trznego - Dane z zewnÄ™trznej aplikacji zostanÄ… skopiowane', ); $jsLanguageStrings = array( 'JS_BLOCK_VISIBILITY_SHOW' => 'Blok Pokaż wÅ‚Ä…czony' , @@ -195,4 +209,7 @@ JesteÅ› pewien że chcesz usunąć to pole?', 'JS_NAME_FIELDS_APPEAR_IN_HEADER_BY_DEFAULT' => 'Nazwa pola sÄ… wyÅ›wietlane w nagłówku domyÅ›lnie', 'JS_FIELD_IS_HEADER_ENABLED_FOR_VTIGER7' => 'To pole nagłówka jest wÅ‚Ä…czona Vtiger7, zostanie ona wyÅ›wietlona w widoku "podsumowanie"', + 'JS_DUPLICATE_HANDLING_SUCCESS_MESSAGE' => 'PomyÅ›lnie zaktualizowany do rozważenia wybranych pól w zapobieganiu duplikatów', + 'JS_DUPLICATE_HANDLING_FAILURE_MESSAGE' => 'Nie wzięła pod uwagÄ™ wybrane pola w zapobieganiu duplikatów', + 'JS_DUPLICATE_CHECK_DISABLED' => 'Duplikat wyboru jest wyÅ‚Ä…czony', ); \ No newline at end of file diff --git a/pkg/vtiger/translations/PolishLanguagePack_pl_pl/modules/Vtiger.php b/pkg/vtiger/translations/PolishLanguagePack_pl_pl/modules/Vtiger.php index c8d020dcfa4194f2938e53891fce15c1176fb34c..6d26356e55537d6e82b753031194f06d04866601 100644 --- a/pkg/vtiger/translations/PolishLanguagePack_pl_pl/modules/Vtiger.php +++ b/pkg/vtiger/translations/PolishLanguagePack_pl_pl/modules/Vtiger.php @@ -1204,6 +1204,16 @@ na zewnÄ…trz free rosyjska.', 'LBL_SLA_INFORMATION' => 'CCA informacje', 'LBL_TO_USE_SWITCH_TO_NEW_LOOK' => 'Aby korzystać <b>%s</ b>, zalecamy, aby przeÅ‚Ä…czyć na nowy wyglÄ…d.', 'LBL_DELETE_USER_CONFIRMATION' => 'Gdy użytkownik zostanie usuniÄ™ty, użytkownik zostanie oznaczona jako "nieaktywny" i żadne nowe rekordy mogÄ… być przypisane do użytkownika, a użytkownik nie bÄ™dzie mógÅ‚ siÄ™ zalogować. Czy na pewno chcesz usunąć?', + + 'LBL_DUPLICATES' => 'duplikaty', + 'LBL_DUPLICATES_DETECTED' => 'Duplikat (e) wykryto!', + 'LBL_DUPLICATES_FOUND_MESSAGE' => 'Ten%s nie może zostać zapisany, ponieważ duplikat%s istnieje w vtiger z pasujÄ…cymi wartoÅ›ci dla%s.', + 'LBL_VTIGER_NOTIFICATION' => 'Wiadomość od: vtiger Systemu ZgÅ‚oszeÅ„', + 'LBL_DUPLICATION_FAILURE_FROM_WORKFLOWS' => 'Poniższy%s nie może być zapisany z „%s†workflow', + 'LBL_DUPLICATION_FAILURE_FROM_WEBFORMS' => 'Poniższy%s nie może być zapisany z „%s†formularza internetowego', + 'LBL_DUPLICATION_FAILURE_FOR_ADMIN' => 'Można%s modyfikować duplikaty zasady profilaktyki.', + 'LBL_DUPLICATION_FAILURE_FOR_NON_ADMIN' => 'Skontaktuj siÄ™ z administratorem w celu rewizji zasad duplikaty', + 'LBL_DUPLICATE_RECORD_LISTS' => 'Duplikat%s (s):', ); $jsLanguageStrings = array( 'JS_EMAIL_SERVER_CONFIGURATION' => 'Należy skonfigurować ustawienia serwera poczty wychodzÄ…cej - SMTP', @@ -1633,4 +1643,6 @@ $jsLanguageStrings = array( 'JS_UPLOAD_SUCCESSFUL' => 'Dodany plik z powodzeniem', 'JS_UPLOAD_FAILED' => 'PrzesyÅ‚anie pliku nie powiodÅ‚o', + + 'JS_DUPLICATES_DETECTED' => 'Duplikat (e) wykryto!', ); \ No newline at end of file diff --git a/pkg/vtiger/translations/RomanianLanguagePack_rm_rm/modules/Calendar.php b/pkg/vtiger/translations/RomanianLanguagePack_rm_rm/modules/Calendar.php index 26d35974fa2941d2526b72cb99ab79313acc951d..a5362d9874cd030249a262f9bbe6960e63e5b9d1 100644 --- a/pkg/vtiger/translations/RomanianLanguagePack_rm_rm/modules/Calendar.php +++ b/pkg/vtiger/translations/RomanianLanguagePack_rm_rm/modules/Calendar.php @@ -147,6 +147,9 @@ $languageStrings = array( 'LBL_NOVEMBER' => 'Noiembrie', 'LBL_DECEMBER' => 'Decembrie', 'LBL_CLICK_HERE_TO_VIEW' => 'Apasa aici pentru a vizualiza', + + 'LBL_TOTAL_EVENTS_DUPLICATED' => 'Nr de evenimente duplicate omit', + 'LBL_TOTAL_TASKS_DUPLICATED' => 'Nr Sarcini duplicate omit', ); $jsLanguageStrings = array( 'LBL_ADD_EVENT_TASK' => 'Add Event / Sarcină' , diff --git a/pkg/vtiger/translations/RomanianLanguagePack_rm_rm/modules/Settings/LayoutEditor.php b/pkg/vtiger/translations/RomanianLanguagePack_rm_rm/modules/Settings/LayoutEditor.php index 38d6ac42febd0f2ae02e86e7682fa66692ee9462..1596954002c62dfbc5bf735dd8413a1b1baf729f 100644 --- a/pkg/vtiger/translations/RomanianLanguagePack_rm_rm/modules/Settings/LayoutEditor.php +++ b/pkg/vtiger/translations/RomanianLanguagePack_rm_rm/modules/Settings/LayoutEditor.php @@ -136,6 +136,20 @@ $languageStrings = array( 'LBL_DETAIL_HEADER' => 'ÃŽnregistrarea antet', 'LBL_HEADER_FIELD' => 'Tip De Titlu', + 'LBL_DUPLICATE_HANDLING' => 'Prevenirea dublură', + 'LBL_DUPLICATE_CHECK' => 'Activează cec duplicat', + 'LBL_DUPLICATION_INFO_MESSAGE' => 'Caracteristica dublură de prevenire previne doar noi înregistrări duplicat de la obtinerea create de către utilizatori È™i aplicaÈ›ii externe. ÃŽnregistrări create din import', + 'LBL_SELECT_FIELDS_FOR_DUPLICATION' => 'SelectaÈ›i câmpurile unice pe care urmează să fie verificate înregistrările duplicat', + 'LBL_SELECT_FIELDS' => 'SelectaÈ›i Domenii', + 'LBL_MAX_3_FIELDS' => 'Max 3 Fields', + 'LBL_SELECT_RULE' => 'SelectaÈ›i regula pentru duplicate de manipulare', + 'LBL_ALLOW_DUPLICATES' => 'PermiteÈ›i dubluri', + 'LBL_DO_NOT_ALLOW_DUPLICATES' => 'Nu permiteÈ›i dubluri', + 'LBL_DUPLICATES_IN_SYNC_MESSAGE' => 'AcÈ›iunea de a lua în cazul în care înregistrarea duplicat este găsit în timp ce sincronizarea cu aplicaÈ›ie externă', + 'LBL_PREFER_LATEST_RECORD' => 'PreferaÈ›i cele mai recente de înregistrare', + 'LBL_PREFER_INTERNAL_RECORD' => 'PreferaÈ›i înregistrare internă', + 'LBL_PREFER_EXTERNAL_RECORD' => 'PreferaÈ›i înregistrare externă', + 'LBL_SYNC_TOOLTIP_MESSAGE' => 'Prefer cele mai recente înregistrări - date de înregistrare cel mai recent modificate vor fi păstrate <br> PreferaÈ›i record de interne - existente de înregistrare vor fi păstrate este <br> PreferaÈ›i record de externe - Datele din cererea externă va fi copiat', ); $jsLanguageStrings = array( 'JS_BLOCK_VISIBILITY_SHOW' => 'Block show enabled' , @@ -196,4 +210,7 @@ Sigur că doriÈ›i să È™tergeÈ›i acest domeniu?', 'JS_NAME_FIELDS_APPEAR_IN_HEADER_BY_DEFAULT' => 'Nume câmp sunt afiÈ™ate în antetul implicit', 'JS_FIELD_IS_HEADER_ENABLED_FOR_VTIGER7' => 'Acest câmp de antet este activată Vtiger7, acesta va fi afiÈ™at în vizualizarea "rezumat"', + 'JS_DUPLICATE_HANDLING_SUCCESS_MESSAGE' => 'Actualizat cu succes pentru a lua în considerare domeniile selectate în prevenirea duplicate', + 'JS_DUPLICATE_HANDLING_FAILURE_MESSAGE' => 'Nu a reuÈ™it să ia în considerare domeniile selectate în prevenirea duplicate', + 'JS_DUPLICATE_CHECK_DISABLED' => 'cec duplicat este dezactivat', ); \ No newline at end of file diff --git a/pkg/vtiger/translations/RomanianLanguagePack_rm_rm/modules/Vtiger.php b/pkg/vtiger/translations/RomanianLanguagePack_rm_rm/modules/Vtiger.php index cf494780b514b89e3435df600581876614d9af02..6a223c678d88ba15f5a99c9040713a9cbbab3c39 100644 --- a/pkg/vtiger/translations/RomanianLanguagePack_rm_rm/modules/Vtiger.php +++ b/pkg/vtiger/translations/RomanianLanguagePack_rm_rm/modules/Vtiger.php @@ -1075,6 +1075,16 @@ FaceÈ›i clic pe autorizaÈ›i È™i de a obÈ›ine Contacte din Google.', 'LBL_SLA_INFORMATION' => 'SLA informaÈ›ii', 'LBL_TO_USE_SWITCH_TO_NEW_LOOK' => 'Pentru a utiliza <b>%s</b>, vă recomandăm să treceÈ›i la nou look.', 'LBL_DELETE_USER_CONFIRMATION' => 'Atunci când un utilizator este È™ters, utilizatorul va fi marcat ca fiind "inactive" È™i nici o nouă înregistrări pot fi atribuite Utilizatorului, iar utilizatorul nu va putea conecta. EÈ™ti sigur că vrei să È™tergi?', + + 'LBL_DUPLICATES' => 'dubluri', + 'LBL_DUPLICATES_DETECTED' => 'Duplicate (e) detectat!', + 'LBL_DUPLICATES_FOUND_MESSAGE' => 'Acest%s nu poate fi salvată deoarece există două exemplare%s în Vtiger cu valori de potrivire pentru%s.', + 'LBL_VTIGER_NOTIFICATION' => 'Mesaj din: Vtiger Notificări de sistem', + 'LBL_DUPLICATION_FAILURE_FROM_WORKFLOWS' => 'Următoarele%s nu a putut fi salvat de la „%s“ flux de lucru', + 'LBL_DUPLICATION_FAILURE_FROM_WEBFORMS' => 'Următoarele%s nu a putut fi salvat de la „%s“ formularul web', + 'LBL_DUPLICATION_FAILURE_FOR_ADMIN' => 'PuteÈ›i% de a modifica normele de prevenire duplicat.', + 'LBL_DUPLICATION_FAILURE_FOR_NON_ADMIN' => 'ContactaÈ›i administratorul pentru revizuirea normelor duplicat', + 'LBL_DUPLICATE_RECORD_LISTS' => 'Duplica%s (e):', ); $jsLanguageStrings = array( 'JS_EMAIL_SERVER_CONFIGURATION' => 'Please configure your outgoing server settings from the settings page', @@ -1477,4 +1487,6 @@ $jsLanguageStrings = array( 'JS_UPLOAD_SUCCESSFUL' => 'FiÈ™ier încărcat cu succes', 'JS_UPLOAD_FAILED' => 'ÃŽncărcaÈ›i fiÈ™ier eÈ™uat', + + 'JS_DUPLICATES_DETECTED' => 'Duplicate (e) detectat!', ); \ No newline at end of file diff --git a/pkg/vtiger/translations/Russian/modules/Calendar.php b/pkg/vtiger/translations/Russian/modules/Calendar.php index 6dcad66dcd7196c52d00afbeb60fe344808e650c..8d7be508f487d3340f046c251a2be21a30708278 100644 --- a/pkg/vtiger/translations/Russian/modules/Calendar.php +++ b/pkg/vtiger/translations/Russian/modules/Calendar.php @@ -146,6 +146,9 @@ $languageStrings = array( 'LBL_NOVEMBER' => 'ÐоÑбрь', 'LBL_DECEMBER' => 'Декабрь', 'LBL_CLICK_HERE_TO_VIEW' => 'Ðажмите Ñюда, чтобы поÑмотреть', + + 'LBL_TOTAL_EVENTS_DUPLICATED' => 'КоличеÑтво повторÑющихÑÑ Ñобытий пропуÑкаютÑÑ', + 'LBL_TOTAL_TASKS_DUPLICATED' => 'КоличеÑтво повторÑющихÑÑ Ð·Ð°Ð´Ð°Ñ‡ пропуÑкаютÑÑ', ); $jsLanguageStrings = array( 'LBL_ADD_EVENT_TASK' => 'Добавить Ñобытие / Задача' , diff --git a/pkg/vtiger/translations/Russian/modules/Settings/LayoutEditor.php b/pkg/vtiger/translations/Russian/modules/Settings/LayoutEditor.php index db53f22b7fc3d9092c20b94739073ad1d4f3329c..697f69383d992a264ed0b5c9b8fa5f7503f5623c 100644 --- a/pkg/vtiger/translations/Russian/modules/Settings/LayoutEditor.php +++ b/pkg/vtiger/translations/Russian/modules/Settings/LayoutEditor.php @@ -136,6 +136,20 @@ $languageStrings = array( 'LBL_DETAIL_HEADER' => 'ЗапиÑÑŒ заголовка', 'LBL_HEADER_FIELD' => 'Вид Заголовка', + 'LBL_DUPLICATE_HANDLING' => 'Дубликат Профилактика', + 'LBL_DUPLICATE_CHECK' => 'Включить дубликат чека', + 'LBL_DUPLICATION_INFO_MESSAGE' => 'Дубликат Ñ„ÑƒÐ½ÐºÑ†Ð¸Ñ Ð¿Ñ€ÐµÐ´Ð¾Ñ‚Ð²Ñ€Ð°Ñ‰ÐµÐ½Ð¸Ñ Ñ‚Ð¾Ð»ÑŒÐºÐ¾ предотвращает новые дубликаты запиÑей от Ð¿Ð¾Ð»ÑƒÑ‡ÐµÐ½Ð¸Ñ Ñозданных пользователÑми и внешними приложениÑми. ЗапиÑи, Ñозданные из импорта', + 'LBL_SELECT_FIELDS_FOR_DUPLICATION' => 'Выберите уникальные полÑ, на которых будут проверÑÑ‚ÑŒÑÑ Ð¿Ð¾Ð²Ñ‚Ð¾Ñ€ÑющиеÑÑ Ð·Ð°Ð¿Ð¸Ñи', + 'LBL_SELECT_FIELDS' => 'Выберите полÑ', + 'LBL_MAX_3_FIELDS' => 'Max 3 ПолÑ', + 'LBL_SELECT_RULE' => 'Выберите правило Ð´Ð»Ñ Ð¾Ð±Ñ€Ð°Ð±Ð¾Ñ‚ÐºÐ¸ дубликатов', + 'LBL_ALLOW_DUPLICATES' => 'Разрешить дубликаты', + 'LBL_DO_NOT_ALLOW_DUPLICATES' => 'Ðе допуÑкать Дубликаты', + 'LBL_DUPLICATES_IN_SYNC_MESSAGE' => 'ДейÑтвие, предпринимаемое, еÑли дубликат запиÑÑŒ найдена во Ð²Ñ€ÐµÐ¼Ñ Ñинхронизации Ñ Ð²Ð½ÐµÑˆÐ½Ð¸Ð¼ приложением', + 'LBL_PREFER_LATEST_RECORD' => 'Предпочитают поÑледнÑÑ Ð·Ð°Ð¿Ð¸ÑÑŒ', + 'LBL_PREFER_INTERNAL_RECORD' => 'Предпочитают внутреннюю запиÑÑŒ', + 'LBL_PREFER_EXTERNAL_RECORD' => 'Предпочитает внешнюю запиÑÑŒ', + 'LBL_SYNC_TOOLTIP_MESSAGE' => 'Предпочитает поÑледнюю запиÑÑŒ - СовÑем недавно измененные данные запиÑей будет Ñохранены <br> Предпочитают внутренние рекорд - СущеÑтвующие запиÑи будут Ñохранены, как Ñто <br> Предпочитает внешнюю запиÑÑŒ - данные из внешнего Ð¿Ñ€Ð¸Ð»Ð¾Ð¶ÐµÐ½Ð¸Ñ Ð±ÑƒÐ´ÐµÑ‚ Ñкопировано', ); $jsLanguageStrings = array( 'JS_BLOCK_VISIBILITY_SHOW' => 'Блок-шоу включен', @@ -196,4 +210,7 @@ $jsLanguageStrings = array( 'JS_NAME_FIELDS_APPEAR_IN_HEADER_BY_DEFAULT' => 'Ð˜Ð¼Ñ Ð¿Ð¾Ð»Ñ Ð¾Ñ‚Ð¾Ð±Ñ€Ð°Ð¶Ð°ÑŽÑ‚ÑÑ Ð² заголовке по умолчанию', 'JS_FIELD_IS_HEADER_ENABLED_FOR_VTIGER7' => 'Ðто поле заголовка включена Vtiger7, она будет отображатьÑÑ Ð² предÑтавлении "Ñводка"', + 'JS_DUPLICATE_HANDLING_SUCCESS_MESSAGE' => 'УÑпешно обновлено раÑÑмотреть выбранные Ð¿Ð¾Ð»Ñ Ð² облаÑти профилактики дублей', + 'JS_DUPLICATE_HANDLING_FAILURE_MESSAGE' => 'Ðе удалоÑÑŒ раÑÑмотреть выбранные Ð¿Ð¾Ð»Ñ Ð² облаÑти профилактики дублей', + 'JS_DUPLICATE_CHECK_DISABLED' => 'Дубликат проверка отключена', ); \ No newline at end of file diff --git a/pkg/vtiger/translations/Russian/modules/Vtiger.php b/pkg/vtiger/translations/Russian/modules/Vtiger.php index 0ecd87e86cd57ab8574a7ccacf5b48151625188a..ce95753129a41a5f99c095990f2413a9bb911f99 100644 --- a/pkg/vtiger/translations/Russian/modules/Vtiger.php +++ b/pkg/vtiger/translations/Russian/modules/Vtiger.php @@ -1074,6 +1074,16 @@ $languageStrings = array( 'LBL_SLA_INFORMATION' => 'ОÐС информациÑ', 'LBL_TO_USE_SWITCH_TO_NEW_LOOK' => 'Ð”Ð»Ñ Ð¸ÑÐ¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ð½Ð¸Ñ <B>%s</B>, мы рекомендуем вам перейти на новый облик.', 'LBL_DELETE_USER_CONFIRMATION' => 'Когда пользователь будет удален, пользователь будет помечен как "неактивные" и никаких новых запиÑей не могут быть назначены на пользователÑ, и пользователь не Ñможет войти в ÑиÑтему. Ð’Ñ‹ уверены, что хотите удалить?', + + 'LBL_DUPLICATES' => 'Дубликаты', + 'LBL_DUPLICATES_DETECTED' => 'Дубликат (s) обнаружено!', + 'LBL_DUPLICATES_FOUND_MESSAGE' => 'Ðто%s не может быть Ñохранен, так как дубликат%s ÑущеÑтвует в Vtiger Ñ ÑоответÑтвующими значениÑми длÑ% Ñ.', + 'LBL_VTIGER_NOTIFICATION' => 'Сообщение от: Vtiger ÑиÑтемы уведомлений', + 'LBL_DUPLICATION_FAILURE_FROM_WORKFLOWS' => 'Следующий%s не может быть ÑпаÑен от «%s» рабочего процеÑÑа', + 'LBL_DUPLICATION_FAILURE_FROM_WEBFORMS' => 'Следующие%s не может быть ÑпаÑен от «%s» веб-формы', + 'LBL_DUPLICATION_FAILURE_FOR_ADMIN' => 'Ð’Ñ‹ можете%s изменить дублирующие правила профилактики.', + 'LBL_DUPLICATION_FAILURE_FOR_NON_ADMIN' => 'ОбратитеÑÑŒ к админиÑтратору Ð´Ð»Ñ Ð¿ÐµÑ€ÐµÑмотра правил дублирующих', + 'LBL_DUPLICATE_RECORD_LISTS' => 'Дубликат%s (S):', ); $jsLanguageStrings = array( 'JS_EMAIL_SERVER_CONFIGURATION' => 'ПожалуйÑта, наÑтроить параметры иÑходÑщей Ñервера на Ñтранице наÑтроек', @@ -1477,4 +1487,6 @@ $jsLanguageStrings = array( 'JS_UPLOAD_SUCCESSFUL' => 'Файл уÑпешно Добавленоy', 'JS_UPLOAD_FAILED' => 'Загрузка файла Ошибка', + + 'JS_DUPLICATES_DETECTED' => 'Дубликат (s) обнаружено!', ); \ No newline at end of file diff --git a/pkg/vtiger/translations/Spanish/modules/Calendar.php b/pkg/vtiger/translations/Spanish/modules/Calendar.php index 168a6389ba156b079f5de92701670c28d92a5085..9ef7cb2104681deb7ff34f461506a0b0ce50a411 100644 --- a/pkg/vtiger/translations/Spanish/modules/Calendar.php +++ b/pkg/vtiger/translations/Spanish/modules/Calendar.php @@ -155,6 +155,9 @@ $languageStrings = array( 'LBL_NOVEMBER' => 'Noviembre', 'LBL_DECEMBER' => 'De diciembre de', 'LBL_CLICK_HERE_TO_VIEW' => 'Haga clic aquà para ver', + + 'LBL_TOTAL_EVENTS_DUPLICATED' => 'Número de eventos duplicados saltado', + 'LBL_TOTAL_TASKS_DUPLICATED' => 'Número de tareas duplicadas saltado', ); $jsLanguageStrings = array( 'LBL_ADD_EVENT_TASK' => 'Añadir Evento / Tarea' , diff --git a/pkg/vtiger/translations/Spanish/modules/Settings/LayoutEditor.php b/pkg/vtiger/translations/Spanish/modules/Settings/LayoutEditor.php index 8a41d820f28c93b8647ae55d0bf873e072cfad30..8b10a8dfed1543afecefb6e661b52ece05d5e9d0 100644 --- a/pkg/vtiger/translations/Spanish/modules/Settings/LayoutEditor.php +++ b/pkg/vtiger/translations/Spanish/modules/Settings/LayoutEditor.php @@ -136,6 +136,20 @@ $languageStrings = array( 'LBL_DETAIL_HEADER' => 'Registro de encabezado', 'LBL_HEADER_FIELD' => 'Encabezado De La Vista', + 'LBL_DUPLICATE_HANDLING' => 'Prevención duplicado', + 'LBL_DUPLICATE_CHECK' => 'Habilitar comprobación de duplicados', + 'LBL_DUPLICATION_INFO_MESSAGE' => 'Duplicar función de prevención sólo previene nuevos registros duplicados de conseguir creado por los usuarios y aplicaciones externas. Los registros creados a partir de importación', + 'LBL_SELECT_FIELDS_FOR_DUPLICATION' => 'Seleccione los campos únicos en los que se van a comprobar los registros duplicados', + 'LBL_SELECT_FIELDS' => 'Seleccionar campos', + 'LBL_MAX_3_FIELDS' => 'Max 3 campos', + 'LBL_SELECT_RULE' => 'Seleccione la regla de duplicados de manipulación', + 'LBL_ALLOW_DUPLICATES' => 'Permitir Duplicados', + 'LBL_DO_NOT_ALLOW_DUPLICATES' => 'No permita que Duplicados', + 'LBL_DUPLICATES_IN_SYNC_MESSAGE' => 'Acción a realizar si no se encuentra registro duplicado, mientras que la sincronización con la aplicación externa', + 'LBL_PREFER_LATEST_RECORD' => 'Prefiero último disco', + 'LBL_PREFER_INTERNAL_RECORD' => 'Prefiero registro interno', + 'LBL_PREFER_EXTERNAL_RECORD' => 'Prefiero registro externo', + 'LBL_SYNC_TOOLTIP_MESSAGE' => 'Prefiero último disco - datos de registro Más recientemente modificados serán retenidos <br> prefieren registro interno - existente registro será retenido, ya que es <br> prefieren registro externo - Los datos de la aplicación externa será copiado', ); $jsLanguageStrings = array( 'JS_BLOCK_VISIBILITY_SHOW' => 'Mostrar bloque abierto' , @@ -196,4 +210,7 @@ Está seguro de que desea eliminar este campo?', 'JS_NAME_FIELDS_APPEAR_IN_HEADER_BY_DEFAULT' => 'Nombre de los campos aparecen en la Cabecera por defecto', 'JS_FIELD_IS_HEADER_ENABLED_FOR_VTIGER7' => 'Este Campo es Encabezado habilitado para Vtiger7, aparecerá en la Vista de Resumen', + 'JS_DUPLICATE_HANDLING_SUCCESS_MESSAGE' => 'Se ha actualizado correctamente a considerar los campos seleccionados en la prevención de duplicados', + 'JS_DUPLICATE_HANDLING_FAILURE_MESSAGE' => 'No tuvo en cuenta los campos seleccionados en la prevención de duplicados', + 'JS_DUPLICATE_CHECK_DISABLED' => 'comprobación de duplicados está desactivada', ); \ No newline at end of file diff --git a/pkg/vtiger/translations/Spanish/modules/Vtiger.php b/pkg/vtiger/translations/Spanish/modules/Vtiger.php index 391c885755d1504e55d85f1d276ba9352b1663f6..4744b5584253ae4904ce9a71a2d25a727acb9727 100644 --- a/pkg/vtiger/translations/Spanish/modules/Vtiger.php +++ b/pkg/vtiger/translations/Spanish/modules/Vtiger.php @@ -1091,6 +1091,16 @@ fuera de Vtiger.', 'LBL_SLA_INFORMATION' => 'SLA Información', 'LBL_TO_USE_SWITCH_TO_NEW_LOOK' => 'Para utilizar <b>%s</b>, se recomienda cambiar a nuevo look.', 'LBL_DELETE_USER_CONFIRMATION' => 'Cuando se elimina un usuario, el usuario será marcado como "inactivo" y no hay nuevos registros pueden ser asignados al usuario, y el usuario no será capaz de iniciar sesión. ¿Estas seguro que quieres borrarlo?', + + 'LBL_DUPLICATES' => 'duplicados', + 'LBL_DUPLICATES_DETECTED' => 'Duplicar (s) detectado!', + 'LBL_DUPLICATES_FOUND_MESSAGE' => 'Esto%s no se puede guardar desde duplicado%s existe en VTiger a juego con los valores de%s.', + 'LBL_VTIGER_NOTIFICATION' => 'Mensaje: VTiger Sistema de Notificaciones', + 'LBL_DUPLICATION_FAILURE_FROM_WORKFLOWS' => 'El siguiente%s no pudo ser salvado de flujo de trabajo "%s"', + 'LBL_DUPLICATION_FAILURE_FROM_WEBFORMS' => 'El siguiente%s no pudo ser salvado de formulario web "%s"', + 'LBL_DUPLICATION_FAILURE_FOR_ADMIN' => 'Puede%s para modificar las normas de prevención de duplicados.', + 'LBL_DUPLICATION_FAILURE_FOR_NON_ADMIN' => 'Póngase en contacto con el administrador para obtener la revisión de las reglas duplicadas', + 'LBL_DUPLICATE_RECORD_LISTS' => 'Duplicar%s (s):', ); $jsLanguageStrings = array( 'JS_EMAIL_SERVER_CONFIGURATION' => 'Por favor, configura el servidor de correo saliente en la sección de configuración', @@ -1515,4 +1525,6 @@ $jsLanguageStrings = array( 'JS_UPLOAD_SUCCESSFUL' => 'Archivo subido exitosamente', 'JS_UPLOAD_FAILED' => 'Cargar archivo Error', + + 'JS_DUPLICATES_DETECTED' => 'Duplicar (s) detectado!', ); \ No newline at end of file diff --git a/pkg/vtiger/translations/Sweden_sv_se/modules/Calendar.php b/pkg/vtiger/translations/Sweden_sv_se/modules/Calendar.php index dd3c3c3ae1a2869f7bfb46bdcc5dd95190994aa3..cd9f9c84dd2c86e2c9fbf22d3577e89893da6327 100755 --- a/pkg/vtiger/translations/Sweden_sv_se/modules/Calendar.php +++ b/pkg/vtiger/translations/Sweden_sv_se/modules/Calendar.php @@ -175,6 +175,9 @@ $languageStrings = array( 'LBL_NOVEMBER' => 'November', 'LBL_DECEMBER' => 'December', 'LBL_CLICK_HERE_TO_VIEW' => 'Klicka här för att se', + + 'LBL_TOTAL_EVENTS_DUPLICATED' => 'Antal dubbla händelser hoppas över', + 'LBL_TOTAL_TASKS_DUPLICATED' => 'Antal dubbla uppgifter hoppas över', ); $jsLanguageStrings = array( 'LBL_ADD_EVENT_TASK' => 'Lägg till händelse / att göra', diff --git a/pkg/vtiger/translations/Sweden_sv_se/modules/Settings/LayoutEditor.php b/pkg/vtiger/translations/Sweden_sv_se/modules/Settings/LayoutEditor.php index 27cd874a3531905a186aca20d35a1c27e9790ccb..db2a229743a478969ba2ef4436a121cc829eaf8c 100755 --- a/pkg/vtiger/translations/Sweden_sv_se/modules/Settings/LayoutEditor.php +++ b/pkg/vtiger/translations/Sweden_sv_se/modules/Settings/LayoutEditor.php @@ -136,6 +136,20 @@ $languageStrings = array( 'LBL_DETAIL_HEADER' => 'Spela in header', 'LBL_HEADER_FIELD' => 'Header Visa', + 'LBL_DUPLICATE_HANDLING' => 'Duplicate Prevention', + 'LBL_DUPLICATE_CHECK' => 'Aktivera dubbla kontroll', + 'LBL_DUPLICATION_INFO_MESSAGE' => 'Duplicera förebyggande funktion endast förhindrar nya dubbla poster frÃ¥n att bli skapat av användare och externa applikationer. Records som skapats frÃ¥n Import', + 'LBL_SELECT_FIELDS_FOR_DUPLICATION' => 'Välj unika omrÃ¥den som dubbla poster som ska kontrolleras', + 'LBL_SELECT_FIELDS' => 'Välj Fields', + 'LBL_MAX_3_FIELDS' => 'Max 3 Fält', + 'LBL_SELECT_RULE' => 'Välj regel för hantering dubbletter', + 'LBL_ALLOW_DUPLICATES' => 'TillÃ¥t dubbletter', + 'LBL_DO_NOT_ALLOW_DUPLICATES' => 'LÃ¥t inte dubbletter', + 'LBL_DUPLICATES_IN_SYNC_MESSAGE' => 'Ã…tgärder för att ta om dubbla rekord hittas medan synkronisering med externa program', + 'LBL_PREFER_LATEST_RECORD' => 'Föredrar senaste rekord', + 'LBL_PREFER_INTERNAL_RECORD' => 'Föredrar interna register', + 'LBL_PREFER_EXTERNAL_RECORD' => 'Föredrar extern rekord', + 'LBL_SYNC_TOOLTIP_MESSAGE' => 'Föredrar senaste rekord - ska Senast ändrade registerdata bevaras <br> föredrar interna register - befintlig post kommer att behÃ¥llas eftersom det är <br> föredrar extern rekord - Data frÃ¥n den externa ansökan kommer att kopieras', ); $jsLanguageStrings = array( 'JS_BLOCK_VISIBILITY_SHOW' => 'Block visa aktiverad' , @@ -196,4 +210,7 @@ Om du är osäker och vill kunna visa data i framtiden, kan du markera det fält 'JS_NAME_FIELDS_APPEAR_IN_HEADER_BY_DEFAULT' => 'Namn som fälten visas i Sidhuvudet som standard', 'JS_FIELD_IS_HEADER_ENABLED_FOR_VTIGER7' => 'Detta OmrÃ¥de är Rubriken aktiverat för Vtiger7, Det kommer att visas i Sammanfattning', + 'JS_DUPLICATE_HANDLING_SUCCESS_MESSAGE' => 'Uppdaterats överväga utvalda fält i dubbletter förebyggande', + 'JS_DUPLICATE_HANDLING_FAILURE_MESSAGE' => 'Det gick inte att tänka pÃ¥ utvalda omrÃ¥den i dubbletter förebyggande', + 'JS_DUPLICATE_CHECK_DISABLED' => 'Duplicate kontroll är inaktiverad', ); \ No newline at end of file diff --git a/pkg/vtiger/translations/Sweden_sv_se/modules/Vtiger.php b/pkg/vtiger/translations/Sweden_sv_se/modules/Vtiger.php index 0fe0435b0c1ef802e2ba4d78409ff3603c42e2cd..813d5b15f690c8fefbbd5e7f8e7467bb94a44874 100755 --- a/pkg/vtiger/translations/Sweden_sv_se/modules/Vtiger.php +++ b/pkg/vtiger/translations/Sweden_sv_se/modules/Vtiger.php @@ -1215,6 +1215,16 @@ utanför Vtiger.', 'LBL_SLA_INFORMATION' => 'SLA Information', 'LBL_TO_USE_SWITCH_TO_NEW_LOOK' => 'Om du vill använda <b>%s</b>, rekommenderar vi att du Växla till nytt utseende.', 'LBL_DELETE_USER_CONFIRMATION' => 'När en användare tas bort, kommer användaren att markeras som "inaktiva" och inga nya rekord kan tilldelas till användaren, och användaren kommer inte att kunna logga in. Är du säker att du vill radera?', + + 'LBL_DUPLICATES' => 'dubbletter', + 'LBL_DUPLICATES_DETECTED' => 'Duplicera (s) upptäckt!', + 'LBL_DUPLICATES_FOUND_MESSAGE' => 'Denna%s kan inte sparas eftersom duplikat%s förekommer i vtiger med matchande värden för%s.', + 'LBL_VTIGER_NOTIFICATION' => 'Meddelande frÃ¥n: vtiger System Notifications', + 'LBL_DUPLICATION_FAILURE_FROM_WORKFLOWS' => 'Följande%s kunde inte räddas frÃ¥n "%s" workflow', + 'LBL_DUPLICATION_FAILURE_FROM_WEBFORMS' => 'Följande%s kunde inte räddas frÃ¥n "%s" webbformulär', + 'LBL_DUPLICATION_FAILURE_FOR_ADMIN' => 'Du kan%s för att ändra dubbla regler förebyggande.', + 'LBL_DUPLICATION_FAILURE_FOR_NON_ADMIN' => 'Kontakta administratören för att revidera de dubbla regler', + 'LBL_DUPLICATE_RECORD_LISTS' => 'Duplicera%s (n):', ); $jsLanguageStrings = array( 'JS_EMAIL_SERVER_CONFIGURATION' => 'Vänligen konfigurera utgÃ¥ende serverinställningar frÃ¥n inställningssidan', @@ -1648,4 +1658,6 @@ $jsLanguageStrings = array( 'JS_UPLOAD_SUCCESSFUL' => 'File Uploaded Successfuly', 'JS_UPLOAD_FAILED' => 'Filöverföring misslyckades', + + 'JS_DUPLICATES_DETECTED' => 'Duplicera (s) upptäckt!', ); \ No newline at end of file diff --git a/pkg/vtiger/translations/TurkishLanguagePack_tr_tr/modules/Calendar.php b/pkg/vtiger/translations/TurkishLanguagePack_tr_tr/modules/Calendar.php index 052a0609ec21f4b2598a9a270c6b8e53dba68587..5fa36cab9fe1e5ea281d6089416cac9c90ee851b 100644 --- a/pkg/vtiger/translations/TurkishLanguagePack_tr_tr/modules/Calendar.php +++ b/pkg/vtiger/translations/TurkishLanguagePack_tr_tr/modules/Calendar.php @@ -147,6 +147,9 @@ $languageStrings = array( 'LBL_NOVEMBER' => 'Kasım', 'LBL_DECEMBER' => 'Aralık', 'LBL_CLICK_HERE_TO_VIEW' => 'görmek için buraya tıklayın', + + 'LBL_TOTAL_EVENTS_DUPLICATED' => 'yinelenen Olayların sayılı atlanır', + 'LBL_TOTAL_TASKS_DUPLICATED' => 'yinelenen Görevlerin sayılı atlanır', ); $jsLanguageStrings = array( 'LBL_ADD_EVENT_TASK' => 'Add Event / Görev' , diff --git a/pkg/vtiger/translations/TurkishLanguagePack_tr_tr/modules/Settings/LayoutEditor.php b/pkg/vtiger/translations/TurkishLanguagePack_tr_tr/modules/Settings/LayoutEditor.php index dcb133e73cbcd11d03cc601eb6dc0447a5d9b359..5b9c830e0d545d8078e24d7f98da84b3148523b5 100644 --- a/pkg/vtiger/translations/TurkishLanguagePack_tr_tr/modules/Settings/LayoutEditor.php +++ b/pkg/vtiger/translations/TurkishLanguagePack_tr_tr/modules/Settings/LayoutEditor.php @@ -136,6 +136,20 @@ $languageStrings = array( 'LBL_DETAIL_HEADER' => 'Kayıt BaÅŸlığı', 'LBL_HEADER_FIELD' => 'BaÅŸlık Görüntüleyin', + 'LBL_DUPLICATE_HANDLING' => 'Yinelenen Önleme', + 'LBL_DUPLICATE_CHECK' => 'yinelenen denetimini etkinleÅŸtir', + 'LBL_DUPLICATION_INFO_MESSAGE' => 'Sadece kullanıcı ve harici uygulamalar tarafından oluÅŸturulan alma yeni yinelenen kayıtları engeller önleme özelliÄŸini çoÄŸaltın. İçe oluÅŸturulan kayıtlar', + 'LBL_SELECT_FIELDS_FOR_DUPLICATION' => 'yinelenen kayıtları kontrol edilecek edildiÄŸi benzersiz alanları seçin', + 'LBL_SELECT_FIELDS' => 'seç Alanlar', + 'LBL_MAX_3_FIELDS' => 'Maksimum 3 Alanları', + 'LBL_SELECT_RULE' => 'elleçleme çiftleri için Seç kural', + 'LBL_ALLOW_DUPLICATES' => 'Çiftleri izin ver', + 'LBL_DO_NOT_ALLOW_DUPLICATES' => 'Çiftleri izin verme', + 'LBL_DUPLICATES_IN_SYNC_MESSAGE' => 'yinelenen kayıt bulunursa harici uygulama ile senkronizasyon yapılırken Eylem almaya', + 'LBL_PREFER_LATEST_RECORD' => 'son kayıt tercih', + 'LBL_PREFER_INTERNAL_RECORD' => 'İç kaydını tercih', + 'LBL_PREFER_EXTERNAL_RECORD' => 'Harici kayıt tercih', + 'LBL_SYNC_TOOLTIP_MESSAGE' => 'son kayıt tercih - Verileri harici uygulamadan kopyalanmış olacaktır - bu dış rekoru tercih <br> olduÄŸu gibi korunacak Mevcut rekoru - En son deÄŸiÅŸtirilen kayıt verileri dahili kayıt tercih <br> korunur', ); $jsLanguageStrings = array( 'JS_BLOCK_VISIBILITY_SHOW' => 'Block show enabled' , @@ -196,4 +210,7 @@ Bu alanı silmek için emin misiniz?', 'JS_NAME_FIELDS_APPEAR_IN_HEADER_BY_DEFAULT' => 'Adı alanları varsayılan olarak BaÅŸlık görünür ', 'JS_FIELD_IS_HEADER_ENABLED_FOR_VTIGER7' => 'Bu Alan BaÅŸlık Vtiger7, Özet olarak görünecektir Görüntülemek için etkindir ', + 'JS_DUPLICATE_HANDLING_SUCCESS_MESSAGE' => 'BaÅŸarıyla çiftleri önlenmesinde seçili alanları dikkate güncellendi', + 'JS_DUPLICATE_HANDLING_FAILURE_MESSAGE' => 'çiftleri önlenmesinde seçili alanları dikkate BaÅŸarısız', + 'JS_DUPLICATE_CHECK_DISABLED' => 'Yinelenen kontrolü devre dışı bırakıldığında', ); \ No newline at end of file diff --git a/pkg/vtiger/translations/TurkishLanguagePack_tr_tr/modules/Vtiger.php b/pkg/vtiger/translations/TurkishLanguagePack_tr_tr/modules/Vtiger.php index 8906fe12b3044f4f13964d43df401df29d0ac459..cfb681a274ce738230e9144e55fc77f1e949ac58 100644 --- a/pkg/vtiger/translations/TurkishLanguagePack_tr_tr/modules/Vtiger.php +++ b/pkg/vtiger/translations/TurkishLanguagePack_tr_tr/modules/Vtiger.php @@ -1073,6 +1073,16 @@ Vtiger dışında.', 'LBL_SLA_INFORMATION' => 'SLA Bilgi', 'LBL_TO_USE_SWITCH_TO_NEW_LOOK' => '%s öneririz kullanmak için yeni bir görünüm geçmek için.', 'LBL_DELETE_USER_CONFIRMATION' => 'Kullanıcı silindiÄŸinde, kullanıcı "Etkin" ve yeni kayıt Kullanıcı atanabilir olarak iÅŸaretlenir ve kullanıcı giriÅŸ mümkün olmayacaktır. Silmek istediÄŸine emin misin?', + + 'LBL_DUPLICATES' => 'çoÄŸaltır', + 'LBL_DUPLICATES_DETECTED' => 'ÇoÄŸaltın (ler) algılandı!', + 'LBL_DUPLICATES_FOUND_MESSAGE' => 'yinelenen%s%s deÄŸerleri eÅŸleÅŸen vtiger var çünkü bu%s kaydedilemez.', + 'LBL_VTIGER_NOTIFICATION' => 'Ileti: Vtiger Sistem Bildirimleri', + 'LBL_DUPLICATION_FAILURE_FROM_WORKFLOWS' => 'AÅŸağıdaki%s "%s" iÅŸ akışından kurtarılamadı', + 'LBL_DUPLICATION_FAILURE_FROM_WEBFORMS' => 'AÅŸağıdaki%s "%s" web formunda gelen kurtarılamadı', + 'LBL_DUPLICATION_FAILURE_FOR_ADMIN' => '%s yinelenen önleme kurallarını deÄŸiÅŸtirmek olabilir.', + 'LBL_DUPLICATION_FAILURE_FOR_NON_ADMIN' => 'yinelenen kurallarını revize için yöneticinize baÅŸvurun', + 'LBL_DUPLICATE_RECORD_LISTS' => '%s (ler) Çift:', ); $jsLanguageStrings = array( 'JS_EMAIL_SERVER_CONFIGURATION' => 'Please configure your outgoing server settings from the settings page', @@ -1483,4 +1493,6 @@ $jsLanguageStrings = array( 'JS_UPLOAD_SUCCESSFUL' => 'Uploaded baÅŸarıyla Dosya', 'JS_UPLOAD_FAILED' => 'Dosya Yükleme BaÅŸarısız', + + 'JS_DUPLICATES_DETECTED' => 'ÇoÄŸaltın (ler) algılandı!', ); \ No newline at end of file diff --git a/vtlib/Vtiger/FieldBasic.php b/vtlib/Vtiger/FieldBasic.php index 940a810eae59da47990311579c3e023b8d9adf63..c79b5ec11d594ce21ee8f2bf1283e34e17b1f77b 100644 --- a/vtlib/Vtiger/FieldBasic.php +++ b/vtlib/Vtiger/FieldBasic.php @@ -38,6 +38,7 @@ class Vtiger_FieldBasic { var $quickcreate = 1; var $quicksequence = false; var $info_type = 'BAS'; + var $isunique = false; var $block; /** @@ -71,6 +72,7 @@ class Vtiger_FieldBasic { $this->quickcreate = $valuemap['quickcreate']; $this->sequence = $valuemap['sequence']; $this->summaryfield = $valuemap['summaryfield']; + $this->isunique = $valuemap['isunique']; $this->block= $blockInstance? $blockInstance : Vtiger_Block::getInstance($valuemap['block'], $moduleInstance); $this->headerfield = $valuemap['headerfield']; } diff --git a/vtlib/Vtiger/ModuleBasic.php b/vtlib/Vtiger/ModuleBasic.php index e751ad663e910eb5bb6db7db5abf63a1f82a79d6..347d3fd4c21b59cef7065cf61340272519e93346 100644 --- a/vtlib/Vtiger/ModuleBasic.php +++ b/vtlib/Vtiger/ModuleBasic.php @@ -47,6 +47,9 @@ class Vtiger_ModuleBasic { var $basetableid=false; var $customtable=false; var $grouptable = false; + var $allowDuplicates = false; + var $isSyncable = 0; + var $syncActionForDuplicate = 1; const EVENT_MODULE_ENABLED = 'module.enabled'; const EVENT_MODULE_DISABLED = 'module.disabled'; @@ -77,13 +80,16 @@ class Vtiger_ModuleBasic { $this->tabsequence = $valuemap['tabsequence']; $this->parent = $valuemap['parent']; $this->customized = $valuemap['customized']; - $this->trial = $valuemap['trial']; + $this->trial = $valuemap['trial']; $this->isentitytype = $valuemap['isentitytype']; if($this->isentitytype || $this->name == 'Users') { // Initialize other details too $this->initialize2(); } + $this->isSyncable = $valuemap['issyncable']; + $this->allowDuplicates = $valuemap['allowduplicates']; + $this->syncActionForDuplicate = $valuemap['sync_action_for_duplicates']; } /** diff --git a/webservice.php b/webservice.php index ca5a6735b7bea1e4c0555d96961bd9a3e833cfae..98dfa1e0257a399015aded2e011935f5077648ca 100644 --- a/webservice.php +++ b/webservice.php @@ -133,6 +133,8 @@ } $rawOutput = $operationManager->runOperation($operationInput,$current_user); writeOutput($operationManager, $rawOutput); + } catch (DuplicateException $e) { + writeErrorOutput($operationManager,new WebServiceException($e->getCode(), $e->getMessage())); }catch(WebServiceException $e){ writeErrorOutput($operationManager,$e); }catch(Exception $e){