Skip to content

Commit

Permalink
#20 [QuickCreation] add: Extrafields CommercialTask
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-eoxia committed Mar 21, 2023
1 parent d32a883 commit 32ff8a4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions core/modules/modEasyCRM.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,7 @@ public function init($options = ''): int
$extra_fields = new ExtraFields($this->db);

$extra_fields->addExtraField('commrelaunch', $langs->transnoentities('CommercialsRelaunching'), 'text', 100, 2000, 'projet', 0, 0, '', '', '', '', 2);
$extra_fields->addExtraField('commtask', $langs->transnoentities('CommercialTask'), 'sellist', 100, 2000, 'projet', 0, 0, '', 'a:1:{s:7:"options";a:1:{s:39:"projet_task:ref:rowid::fk_projet = $ID$";N;}}', 1, '', 1);

// Permissions
$this->remove($options);
Expand Down
3 changes: 2 additions & 1 deletion langs/fr_FR/easycrm.lang
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ QuickContactCreation = Ajout rapide de contact/adresse
QuickContactCreations = ajouts rapide de contact/adresse
QuickEventCreation = Ajout rapide d'événement
QuickEventCreations = ajouts rapide d'événements
CommercialFollowUp = Suivi commercial
CommercialFollowUp = SC
CommercialTask = Tâche commerciale

#
# Config page - Page d'administration
Expand Down
2 changes: 2 additions & 0 deletions view/quickcreation.php
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,8 @@
$taskID = $task->create($user);
if ($taskID > 0) {
$task->add_contact($user->id, 'TASKEXECUTIVE', 'internal');
$project->array_options['commtask'] = $taskID;
$project->update($user);
} else {
setEventMessages($task->error, $task->errors, 'errors');
$error++;
Expand Down

0 comments on commit 32ff8a4

Please sign in to comment.