32require
'../main.inc.php';
33require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
34require_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
35require_once DOL_DOCUMENT_ROOT.
'/core/lib/date.lib.php';
36require_once DOL_DOCUMENT_ROOT.
'/core/lib/images.lib.php';
37require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
38require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
39require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
40require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formcompany.class.php';
42$action =
GETPOST(
'action',
'aZ09');
43$contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'admincompany';
47$langs->loadLangs(array(
'admin',
'companies',
'bills'));
56$maxwidthsmall = $tmparraysize[
'maxwidthsmall'];
57$maxheightsmall = $tmparraysize[
'maxheightsmall'];
58$maxwidthmini = $tmparraysize[
'maxwidthmini'];
59$maxheightmini = $tmparraysize[
'maxheightmini'];
60$quality = $tmparraysize[
'quality'];
63$hookmanager->initHooks(array(
'admincompany',
'globaladmin'));
71$reshook = $hookmanager->executeHooks(
'doActions', $parameters,
$object, $action);
76if (($action ==
'update' && !
GETPOST(
"cancel",
'alpha'))
77|| ($action ==
'updateedit')) {
79 if (!empty($tmparray[
'id'])) {
80 if ($tmparray[
'code'] ==
'FR' && $tmparray[
'id'] != $mysoc->country_id) {
82 $res =
dolibarr_set_const($db,
"MAIN_PROFID1_IN_ADDRESS", 1,
'chaine', 0,
'', $conf->entity);
85 $mysoc->country_id = $tmparray[
'id'];
86 $mysoc->country_code = $tmparray[
'code'];
87 $mysoc->country_label = $tmparray[
'label'];
89 $s = $mysoc->country_id.
':'.$mysoc->country_code.
':'.$mysoc->country_label;
90 dolibarr_set_const($db,
"MAIN_INFO_SOCIETE_COUNTRY", $s,
'chaine', 0,
'', $conf->entity);
96 if (!empty($tmparray[
'id'])) {
97 $mysoc->state_id = $tmparray[
'id'];
98 $mysoc->state_code = $tmparray[
'code'];
99 $mysoc->state_label = $tmparray[
'label'];
101 $s = $mysoc->state_id.
':'.$mysoc->state_code.
':'.$mysoc->state_label;
102 dolibarr_set_const($db,
"MAIN_INFO_SOCIETE_STATE", $s,
'chaine', 0,
'', $conf->entity);
110 dolibarr_set_const($db,
"MAIN_INFO_SOCIETE_ADDRESS",
GETPOST(
"MAIN_INFO_SOCIETE_ADDRESS",
'alphanohtml'),
'chaine', 0,
'', $conf->entity);
111 dolibarr_set_const($db,
"MAIN_INFO_SOCIETE_TOWN",
GETPOST(
"MAIN_INFO_SOCIETE_TOWN",
'alphanohtml'),
'chaine', 0,
'', $conf->entity);
112 dolibarr_set_const($db,
"MAIN_INFO_SOCIETE_ZIP",
GETPOST(
"MAIN_INFO_SOCIETE_ZIP",
'alphanohtml'),
'chaine', 0,
'', $conf->entity);
113 dolibarr_set_const($db,
"MAIN_INFO_SOCIETE_REGION",
GETPOST(
"region_code",
'alphanohtml'),
'chaine', 0,
'', $conf->entity);
116 dolibarr_set_const($db,
"MAIN_INFO_SOCIETE_MOBILE",
GETPOST(
"phone_mobile",
'alphanohtml'),
'chaine', 0,
'', $conf->entity);
123 $dirforimage = $conf->mycompany->dir_output.
'/logos/';
125 $arrayofimages = array(
'logo',
'logo_squarred');
127 foreach ($arrayofimages as $varforimage) {
128 if ($_FILES[$varforimage][
"name"] && !preg_match(
'/(\.jpeg|\.jpg|\.png)$/i', $_FILES[$varforimage][
"name"])) {
129 $langs->load(
"errors");
137 if (preg_match(
'/([^\\/:]+)$/i', $_FILES[$varforimage][
"name"], $reg)) {
138 $original_file = $reg[1];
142 dol_syslog(
"Move file ".$_FILES[$varforimage][
"tmp_name"].
" to ".$dirforimage.$original_file);
143 if (!is_dir($dirforimage)) {
146 $result =
dol_move_uploaded_file($_FILES[$varforimage][
"tmp_name"], $dirforimage.$original_file, 1, 0, $_FILES[$varforimage][
'error']);
148 if (is_numeric($result) && $result > 0) {
149 $constant =
"MAIN_INFO_SOCIETE_LOGO";
150 if ($varforimage ==
'logo_squarred') {
151 $constant =
"MAIN_INFO_SOCIETE_LOGO_SQUARRED";
163 $imgThumbSmall =
vignette($dirforimage.$original_file, $maxwidthsmall, $maxheightsmall,
'_small', $quality);
165 $imgThumbSmall = $reg[1];
166 dolibarr_set_const($db, $constant.
"_SMALL", $imgThumbSmall,
'chaine', 0,
'', $conf->entity);
172 $imgThumbMini =
vignette($dirforimage.$original_file, $maxwidthmini, $maxheightmini,
'_mini', $quality);
174 $imgThumbMini = $reg[1];
175 dolibarr_set_const($db, $constant.
"_MINI", $imgThumbMini,
'chaine', 0,
'', $conf->entity);
180 dol_syslog(
"ErrorImageFormatNotSupported", LOG_WARNING);
182 } elseif (preg_match(
'/^ErrorFileIsInfectedWithAVirus/', $result)) {
184 $langs->load(
"errors");
185 $tmparray = explode(
':', $result);
186 setEventMessages($langs->trans(
'ErrorFileIsInfectedWithAVirus', $tmparray[1]),
null,
'errors');
187 } elseif (preg_match(
'/^ErrorFileSizeTooLarge/', $result)) {
196 $langs->load(
"errors");
203 dolibarr_set_const($db,
"MAIN_INFO_SOCIETE_MANAGERS",
GETPOST(
"MAIN_INFO_SOCIETE_MANAGERS",
'alphanohtml'),
'chaine', 0,
'', $conf->entity);
206 dolibarr_set_const($db,
"MAIN_INFO_SOCIETE_FORME_JURIDIQUE",
GETPOST(
"forme_juridique_code",
'alphanohtml'),
'chaine', 0,
'', $conf->entity);
211 dolibarr_set_const($db,
"MAIN_INFO_PROFID5",
GETPOST(
"MAIN_INFO_PROFID5",
'alphanohtml'),
'chaine', 0,
'', $conf->entity);
212 dolibarr_set_const($db,
"MAIN_INFO_PROFID6",
GETPOST(
"MAIN_INFO_PROFID6",
'alphanohtml'),
'chaine', 0,
'', $conf->entity);
213 dolibarr_set_const($db,
"MAIN_INFO_PROFID7",
GETPOST(
"MAIN_INFO_PROFID7",
'alphanohtml'),
'chaine', 0,
'', $conf->entity);
214 dolibarr_set_const($db,
"MAIN_INFO_PROFID8",
GETPOST(
"MAIN_INFO_PROFID8",
'alphanohtml'),
'chaine', 0,
'', $conf->entity);
215 dolibarr_set_const($db,
"MAIN_INFO_PROFID9",
GETPOST(
"MAIN_INFO_PROFID9",
'alphanohtml'),
'chaine', 0,
'', $conf->entity);
216 dolibarr_set_const($db,
"MAIN_INFO_PROFID10",
GETPOST(
"MAIN_INFO_PROFID10",
'alphanohtml'),
'chaine', 0,
'', $conf->entity);
219 dolibarr_set_const($db,
"MAIN_INFO_SOCIETE_OBJECT",
GETPOST(
"socialobject",
'alphanohtml'),
'chaine', 0,
'', $conf->entity);
224 $usevat =
GETPOST(
"optiontva",
'aZ09');
225 $uselocaltax1 =
GETPOST(
"optionlocaltax1",
'aZ09');
226 $uselocaltax2 =
GETPOST(
"optionlocaltax2",
'aZ09');
227 if ($uselocaltax1 ==
'localtax1on' && !$usevat) {
228 setEventMessages($langs->trans(
"IfYouUseASecondTaxYouMustSetYouUseTheMainTax"),
null,
'errors');
231 if ($uselocaltax2 ==
'localtax2on' && !$usevat) {
232 setEventMessages($langs->trans(
"IfYouUseAThirdTaxYouMustSetYouUseTheMainTax"),
null,
'errors');
236 dolibarr_set_const($db,
"FACTURE_TVAOPTION", $usevat,
'chaine', 0,
'', $conf->entity);
237 dolibarr_set_const($db,
"FACTURE_LOCAL_TAX1_OPTION", $uselocaltax1,
'chaine', 0,
'', $conf->entity);
238 dolibarr_set_const($db,
"FACTURE_LOCAL_TAX2_OPTION", $uselocaltax2,
'chaine', 0,
'', $conf->entity);
240 if (
GETPOST(
"optionlocaltax1") ==
"localtax1on") {
241 if (!GETPOSTISSET(
'lt1')) {
242 dolibarr_set_const($db,
"MAIN_INFO_VALUE_LOCALTAX1", 0,
'chaine', 0,
'', $conf->entity);
248 if (
GETPOST(
"optionlocaltax2") ==
"localtax2on") {
249 if (!GETPOSTISSET(
'lt2')) {
250 dolibarr_set_const($db,
"MAIN_INFO_VALUE_LOCALTAX2", 0,
'chaine', 0,
'', $conf->entity);
258 if ($mysoc->country_code ==
'GR') {
261 dolibarr_set_const($db,
"AADE_WEBSERVICE_USER",
GETPOST(
"AADE_WEBSERVICE_USER",
'alpha'),
'chaine', 0,
'', $conf->entity);
277 if ($action !=
'updateedit' && !$error) {
278 header(
"Location: ".$_SERVER[
"PHP_SELF"].($page_y ?
'?page_y='.$page_y :
''));
283if ($action ==
'addthumb' || $action ==
'addthumbsquarred') {
284 if (file_exists($conf->mycompany->dir_output.
'/logos/'.
GETPOST(
"file"))) {
289 $constant =
"MAIN_INFO_SOCIETE_LOGO";
290 if ($action ==
'addthumbsquarred') {
291 $constant =
"MAIN_INFO_SOCIETE_LOGO_SQUARRED";
300 $imgThumbSmall =
vignette($conf->mycompany->dir_output.
'/logos/'.
GETPOST(
"file"), $maxwidthsmall, $maxheightsmall,
'_small', $quality);
302 $imgThumbSmall = $reg[1];
303 dolibarr_set_const($db, $constant.
"_SMALL", $imgThumbSmall,
'chaine', 0,
'', $conf->entity);
309 $imgThumbMini =
vignette($conf->mycompany->dir_output.
'/logos/'.
GETPOST(
"file"), $maxwidthmini, $maxheightmini,
'_mini', $quality);
311 $imgThumbMini = $reg[1];
312 dolibarr_set_const($db, $constant.
"_MINI", $imgThumbMini,
'chaine', 0,
'', $conf->entity);
317 header(
"Location: ".$_SERVER[
"PHP_SELF"]);
321 $langs->load(
"errors");
323 dol_syslog($langs->transnoentities(
"ErrorBadImageFormat"), LOG_INFO);
327 $langs->load(
"errors");
329 dol_syslog($langs->transnoentities(
"ErrorFileDoesNotExists",
GETPOST(
"file")), LOG_WARNING);
334if ($action ==
'removelogo' || $action ==
'removelogosquarred') {
335 $constant =
"MAIN_INFO_SOCIETE_LOGO";
336 if ($action ==
'removelogosquarred') {
337 $constant =
"MAIN_INFO_SOCIETE_LOGO_SQUARRED";
340 require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
342 $logofilename = $mysoc->logo;
343 $logofilenamebis = $mysoc->logo_squarred;
344 if ($action ==
'removelogosquarred') {
345 $logofilename = $mysoc->logo_squarred;
346 $logofilenamebis = $mysoc->logo;
349 $logofile = $conf->mycompany->dir_output.
'/logos/'.$logofilename;
350 if ($logofilename !=
'' && $logofilename != $logofilenamebis) {
354 if ($action ==
'removelogosquarred') {
355 $mysoc->logo_squarred =
'';
360 $logofilename = $mysoc->logo_small;
361 $logofilenamebis = $mysoc->logo_squarred_small;
362 if ($action ==
'removelogosquarred') {
363 $logofilename = $mysoc->logo_squarred_small;
364 $logofilenamebis = $mysoc->logo_small;
367 $logosmallfile = $conf->mycompany->dir_output.
'/logos/thumbs/'.$logofilename;
368 if ($logofilename !=
'' && $logofilename != $logofilenamebis) {
372 if ($action ==
'removelogosquarred') {
373 $mysoc->logo_squarred_small =
'';
375 $mysoc->logo_small =
'';
378 $logofilename = $mysoc->logo_mini;
379 $logofilenamebis = $mysoc->logo_squarred_mini;
380 if ($action ==
'removelogosquarred') {
381 $logofilename = $mysoc->logo_squarred_mini;
382 $logofilenamebis = $mysoc->logo_mini;
385 $logominifile = $conf->mycompany->dir_output.
'/logos/thumbs/'.$logofilename;
386 if ($logofilename !=
'' && $logofilename != $logofilenamebis) {
390 if ($action ==
'removelogosquarred') {
391 $mysoc->logo_squarred_mini =
'';
393 $mysoc->logo_mini =
'';
402$wikihelp =
'EN:First_setup|FR:Premiers_paramétrages|ES:Primeras_configuraciones';
403llxHeader(
'', $langs->trans(
"Setup"), $wikihelp,
'', 0, 0,
'',
'',
'',
'mod-admin page-company');
405$form =
new Form($db);
409$countrynotdefined =
'<span class="error">'.$langs->trans(
"ErrorSetACountryFirst").
' <a href="#trzipbeforecountry">('.$langs->trans(
"SeeAbove").
')</a></span>';
411print
load_fiche_titre($langs->trans(
"CompanyFoundation"),
'',
'title_setup');
417print
'<span class="opacitymedium">'.$langs->trans(
"CompanyFundationDesc", $langs->transnoentities(
"Save")).
"</span><br>\n";
423if (!empty($conf->use_javascript_ajax)) {
424 print
"\n".
'<script type="text/javascript">';
425 print
'$(document).ready(function () {
426 $("#selectcountry_id").change(function() {
427 document.form_index.action.value="updateedit";
428 document.form_index.submit();
431 print
'</script>'.
"\n";
434print
'<form enctype="multipart/form-data" method="POST" action="'.$_SERVER[
"PHP_SELF"].
'" name="form_index">';
435print
'<input type="hidden" name="token" value="'.newToken().
'">';
436print
'<input type="hidden" name="action" value="update">';
437print
'<input type="hidden" name="page_y" value="">';
439print
'<table class="noborder centpercent editmode">';
440print
'<tr class="liste_titre"><th class="titlefieldcreate wordbreak">'.$langs->trans(
"CompanyInfo").
'</th><th></th></tr>'.
"\n";
443print
'<tr class="oddeven"><td class="fieldrequired wordbreak"><label for="name">'.$langs->trans(
"CompanyName").
'</label></td><td>';
444print
'<input name="name" id="name" class="minwidth200" value="'.dol_escape_htmltag((GETPOSTISSET(
'name') ?
GETPOST(
'name',
'alphanohtml') : (
getDolGlobalString(
'MAIN_INFO_SOCIETE_NOM')))).
'"'.(!
getDolGlobalString(
'MAIN_INFO_SOCIETE_NOM') ?
' autofocus="autofocus"' :
'').
'></td></tr>'.
"\n";
447print
'<tr class="oddeven"><td><label for="MAIN_INFO_SOCIETE_ADDRESS">'.$langs->trans(
"CompanyAddress").
'</label></td><td>';
448print
'<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";
451print
'<tr class="oddeven" id="trzipbeforecountry"><td><label for="MAIN_INFO_SOCIETE_ZIP">'.$langs->trans(
"CompanyZip").
'</label></td><td>';
452print
'<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";
454print
'<tr class="oddeven" id="trtownbeforecountry"><td><label for="MAIN_INFO_SOCIETE_TOWN">'.$langs->trans(
"CompanyTown").
'</label></td><td>';
455print
'<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";
458print
'<tr class="oddeven"><td class="fieldrequired"><label for="selectcountry_id">'.$langs->trans(
"Country").
'</label></td><td>';
459print
img_picto(
'',
'globe-americas',
'class="pictofixedwidth"');
460print $form->select_country($mysoc->country_id,
'country_id',
'', 0);
462 print
info_admin($langs->trans(
"YouCanChangeValuesForThisListFromDictionarySetup"), 1);
464print
'</td></tr>'.
"\n";
466print
'<tr class="oddeven"><td class="wordbreak"><label for="state_id">'.$langs->trans(
"State").
'</label></td><td>';
472print
img_picto(
'',
'state',
'class="pictofixedwidth"');
473print $formcompany->select_state($state_id, $mysoc->country_code,
'state_id',
'maxwidth200onsmartphone minwidth300');
474print
'</td></tr>'.
"\n";
477print
'<tr class="oddeven"><td><label for="currency">'.$langs->trans(
"CompanyCurrency").
'</label></td><td>';
478print
img_picto(
'',
'multicurrency',
'class="pictofixedwidth"');
479print $form->selectCurrency($conf->currency,
"currency");
480print
'</td></tr>'.
"\n";
483print
'<tr class="oddeven"><td><label for="phone">'.$langs->trans(
"Phone").
'</label></td><td>';
484print
img_picto(
'',
'object_phoning',
'',
false, 0, 0,
'',
'pictofixedwidth');
485print
'<input class="maxwidth150 widthcentpercentminusx" name="phone" id="phone" value="'.dol_escape_htmltag((GETPOSTISSET(
'phone') ?
GETPOST(
'phone',
'alphanohtml') : (
getDolGlobalString(
'MAIN_INFO_SOCIETE_TEL')))).
'"></td></tr>';
486print
'</td></tr>'.
"\n";
489print
'<tr class="oddeven"><td><label for="phone">'.$langs->trans(
"PhoneMobile").
'</label></td><td>';
490print
img_picto(
'',
'object_phoning_mobile',
'',
false, 0, 0,
'',
'pictofixedwidth');
491print
'<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>';
492print
'</td></tr>'.
"\n";
495print
'<tr class="oddeven"><td><label for="fax">'.$langs->trans(
"Fax").
'</label></td><td>';
496print
img_picto(
'',
'object_phoning_fax',
'',
false, 0, 0,
'',
'pictofixedwidth');
497print
'<input class="maxwidth150" name="fax" id="fax" value="'.dol_escape_htmltag((GETPOSTISSET(
'fax') ?
GETPOST(
'fax',
'alphanohtml') : (
getDolGlobalString(
'MAIN_INFO_SOCIETE_FAX')))).
'"></td></tr>';
498print
'</td></tr>'.
"\n";
501print
'<tr class="oddeven"><td><label for="email">'.$langs->trans(
"EMail").
'</label></td><td>';
502print
img_picto(
'',
'object_email',
'',
false, 0, 0,
'',
'pictofixedwidth');
503print
'<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>';
504print
'</td></tr>'.
"\n";
507print
'<tr class="oddeven"><td><label for="web">'.$langs->trans(
"Web").
'</label></td><td>';
508print
img_picto(
'',
'globe',
'',
false, 0, 0,
'',
'pictofixedwidth');
509print
'<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>';
510print
'</td></tr>'.
"\n";
513if (isModEnabled(
'barcode')) {
514 print
'<tr class="oddeven"><td>';
515 print
'<label for="barcode">'.$langs->trans(
"Gencod").
'</label></td><td>';
516 print
'<span class="fa fa-barcode pictofixedwidth"></span>';
517 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>';
522$tooltiplogo = $langs->trans(
'AvailableFormats').
' : png, jpg, jpeg';
524$maxmin = $maxfilesizearray[
'maxmin'];
525$tooltiplogo .= ($maxmin > 0) ?
'<br>'.$langs->trans(
'MaxSize').
' : '.$maxmin.
' '.$langs->trans(
'Kb') :
'';
528print
'<tr class="oddeven"><td><label for="logo">'.$form->textwithpicto($langs->trans(
"Logo"), $tooltiplogo).
'</label></td><td>';
529print
'<div class="centpercent nobordernopadding valignmiddle "><div class="inline-block marginrightonly">';
531 print
'<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).
'">';
533print
'<input type="file" class="flat minwidth100 maxwidthinputfileonsmartphone" name="logo" id="logo" accept="image/*">';
535if (!empty($mysoc->logo_small)) {
536 print
'<div class="inline-block valignmiddle marginrightonly">';
537 print
'<a class="reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=removelogo&token='.
newToken().
'">'.
img_delete($langs->trans(
"Delete"),
'',
'marginleftonly').
'</a>';
539 if (file_exists($conf->mycompany->dir_output.
'/logos/thumbs/'.$mysoc->logo_small)) {
540 print
'<div class="inline-block valignmiddle">';
541 print
'<img style="max-height: 80px; max-width: 200px;" src="'.DOL_URL_ROOT.
'/viewimage.php?modulepart=mycompany&file='.urlencode(
'logos/thumbs/'.$mysoc->logo_small).
'">';
543 } elseif (!empty($mysoc->logo)) {
544 if (!file_exists($conf->mycompany->dir_output.
'/logos/thumbs/'.$mysoc->logo_mini)) {
545 $imgThumbMini =
vignette($conf->mycompany->dir_output.
'/logos/'.$mysoc->logo, $maxwidthmini, $maxheightmini,
'_mini', $quality);
547 $imgThumbSmall =
vignette($conf->mycompany->dir_output.
'/logos/'.$mysoc->logo, $maxwidthmini, $maxheightmini,
'_small', $quality);
548 print
'<div class="inline-block valignmiddle">';
549 print
'<img style="max-height: 80px; max-width: 200px;" src="'.DOL_URL_ROOT.
'/viewimage.php?modulepart=mycompany&file='.urlencode(
'logos/thumbs/'.basename($imgThumbSmall)).
'">';
552} elseif (!empty($mysoc->logo)) {
553 if (file_exists($conf->mycompany->dir_output.
'/logos/'.$mysoc->logo)) {
554 print
'<div class="inline-block valignmiddle">';
555 print
'<img style="max-height: 80px" src="'.DOL_URL_ROOT.
'/viewimage.php?modulepart=mycompany&file='.urlencode(
'logos/'.$mysoc->logo).
'">';
557 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>';
559 print
'<div class="inline-block valignmiddle">';
560 print
'<img height="80" src="'.DOL_URL_ROOT.
'/public/theme/common/nophoto.png" title="File has been removed from disk">';
568print
'<tr class="oddeven"><td><label for="logo_squarred">'.$form->textwithpicto($langs->trans(
"LogoSquarred"), $tooltiplogo).
'</label></td><td>';
569print
'<div class="centpercent nobordernopadding valignmiddle"><div class="inline-block marginrightonly">';
571$maxmin = $maxfilesizearray[
'maxmin'];
573 print
'<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).
'">';
575print
'<input type="file" class="flat minwidth100 maxwidthinputfileonsmartphone" name="logo_squarred" id="logo_squarred" accept="image/*">';
577if (!empty($mysoc->logo_squarred_small)) {
578 print
'<div class="inline-block valignmiddle marginrightonly">';
579 print
'<a class="reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=removelogosquarred&token='.
newToken().
'">'.
img_delete($langs->trans(
"Delete"),
'',
'marginleftonly').
'</a>';
581 if (file_exists($conf->mycompany->dir_output.
'/logos/thumbs/'.$mysoc->logo_squarred_small)) {
582 print
'<div class="inline-block valignmiddle marginrightonly">';
583 print
'<img style="max-height: 80px" src="'.DOL_URL_ROOT.
'/viewimage.php?modulepart=mycompany&file='.urlencode(
'logos/thumbs/'.$mysoc->logo_squarred_small).
'">';
585 } elseif (!empty($mysoc->logo_squarred)) {
586 if (!file_exists($conf->mycompany->dir_output.
'/logos/thumbs/'.$mysoc->logo_squarred_mini)) {
587 $imgThumbMini =
vignette($conf->mycompany->dir_output.
'/logos/'.$mysoc->logo_squarred, $maxwidthmini, $maxheightmini,
'_mini', $quality);
589 $imgThumbSmall =
vignette($conf->mycompany->dir_output.
'/logos/'.$mysoc->logo_squarred, $maxwidthmini, $maxheightmini,
'_small', $quality);
590 print
'<div class="inline-block valignmiddle">';
591 print
'<img style="max-height: 80px" src="'.DOL_URL_ROOT.
'/viewimage.php?modulepart=mycompany&file='.urlencode(
'logos/thumbs/'.basename($imgThumbSmall)).
'">';
594} elseif (!empty($mysoc->logo_squarred)) {
595 if (file_exists($conf->mycompany->dir_output.
'/logos/'.$mysoc->logo_squarred)) {
596 print
'<div class="inline-block valignmiddle">';
597 print
'<img style="max-height: 80px" src="'.DOL_URL_ROOT.
'/viewimage.php?modulepart=mycompany&file='.urlencode(
'logos/'.$mysoc->logo_squarred).
'">';
599 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>';
601 print
'<div class="inline-block valignmiddle">';
602 print
'<img height="80" src="'.DOL_URL_ROOT.
'/public/theme/common/nophoto.png" title="File has been removed from disk">';
610print
'<tr class="oddeven"><td class="tdtop"><label for="note">'.$langs->trans(
"Note").
'</label></td><td>';
611print
'<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>';
616print $form->buttonsSaveCancel(
"Save",
'', array(),
false,
'reposition');
622print
'<div class="div-table-responsive-no-min">';
623print
'<table class="noborder centpercent editmode">';
624print
'<tr class="liste_titre"><td class="titlefieldcreate wordbreak">'.$langs->trans(
"CompanyIds").
'</td><td></td></tr>';
626$langs->load(
"companies");
629print
'<tr class="oddeven"><td><label for="director">'.$langs->trans(
"ManagingDirectors").
'</label></td><td>';
630print
'<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>';
633print
'<tr class="oddeven"><td>';
634print $form->textwithpicto($langs->trans(
"GDPRContact"), $langs->trans(
"GDPRContactDesc"));
636print
'<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>';
639print
'<tr class="oddeven"><td><label for="capital">'.$langs->trans(
"Capital").
'</label></td><td>';
640print
'<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>';
643print
'<tr class="oddeven"><td><label for="forme_juridique_code">'.$langs->trans(
"JuridicalStatus").
'</label></td><td>';
644if ($mysoc->country_code) {
645 print $formcompany->select_juridicalstatus(
getDolGlobalString(
'MAIN_INFO_SOCIETE_FORME_JURIDIQUE'), $mysoc->country_code,
'',
'forme_juridique_code');
647 print $countrynotdefined;
652if ($langs->transcountry(
"ProfId1", $mysoc->country_code) !=
'-') {
653 print
'<tr class="oddeven"><td><label for="profid1">'.$langs->transcountry(
"ProfId1", $mysoc->country_code).
'</label></td><td>';
654 if (!empty($mysoc->country_code)) {
655 print
'<input name="siren" id="profid1" class="minwidth200" value="'.dol_escape_htmltag(
getDolGlobalString(
'MAIN_INFO_SIREN')).
'">';
657 print $countrynotdefined;
663if ($langs->transcountry(
"ProfId2", $mysoc->country_code) !=
'-') {
664 print
'<tr class="oddeven"><td><label for="profid2">'.$langs->transcountry(
"ProfId2", $mysoc->country_code).
'</label></td><td>';
665 if (!empty($mysoc->country_code)) {
666 print
'<input name="siret" id="profid2" class="minwidth200" value="'.dol_escape_htmltag(
getDolGlobalString(
'MAIN_INFO_SIRET')).
'">';
668 print $countrynotdefined;
674if ($langs->transcountry(
"ProfId3", $mysoc->country_code) !=
'-') {
675 print
'<tr class="oddeven"><td><label for="profid3">'.$langs->transcountry(
"ProfId3", $mysoc->country_code).
'</label></td><td>';
676 if (!empty($mysoc->country_code)) {
677 print
'<input name="ape" id="profid3" class="minwidth200" value="'.dol_escape_htmltag(
getDolGlobalString(
'MAIN_INFO_APE')).
'">';
679 print $countrynotdefined;
685if ($langs->transcountry(
"ProfId4", $mysoc->country_code) !=
'-') {
686 print
'<tr class="oddeven"><td><label for="profid4">'.$langs->transcountry(
"ProfId4", $mysoc->country_code).
'</label></td><td>';
687 if (!empty($mysoc->country_code)) {
688 print
'<input name="rcs" id="profid4" class="minwidth200" value="'.dol_escape_htmltag(
getDolGlobalString(
'MAIN_INFO_RCS')).
'">';
690 print $countrynotdefined;
696if ($langs->transcountry(
"ProfId5", $mysoc->country_code) !=
'-') {
697 print
'<tr class="oddeven"><td><label for="profid5">'.$langs->transcountry(
"ProfId5", $mysoc->country_code).
'</label></td><td>';
698 if (!empty($mysoc->country_code)) {
699 print
'<input name="MAIN_INFO_PROFID5" id="profid5" class="minwidth200" value="'.dol_escape_htmltag(
getDolGlobalString(
'MAIN_INFO_PROFID5')).
'">';
701 print $countrynotdefined;
707if ($langs->transcountry(
"ProfId6", $mysoc->country_code) !=
'-') {
708 print
'<tr class="oddeven"><td><label for="profid6">'.$langs->transcountry(
"ProfId6", $mysoc->country_code).
'</label></td><td>';
709 if (!empty($mysoc->country_code)) {
710 print
'<input name="MAIN_INFO_PROFID6" id="profid6" class="minwidth200" value="'.dol_escape_htmltag(
getDolGlobalString(
'MAIN_INFO_PROFID6')).
'">';
712 print $countrynotdefined;
718if ($langs->transcountry(
"ProfId7", $mysoc->country_code) !=
'-') {
719 print
'<tr class="oddeven"><td><label for="profid7">'.$langs->transcountry(
"ProfId7", $mysoc->country_code).
'</label></td><td>';
720 if (!empty($mysoc->country_code)) {
721 print
'<input name="MAIN_INFO_PROFID7" id="profid7" class="minwidth200" value="'.dol_escape_htmltag(
getDolGlobalString(
'MAIN_INFO_PROFID7')).
'">';
723 print $countrynotdefined;
729if ($langs->transcountry(
"ProfId8", $mysoc->country_code) !=
'-') {
730 print
'<tr class="oddeven"><td><label for="profid8">'.$langs->transcountry(
"ProfId8", $mysoc->country_code).
'</label></td><td>';
731 if (!empty($mysoc->country_code)) {
732 print
'<input name="MAIN_INFO_PROFID8" id="profid8" class="minwidth200" value="'.dol_escape_htmltag(
getDolGlobalString(
'MAIN_INFO_PROFID8')).
'">';
734 print $countrynotdefined;
740if ($langs->transcountry(
"ProfId9", $mysoc->country_code) !=
'-') {
741 print
'<tr class="oddeven"><td><label for="profid9">'.$langs->transcountry(
"ProfId9", $mysoc->country_code).
'</label></td><td>';
742 if (!empty($mysoc->country_code)) {
743 print
'<input name="MAIN_INFO_PROFID9" id="profid9" class="minwidth200" value="'.dol_escape_htmltag(
getDolGlobalString(
'MAIN_INFO_PROFID9')).
'">';
745 print $countrynotdefined;
751if ($langs->transcountry(
"ProfId10", $mysoc->country_code) !=
'-') {
752 print
'<tr class="oddeven"><td><label for="profid10">'.$langs->transcountry(
"ProfId10", $mysoc->country_code).
'</label></td><td>';
753 if (!empty($mysoc->country_code)) {
754 print
'<input name="MAIN_INFO_PROFID10" id="profid10" class="minwidth200" value="'.dol_escape_htmltag(
getDolGlobalString(
'MAIN_INFO_PROFID10')).
'">';
756 print $countrynotdefined;
762print
'<tr class="oddeven"><td><label for="intra_vat">'.$langs->trans(
"VATIntra").
'</label></td><td>';
763print
'<input name="tva" id="intra_vat" class="minwidth200" value="'.dol_escape_htmltag(
getDolGlobalString(
'MAIN_INFO_TVAINTRA')).
'">';
767print
'<tr class="oddeven"><td><label for="socialobject">'.$langs->trans(
"CompanyObject").
'</label></td><td>';
768print
'<textarea class="flat quatrevingtpercent" name="socialobject" id="socialobject" rows="'.ROWS_5.
'">'.(
getDolGlobalString(
'MAIN_INFO_SOCIETE_OBJECT')).
'</textarea></td></tr>';
777print
'<table class="noborder centpercent editmode">';
778print
'<tr class="liste_titre">';
779print
'<td class="titlefieldcreate">'.$langs->trans(
"FiscalYearInformation").
'</td><td></td>';
782print
'<tr class="oddeven"><td><label for="SOCIETE_FISCAL_MONTH_START">'.$langs->trans(
"FiscalMonthStart").
'</label></td><td>';
783print $formother->select_month(
getDolGlobalInt(
'SOCIETE_FISCAL_MONTH_START') ? $conf->global->SOCIETE_FISCAL_MONTH_START :
'',
'SOCIETE_FISCAL_MONTH_START', 0, 1,
'maxwidth100').
'</td></tr>';
787print $form->buttonsSaveCancel(
"Save",
'', array(),
false,
'reposition');
793print
load_fiche_titre($langs->trans(
"TypeOfSaleTaxes"),
'',
'object_payment');
795print
'<table class="noborder centpercent editmode">';
796print
'<tr class="liste_titre">';
797print
'<td class="titlefieldcreate">'.$langs->trans(
"VATManagement").
'</td><td></td>';
798print
'<td class="right"> </td>';
802print
'<tr class="oddeven"><td><label><input type="radio" name="optiontva" id="use_vat" value="1"'.(!
getDolGlobalString(
'FACTURE_TVAOPTION') ?
"" :
" checked").
"> ".$langs->trans(
"VATIsUsed").
"</label></td>";
803print
'<td colspan="2">';
804$tooltiphelp = $langs->trans(
"VATIsUsedDesc");
805if ($mysoc->country_code ==
'FR') {
806 $tooltiphelp .=
'<br><br><i>'.$langs->trans(
"Example").
': '.$langs->trans(
"VATIsUsedExampleFR").
"</i>";
808print
'<label for="use_vat">'.$form->textwithpicto($langs->trans(
"VATIsUsedStandard"), $tooltiphelp).
"</label>";
812print
'<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>";
813print
'<td colspan="2">';
815if ($mysoc->country_code ==
'FR') {
816 $tooltiphelp =
"<i>".$langs->trans(
"Example").
': '.$langs->trans(
"VATIsNotUsedExampleFR").
"</i>\n";
818print
'<label for="no_vat">'.$form->textwithpicto($langs->trans(
"VATIsNotUsedDesc"), $tooltiphelp).
"</label>";
825print
'<table class="noborder centpercent editmode">';
826print
'<tr class="liste_titre">';
827print
'<td class="titlefieldcreate">'.$form->textwithpicto($langs->transcountry(
"LocalTax1Management", $mysoc->country_code), $langs->transcountry(
"LocalTax1IsUsedDesc", $mysoc->country_code)).
'</td><td></td>';
828print
'<td class="right"> </td>';
831if ($mysoc->useLocalTax(1)) {
833 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>";
834 print
'<td colspan="2">';
835 print
'<div class="nobordernopadding">';
836 $tooltiphelp = $langs->transcountry(
"LocalTax1IsUsedExample", $mysoc->country_code);
837 $tooltiphelp = ($tooltiphelp !=
"LocalTax1IsUsedExample" ?
"<i>".$langs->trans(
"Example").
': '.$langs->transcountry(
"LocalTax1IsUsedExample", $mysoc->country_code).
"</i>\n" :
"");
838 print $form->textwithpicto($langs->transcountry(
"LocalTax1IsUsedDesc", $mysoc->country_code), $tooltiphelp);
840 print
'<br><label for="lt1">'.$langs->trans(
"LTRate").
'</label>: ';
841 $formcompany->select_localtax(1, $conf->global->MAIN_INFO_VALUE_LOCALTAX1,
"lt1");
844 $opcions = array($langs->trans(
"CalcLocaltax1").
' '.$langs->trans(
"CalcLocaltax1Desc"), $langs->trans(
"CalcLocaltax2").
' - '.$langs->trans(
"CalcLocaltax2Desc"), $langs->trans(
"CalcLocaltax3").
' - '.$langs->trans(
"CalcLocaltax3Desc"));
846 print
'<br><label for="clt1">'.$langs->trans(
"CalcLocaltax").
'</label>: ';
847 print $form->selectarray(
"clt1", $opcions,
getDolGlobalString(
'MAIN_INFO_LOCALTAX_CALC1'));
849 print
"</td></tr>\n";
851 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>";
852 print
'<td colspan="2">';
853 $tooltiphelp = $langs->transcountry(
"LocalTax1IsNotUsedExample", $mysoc->country_code);
854 $tooltiphelp = ($tooltiphelp !=
"LocalTax1IsNotUsedExample" ?
"<i>".$langs->trans(
"Example").
': '.$langs->transcountry(
"LocalTax1IsNotUsedExample", $mysoc->country_code).
"</i>\n" :
"");
855 print $form->textwithpicto($langs->transcountry(
"LocalTax1IsNotUsedDesc", $mysoc->country_code), $tooltiphelp);
856 print
"</td></tr>\n";
858 if (empty($mysoc->country_code)) {
859 print
'<tr class="oddeven nohover"><td class="" colspan="3">'.$countrynotdefined.
'</td></tr>';
861 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>';
869print
'<table class="noborder centpercent editmode">';
870print
'<tr class="liste_titre">';
871print
'<td class="titlefieldcreate">'.$form->textwithpicto($langs->transcountry(
"LocalTax2Management", $mysoc->country_code), $langs->transcountry(
"LocalTax2IsUsedDesc", $mysoc->country_code)).
'</td><td></td>';
872print
'<td class="right"> </td>';
875if ($mysoc->useLocalTax(2)) {
877 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>";
878 print
'<td colspan="2">';
879 print
'<div class="nobordernopadding">';
880 print
'<label for="lt2">'.$langs->transcountry(
"LocalTax2IsUsedDesc", $mysoc->country_code).
"</label>";
881 $tooltiphelp = $langs->transcountry(
"LocalTax2IsUsedExample", $mysoc->country_code);
882 $tooltiphelp = ($tooltiphelp !=
"LocalTax2IsUsedExample" ?
"<i>".$langs->trans(
"Example").
': '.$langs->transcountry(
"LocalTax2IsUsedExample", $mysoc->country_code).
"</i>\n" :
"");
884 print
'<br><label for="lt2">'.$langs->trans(
"LTRate").
'</label>: ';
885 $formcompany->select_localtax(2,
getDolGlobalString(
'MAIN_INFO_VALUE_LOCALTAX2'),
"lt2");
887 print
'<br><label for="clt2">'.$langs->trans(
"CalcLocaltax").
'</label>: ';
888 print $form->selectarray(
"clt2", $opcions,
getDolGlobalString(
'MAIN_INFO_LOCALTAX_CALC2'));
890 print
"</td></tr>\n";
892 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>";
893 print
'<td colspan="2">';
895 $tooltiphelp = $langs->transcountry(
"LocalTax2IsNotUsedExample", $mysoc->country_code);
896 $tooltiphelp = ($tooltiphelp !=
"LocalTax2IsNotUsedExample" ?
"<i>".$langs->trans(
"Example").
': '.$langs->transcountry(
"LocalTax2IsNotUsedExample", $mysoc->country_code).
"</i>\n" :
"");
897 print
"<label for=\"nolt2\">".$form->textwithpicto($langs->transcountry(
"LocalTax2IsNotUsedDesc", $mysoc->country_code), $tooltiphelp).
"</label>";
899 print
"</td></tr>\n";
901 if (empty($mysoc->country_code)) {
902 print
'<tr class="oddeven nohover"><td class="" colspan="3">'.$countrynotdefined.
'</td></tr>';
904 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>';
913print
'<table class="noborder centpercent editmode">';
914print
'<tr class="liste_titre">';
915print
'<td>'.$form->textwithpicto($langs->trans(
"RevenueStamp"), $langs->trans(
"RevenueStampDesc")).
'</td><td></td>';
916print
'<td class="right"> </td>';
918if ($mysoc->useRevenueStamp()) {
920 print
'<tr class="oddeven"><td>';
921 print $langs->trans(
"UseRevenueStamp");
923 print
'<td colspan="2">';
924 print $langs->trans(
"UseRevenueStampExample", $langs->transnoentitiesnoconv(
"Setup"), $langs->transnoentitiesnoconv(
"Dictionaries"), $langs->transnoentitiesnoconv(
"DictionaryRevenueStamp"));
925 print
"</td></tr>\n";
927 if (empty($mysoc->country_code)) {
928 print
'<tr class="oddeven nohover"><td class="" colspan="3">'.$countrynotdefined.
'</td></tr>';
930 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>';
937if ($mysoc->country_code ==
'GR') {
939 print
'<table class="noborder centpercent editmode">';
940 print
'<tr class="liste_titre">';
941 print
'<td>'.$langs->trans(
"AccountParameter").
'</td>';
942 print
'<td>'.$langs->trans(
"Value").
'</td>';
946 print
'<tr class="oddeven"><td>';
947 print
'<span class="titlefield fieldrequired">'.$langs->trans(
"MYDATA_AADE_USER").
'</span></td><td>';
948 print
'<input class="minwidth300" type="text" name="MYDATA_AADE_USER" value="'.getDolGlobalString(
'MYDATA_AADE_USER').
'"';
949 print
'</td><td></td></tr>';
951 print
'<tr class="oddeven"><td>';
952 print
'<span class="titlefield fieldrequired">'.$langs->trans(
"MYDATA_AADE_KEY").
'</span></td><td>';
953 print
'<input class="minwidth300" type="text" name="MYDATA_AADE_KEY" value="'.getDolGlobalString(
'MYDATA_AADE_KEY').
'"';
954 print
'</td><td></td></tr>';
956 print
'<tr class="oddeven"><td>';
957 print
'<span class="titlefield fieldrequired">'.$langs->trans(
"AADE_WEBSERVICE_USER").
'</span></td><td>';
958 print
'<input class="minwidth300" type="text" name="AADE_WEBSERVICE_USER" value="'.getDolGlobalString(
'AADE_WEBSERVICE_USER').
'"';
959 print
'</td><td></td></tr>';
961 print
'<tr class="oddeven"><td>';
962 print
'<span class="titlefield fieldrequired">'.$langs->trans(
"AADE_WEBSERVICE_KEY").
'</span></td><td>';
963 print
'<input class="minwidth300" type="text" name="AADE_WEBSERVICE_KEY" value="'.getDolGlobalString(
'AADE_WEBSERVICE_KEY').
'"';
964 print
'</td><td></td></tr>';
971print $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()
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.
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.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0)
Set event messages in dol_events session object.
getDolGlobalString($key, $default='')
Return 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)
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.
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.