Go to the documentation of this file.
31 require
'../main.inc.php';
32 require_once DOL_DOCUMENT_ROOT.
'/contact/class/contact.class.php';
33 require_once DOL_DOCUMENT_ROOT.
'/projet/class/project.class.php';
35 $langs->loadLangs(array(
"companies",
"projects"));
38 $socid =
GETPOST(
'socid',
'int');
40 $socid = $user->socid;
45 $hookmanager->initHooks(array(
'projectthirdparty'));
52 $parameters = array(
'id'=>$socid);
53 $reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
64 $contactstatic =
new Contact($db);
69 require_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
70 require_once DOL_DOCUMENT_ROOT.
'/societe/class/societe.class.php';
72 $langs->load(
"companies");
76 $result = $object->fetch($socid);
78 $title = $langs->trans(
"Projects");
79 if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match(
'/thirdpartynameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) {
80 $title = $object->name.
" - ".$title;
84 if (!empty($conf->notification->enabled)) {
85 $langs->load(
"mails");
89 print
dol_get_fiche_head($head,
'project', $langs->trans(
"ThirdParty"), -1,
'company');
91 $linkback =
'<a href="'.DOL_URL_ROOT.
'/societe/list.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToList").
'</a>';
93 dol_banner_tab($object,
'socid', $linkback, ($user->socid ? 0 : 1),
'rowid',
'nom');
95 print
'<div class="fichecenter">';
97 print
'<div class="underbanner clearboth"></div>';
98 print
'<table class="border centpercent tableforfield">';
101 print
'<tr><td class="titlefield">'.$langs->trans(
'NatureOfThirdParty').
'</td><td>';
102 print $object->getTypeUrl(1);
105 if (!empty($conf->global->SOCIETE_USEPREFIX)) {
106 print
'<tr><td>'.$langs->trans(
'Prefix').
'</td><td colspan="3">'.$object->prefix_comm.
'</td></tr>';
109 if ($object->client) {
110 print
'<tr><td class="titlefield">';
111 print $langs->trans(
'CustomerCode').
'</td><td colspan="3">';
113 $tmpcheck = $object->check_codeclient();
114 if ($tmpcheck != 0 && $tmpcheck != -5) {
115 print
' <span class="error">('.$langs->trans(
"WrongCustomerCode").
')</span>';
120 if ($object->fournisseur) {
121 print
'<tr><td class="titlefield">';
122 print $langs->trans(
'SupplierCode').
'</td><td colspan="3">';
124 $tmpcheck = $object->check_codefournisseur();
125 if ($tmpcheck != 0 && $tmpcheck != -5) {
126 print
' <span class="error">('.$langs->trans(
"WrongSupplierCode").
')</span>';
138 $backtopage = $_SERVER[
'PHP_SELF'].
'?socid='.$object->id;
139 $newcardbutton =
dolGetButtonTitle($langs->trans(
"NewProject"),
'',
'fa fa-plus-circle', DOL_URL_ROOT.
'/projet/card.php?action=create&socid='.$object->id.
'&backtopageforcancel='.urlencode($backtopage),
'', 1, $params);
145 $result =
show_projects($conf, $langs, $db, $object, $_SERVER[
"PHP_SELF"].
'?socid='.$object->id, 1, $newcardbutton);
Class to manage third parties objects (customers, suppliers, prospects...)
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0)
Returns text escaped for inclusion in HTML alt or title tags, or into values of HTML input fields.
restrictedArea($user, $features, $objectid=0, $tableandshare='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid', $isdraft=0, $mode=0)
Check permissions of a user to show a page and an object.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
if($cancel &&! $id) if($action=='add' &&! $cancel) if($action=='delete') if($id) $form
Actions.
dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='rowid', $fieldref='ref', $morehtmlref='', $moreparam='', $nodbprefix=0, $morehtmlleft='', $morehtmlstatus='', $onlybanner=0, $morehtmlright='')
Show tab footer of a card.
showValueWithClipboardCPButton($valuetocopy, $showonlyonhover=1, $texttoshow='')
Create a button to copy $valuetocopy in the clipboard (for copy and paste feature).
dolGetButtonTitle($label, $helpText='', $iconClass='fa fa-file', $url='', $id='', $status=1, $params=array())
Function dolGetButtonTitle : this kind of buttons are used in title in list.
show_projects($conf, $langs, $db, $object, $backtopage='', $nocreatelink=0, $morehtmlright='')
Show html area for list of projects.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='')
Show tabs of a record.
societe_prepare_head(Societe $object)
Return array of tabs to used on pages for third parties cards.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='')
Set event messages in dol_events session object.
if(!defined('NOREQUIRESOC')) if(!defined('NOREQUIRETRAN')) if(!defined('NOCSRFCHECK')) if(!defined('NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) llxHeader()
Empty header.