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");
38 if ($user->socid) $id = $user->socid;
42 if ($id > 0) $object->fetch($id);
44 $permissionnote = $user->rights->societe->creer;
47 $hookmanager->initHooks(array(
'thirdpartynote',
'globalcard'));
54 include DOL_DOCUMENT_ROOT.
'/core/actions_setnotes.inc.php';
61 $form =
new Form($db);
63 $title = $langs->trans(
"ThirdParty").
' - '.$langs->trans(
"Notes");
64 if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match(
'/thirdpartynameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) $title = $object->name.
' - '.$langs->trans(
"Notes");
65 $help_url =
'EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas';
73 if (!empty($conf->notification->enabled)) $langs->load(
"mails");
79 $linkback =
'<a href="'.DOL_URL_ROOT.
'/societe/list.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToList").
'</a>';
81 dol_banner_tab($object,
'socid', $linkback, ($user->socid ? 0 : 1),
'rowid',
'nom');
83 $cssclass =
'titlefield';
87 print '<div class="fichecenter">';
89 print '<div class="underbanner clearboth"></div>';
90 print '<table class="border centpercent tableforfield">';
92 if (!empty($conf->global->SOCIETE_USEPREFIX))
94 print '<tr><td class="'.$cssclass.
'">'.$langs->trans(
'Prefix').
'</td><td colspan="3">'.$object->prefix_comm.
'</td></tr>';
97 if ($object->client) {
98 print '<tr><td class="'.$cssclass.
'">';
99 print $langs->trans(
'CustomerCode').
'</td><td colspan="3">';
100 print $object->code_client;
101 $tmpcheck = $object->check_codeclient();
102 if ($tmpcheck != 0 && $tmpcheck != -5) {
103 print ' <font class="error">('.$langs->trans(
"WrongCustomerCode").
')</font>';
108 if ($object->fournisseur) {
109 print '<tr><td class="'.$cssclass.
'">';
110 print $langs->trans(
'SupplierCode').
'</td><td colspan="3">';
111 print $object->code_fournisseur;
112 $tmpcheck = $object->check_codefournisseur();
113 if ($tmpcheck != 0 && $tmpcheck != -5) {
114 print ' <font class="error">('.$langs->trans(
"WrongSupplierCode").
')</font>';
126 include DOL_DOCUMENT_ROOT.
'/core/tpl/notes.tpl.php';
130 $langs->load(
"errors");
131 print $langs->trans(
"ErrorRecordNotFound");
GETPOST($paramname, $check= 'alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
Class to manage third parties objects (customers, suppliers, prospects...)
restrictedArea($user, $features, $objectid=0, $tableandshare= '', $feature2= '', $dbt_keyfield= 'fk_soc', $dbt_select= 'rowid', $isdraft=0)
Check permissions of a user to show a page and an object.
societe_prepare_head(Societe $object)
Return array of tabs to used on pages for third parties cards.
dol_get_fiche_head($links=array(), $active= '', $title= '', $notab=0, $picto= '', $pictoisfullpath=0, $morehtmlright= '', $morecss= '', $limittoshow=0, $moretabssuffix= '')
Show tabs of a record.
print
Draft customers invoices.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
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.