34require
'../main.inc.php';
35require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
36require_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
37require_once DOL_DOCUMENT_ROOT.
'/core/lib/date.lib.php';
38require_once DOL_DOCUMENT_ROOT.
'/core/lib/images.lib.php';
39require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
40require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
41require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
42require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formcompany.class.php';
44$action =
GETPOST(
'action',
'aZ09');
45$contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'admincompany';
49$langs->loadLangs(array(
'admin',
'companies',
'bills'));
58$maxwidthsmall = $tmparraysize[
'maxwidthsmall'];
59$maxheightsmall = $tmparraysize[
'maxheightsmall'];
60$maxwidthmini = $tmparraysize[
'maxwidthmini'];
61$maxheightmini = $tmparraysize[
'maxheightmini'];
62$quality = $tmparraysize[
'quality'];
65$hookmanager->initHooks(array(
'admincompany',
'globaladmin'));
73$reshook = $hookmanager->executeHooks(
'doActions', $parameters,
$object, $action);
78if (($action ==
'update' && !
GETPOST(
"cancel",
'alpha'))
79|| ($action ==
'updateedit')) {
81 if (!empty($tmparray[
'id'])) {
82 if ($tmparray[
'code'] ==
'FR' && $tmparray[
'id'] != $mysoc->country_id) {
84 $res =
dolibarr_set_const($db,
"MAIN_PROFID1_IN_ADDRESS", 1,
'chaine', 0,
'', $conf->entity);
87 $mysoc->country_id = $tmparray[
'id'];
88 $mysoc->country_code = $tmparray[
'code'];
89 $mysoc->country_label = $tmparray[
'label'];
91 $s = $mysoc->country_id.
':'.$mysoc->country_code.
':'.$mysoc->country_label;
92 dolibarr_set_const($db,
"MAIN_INFO_SOCIETE_COUNTRY", $s,
'chaine', 0,
'', $conf->entity);
98 if (!empty($tmparray[
'id'])) {
99 $mysoc->state_id = $tmparray[
'id'];
100 $mysoc->state_code = $tmparray[
'code'];
101 $mysoc->state_label = $tmparray[
'label'];
103 $s = $mysoc->state_id.
':'.$mysoc->state_code.
':'.$mysoc->state_label;
104 dolibarr_set_const($db,
"MAIN_INFO_SOCIETE_STATE", $s,
'chaine', 0,
'', $conf->entity);
112 dolibarr_set_const($db,
"MAIN_INFO_SOCIETE_ADDRESS",
GETPOST(
"MAIN_INFO_SOCIETE_ADDRESS",
'alphanohtml'),
'chaine', 0,
'', $conf->entity);
113 dolibarr_set_const($db,
"MAIN_INFO_SOCIETE_TOWN",
GETPOST(
"MAIN_INFO_SOCIETE_TOWN",
'alphanohtml'),
'chaine', 0,
'', $conf->entity);
114 dolibarr_set_const($db,
"MAIN_INFO_SOCIETE_ZIP",
GETPOST(
"MAIN_INFO_SOCIETE_ZIP",
'alphanohtml'),
'chaine', 0,
'', $conf->entity);
115 dolibarr_set_const($db,
"MAIN_INFO_SOCIETE_REGION",
GETPOST(
"region_code",
'alphanohtml'),
'chaine', 0,
'', $conf->entity);
118 dolibarr_set_const($db,
"MAIN_INFO_SOCIETE_MOBILE",
GETPOST(
"phone_mobile",
'alphanohtml'),
'chaine', 0,
'', $conf->entity);
125 $dirforimage = $conf->mycompany->dir_output.
'/logos/';
127 $arrayofimages = array(
'logo',
'logo_squarred');
129 foreach ($arrayofimages as $varforimage) {
130 if ($_FILES[$varforimage][
"name"] && !preg_match(
'/(\.jpeg|\.jpg|\.png)$/i', $_FILES[$varforimage][
"name"])) {
131 $langs->load(
"errors");
139 if (preg_match(
'/([^\\/:]+)$/i', $_FILES[$varforimage][
"name"], $reg)) {
140 $original_file = $reg[1];
144 dol_syslog(
"Move file ".$_FILES[$varforimage][
"tmp_name"].
" to ".$dirforimage.$original_file);
145 if (!is_dir($dirforimage)) {
148 $result =
dol_move_uploaded_file($_FILES[$varforimage][
"tmp_name"], $dirforimage.$original_file, 1, 0, $_FILES[$varforimage][
'error']);
150 if (is_numeric($result) && $result > 0) {
151 $constant =
"MAIN_INFO_SOCIETE_LOGO";
152 if ($varforimage ==
'logo_squarred') {
153 $constant =
"MAIN_INFO_SOCIETE_LOGO_SQUARRED";
165 $imgThumbSmall =
vignette($dirforimage.$original_file, $maxwidthsmall, $maxheightsmall,
'_small', $quality);
167 $imgThumbSmall = $reg[1];
168 dolibarr_set_const($db, $constant.
"_SMALL", $imgThumbSmall,
'chaine', 0,
'', $conf->entity);
174 $imgThumbMini =
vignette($dirforimage.$original_file, $maxwidthmini, $maxheightmini,
'_mini', $quality);
176 $imgThumbMini = $reg[1];
177 dolibarr_set_const($db, $constant.
"_MINI", $imgThumbMini,
'chaine', 0,
'', $conf->entity);
182 dol_syslog(
"ErrorImageFormatNotSupported", LOG_WARNING);
184 } elseif (preg_match(
'/^ErrorFileIsInfectedWithAVirus/', $result)) {
186 $langs->load(
"errors");
187 $tmparray = explode(
':', $result);
188 setEventMessages($langs->trans(
'ErrorFileIsInfectedWithAVirus', $tmparray[1]),
null,
'errors');
189 } elseif (preg_match(
'/^ErrorFileSizeTooLarge/', $result)) {
198 $langs->load(
"errors");
205 dolibarr_set_const($db,
"MAIN_INFO_SOCIETE_MANAGERS",
GETPOST(
"MAIN_INFO_SOCIETE_MANAGERS",
'alphanohtml'),
'chaine', 0,
'', $conf->entity);
208 dolibarr_set_const($db,
"MAIN_INFO_SOCIETE_FORME_JURIDIQUE",
GETPOST(
"forme_juridique_code",
'alphanohtml'),
'chaine', 0,
'', $conf->entity);
213 dolibarr_set_const($db,
"MAIN_INFO_PROFID5",
GETPOST(
"MAIN_INFO_PROFID5",
'alphanohtml'),
'chaine', 0,
'', $conf->entity);
214 dolibarr_set_const($db,
"MAIN_INFO_PROFID6",
GETPOST(
"MAIN_INFO_PROFID6",
'alphanohtml'),
'chaine', 0,
'', $conf->entity);
215 dolibarr_set_const($db,
"MAIN_INFO_PROFID7",
GETPOST(
"MAIN_INFO_PROFID7",
'alphanohtml'),
'chaine', 0,
'', $conf->entity);
216 dolibarr_set_const($db,
"MAIN_INFO_PROFID8",
GETPOST(
"MAIN_INFO_PROFID8",
'alphanohtml'),
'chaine', 0,
'', $conf->entity);
217 dolibarr_set_const($db,
"MAIN_INFO_PROFID9",
GETPOST(
"MAIN_INFO_PROFID9",
'alphanohtml'),
'chaine', 0,
'', $conf->entity);
218 dolibarr_set_const($db,
"MAIN_INFO_PROFID10",
GETPOST(
"MAIN_INFO_PROFID10",
'alphanohtml'),
'chaine', 0,
'', $conf->entity);
221 dolibarr_set_const($db,
"MAIN_INFO_SOCIETE_OBJECT",
GETPOST(
"socialobject",
'alphanohtml'),
'chaine', 0,
'', $conf->entity);
226 $usevat =
GETPOST(
"optiontva",
'aZ09');
227 $uselocaltax1 =
GETPOST(
"optionlocaltax1",
'aZ09');
228 $uselocaltax2 =
GETPOST(
"optionlocaltax2",
'aZ09');
229 if ($uselocaltax1 ==
'localtax1on' && !$usevat) {
230 setEventMessages($langs->trans(
"IfYouUseASecondTaxYouMustSetYouUseTheMainTax"),
null,
'errors');
233 if ($uselocaltax2 ==
'localtax2on' && !$usevat) {
234 setEventMessages($langs->trans(
"IfYouUseAThirdTaxYouMustSetYouUseTheMainTax"),
null,
'errors');
238 dolibarr_set_const($db,
"FACTURE_TVAOPTION", $usevat,
'chaine', 0,
'', $conf->entity);
239 dolibarr_set_const($db,
"FACTURE_LOCAL_TAX1_OPTION", $uselocaltax1,
'chaine', 0,
'', $conf->entity);
240 dolibarr_set_const($db,
"FACTURE_LOCAL_TAX2_OPTION", $uselocaltax2,
'chaine', 0,
'', $conf->entity);
242 if (
GETPOST(
"optionlocaltax1") ==
"localtax1on") {
243 if (!GETPOSTISSET(
'lt1')) {
244 dolibarr_set_const($db,
"MAIN_INFO_VALUE_LOCALTAX1", 0,
'chaine', 0,
'', $conf->entity);
250 if (
GETPOST(
"optionlocaltax2") ==
"localtax2on") {
251 if (!GETPOSTISSET(
'lt2')) {
252 dolibarr_set_const($db,
"MAIN_INFO_VALUE_LOCALTAX2", 0,
'chaine', 0,
'', $conf->entity);
260 if ($mysoc->country_code ==
'GR') {
263 dolibarr_set_const($db,
"AADE_WEBSERVICE_USER",
GETPOST(
"AADE_WEBSERVICE_USER",
'alpha'),
'chaine', 0,
'', $conf->entity);
279 if ($action !=
'updateedit' && !$error) {
280 header(
"Location: ".$_SERVER[
"PHP_SELF"].($page_y ?
'?page_y='.$page_y :
''));
285if ($action ==
'addthumb' || $action ==
'addthumbsquarred') {
286 if (file_exists($conf->mycompany->dir_output.
'/logos/'.
GETPOST(
"file"))) {
291 $constant =
"MAIN_INFO_SOCIETE_LOGO";
292 if ($action ==
'addthumbsquarred') {
293 $constant =
"MAIN_INFO_SOCIETE_LOGO_SQUARRED";
302 $imgThumbSmall =
vignette($conf->mycompany->dir_output.
'/logos/'.
GETPOST(
"file"), $maxwidthsmall, $maxheightsmall,
'_small', $quality);
304 $imgThumbSmall = $reg[1];
305 dolibarr_set_const($db, $constant.
"_SMALL", $imgThumbSmall,
'chaine', 0,
'', $conf->entity);
311 $imgThumbMini =
vignette($conf->mycompany->dir_output.
'/logos/'.
GETPOST(
"file"), $maxwidthmini, $maxheightmini,
'_mini', $quality);
313 $imgThumbMini = $reg[1];
314 dolibarr_set_const($db, $constant.
"_MINI", $imgThumbMini,
'chaine', 0,
'', $conf->entity);
319 header(
"Location: ".$_SERVER[
"PHP_SELF"]);
323 $langs->load(
"errors");
325 dol_syslog($langs->transnoentities(
"ErrorBadImageFormat"), LOG_INFO);
329 $langs->load(
"errors");
331 dol_syslog($langs->transnoentities(
"ErrorFileDoesNotExists",
GETPOST(
"file")), LOG_WARNING);
336if ($action ==
'removelogo' || $action ==
'removelogosquarred') {
337 $constant =
"MAIN_INFO_SOCIETE_LOGO";
338 if ($action ==
'removelogosquarred') {
339 $constant =
"MAIN_INFO_SOCIETE_LOGO_SQUARRED";
342 require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
344 $logofilename = $mysoc->logo;
345 $logofilenamebis = $mysoc->logo_squarred;
346 if ($action ==
'removelogosquarred') {
347 $logofilename = $mysoc->logo_squarred;
348 $logofilenamebis = $mysoc->logo;
351 $logofile = $conf->mycompany->dir_output.
'/logos/'.$logofilename;
352 if ($logofilename !=
'' && $logofilename != $logofilenamebis) {
356 if ($action ==
'removelogosquarred') {
357 $mysoc->logo_squarred =
'';
362 $logofilename = $mysoc->logo_small;
363 $logofilenamebis = $mysoc->logo_squarred_small;
364 if ($action ==
'removelogosquarred') {
365 $logofilename = $mysoc->logo_squarred_small;
366 $logofilenamebis = $mysoc->logo_small;
369 $logosmallfile = $conf->mycompany->dir_output.
'/logos/thumbs/'.$logofilename;
370 if ($logofilename !=
'' && $logofilename != $logofilenamebis) {
374 if ($action ==
'removelogosquarred') {
375 $mysoc->logo_squarred_small =
'';
377 $mysoc->logo_small =
'';
380 $logofilename = $mysoc->logo_mini;
381 $logofilenamebis = $mysoc->logo_squarred_mini;
382 if ($action ==
'removelogosquarred') {
383 $logofilename = $mysoc->logo_squarred_mini;
384 $logofilenamebis = $mysoc->logo_mini;
387 $logominifile = $conf->mycompany->dir_output.
'/logos/thumbs/'.$logofilename;
388 if ($logofilename !=
'' && $logofilename != $logofilenamebis) {
392 if ($action ==
'removelogosquarred') {
393 $mysoc->logo_squarred_mini =
'';
395 $mysoc->logo_mini =
'';
404$wikihelp =
'EN:First_setup|FR:Premiers_paramétrages|ES:Primeras_configuraciones';
405llxHeader(
'', $langs->trans(
"Setup"), $wikihelp,
'', 0, 0,
'',
'',
'',
'mod-admin page-company');
407$form =
new Form($db);
411$countrynotdefined =
'<span class="error">'.$langs->trans(
"ErrorSetACountryFirst").
' <a href="#trzipbeforecountry">('.$langs->trans(
"SeeAbove").
')</a></span>';
413print
load_fiche_titre($langs->trans(
"CompanyFoundation"),
'',
'title_setup');
419print
'<span class="opacitymedium">'.$langs->trans(
"CompanyFundationDesc", $langs->transnoentities(
"Save")).
"</span><br>\n";
425if (!empty($conf->use_javascript_ajax)) {
426 print
"\n".
'<script type="text/javascript">';
427 print
'$(document).ready(function () {
428 $("#selectcountry_id").change(function() {
429 document.form_index.action.value="updateedit";
430 document.form_index.submit();
433 print
'</script>'.
"\n";
436print
'<form enctype="multipart/form-data" method="POST" action="'.$_SERVER[
"PHP_SELF"].
'" name="form_index">';
437print
'<input type="hidden" name="token" value="'.newToken().
'">';
438print
'<input type="hidden" name="action" value="update">';
439print
'<input type="hidden" name="page_y" value="">';
441print
'<table class="noborder centpercent editmode">';
442print
'<tr class="liste_titre"><th class="titlefieldcreate wordbreak">'.$langs->trans(
"CompanyInfo").
'</th><th></th></tr>'.
"\n";
445print
'<tr class="oddeven"><td class="fieldrequired wordbreak"><label for="name">'.$langs->trans(
"CompanyName").
'</label></td><td>';
446print
'<input name="name" id="name" maxlength="'.$mysoc->fields[
'nom'][
'length'].
'" class="minwidth250" value="'.
dol_escape_htmltag((GETPOSTISSET(
'name') ?
GETPOST(
'name',
'alphanohtml') : (
getDolGlobalString(
'MAIN_INFO_SOCIETE_NOM')))).
'"'.(!
getDolGlobalString(
'MAIN_INFO_SOCIETE_NOM') ?
' autofocus="autofocus"' :
'').
'></td></tr>'.
"\n";
449print
'<tr class="oddeven"><td><label for="MAIN_INFO_SOCIETE_ADDRESS">'.$langs->trans(
"CompanyAddress").
'</label></td><td>';
450print
'<textarea name="MAIN_INFO_SOCIETE_ADDRESS" id="MAIN_INFO_SOCIETE_ADDRESS" class="quatrevingtpercent" rows="'.ROWS_3.
'">'.(GETPOSTISSET(
'MAIN_INFO_SOCIETE_ADDRESS') ?
GETPOST(
'MAIN_INFO_SOCIETE_ADDRESS',
'alphanohtml') : (
getDolGlobalString(
'MAIN_INFO_SOCIETE_ADDRESS'))).
'</textarea></td></tr>'.
"\n";
453print
'<tr class="oddeven" id="trzipbeforecountry"><td><label for="MAIN_INFO_SOCIETE_ZIP">'.$langs->trans(
"CompanyZip").
'</label></td><td>';
454print
'<input class="width100" name="MAIN_INFO_SOCIETE_ZIP" id="MAIN_INFO_SOCIETE_ZIP" value="'.dol_escape_htmltag((GETPOSTISSET(
'MAIN_INFO_SOCIETE_ZIP') ?
GETPOST(
'MAIN_INFO_SOCIETE_ZIP',
'alphanohtml') : (
getDolGlobalString(
'MAIN_INFO_SOCIETE_ZIP')))).
'"></td></tr>'.
"\n";
456print
'<tr class="oddeven" id="trtownbeforecountry"><td><label for="MAIN_INFO_SOCIETE_TOWN">'.$langs->trans(
"CompanyTown").
'</label></td><td>';
457print
'<input name="MAIN_INFO_SOCIETE_TOWN" class="minwidth200" id="MAIN_INFO_SOCIETE_TOWN" value="'.dol_escape_htmltag((GETPOSTISSET(
'MAIN_INFO_SOCIETE_TOWN') ?
GETPOST(
'MAIN_INFO_SOCIETE_TOWN',
'alphanohtml') : (
getDolGlobalString(
'MAIN_INFO_SOCIETE_TOWN')))).
'"></td></tr>'.
"\n";
460print
'<tr class="oddeven"><td class="fieldrequired"><label for="selectcountry_id">'.$langs->trans(
"Country").
'</label></td><td>';
461print
img_picto(
'',
'globe-americas',
'class="pictofixedwidth"');
462print $form->select_country($mysoc->country_id,
'country_id',
'', 0);
464 print
info_admin($langs->trans(
"YouCanChangeValuesForThisListFromDictionarySetup"), 1);
466print
'</td></tr>'.
"\n";
468print
'<tr class="oddeven"><td class="wordbreak"><label for="state_id">'.$langs->trans(
"State").
'</label></td><td>';
474print
img_picto(
'',
'state',
'class="pictofixedwidth"');
475print $formcompany->select_state($state_id, $mysoc->country_code,
'state_id',
'maxwidth200onsmartphone minwidth300');
476print
'</td></tr>'.
"\n";
479print
'<tr class="oddeven"><td><label for="currency">'.$langs->trans(
"CompanyCurrency").
'</label></td><td>';
480print
img_picto(
'',
'multicurrency',
'class="pictofixedwidth"');
481print $form->selectCurrency($conf->currency,
"currency");
482print
'</td></tr>'.
"\n";
485print
'<tr class="oddeven"><td><label for="phone">'.$langs->trans(
"Phone").
'</label></td><td>';
486print
img_picto(
'',
'object_phoning',
'', 0, 0, 0,
'',
'pictofixedwidth');
487print
'<input class="maxwidth150 widthcentpercentminusx" name="phone" id="phone" value="'.dol_escape_htmltag((GETPOSTISSET(
'phone') ?
GETPOST(
'phone',
'alphanohtml') : (
getDolGlobalString(
'MAIN_INFO_SOCIETE_TEL')))).
'"></td></tr>';
488print
'</td></tr>'.
"\n";
491print
'<tr class="oddeven"><td><label for="phone">'.$langs->trans(
"PhoneMobile").
'</label></td><td>';
492print
img_picto(
'',
'object_phoning_mobile',
'', 0, 0, 0,
'',
'pictofixedwidth');
493print
'<input class="maxwidth150 widthcentpercentminusx" name="phone_mobile" id="phone_mobile" value="'.dol_escape_htmltag((GETPOSTISSET(
'phone_mobile') ?
GETPOST(
'phone_mobile',
'alphanohtml') : (
getDolGlobalString(
'MAIN_INFO_SOCIETE_MOBILE')))).
'"></td></tr>';
494print
'</td></tr>'.
"\n";
497print
'<tr class="oddeven"><td><label for="fax">'.$langs->trans(
"Fax").
'</label></td><td>';
498print
img_picto(
'',
'object_phoning_fax',
'', 0, 0, 0,
'',
'pictofixedwidth');
499print
'<input class="maxwidth150" name="fax" id="fax" value="'.dol_escape_htmltag((GETPOSTISSET(
'fax') ?
GETPOST(
'fax',
'alphanohtml') : (
getDolGlobalString(
'MAIN_INFO_SOCIETE_FAX')))).
'"></td></tr>';
500print
'</td></tr>'.
"\n";
503print
'<tr class="oddeven"><td><label for="email">'.$langs->trans(
"EMail").
'</label></td><td>';
504print
img_picto(
'',
'object_email',
'', 0, 0, 0,
'',
'pictofixedwidth');
505print
'<input class="minwidth300 maxwidth500 widthcentpercentminusx" name="mail" id="email" value="'.dol_escape_htmltag((GETPOSTISSET(
'mail') ?
GETPOST(
'mail',
'alphanohtml') : (
getDolGlobalString(
'MAIN_INFO_SOCIETE_MAIL') ? $conf->global->MAIN_INFO_SOCIETE_MAIL :
''))).
'"></td></tr>';
506print
'</td></tr>'.
"\n";
509print
'<tr class="oddeven"><td><label for="web">'.$langs->trans(
"Web").
'</label></td><td>';
510print
img_picto(
'',
'globe',
'', 0, 0, 0,
'',
'pictofixedwidth');
511print
'<input class="maxwidth300 widthcentpercentminusx" name="web" id="web" value="'.dol_escape_htmltag((GETPOSTISSET(
'web') ?
GETPOST(
'web',
'alphanohtml') : (
getDolGlobalString(
'MAIN_INFO_SOCIETE_WEB') ? $conf->global->MAIN_INFO_SOCIETE_WEB :
''))).
'"></td></tr>';
512print
'</td></tr>'.
"\n";
515if (isModEnabled(
'barcode')) {
516 print
'<tr class="oddeven"><td>';
517 print
'<label for="barcode">'.$langs->trans(
"Gencod").
'</label></td><td>';
518 print
'<span class="fa fa-barcode pictofixedwidth"></span>';
519 print
'<input name="barcode" id="barcode" class="minwidth150 widthcentpercentminusx maxwidth300" value="'.dol_escape_htmltag(GETPOSTISSET(
'barcode') ?
GETPOST(
'barcode',
'alphanohtml') :
getDolGlobalString(
'MAIN_INFO_SOCIETE_GENCOD',
'')).
'"></td></tr>';
524$tooltiplogo = $langs->trans(
'AvailableFormats').
' : png, jpg, jpeg';
526$maxmin = $maxfilesizearray[
'maxmin'];
527$tooltiplogo .= ($maxmin > 0) ?
'<br>'.$langs->trans(
'MaxSize').
' : '.$maxmin.
' '.$langs->trans(
'Kb') :
'';
530print
'<tr class="oddeven"><td><label for="logo">'.$form->textwithpicto($langs->trans(
"Logo"), $tooltiplogo).
'</label></td><td>';
531print
'<div class="centpercent nobordernopadding valignmiddle "><div class="inline-block marginrightonly">';
533 print
'<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).
'">';
535print
'<input type="file" class="flat minwidth100 maxwidthinputfileonsmartphone" name="logo" id="logo" accept="image/*">';
537if (!empty($mysoc->logo_small)) {
538 print
'<div class="inline-block valignmiddle marginrightonly">';
539 print
'<a class="reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=removelogo&token='.
newToken().
'">'.
img_delete($langs->trans(
"Delete"),
'',
'marginleftonly').
'</a>';
541 if (file_exists($conf->mycompany->dir_output.
'/logos/thumbs/'.$mysoc->logo_small)) {
542 print
'<div class="inline-block valignmiddle">';
543 print
'<img id="logo" style="max-height: 80px; max-width: 200px;" src="'.DOL_URL_ROOT.
'/viewimage.php?modulepart=mycompany&file='.urlencode(
'logos/thumbs/'.$mysoc->logo_small).
'">';
545 } elseif (!empty($mysoc->logo)) {
546 if (!file_exists($conf->mycompany->dir_output.
'/logos/thumbs/'.$mysoc->logo_mini)) {
547 $imgThumbMini =
vignette($conf->mycompany->dir_output.
'/logos/'.$mysoc->logo, $maxwidthmini, $maxheightmini,
'_mini', $quality);
549 $imgThumbSmall =
vignette($conf->mycompany->dir_output.
'/logos/'.$mysoc->logo, $maxwidthmini, $maxheightmini,
'_small', $quality);
550 print
'<div class="inline-block valignmiddle">';
551 print
'<img id="logo" style="max-height: 80px; max-width: 200px;" src="'.DOL_URL_ROOT.
'/viewimage.php?modulepart=mycompany&file='.urlencode(
'logos/thumbs/'.basename($imgThumbSmall)).
'">';
554} elseif (!empty($mysoc->logo)) {
555 if (file_exists($conf->mycompany->dir_output.
'/logos/'.$mysoc->logo)) {
556 print
'<div class="inline-block valignmiddle">';
557 print
'<img id="logo" style="max-height: 80px" src="'.DOL_URL_ROOT.
'/viewimage.php?modulepart=mycompany&file='.urlencode(
'logos/'.$mysoc->logo).
'">';
559 print
'<div class="inline-block valignmiddle marginrightonly"><a class="reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=removelogo&token='.
newToken().
'">'.
img_delete($langs->trans(
"Delete"),
'',
'marginleftonly').
'</a></div>';
561 print
'<div class="inline-block valignmiddle">';
562 print
'<img id="logo" height="80" src="'.DOL_URL_ROOT.
'/public/theme/common/nophoto.png" title="File has been removed from disk">';
570print
'<tr class="oddeven"><td><label for="logo_squarred">'.$form->textwithpicto($langs->trans(
"LogoSquarred"), $tooltiplogo).
'</label></td><td>';
571print
'<div class="centpercent nobordernopadding valignmiddle"><div class="inline-block marginrightonly">';
573$maxmin = $maxfilesizearray[
'maxmin'];
575 print
'<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).
'">';
577print
'<input type="file" class="flat minwidth100 maxwidthinputfileonsmartphone" name="logo_squarred" id="logo_squarred" accept="image/*">';
579if (!empty($mysoc->logo_squarred_small)) {
580 print
'<div class="inline-block valignmiddle marginrightonly">';
581 print
'<a class="reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=removelogosquarred&token='.
newToken().
'">'.
img_delete($langs->trans(
"Delete"),
'',
'marginleftonly').
'</a>';
583 if (file_exists($conf->mycompany->dir_output.
'/logos/thumbs/'.$mysoc->logo_squarred_small)) {
584 print
'<div class="inline-block valignmiddle marginrightonly">';
585 print
'<img id="logosquarred" style="height: 80px; width: 80px;" src="'.DOL_URL_ROOT.
'/viewimage.php?modulepart=mycompany&file='.urlencode(
'logos/thumbs/'.$mysoc->logo_squarred_small).
'">';
587 } elseif (!empty($mysoc->logo_squarred)) {
588 if (!file_exists($conf->mycompany->dir_output.
'/logos/thumbs/'.$mysoc->logo_squarred_mini)) {
589 $imgThumbMini =
vignette($conf->mycompany->dir_output.
'/logos/'.$mysoc->logo_squarred, $maxwidthmini, $maxheightmini,
'_mini', $quality);
591 $imgThumbSmall =
vignette($conf->mycompany->dir_output.
'/logos/'.$mysoc->logo_squarred, $maxwidthmini, $maxheightmini,
'_small', $quality);
592 print
'<div class="inline-block valignmiddle">';
593 print
'<img id="logosquarred" style="height: 80px; width: 80px;" src="'.DOL_URL_ROOT.
'/viewimage.php?modulepart=mycompany&file='.urlencode(
'logos/thumbs/'.basename($imgThumbSmall)).
'">';
597} elseif (!empty($mysoc->logo_squarred)) {
598 if (file_exists($conf->mycompany->dir_output.
'/logos/'.$mysoc->logo_squarred)) {
599 print
'<div class="inline-block valignmiddle">';
600 print
'<img id="logosquarred" style="height: 80px; width: 80px;" src="'.DOL_URL_ROOT.
'/viewimage.php?modulepart=mycompany&file='.urlencode(
'logos/'.$mysoc->logo_squarred).
'">';
602 print
'<div class="inline-block valignmiddle marginrightonly"><a class="reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=removelogosquarred&token='.
newToken().
'">'.
img_delete($langs->trans(
"Delete"),
'',
'marginleftonly').
'</a></div>';
605 print
'<div class="inline-block valignmiddle">';
606 print
'<img id="logosquarred" style="height: 80px; width: 80px;" src="'.DOL_URL_ROOT.
'/public/theme/common/nophoto.png" title="File has been removed from disk">';
615print
'<tr class="oddeven"><td class="tdtop"><label for="note">'.$langs->trans(
"Note").
'</label></td><td>';
616print
'<textarea class="flat quatrevingtpercent" name="note" id="note" rows="'.ROWS_5.
'">'.(GETPOSTISSET(
'note') ?
GETPOST(
'note',
'restricthtml') : (
getDolGlobalString(
'MAIN_INFO_SOCIETE_NOTE') ? $conf->global->MAIN_INFO_SOCIETE_NOTE :
'')).
'</textarea></td></tr>';
621print $form->buttonsSaveCancel(
"Save",
'', array(),
false,
'reposition');
627print
'<div class="div-table-responsive-no-min">';
628print
'<table class="noborder centpercent editmode">';
629print
'<tr class="liste_titre"><td class="titlefieldcreate wordbreak">'.$langs->trans(
"CompanyIds").
'</td><td></td></tr>';
631$langs->load(
"companies");
634print
'<tr class="oddeven"><td><label for="director">'.$langs->trans(
"ManagingDirectors").
'</label></td><td>';
635print
'<input name="MAIN_INFO_SOCIETE_MANAGERS" id="directors" class="minwidth300" value="'.dol_escape_htmltag((GETPOSTISSET(
'MAIN_INFO_SOCIETE_MANAGERS') ?
GETPOST(
'MAIN_INFO_SOCIETE_MANAGERS',
'alphanohtml') : (
getDolGlobalString(
'MAIN_INFO_SOCIETE_MANAGERS') ? $conf->global->MAIN_INFO_SOCIETE_MANAGERS :
''))).
'"></td></tr>';
638print
'<tr class="oddeven"><td>';
639print $form->textwithpicto($langs->trans(
"GDPRContact"), $langs->trans(
"GDPRContactDesc"));
641print
'<input name="MAIN_INFO_GDPR" id="infodirector" class="minwidth300" value="'.dol_escape_htmltag((GETPOSTISSET(
"MAIN_INFO_GDPR") ?
GETPOST(
"MAIN_INFO_GDPR",
'alphanohtml') : (
getDolGlobalString(
'MAIN_INFO_GDPR') ? $conf->global->MAIN_INFO_GDPR :
''))).
'"></td></tr>';
644print
'<tr class="oddeven"><td><label for="capital">'.$langs->trans(
"Capital").
'</label></td><td>';
645print
'<input name="capital" id="capital" class="maxwidth100" value="'.dol_escape_htmltag((GETPOSTISSET(
'capital') ?
GETPOST(
'capital',
'alphanohtml') : (
getDolGlobalString(
'MAIN_INFO_CAPITAL') ? $conf->global->MAIN_INFO_CAPITAL :
''))).
'"></td></tr>';
648print
'<tr class="oddeven"><td><label for="forme_juridique_code">'.$langs->trans(
"JuridicalStatus").
'</label></td><td>';
649if ($mysoc->country_code) {
650 print $formcompany->select_juridicalstatus(
getDolGlobalString(
'MAIN_INFO_SOCIETE_FORME_JURIDIQUE'), $mysoc->country_code,
'',
'forme_juridique_code');
652 print $countrynotdefined;
657if ($langs->transcountry(
"ProfId1", $mysoc->country_code) !=
'-') {
658 print
'<tr class="oddeven"><td><label for="profid1">'.$langs->transcountry(
"ProfId1", $mysoc->country_code).
'</label></td><td>';
659 if (!empty($mysoc->country_code)) {
660 print
'<input name="siren" id="profid1" class="minwidth200" value="'.dol_escape_htmltag(
getDolGlobalString(
'MAIN_INFO_SIREN')).
'">';
662 print $countrynotdefined;
668if ($langs->transcountry(
"ProfId2", $mysoc->country_code) !=
'-') {
669 print
'<tr class="oddeven"><td><label for="profid2">'.$langs->transcountry(
"ProfId2", $mysoc->country_code).
'</label></td><td>';
670 if (!empty($mysoc->country_code)) {
671 print
'<input name="siret" id="profid2" class="minwidth200" value="'.dol_escape_htmltag(
getDolGlobalString(
'MAIN_INFO_SIRET')).
'">';
673 print $countrynotdefined;
679if ($langs->transcountry(
"ProfId3", $mysoc->country_code) !=
'-') {
680 print
'<tr class="oddeven"><td><label for="profid3">'.$langs->transcountry(
"ProfId3", $mysoc->country_code).
'</label></td><td>';
681 if (!empty($mysoc->country_code)) {
682 print
'<input name="ape" id="profid3" class="minwidth200" value="'.dol_escape_htmltag(
getDolGlobalString(
'MAIN_INFO_APE')).
'">';
684 print $countrynotdefined;
690if ($langs->transcountry(
"ProfId4", $mysoc->country_code) !=
'-') {
691 print
'<tr class="oddeven"><td><label for="profid4">'.$langs->transcountry(
"ProfId4", $mysoc->country_code).
'</label></td><td>';
692 if (!empty($mysoc->country_code)) {
693 print
'<input name="rcs" id="profid4" class="minwidth200" value="'.dol_escape_htmltag(
getDolGlobalString(
'MAIN_INFO_RCS')).
'">';
695 print $countrynotdefined;
701if ($langs->transcountry(
"ProfId5", $mysoc->country_code) !=
'-') {
702 print
'<tr class="oddeven"><td><label for="profid5">'.$langs->transcountry(
"ProfId5", $mysoc->country_code).
'</label></td><td>';
703 if (!empty($mysoc->country_code)) {
704 print
'<input name="MAIN_INFO_PROFID5" id="profid5" class="minwidth200" value="'.dol_escape_htmltag(
getDolGlobalString(
'MAIN_INFO_PROFID5')).
'">';
706 print $countrynotdefined;
712if ($langs->transcountry(
"ProfId6", $mysoc->country_code) !=
'-') {
713 print
'<tr class="oddeven"><td><label for="profid6">'.$langs->transcountry(
"ProfId6", $mysoc->country_code).
'</label></td><td>';
714 if (!empty($mysoc->country_code)) {
715 print
'<input name="MAIN_INFO_PROFID6" id="profid6" class="minwidth200" value="'.dol_escape_htmltag(
getDolGlobalString(
'MAIN_INFO_PROFID6')).
'">';
717 print $countrynotdefined;
723if ($langs->transcountry(
"ProfId7", $mysoc->country_code) !=
'-') {
724 print
'<tr class="oddeven"><td><label for="profid7">'.$langs->transcountry(
"ProfId7", $mysoc->country_code).
'</label></td><td>';
725 if (!empty($mysoc->country_code)) {
726 print
'<input name="MAIN_INFO_PROFID7" id="profid7" class="minwidth200" value="'.dol_escape_htmltag(
getDolGlobalString(
'MAIN_INFO_PROFID7')).
'">';
728 print $countrynotdefined;
734if ($langs->transcountry(
"ProfId8", $mysoc->country_code) !=
'-') {
735 print
'<tr class="oddeven"><td><label for="profid8">'.$langs->transcountry(
"ProfId8", $mysoc->country_code).
'</label></td><td>';
736 if (!empty($mysoc->country_code)) {
737 print
'<input name="MAIN_INFO_PROFID8" id="profid8" class="minwidth200" value="'.dol_escape_htmltag(
getDolGlobalString(
'MAIN_INFO_PROFID8')).
'">';
739 print $countrynotdefined;
745if ($langs->transcountry(
"ProfId9", $mysoc->country_code) !=
'-') {
746 print
'<tr class="oddeven"><td><label for="profid9">'.$langs->transcountry(
"ProfId9", $mysoc->country_code).
'</label></td><td>';
747 if (!empty($mysoc->country_code)) {
748 print
'<input name="MAIN_INFO_PROFID9" id="profid9" class="minwidth200" value="'.dol_escape_htmltag(
getDolGlobalString(
'MAIN_INFO_PROFID9')).
'">';
750 print $countrynotdefined;
756if ($langs->transcountry(
"ProfId10", $mysoc->country_code) !=
'-') {
757 print
'<tr class="oddeven"><td><label for="profid10">'.$langs->transcountry(
"ProfId10", $mysoc->country_code).
'</label></td><td>';
758 if (!empty($mysoc->country_code)) {
759 print
'<input name="MAIN_INFO_PROFID10" id="profid10" class="minwidth200" value="'.dol_escape_htmltag(
getDolGlobalString(
'MAIN_INFO_PROFID10')).
'">';
761 print $countrynotdefined;
767print
'<tr class="oddeven"><td><label for="intra_vat">'.$langs->trans(
"VATIntra").
'</label></td><td>';
768print
'<input name="tva" id="intra_vat" class="minwidth200" value="'.dol_escape_htmltag(
getDolGlobalString(
'MAIN_INFO_TVAINTRA')).
'">';
772print
'<tr class="oddeven"><td><label for="socialobject">'.$langs->trans(
"CompanyObject").
'</label></td><td>';
773print
'<textarea class="flat quatrevingtpercent" name="socialobject" id="socialobject" rows="'.ROWS_5.
'">'.(
getDolGlobalString(
'MAIN_INFO_SOCIETE_OBJECT')).
'</textarea></td></tr>';
782print
'<table class="noborder centpercent editmode">';
783print
'<tr class="liste_titre">';
784print
'<td class="titlefieldcreate">'.$langs->trans(
"FiscalYearInformation").
'</td><td></td>';
787print
'<tr class="oddeven"><td><label for="SOCIETE_FISCAL_MONTH_START">'.$langs->trans(
"FiscalMonthStart").
'</label></td><td>';
788print $formother->select_month(
getDolGlobalInt(
'SOCIETE_FISCAL_MONTH_START') ? $conf->global->SOCIETE_FISCAL_MONTH_START :
'',
'SOCIETE_FISCAL_MONTH_START', 0, 1,
'maxwidth100').
'</td></tr>';
792print $form->buttonsSaveCancel(
"Save",
'', array(),
false,
'reposition');
798print
load_fiche_titre($langs->trans(
"TypeOfSaleTaxes"),
'',
'object_payment');
800print
'<table class="noborder centpercent editmode">';
801print
'<tr class="liste_titre">';
802print
'<td class="titlefieldcreate">'.$langs->trans(
"VATManagement").
'</td><td></td>';
803print
'<td class="right"> </td>';
807print
'<tr class="oddeven"><td><label><input type="radio" name="optiontva" id="use_vat" value="1"'.(!
getDolGlobalString(
'FACTURE_TVAOPTION') ?
"" :
" checked").
"> ".$langs->trans(
"VATIsUsed").
"</label></td>";
808print
'<td colspan="2">';
809$tooltiphelp = $langs->trans(
"VATIsUsedDesc");
810if ($mysoc->country_code ==
'FR') {
811 $tooltiphelp .=
'<br><br><i>'.$langs->trans(
"Example").
': '.$langs->trans(
"VATIsUsedExampleFR").
"</i>";
813print
'<label for="use_vat">'.$form->textwithpicto($langs->trans(
"VATIsUsedStandard"), $tooltiphelp).
"</label>";
817print
'<tr class="oddeven"><td width="140"><label><input type="radio" name="optiontva" id="no_vat" value="0"'.(!
getDolGlobalString(
'FACTURE_TVAOPTION') ?
" checked" :
"").
"> ".$langs->trans(
"VATIsNotUsed").
"</label></td>";
818print
'<td colspan="2">';
820if ($mysoc->country_code ==
'FR') {
821 $tooltiphelp =
"<i>".$langs->trans(
"Example").
': '.$langs->trans(
"VATIsNotUsedExampleFR").
"</i>\n";
823print
'<label for="no_vat">'.$form->textwithpicto($langs->trans(
"VATIsNotUsedDesc"), $tooltiphelp).
"</label>";
830print
'<table class="noborder centpercent editmode">';
831print
'<tr class="liste_titre">';
832print
'<td class="titlefieldcreate">'.$form->textwithpicto($langs->transcountry(
"LocalTax1Management", $mysoc->country_code), $langs->transcountry(
"LocalTax1IsUsedDesc", $mysoc->country_code)).
'</td><td></td>';
833print
'<td class="right"> </td>';
836if ($mysoc->useLocalTax(1)) {
838 print
'<tr class="oddeven"><td><input type="radio" name="optionlocaltax1" id="lt1" value="localtax1on"'.((getDolGlobalString(
'FACTURE_LOCAL_TAX1_OPTION') ==
'1' ||
getDolGlobalString(
'FACTURE_LOCAL_TAX1_OPTION') ==
"localtax1on") ?
" checked" :
"").
'> <label for="lt1">'.$langs->transcountry(
"LocalTax1IsUsed", $mysoc->country_code).
"</label></td>";
839 print
'<td colspan="2">';
840 print
'<div class="nobordernopadding">';
841 $tooltiphelp = $langs->transcountry(
"LocalTax1IsUsedExample", $mysoc->country_code);
842 $tooltiphelp = ($tooltiphelp !=
"LocalTax1IsUsedExample" ?
"<i>".$langs->trans(
"Example").
': '.$langs->transcountry(
"LocalTax1IsUsedExample", $mysoc->country_code).
"</i>\n" :
"");
843 print $form->textwithpicto($langs->transcountry(
"LocalTax1IsUsedDesc", $mysoc->country_code), $tooltiphelp);
845 print
'<br><label for="lt1">'.$langs->trans(
"LTRate").
'</label>: ';
846 $formcompany->select_localtax(1, $conf->global->MAIN_INFO_VALUE_LOCALTAX1,
"lt1");
849 $options = array($langs->trans(
"CalcLocaltax1").
' '.$langs->trans(
"CalcLocaltax1Desc"), $langs->trans(
"CalcLocaltax2").
' - '.$langs->trans(
"CalcLocaltax2Desc"), $langs->trans(
"CalcLocaltax3").
' - '.$langs->trans(
"CalcLocaltax3Desc"));
851 print
'<br><label for="clt1">'.$langs->trans(
"CalcLocaltax").
'</label>: ';
852 print $form->selectarray(
"clt1", $options,
getDolGlobalString(
'MAIN_INFO_LOCALTAX_CALC1'));
854 print
"</td></tr>\n";
856 print
'<tr class="oddeven"><td><input type="radio" name="optionlocaltax1" id="nolt1" value="localtax1off"'.((!
getDolGlobalString(
'FACTURE_LOCAL_TAX1_OPTION') ||
getDolGlobalString(
'FACTURE_LOCAL_TAX1_OPTION') ==
"localtax1off") ?
" checked" :
"").
'> <label for="nolt1">'.$langs->transcountry(
"LocalTax1IsNotUsed", $mysoc->country_code).
"</label></td>";
857 print
'<td colspan="2">';
858 $tooltiphelp = $langs->transcountry(
"LocalTax1IsNotUsedExample", $mysoc->country_code);
859 $tooltiphelp = ($tooltiphelp !=
"LocalTax1IsNotUsedExample" ?
"<i>".$langs->trans(
"Example").
': '.$langs->transcountry(
"LocalTax1IsNotUsedExample", $mysoc->country_code).
"</i>\n" :
"");
860 print $form->textwithpicto($langs->transcountry(
"LocalTax1IsNotUsedDesc", $mysoc->country_code), $tooltiphelp);
861 print
"</td></tr>\n";
863 if (empty($mysoc->country_code)) {
864 print
'<tr class="oddeven nohover"><td class="" colspan="3">'.$countrynotdefined.
'</td></tr>';
866 print
'<tr class="oddeven nohover"><td class="" colspan="3"><span class="opacitymedium">'.$langs->trans(
"NoLocalTaxXForThisCountry", $langs->transnoentitiesnoconv(
"Setup"), $langs->transnoentitiesnoconv(
"Dictionaries"), $langs->transnoentitiesnoconv(
"DictionaryVAT"), $langs->transnoentitiesnoconv(
"LocalTax1Management")).
'</span></td></tr>';
874print
'<table class="noborder centpercent editmode">';
875print
'<tr class="liste_titre">';
876print
'<td class="titlefieldcreate">'.$form->textwithpicto($langs->transcountry(
"LocalTax2Management", $mysoc->country_code), $langs->transcountry(
"LocalTax2IsUsedDesc", $mysoc->country_code)).
'</td><td></td>';
877print
'<td class="right"> </td>';
880if ($mysoc->useLocalTax(2)) {
882 print
'<tr class="oddeven"><td><input type="radio" name="optionlocaltax2" id="lt2" value="localtax2on"'.((getDolGlobalString(
'FACTURE_LOCAL_TAX2_OPTION') ==
'1' ||
getDolGlobalString(
'FACTURE_LOCAL_TAX2_OPTION') ==
"localtax2on") ?
" checked" :
"").
'> <label for="lt2">'.$langs->transcountry(
"LocalTax2IsUsed", $mysoc->country_code).
"</label></td>";
883 print
'<td colspan="2">';
884 print
'<div class="nobordernopadding">';
885 print
'<label for="lt2">'.$langs->transcountry(
"LocalTax2IsUsedDesc", $mysoc->country_code).
"</label>";
886 $tooltiphelp = $langs->transcountry(
"LocalTax2IsUsedExample", $mysoc->country_code);
887 $tooltiphelp = ($tooltiphelp !=
"LocalTax2IsUsedExample" ?
"<i>".$langs->trans(
"Example").
': '.$langs->transcountry(
"LocalTax2IsUsedExample", $mysoc->country_code).
"</i>\n" :
"");
889 print
'<br><label for="lt2">'.$langs->trans(
"LTRate").
'</label>: ';
890 $formcompany->select_localtax(2,
getDolGlobalString(
'MAIN_INFO_VALUE_LOCALTAX2'),
"lt2");
893 $options = array($langs->trans(
"CalcLocaltax1").
' '.$langs->trans(
"CalcLocaltax1Desc"), $langs->trans(
"CalcLocaltax2").
' - '.$langs->trans(
"CalcLocaltax2Desc"), $langs->trans(
"CalcLocaltax3").
' - '.$langs->trans(
"CalcLocaltax3Desc"));
895 print
'<br><label for="clt2">'.$langs->trans(
"CalcLocaltax").
'</label>: ';
896 print $form->selectarray(
"clt2", $options,
getDolGlobalString(
'MAIN_INFO_LOCALTAX_CALC2'));
898 print
"</td></tr>\n";
900 print
'<tr class="oddeven"><td><input type="radio" name="optionlocaltax2" id="nolt2" value="localtax2off"'.((!
getDolGlobalString(
'FACTURE_LOCAL_TAX2_OPTION') ||
getDolGlobalString(
'FACTURE_LOCAL_TAX2_OPTION') ==
"localtax2off") ?
" checked" :
"").
'> <label for="nolt2">'.$langs->transcountry(
"LocalTax2IsNotUsed", $mysoc->country_code).
"</label></td>";
901 print
'<td colspan="2">';
903 $tooltiphelp = $langs->transcountry(
"LocalTax2IsNotUsedExample", $mysoc->country_code);
904 $tooltiphelp = ($tooltiphelp !=
"LocalTax2IsNotUsedExample" ?
"<i>".$langs->trans(
"Example").
': '.$langs->transcountry(
"LocalTax2IsNotUsedExample", $mysoc->country_code).
"</i>\n" :
"");
905 print
"<label for=\"nolt2\">".$form->textwithpicto($langs->transcountry(
"LocalTax2IsNotUsedDesc", $mysoc->country_code), $tooltiphelp).
"</label>";
907 print
"</td></tr>\n";
909 if (empty($mysoc->country_code)) {
910 print
'<tr class="oddeven nohover"><td class="" colspan="3">'.$countrynotdefined.
'</td></tr>';
912 print
'<tr class="oddeven nohover"><td class="" colspan="3"><span class="opacitymedium">'.$langs->trans(
"NoLocalTaxXForThisCountry", $langs->transnoentitiesnoconv(
"Setup"), $langs->transnoentitiesnoconv(
"Dictionaries"), $langs->transnoentitiesnoconv(
"DictionaryVAT"), $langs->transnoentitiesnoconv(
"LocalTax2Management")).
'</span></td></tr>';
921print
'<table class="noborder centpercent editmode">';
922print
'<tr class="liste_titre">';
923print
'<td>'.$form->textwithpicto($langs->trans(
"RevenueStamp"), $langs->trans(
"RevenueStampDesc")).
'</td><td></td>';
924print
'<td class="right"> </td>';
926if ($mysoc->useRevenueStamp()) {
928 print
'<tr class="oddeven"><td>';
929 print $langs->trans(
"UseRevenueStamp");
931 print
'<td colspan="2">';
932 print $langs->trans(
"UseRevenueStampExample", $langs->transnoentitiesnoconv(
"Setup"), $langs->transnoentitiesnoconv(
"Dictionaries"), $langs->transnoentitiesnoconv(
"DictionaryRevenueStamp"));
933 print
"</td></tr>\n";
935 if (empty($mysoc->country_code)) {
936 print
'<tr class="oddeven nohover"><td class="" colspan="3">'.$countrynotdefined.
'</td></tr>';
938 print
'<tr class="oddeven nohover"><td class="" colspan="3"><span class="opacitymedium">'.$langs->trans(
"NoLocalTaxXForThisCountry", $langs->transnoentitiesnoconv(
"Setup"), $langs->transnoentitiesnoconv(
"Dictionaries"), $langs->transnoentitiesnoconv(
"DictionaryRevenueStamp"), $langs->transnoentitiesnoconv(
"RevenueStamp")).
'</span></td></tr>';
945if ($mysoc->country_code ==
'GR') {
947 print
'<table class="noborder centpercent editmode">';
948 print
'<tr class="liste_titre">';
949 print
'<td>'.$langs->trans(
"AccountParameter").
'</td>';
950 print
'<td>'.$langs->trans(
"Value").
'</td>';
954 print
'<tr class="oddeven"><td>';
955 print
'<span class="titlefield fieldrequired">'.$langs->trans(
"MYDATA_AADE_USER").
'</span></td><td>';
956 print
'<input class="minwidth300" type="text" name="MYDATA_AADE_USER" value="'.getDolGlobalString(
'MYDATA_AADE_USER').
'"';
957 print
'</td><td></td></tr>';
959 print
'<tr class="oddeven"><td>';
960 print
'<span class="titlefield fieldrequired">'.$langs->trans(
"MYDATA_AADE_KEY").
'</span></td><td>';
961 print
'<input class="minwidth300" type="text" name="MYDATA_AADE_KEY" value="'.getDolGlobalString(
'MYDATA_AADE_KEY').
'"';
962 print
'</td><td></td></tr>';
964 print
'<tr class="oddeven"><td>';
965 print
'<span class="titlefield fieldrequired">'.$langs->trans(
"AADE_WEBSERVICE_USER").
'</span></td><td>';
966 print
'<input class="minwidth300" type="text" name="AADE_WEBSERVICE_USER" value="'.getDolGlobalString(
'AADE_WEBSERVICE_USER').
'"';
967 print
'</td><td></td></tr>';
969 print
'<tr class="oddeven"><td>';
970 print
'<span class="titlefield fieldrequired">'.$langs->trans(
"AADE_WEBSERVICE_KEY").
'</span></td><td>';
971 print
'<input class="minwidth300" type="text" name="AADE_WEBSERVICE_KEY" value="'.getDolGlobalString(
'AADE_WEBSERVICE_KEY').
'"';
972 print
'</td><td></td></tr>';
979print $form->buttonsSaveCancel(
"Save",
'', array(),
false,
'reposition');
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
dolibarr_set_const($db, $name, $value, $type='chaine', $visible=0, $note='', $entity=1)
Insert a parameter (key,value) into database (delete old key then insert it again).
dolibarr_del_const($db, $name, $entity=1)
Delete a constant.
activateModulesRequiredByCountry($country_code)
Activate external modules mandatory when country is country_code.
company_admin_prepare_head()
Return array head with list of tabs to view object information.
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
Empty header.
getCountry($searchkey, $withcode='', $dbtouse=null, $outputlangs=null, $entconv=1, $searchlabel='')
Return country label, code or id from an id, code or label.
getState($id, $withcode='0', $dbtouse=null, $withregion=0, $outputlangs=null, $entconv=1)
Return state translated from an id.
dol_delete_file($file, $disableglob=0, $nophperrors=0, $nohook=0, $object=null, $allowdotdot=false, $indexdatabase=1, $nolog=0)
Remove a file or several files with a mask.
dol_move_uploaded_file($src_file, $dest_file, $allowoverwrite, $disablevirusscan=0, $uploaderrorcode=0, $nohook=0, $varfiles='addedfile', $upload_dir='')
Check validity of a file upload from an GUI page, and move it to its final destination.
isOnlyOneLocalTax($local)
Return true if LocalTax (1 or 2) is unique.
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
img_delete($titlealt='default', $other='class="pictodelete"', $morecss='')
Show delete logo.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0)
Show tabs of a record.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
newToken()
Return the value of token currently saved into session with name 'newtoken'.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
info_admin($text, $infoonimgalt=0, $nodiv=0, $admin='1', $morecss='hideonsmartphone', $textfordropdown='', $picto='')
Show information in HTML for admin users or standard users.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
dol_mkdir($dir, $dataroot='', $newmask='')
Creation of a directory (this can create recursive subdir)
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0, $cleanalsojavascript=0)
Returns text escaped for inclusion in HTML alt or title or value tags, or into values of HTML input f...
vignette($file, $maxWidth=160, $maxHeight=120, $extName='_small', $quality=50, $outdir='thumbs', $targetformat=0)
Create a thumbnail from an image file (Supported extensions are gif, jpg, png and bmp).
if(!defined( 'IMAGETYPE_WEBP')) getDefaultImageSizes()
Return default values for image sizes.
imgAddEditDeleteButton($htmlid, $urledit, $urldelete)
Beautify an image by adding a link edit and delete on image.
image_format_supported($file, $acceptsvg=0)
Return if a filename is file name of a supported image format.
getMaxFileSizeArray()
Return the max allowed for file upload.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.