Go to the documentation of this file.
29 require
'../main.inc.php';
30 require_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
32 $action =
GETPOST(
'action',
'aZ09');
34 $langs->load(
"companies");
43 $permissionnote = $user->rights->societe->creer;
46 $hookmanager->initHooks(array(
'thirdpartynote',
'globalcard'));
49 if ($user->socid > 0) {
51 $socid = $user->socid;
53 $result =
restrictedArea($user,
'societe', $object->id,
'&societe');
59 $reshook = $hookmanager->executeHooks(
'doActions', array(), $object, $action);
63 if (empty($reshook)) {
64 include DOL_DOCUMENT_ROOT.
'/core/actions_setnotes.inc.php';
74 $title = $langs->trans(
"ThirdParty").
' - '.$langs->trans(
"Notes");
75 if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match(
'/thirdpartynameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) {
76 $title = $object->name.
' - '.$langs->trans(
"Notes");
78 $help_url =
'EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas';
81 if ($object->id > 0) {
85 if (!empty($conf->notification->enabled)) {
86 $langs->load(
"mails");
93 $linkback =
'<a href="'.DOL_URL_ROOT.
'/societe/list.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToList").
'</a>';
95 dol_banner_tab($object,
'socid', $linkback, ($user->socid ? 0 : 1),
'rowid',
'nom');
97 $cssclass =
'titlefield';
101 print
'<div class="fichecenter">';
103 print
'<div class="underbanner clearboth"></div>';
104 print
'<table class="border centpercent tableforfield">';
107 print
'<tr><td class="titlefield">'.$langs->trans(
'NatureOfThirdParty').
'</td><td>';
108 print $object->getTypeUrl(1);
111 if (!empty($conf->global->SOCIETE_USEPREFIX)) {
112 print
'<tr><td class="'.$cssclass.
'">'.$langs->trans(
'Prefix').
'</td><td colspan="3">'.$object->prefix_comm.
'</td></tr>';
115 if ($object->client) {
116 print
'<tr><td class="'.$cssclass.
'">';
117 print $langs->trans(
'CustomerCode').
'</td><td colspan="3">';
119 $tmpcheck = $object->check_codeclient();
120 if ($tmpcheck != 0 && $tmpcheck != -5) {
121 print
' <span class="error">('.$langs->trans(
"WrongCustomerCode").
')</span>';
126 if ($object->fournisseur) {
127 print
'<tr><td class="'.$cssclass.
'">';
128 print $langs->trans(
'SupplierCode').
'</td><td colspan="3">';
130 $tmpcheck = $object->check_codefournisseur();
131 if ($tmpcheck != 0 && $tmpcheck != -5) {
132 print
' <span class="error">('.$langs->trans(
"WrongSupplierCode").
')</span>';
144 include DOL_DOCUMENT_ROOT.
'/core/tpl/notes.tpl.php';
148 $langs->load(
"errors");
149 print $langs->trans(
"ErrorRecordNotFound");
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.
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.
showValueWithClipboardCPButton($valuetocopy, $showonlyonhover=1, $texttoshow='')
Create a button to copy $valuetocopy in the clipboard (for copy and paste feature).
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.