31 require
'../main.inc.php';
32 require_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
36 $langs->load(
"companies");
41 $action =
GETPOST(
'action',
'aZ09');
51 $permissionnote = $user->hasRight(
'societe',
'creer');
54 $hookmanager->initHooks(array(
'thirdpartynote',
'globalcard'));
57 if ($user->socid > 0) {
59 $socid = $user->socid;
62 $result =
restrictedArea($user,
'societe', $object->id,
'&societe');
68 $reshook = $hookmanager->executeHooks(
'doActions', array(), $object, $action);
72 if (empty($reshook)) {
73 include DOL_DOCUMENT_ROOT.
'/core/actions_setnotes.inc.php';
83 $title = $langs->trans(
"ThirdParty").
' - '.$langs->trans(
"Notes");
84 if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match(
'/thirdpartynameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) {
85 $title = $object->name.
' - '.$langs->trans(
"Notes");
87 $help_url =
'EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas';
90 if ($object->id > 0) {
95 $langs->load(
"mails");
102 $linkback =
'<a href="'.DOL_URL_ROOT.
'/societe/list.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToList").
'</a>';
104 dol_banner_tab($object,
'socid', $linkback, ($user->socid ? 0 : 1),
'rowid',
'nom');
106 $cssclass =
'titlefield';
110 print
'<div class="fichecenter">';
112 print
'<div class="underbanner clearboth"></div>';
113 print
'<table class="border centpercent tableforfield">';
116 print
'<tr><td class="titlefield">'.$langs->trans(
'NatureOfThirdParty').
'</td><td>';
117 print $object->getTypeUrl(1);
120 if (!empty($conf->global->SOCIETE_USEPREFIX)) {
121 print
'<tr><td class="'.$cssclass.
'">'.$langs->trans(
'Prefix').
'</td><td colspan="3">'.$object->prefix_comm.
'</td></tr>';
124 if ($object->client) {
125 print
'<tr><td class="'.$cssclass.
'">';
126 print $langs->trans(
'CustomerCode').
'</td><td colspan="3">';
128 $tmpcheck = $object->check_codeclient();
129 if ($tmpcheck != 0 && $tmpcheck != -5) {
130 print
' <span class="error">('.$langs->trans(
"WrongCustomerCode").
')</span>';
135 if ($object->fournisseur) {
136 print
'<tr><td class="'.$cssclass.
'">';
137 print $langs->trans(
'SupplierCode').
'</td><td colspan="3">';
139 $tmpcheck = $object->check_codefournisseur();
140 if ($tmpcheck != 0 && $tmpcheck != -5) {
141 print
' <span class="error">('.$langs->trans(
"WrongSupplierCode").
')</span>';
153 include DOL_DOCUMENT_ROOT.
'/core/tpl/notes.tpl.php';
157 $langs->load(
"errors");
158 print $langs->trans(
"ErrorRecordNotFound");
if(GETPOST('button_removefilter_x', 'alpha')||GETPOST('button_removefilter.x', 'alpha')||GETPOST('button_removefilter', 'alpha')) if(GETPOST('button_search_x', 'alpha')||GETPOST('button_search.x', 'alpha')||GETPOST('button_search', 'alpha')) if($action=="save" &&empty($cancel)) $help_url
View.
if(!defined('NOREQUIRESOC')) if(!defined('NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) llxHeader()
Empty header.
Class to manage third parties objects (customers, suppliers, prospects...)
societe_prepare_head(Societe $object)
Return array of tabs to used on pages for third parties cards.
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.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='')
Show tabs of a record.
showValueWithClipboardCPButton($valuetocopy, $showonlyonhover=1, $texttoshow='')
Create a button to copy $valuetocopy in the clipboard (for copy and paste feature).
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.
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.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
isModEnabled($module)
Is Dolibarr module enabled.
restrictedArea(User $user, $features, $object=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.