* Copyright (C) 2013 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * This template needs: * $object */ if (! class_exists('Contact')) { require DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; } if (! class_exists('FormCompany')) { require DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; } $module = $object->element; // Special cases if ($module == 'propal') { $permission=$user->rights->propale->creer; } elseif ($module == 'fichinter') { $permission=$user->rights->ficheinter->creer; } elseif ($module == 'invoice_supplier') { $permission=$user->rights->fournisseur->facture->creer; } elseif ($module == 'order_supplier') { $permission=$user->rights->fournisseur->commande->creer; } elseif ($module == 'project') { $permission=$user->rights->projet->creer; } elseif ($module == 'action') { $permission=$user->rights->agenda->myactions->create; } elseif ($module == 'shipping') { $permission=$user->rights->expedition->creer; } elseif ($module == 'project_task') { $permission=$user->rights->projet->creer; } elseif (! isset($permission)) { $permission=$user->rights->$module->creer; } // If already defined by caller page $formcompany= new FormCompany($db); $companystatic=new Societe($db); $contactstatic=new Contact($db); $userstatic=new User($db); ?>
trans("Source"); ?>
trans("Company"); ?>
trans("Contacts"); ?>
trans("ContactType"); ?>
 
 
" />
trans("Users"); ?>
global->MAIN_INFO_SOCIETE_NOM; ?>
select_dolusers($user->id, 'userid', 0, (! empty($userAlreadySelected)?$userAlreadySelected:null), 0, null, null, 0, 56); ?>
selectTypeContact($object, '', 'type','internal'); ?>
 
">
" />
trans("ThirdPartyContacts"); ?>
use_javascript_ajax && ! empty($conf->global->COMPANY_USE_SEARCH_TO_SELECT)) { ?>
'getContacts', 'url' => dol_buildpath('/core/ajax/contacts.php',1), 'htmlname' => 'contactid', 'params' => array('add-customer-contact' => 'disabled')); print $form->select_company($object->socid,'socid','',1,0,0,$events); ?>
select_contacts($object->socid, '', 'contactid'); ?>
socid; ?> selectCompaniesForNewContact($object, 'id', $selectedCompany, 'newcompany'); ?>
select_contacts($selectedCompany, '', 'contactid'); ?>
selectTypeContact($object, '', 'type','external'); ?>
 
">
trans("Source"); ?>
trans("Company"); ?>
trans("Contacts"); ?>
trans("ContactType"); ?>
trans("Status"); ?>
 
liste_contact(-1,$source); $num=count($tab); $i = 0; while ($i < $num) { $var = !$var; ?>
">
trans("User"); ?> trans("ThirdPartyContact"); ?>
0) { $companystatic->fetch($tab[$i]['socid']); echo $companystatic->getNomUrl(1); } if ($tab[$i]['socid'] < 0) { echo $conf->global->MAIN_INFO_SOCIETE_NOM; } if (! $tab[$i]['socid']) { echo ' '; } ?>
id=$tab[$i]['id']; $userstatic->lastname=$tab[$i]['lastname']; $userstatic->firstname=$tab[$i]['firstname']; echo $userstatic->getNomUrl(1); } if ($tab[$i]['source']=='external') { $contactstatic->id=$tab[$i]['id']; $contactstatic->lastname=$tab[$i]['lastname']; $contactstatic->firstname=$tab[$i]['firstname']; echo $contactstatic->getNomUrl(1); } ?>
 ">