diff --git a/ChangeLog b/ChangeLog index c8b7db19236..ede0e10a89f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -24,6 +24,7 @@ Following changes may create regressions for some external modules, but were nec * Removed function dol_micro_time. Use native PHP microtime instead. * The trigger BON_PRELEVEMENT_CREATE has been renamed into DIRECT_DEBIT_ORDER_CREATE. * The constant INVOICE_SHOW_POS_IN_EXPORT has been renamed into INVOICE_SHOW_POS. +* If your logo was visible on the menu bar, you must upload a new logo into 'Home-Setup-Company/Organization' to have it visible agin in menu. ***** ChangeLog for 10.0.2 compared to 10.0.1 ***** diff --git a/htdocs/admin/accountant.php b/htdocs/admin/accountant.php index cba3fd822cc..e48f122c4b0 100644 --- a/htdocs/admin/accountant.php +++ b/htdocs/admin/accountant.php @@ -93,158 +93,87 @@ $countrynotdefined=''.$langs->trans("ErrorSetACountryFirst") print ''.$langs->trans("AccountantDesc")."
\n"; print "
\n"; -if ($action == 'edit' || $action == 'updateedit') -{ - /** - * Edit parameters - */ - print "\n".''."\n"; +/** + * Edit parameters + */ +print "\n".''."\n"; - print '
'; - print ''; - print ''; +print ''; +print ''; +print ''; - print ''; - print ''."\n"; +print '
'.$langs->trans("CompanyInfo").''.$langs->trans("Value").'
'; +print ''."\n"; - // Name - print ''."\n"; +// Name +print ''."\n"; - // Address - print ''."\n"; +// Address +print ''."\n"; - print ''."\n"; +print ''."\n"; - print ''."\n"; +print ''."\n"; - // Country - print ''."\n"; +// Country +print ''."\n"; - print ''."\n"; +print ''."\n"; - print ''; - print ''."\n"; +print ''; +print ''."\n"; - print ''; - print ''."\n"; +print ''; +print ''."\n"; - print ''; - print ''."\n"; +print ''; +print ''."\n"; - // Web - print ''; - print ''."\n"; +// Web +print ''; +print ''."\n"; - // Code - print ''."\n"; +// Code +print ''."\n"; - // Note - print ''; - print ''; +// Note +print ''; +print ''; - print '
'.$langs->trans("CompanyInfo").''.$langs->trans("Value").'
'; - print '
'; +print '
'; - print '
'; +print '
'; - print '
'; +print '
'; - print '
'; +print '
'; - //if (empty($country_selected)) $country_selected=substr($langs->defaultlang,-2); // By default, country of localization - print $form->select_country($conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY, 'country_id'); - if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); - print '
'; +//if (empty($country_selected)) $country_selected=substr($langs->defaultlang,-2); // By default, country of localization +print $form->select_country($conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY, 'country_id'); +if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); +print '
'; - $formcompany->select_departement($conf->global->MAIN_INFO_ACCOUNTANT_STATE, $conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY, 'state_id'); - print '
'; +$formcompany->select_departement($conf->global->MAIN_INFO_ACCOUNTANT_STATE, $conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY, 'state_id'); +print '
'; - print '
'; +print '
'; - print '
'; +print '
'; - print '
'; +print '
'; - print '
'; +print '
'; - print '
'; +print '
'; - print '
'; +print '
'; +print ''; - print '
'; - print ''; - print '     '; - print ''; - print '
'; - print '
'; +print '
'; +print ''; +//print '     '; +//print ''; +print '
'; +//print '
'; - print '
'; -} -else -{ - /* - * Show parameters - */ +print ''; - // Actions buttons - //print '
'; - //print ''.$langs->trans("Modify").''; - //print '

'; - - print '
'; - print ''; - print ''; - - - print ''; - - - print ''; - - - print ''; - - - print ''; - - - print ''; - - - if (! empty($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT)) print ''; - - print ''; - - print ''; - - print ''; - - print ''; - - print ''; - - print ''; - - print '
'.$langs->trans("CompanyInfo").''.$langs->trans("Value").'
'.$langs->trans("CompanyName").''; - print $conf->global->MAIN_INFO_ACCOUNTANT_NAME; - print '
'.$langs->trans("CompanyAddress").'' . nl2br(empty($conf->global->MAIN_INFO_ACCOUNTANT_ADDRESS)?'':$conf->global->MAIN_INFO_ACCOUNTANT_ADDRESS) . '
'.$langs->trans("CompanyZip").'' . (empty($conf->global->MAIN_INFO_ACCOUNTANT_ZIP)?'':$conf->global->MAIN_INFO_ACCOUNTANT_ZIP) . '
'.$langs->trans("CompanyTown").'' . (empty($conf->global->MAIN_INFO_ACCOUNTANT_TOWN)?'':$conf->global->MAIN_INFO_ACCOUNTANT_TOWN) . '
'.$langs->trans("CompanyCountry").''; - if (! empty($conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY)) - { - $code = getCountry($conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY, 2); - $img=picto_from_langcode($code); - print $img?$img.' ':''; - print getCountry($conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY, 1); - } - print '
'.$langs->trans("Region-State").''; - else print '
'.$langs->trans("State").''; - if (! empty($conf->global->MAIN_INFO_ACCOUNTANT_STATE)) print getState($conf->global->MAIN_INFO_ACCOUNTANT_STATE, $conf->global->MAIN_SHOW_STATE_CODE, 0, $conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT); - else print ' '; - print '
'.$langs->trans("Phone").'' . dol_print_phone($conf->global->MAIN_INFO_ACCOUNTANT_PHONE, $mysoc->country_code) . '
'.$langs->trans("Fax").'' . dol_print_phone($conf->global->MAIN_INFO_ACCOUNTANT_FAX, $mysoc->country_code) . '
'.$langs->trans("Mail").'' . dol_print_email($conf->global->MAIN_INFO_ACCOUNTANT_MAIL, 0, 0, 0, 80) . '
'.$langs->trans("Web").'' . dol_print_url($conf->global->MAIN_INFO_ACCOUNTANT_WEB, '_blank', 80) . '
'.$langs->trans("AccountantFileNumber").'' . $conf->global->MAIN_INFO_ACCOUNTANT_CODE . '
'.$langs->trans("Note").'' . (! empty($conf->global->MAIN_INFO_ACCOUNTANT_NOTE) ? nl2br($conf->global->MAIN_INFO_ACCOUNTANT_NOTE) : '') . '
'; - print "
"; - - print ''; - - // Actions buttons - print '
'; - print ''; - print '
'; -} llxFooter(); diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php index a3534d3bc5a..dde962fe9bc 100644 --- a/htdocs/admin/company.php +++ b/htdocs/admin/company.php @@ -105,69 +105,79 @@ if ( ($action == 'update' && ! GETPOST("cancel", 'alpha')) dolibarr_set_const($db, "MAIN_INFO_SOCIETE_NOTE", GETPOST("note", 'none'), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_INFO_SOCIETE_GENCOD", GETPOST("barcode", 'alpha'), 'chaine', 0, '', $conf->entity); - $varforimage='logo'; $dirforimage=$conf->mycompany->dir_output.'/logos/'; - if ($_FILES[$varforimage]["tmp_name"]) + $dirforimage=$conf->mycompany->dir_output.'/logos/'; + + $arrayofimages = array('logo', 'logo_squarred'); + + foreach($arrayofimages as $varforimage) { - if (preg_match('/([^\\/:]+)$/i', $_FILES[$varforimage]["name"], $reg)) + if ($_FILES[$varforimage]["tmp_name"]) { - $original_file=$reg[1]; - - $isimage=image_format_supported($original_file); - if ($isimage >= 0) + $reg = array(); + if (preg_match('/([^\\/:]+)$/i', $_FILES[$varforimage]["name"], $reg)) { - dol_syslog("Move file ".$_FILES[$varforimage]["tmp_name"]." to ".$dirforimage.$original_file); - if (! is_dir($dirforimage)) - { - dol_mkdir($dirforimage); - } - $result=dol_move_uploaded_file($_FILES[$varforimage]["tmp_name"], $dirforimage.$original_file, 1, 0, $_FILES[$varforimage]['error']); - if ($result > 0) - { - dolibarr_set_const($db, "MAIN_INFO_SOCIETE_LOGO", $original_file, 'chaine', 0, '', $conf->entity); + $original_file=$reg[1]; - // Create thumbs of logo (Note that PDF use original file and not thumbs) - if ($isimage > 0) + $isimage=image_format_supported($original_file); + if ($isimage >= 0) + { + dol_syslog("Move file ".$_FILES[$varforimage]["tmp_name"]." to ".$dirforimage.$original_file); + if (! is_dir($dirforimage)) { - // Create thumbs - //$object->addThumbs($newfile); // We can't use addThumbs here yet because we need name of generated thumbs to add them into constants. TODO Check if need such constants. We should be able to retreive value with get... - - // Create small thumb, Used on logon for example - $imgThumbSmall = vignette($dirforimage.$original_file, $maxwidthsmall, $maxheightsmall, '_small', $quality); - if (image_format_supported($imgThumbSmall) >= 0 && preg_match('/([^\\/:]+)$/i', $imgThumbSmall, $reg)) - { - $imgThumbSmall = $reg[1]; // Save only basename - dolibarr_set_const($db, "MAIN_INFO_SOCIETE_LOGO_SMALL", $imgThumbSmall, 'chaine', 0, '', $conf->entity); - } - else dol_syslog($imgThumbSmall); - - // Create mini thumb, Used on menu or for setup page for example - $imgThumbMini = vignette($dirforimage.$original_file, $maxwidthmini, $maxheightmini, '_mini', $quality); - if (image_format_supported($imgThumbMini) >= 0 && preg_match('/([^\\/:]+)$/i', $imgThumbMini, $reg)) - { - $imgThumbMini = $reg[1]; // Save only basename - dolibarr_set_const($db, "MAIN_INFO_SOCIETE_LOGO_MINI", $imgThumbMini, 'chaine', 0, '', $conf->entity); - } - else dol_syslog($imgThumbMini); + dol_mkdir($dirforimage); + } + $result=dol_move_uploaded_file($_FILES[$varforimage]["tmp_name"], $dirforimage.$original_file, 1, 0, $_FILES[$varforimage]['error']); + if ($result > 0) + { + $constant = "MAIN_INFO_SOCIETE_LOGO"; + if ($varforimage == 'logo_squarred') $constant = "MAIN_INFO_SOCIETE_LOGO_SQUARRED"; + + dolibarr_set_const($db, $constant, $original_file, 'chaine', 0, '', $conf->entity); + + // Create thumbs of logo (Note that PDF use original file and not thumbs) + if ($isimage > 0) + { + // Create thumbs + //$object->addThumbs($newfile); // We can't use addThumbs here yet because we need name of generated thumbs to add them into constants. TODO Check if need such constants. We should be able to retreive value with get... + + // Create small thumb, Used on logon for example + $imgThumbSmall = vignette($dirforimage.$original_file, $maxwidthsmall, $maxheightsmall, '_small', $quality); + if (image_format_supported($imgThumbSmall) >= 0 && preg_match('/([^\\/:]+)$/i', $imgThumbSmall, $reg)) + { + $imgThumbSmall = $reg[1]; // Save only basename + dolibarr_set_const($db, $constant."_SMALL", $imgThumbSmall, 'chaine', 0, '', $conf->entity); + } + else dol_syslog($imgThumbSmall); + + // Create mini thumb, Used on menu or for setup page for example + $imgThumbMini = vignette($dirforimage.$original_file, $maxwidthmini, $maxheightmini, '_mini', $quality); + if (image_format_supported($imgThumbMini) >= 0 && preg_match('/([^\\/:]+)$/i', $imgThumbMini, $reg)) + { + $imgThumbMini = $reg[1]; // Save only basename + dolibarr_set_const($db, $constant."_MINI", $imgThumbMini, 'chaine', 0, '', $conf->entity); + } + else dol_syslog($imgThumbMini); + } + else dol_syslog("ErrorImageFormatNotSupported", LOG_WARNING); + } elseif (preg_match('/^ErrorFileIsInfectedWithAVirus/', $result)) { + $error++; + $langs->load("errors"); + $tmparray=explode(':', $result); + setEventMessages($langs->trans('ErrorFileIsInfectedWithAVirus', $tmparray[1]), null, 'errors'); + } + else + { + $error++; + setEventMessages($langs->trans("ErrorFailedToSaveFile"), null, 'errors'); } - else dol_syslog("ErrorImageFormatNotSupported", LOG_WARNING); - } elseif (preg_match('/^ErrorFileIsInfectedWithAVirus/', $result)) { - $error++; - $langs->load("errors"); - $tmparray=explode(':', $result); - setEventMessages($langs->trans('ErrorFileIsInfectedWithAVirus', $tmparray[1]), null, 'errors'); } else { $error++; - setEventMessages($langs->trans("ErrorFailedToSaveFile"), null, 'errors'); + $langs->load("errors"); + setEventMessages($langs->trans("ErrorBadImageFormat"), null, 'errors'); } } - else - { - $error++; - $langs->load("errors"); - setEventMessages($langs->trans("ErrorBadImageFormat"), null, 'errors'); - } } } @@ -247,7 +257,7 @@ if ( ($action == 'update' && ! GETPOST("cancel", 'alpha')) } } -if ($action == 'addthumb') // Regenerate thumbs +if ($action == 'addthumb' || $action == 'addthumbsquarred') // Regenerate thumbs { if (file_exists($conf->mycompany->dir_output.'/logos/'.$_GET["file"])) { @@ -256,15 +266,20 @@ if ($action == 'addthumb') // Regenerate thumbs // Create thumbs of logo if ($isimage > 0) { + $constant = "MAIN_INFO_SOCIETE_LOGO"; + if ($action == 'addthumbsquarred') $constant = "MAIN_INFO_SOCIETE_LOGO_SQUARRED"; + + $reg = array(); + // Create thumbs - //$object->addThumbs($newfile); // We can't use addThumbs here yet because we need name of generated thumbs to add them into constants. TODO Check if need such constants. We should be able to retreive value with get... + //$object->addThumbs($newfile); // We can't use addThumbs here yet because we need name of generated thumbs to add them into constants. TODO Check if need such constants. We should be able to retreive value with get... // Create small thumb. Used on logon for example $imgThumbSmall = vignette($conf->mycompany->dir_output.'/logos/'.$_GET["file"], $maxwidthsmall, $maxheightsmall, '_small', $quality); if (image_format_supported($imgThumbSmall) >= 0 && preg_match('/([^\\/:]+)$/i', $imgThumbSmall, $reg)) { $imgThumbSmall = $reg[1]; // Save only basename - dolibarr_set_const($db, "MAIN_INFO_SOCIETE_LOGO_SMALL", $imgThumbSmall, 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, $constant."_SMALL", $imgThumbSmall, 'chaine', 0, '', $conf->entity); } else dol_syslog($imgThumbSmall); @@ -273,7 +288,7 @@ if ($action == 'addthumb') // Regenerate thumbs if (image_format_supported($imgThumbSmall) >= 0 && preg_match('/([^\\/:]+)$/i', $imgThumbMini, $reg)) { $imgThumbMini = $reg[1]; // Save only basename - dolibarr_set_const($db, "MAIN_INFO_SOCIETE_LOGO_MINI", $imgThumbMini, 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, $constant."_MINI", $imgThumbMini, 'chaine', 0, '', $conf->entity); } else dol_syslog($imgThumbMini); @@ -297,24 +312,55 @@ if ($action == 'addthumb') // Regenerate thumbs } } -if ($action == 'removelogo') + +if ($action == 'removelogo' || $action == 'removelogosquarred') { + $constant = "MAIN_INFO_SOCIETE_LOGO"; + if ($action == 'removelogosquarred') $constant = "MAIN_INFO_SOCIETE_LOGO_SQUARRED"; + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - $logofile=$conf->mycompany->dir_output.'/logos/'.$mysoc->logo; - if ($mysoc->logo != '') dol_delete_file($logofile); - dolibarr_del_const($db, "MAIN_INFO_SOCIETE_LOGO", $conf->entity); - $mysoc->logo=''; + $logofilename = $mysoc->logo; + $logofilenamebis = $mysoc->logo_squarred; + if ($action == 'removelogosquarred') + { + $logofilename = $mysoc->logo_squarred; + $logofilenamebis = $mysoc->logo; + } - $logosmallfile=$conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_small; - if ($mysoc->logo_small != '') dol_delete_file($logosmallfile); - dolibarr_del_const($db, "MAIN_INFO_SOCIETE_LOGO_SMALL", $conf->entity); - $mysoc->logo_small=''; + $logofile=$conf->mycompany->dir_output.'/logos/'.$logofilename; + if ($logofilename != '' && $logofilename != $logofilenamebis) dol_delete_file($logofile); + dolibarr_del_const($db, $constant, $conf->entity); + if ($action == 'removelogosquarred') $mysoc->logo_squarred=''; + else $mysoc->logo=''; - $logominifile=$conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini; - if ($mysoc->logo_mini != '') dol_delete_file($logominifile); - dolibarr_del_const($db, "MAIN_INFO_SOCIETE_LOGO_MINI", $conf->entity); - $mysoc->logo_mini=''; + $logofilename = $mysoc->logo_small; + $logofilenamebis = $mysoc->logo_squarred_small; + if ($action == 'removelogosquarred') + { + $logofilename = $mysoc->logo_squarred_small; + $logofilenamebis = $mysoc->logo_small; + } + + $logosmallfile=$conf->mycompany->dir_output.'/logos/thumbs/'.$logofilename; + if ($logofilename != '' && $logofilename != $logofilenamebis) dol_delete_file($logosmallfile); + dolibarr_del_const($db, $constant."_SMALL", $conf->entity); + if ($action == 'removelogosquarred') $mysoc->logo_squarred_small=''; + else $mysoc->logo_small=''; + + $logofilename = $mysoc->logo_mini; + $logofilenamebis = $mysoc->logo_squarred_mini; + if ($action == 'removelogosquarred') + { + $logofilename = $mysoc->logo_squarred_mini; + $logofilenamebis = $mysoc->logo_mini; + } + + $logominifile=$conf->mycompany->dir_output.'/logos/thumbs/'.$logofilename; + if ($logofilename != '' && $logofilename != $logofilenamebis) dol_delete_file($logominifile); + dolibarr_del_const($db, $constant."_MINI", $conf->entity); + if ($action == 'removelogosquarred') $mysoc->logo_squarred_mini=''; + else $mysoc->logo_mini=''; } @@ -337,875 +383,423 @@ $head = company_admin_prepare_head(); dol_fiche_head($head, 'company', $langs->trans("Company"), -1, 'company'); -print ''.$langs->trans("CompanyFundationDesc", $langs->transnoentities("Modify"), $langs->transnoentities("Save"))."
\n"; +print ''.$langs->trans("CompanyFundationDesc", $langs->transnoentities("Save"))."
\n"; print "
\n"; -if ($action == 'edit' || $action == 'updateedit') + +/** + * Edit parameters + */ +print "\n".''."\n"; + +print '
'; +print ''; +print ''; + +print ''; +print ''."\n"; + +// Name + +print ''."\n"; + +// Addresse + +print ''."\n"; + + +print ''."\n"; + + +print ''."\n"; + +// Country + +print ''."\n"; + + +print ''; +// Fiscal year start +print '
'; +print '
'.$langs->trans("CompanyInfo").''.$langs->trans("Value").'
'; +print '
'; +print '
'; +print '
'; +print '
'; +//if (empty($country_selected)) $country_selected=substr($langs->defaultlang,-2); // By default, country of localization +print $form->select_country($mysoc->country_id, 'country_id'); +if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); +print '
'; +$state_id=0; +if (! empty($conf->global->MAIN_INFO_SOCIETE_STATE)) { - /** - * Edition des parametres - */ - print "\n".''."\n"; - - print ''; - print ''; - print ''; - - print ''; - print ''."\n"; - - // Name - - print ''."\n"; - - // Addresse - - print ''."\n"; + $tmp=explode(':', $conf->global->MAIN_INFO_SOCIETE_STATE); + $state_id=$tmp[0]; +} +$formcompany->select_departement($state_id, $mysoc->country_code, 'state_id'); +print ''."\n"; - print ''."\n"; +print ''."\n"; - print ''."\n"; - - // Country - - print ''."\n"; +print ''; +print ''."\n"; - print ''; +print ''."\n"; + + +print ''; +print ''."\n"; + +// Web +print ''; +print ''."\n"; + +// Barcode +if (! empty($conf->barcode->enabled)) { + + print ''; + print ''; +} + +// Logo +print ''; + +// Logo (squarred) +print ''; + +// Note +print ''; +print ''; + +print '
'.$langs->trans("CompanyInfo").''.$langs->trans("Value").'
'; - print '
'; - print '
'; - print '
'; +print $form->selectCurrency($conf->currency, "currency"); +print '
'; - print '
'; - //if (empty($country_selected)) $country_selected=substr($langs->defaultlang,-2); // By default, country of localization - print $form->select_country($mysoc->country_id, 'country_id'); - if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); - print '
'; +print '
'; - $state_id=0; - if (! empty($conf->global->MAIN_INFO_SOCIETE_STATE)) +print '
'; +print '
'; +print '
'; +print '
'; + print '
'; +print '
'; +print ''; +print ''; +if (! empty($mysoc->logo_mini)) { + print ''.img_delete($langs->trans("Delete")).''; + if (file_exists($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini)) { + print '   '; + print ''; + } +} else { + print ''; +} +print '
'; +print '
'; +print '
'; +print ''; +print ''; +if (! empty($mysoc->logo_squarred_mini)) { + print ''.img_delete($langs->trans("Delete")).''; + if (file_exists($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_squarred_mini)) { + print '   '; + print ''; + } +} else { + print ''; +} +print '
'; +print '
'; +print '
'; + +print '
'; + +// IDs of the company (country-specific) +print ''; +print ''; + +$langs->load("companies"); + +// Managing Director(s) + +print ''; + +// GDPR contact + +print ''; + +// Capital + +print ''; + +// Juridical Status + +print ''; + +// ProfID1 +if ($langs->transcountry("ProfId1", $mysoc->country_code) != '-') +{ + + print ''."\n"; - - - print ''."\n"; - - - print ''; - print ''."\n"; - - - print ''; - print ''."\n"; - - - print ''; - print ''."\n"; - - // Web - print ''; - print ''."\n"; - - // Barcode - if (! empty($conf->barcode->enabled)) { - - print ''; - print ''; - } - - // Logo - print ''; - - // Note - print ''; - print ''; - - print '
'.$langs->trans("CompanyIds").''.$langs->trans("Value").'
'; +print '
'; +print $form->textwithpicto($langs->trans("GDPRContact"), $langs->trans("GDPRContactDesc")); +print ''; +print '
'; +print '
'; +if ($mysoc->country_code) { + print $formcompany->select_juridicalstatus($conf->global->MAIN_INFO_SOCIETE_FORME_JURIDIQUE, $mysoc->country_code, '', 'forme_juridique_code'); +} else { + print $countrynotdefined; +} +print '
'; + if (! empty($mysoc->country_code)) { - $tmp=explode(':', $conf->global->MAIN_INFO_SOCIETE_STATE); - $state_id=$tmp[0]; + print ''; } - $formcompany->select_departement($state_id, $mysoc->country_code, 'state_id'); - print '
'; - print $form->selectCurrency($conf->currency, "currency"); - print '
'; - print '
'; - print '
'; - print '
'; - print '
'; - print '
'; - print '
'; - print ''; - print ''; - if (! empty($mysoc->logo_mini)) { - print ''.img_delete($langs->trans("Delete")).''; - if (file_exists($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini)) { - print '   '; - print ''; - } - } else { - print ''; - } - print '
'; - print '
'; - print '
'; - - print '
'; - - // IDs of the company (country-specific) - print ''; - print ''; - - $langs->load("companies"); - - // Managing Director(s) - - print ''; - - // GDPR contact - - print ''; - - // Capital - - print ''; - - // Juridical Status - - print ''; - - // ProfID1 - if ($langs->transcountry("ProfId1", $mysoc->country_code) != '-') - { - - print ''; - } - - // ProfId2 - if ($langs->transcountry("ProfId2", $mysoc->country_code) != '-') - { - - print ''; - } - - // ProfId3 - if ($langs->transcountry("ProfId3", $mysoc->country_code) != '-') - { - - print ''; - } - - // ProfId4 - if ($langs->transcountry("ProfId4", $mysoc->country_code) != '-') - { - - print ''; - } - - // ProfId5 - if ($langs->transcountry("ProfId5", $mysoc->country_code) != '-') - { - - print ''; - } - - // ProfId6 - if ($langs->transcountry("ProfId6", $mysoc->country_code) != '-') - { - - print ''; - } - - // TVA Intra - - print ''; - - // Object of the company - - print ''; - print ''; - - print '
'.$langs->trans("CompanyIds").''.$langs->trans("Value").'
'; - print '
'; - print $form->textwithpicto($langs->trans("GDPRContact"), $langs->trans("GDPRContactDesc")); - print ''; - print '
'; - print '
'; - if ($mysoc->country_code) { - print $formcompany->select_juridicalstatus($conf->global->MAIN_INFO_SOCIETE_FORME_JURIDIQUE, $mysoc->country_code, '', 'forme_juridique_code'); - } else { + else + { print $countrynotdefined; } print '
'; - if (! empty($mysoc->country_code)) - { - print ''; - } - else - { - print $countrynotdefined; - } - print '
'; - if (! empty($mysoc->country_code)) - { - print ''; - } - else - { - print $countrynotdefined; - } - print '
'; - if (! empty($mysoc->country_code)) - { - print ''; - } - else - { - print $countrynotdefined; - } - print '
'; - if (! empty($mysoc->country_code)) - { - print ''; - } - else - { - print $countrynotdefined; - } - print '
'; - if (! empty($mysoc->country_code)) - { - print ''; - } - else - { - print $countrynotdefined; - } - print '
'; - if (! empty($mysoc->country_code)) - { - print ''; - } - else - { - print $countrynotdefined; - } - print '
'; - print ''; - print '
'; - print '
'; - - - // Fiscal year start - print '
'; - print ''; - print ''; - print ''; - print "\n"; - - print ''; - - print "
'.$langs->trans("FiscalYearInformation").''.$langs->trans("Value").'
'; - print $formother->select_month($conf->global->SOCIETE_FISCAL_MONTH_START, 'SOCIETE_FISCAL_MONTH_START', 0, 1, 'maxwidth100') . '
"; - - - // Fiscal options - print '
'; - print ''; - print ''; - print ''; - print ''; - print "\n"; - - - print ""; - print '\n"; - - - print ""; - print '\n"; - - print "
'.$langs->trans("VATManagement").''.$langs->trans("Description").' 
'; - print ""; - print ""; - if ($mysoc->country_code == 'FR') print "\n"; - print "
".$langs->trans("Example").': '.$langs->trans("VATIsUsedExampleFR")."
"; - print "
'; - print ""; - print ""; - if ($mysoc->country_code == 'FR') print "\n"; - print "
".$langs->trans("Example").': '.$langs->trans("VATIsNotUsedExampleFR")."
"; - print "
"; - - /* - * Local Taxes - */ - if ($mysoc->useLocalTax(1)) - { - // Local Tax 1 - print '
'; - print ''; - print ''; - print ''; - print ''; - print "\n"; - - // Note: When option is not set, it must not appears as set on on, because there is no default value for this option - print ""; - print '\n"; - - - print ""; - print '\n"; - print "
'.$langs->transcountry("LocalTax1Management", $mysoc->country_code).''.$langs->trans("Description").' 
global->FACTURE_LOCAL_TAX1_OPTION == '1' || $conf->global->FACTURE_LOCAL_TAX1_OPTION == "localtax1on")?" checked":"")."> ".$langs->transcountry("LocalTax1IsUsed", $mysoc->country_code)."'; - print ''; - print ""; - $example=$langs->transcountry("LocalTax1IsUsedExample", $mysoc->country_code); - print ($example!="LocalTax1IsUsedExample"?"\n":""); - if(! isOnlyOneLocalTax(1)) - { - print ''; - } - - $opcions=array($langs->trans("CalcLocaltax1").' '.$langs->trans("CalcLocaltax1Desc"),$langs->trans("CalcLocaltax2").' - '.$langs->trans("CalcLocaltax2Desc"),$langs->trans("CalcLocaltax3").' - '.$langs->trans("CalcLocaltax3Desc")); - - print ''; - print "
".$langs->trans("Example").': '.$langs->transcountry("LocalTax1IsUsedExample", $mysoc->country_code)."
: '; - $formcompany->select_localtax(1, $conf->global->MAIN_INFO_VALUE_LOCALTAX1, "lt1"); - print '
'.$langs->trans("CalcLocaltax").': '; - print $form->selectarray("clt1", $opcions, $conf->global->MAIN_INFO_LOCALTAX_CALC1); - print '
"; - print "
global->FACTURE_LOCAL_TAX1_OPTION) || $conf->global->FACTURE_LOCAL_TAX1_OPTION == "localtax1off")?" checked":"")."> ".$langs->transcountry("LocalTax1IsNotUsed", $mysoc->country_code)."'; - print ""; - print ""; - $example=$langs->transcountry("LocalTax1IsNotUsedExample", $mysoc->country_code); - print ($example!="LocalTax1IsNotUsedExample"?"\n":""); - print "
".$langs->trans("Example").': '.$langs->transcountry("LocalTax1IsNotUsedExample", $mysoc->country_code)."
"; - print "
"; - } - if ($mysoc->useLocalTax(2)) - { - // Local Tax 2 - print '
'; - print ''; - print ''; - print ''; - print ''; - print "\n"; - - - // Note: When option is not set, it must not appears as set on on, because there is no default value for this option - print ""; - print '\n"; - - - print ""; - print '\n"; - print "
'.$langs->transcountry("LocalTax2Management", $mysoc->country_code).''.$langs->trans("Description").' 
global->FACTURE_LOCAL_TAX2_OPTION == '1' || $conf->global->FACTURE_LOCAL_TAX2_OPTION == "localtax2on")?" checked":"")."> ".$langs->transcountry("LocalTax2IsUsed", $mysoc->country_code)."'; - print ''; - print ""; - $example=$langs->transcountry("LocalTax2IsUsedExample", $mysoc->country_code); - print ($example!="LocalTax2IsUsedExample"?"\n":""); - if(! isOnlyOneLocalTax(2)) - { - print ''; - } - print ''; - print "
".$langs->trans("Example").': '.$langs->transcountry("LocalTax2IsUsedExample", $mysoc->country_code)."
: '; - $formcompany->select_localtax(2, $conf->global->MAIN_INFO_VALUE_LOCALTAX2, "lt2"); - print '
: '; - print $form->selectarray("clt2", $opcions, $conf->global->MAIN_INFO_LOCALTAX_CALC2); - print '
"; - print "
global->FACTURE_LOCAL_TAX2_OPTION) || $conf->global->FACTURE_LOCAL_TAX2_OPTION == "localtax2off")?" checked":"")."> ".$langs->transcountry("LocalTax2IsNotUsed", $mysoc->country_code)."'; - print ""; - print ""; - $example=$langs->transcountry("LocalTax2IsNotUsedExample", $mysoc->country_code); - print ($example!="LocalTax2IsNotUsedExample"?"\n":""); - print "
".$langs->trans("Example").': '.$langs->transcountry("LocalTax2IsNotUsedExample", $mysoc->country_code)."
"; - print "
"; - } - - - print '
'; - print ''; - print '     '; - print ''; - print '
'; - print '
'; - - print ''; } -else + +// ProfId2 +if ($langs->transcountry("ProfId2", $mysoc->country_code) != '-') { - /* - * Show parameters - */ - // Actions buttons - //print '
'; - //print ''.$langs->trans("Modify").''; - //print '

'; - - print '
'; - print ''; - print ''; - - - print ''; - - - print ''; - - - print ''; - - - print ''; - - - print ''; - - - if (! empty($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT)) print ''; - - - print ''; - - - print ''; - - - print ''; - - - print ''; - - // Web - - print ''; - - // Barcode - - if (! empty($conf->barcode->enabled)) - { - print ''; - } - - // Logo - - print ''; +} +// ProfId3 +if ($langs->transcountry("ProfId3", $mysoc->country_code) != '-') +{ - print ''; - - print '
'.$langs->trans("CompanyInfo").''.$langs->trans("Value").'
'.$langs->trans("CompanyName").''; - if (! empty($conf->global->MAIN_INFO_SOCIETE_NOM)) print $conf->global->MAIN_INFO_SOCIETE_NOM; - else print img_warning().' '.$langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CompanyName")).''; - print '
'.$langs->trans("CompanyAddress").'' . nl2br(empty($conf->global->MAIN_INFO_SOCIETE_ADDRESS)?'':$conf->global->MAIN_INFO_SOCIETE_ADDRESS) . '
'.$langs->trans("CompanyZip").'' . (empty($conf->global->MAIN_INFO_SOCIETE_ZIP)?'':$conf->global->MAIN_INFO_SOCIETE_ZIP) . '
'.$langs->trans("CompanyTown").'' . (empty($conf->global->MAIN_INFO_SOCIETE_TOWN)?'':$conf->global->MAIN_INFO_SOCIETE_TOWN) . '
'.$langs->trans("CompanyCountry").''; - if ($mysoc->country_code) + print '
'; + if (! empty($mysoc->country_code)) { - $img=picto_from_langcode($mysoc->country_code); - print $img?$img.' ':''; - print getCountry($mysoc->country_code, 1); - } - else print img_warning().' '.$langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CompanyCountry")).''; - print '
'.$langs->trans("Region-State").''; - else print '
'.$langs->trans("State").''; - if (! empty($conf->global->MAIN_INFO_SOCIETE_STATE)) - { - $tmp=explode(':', $conf->global->MAIN_INFO_SOCIETE_STATE); - $state_id=$tmp[0]; - print getState($state_id, $conf->global->MAIN_SHOW_STATE_CODE, 0, $conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT); - } - print '
'.$langs->trans("CompanyCurrency").''; - print currency_name($conf->currency, 0); - print ' ('.$conf->currency; - print ($conf->currency != $langs->getCurrencySymbol($conf->currency) ? ' - '.$langs->getCurrencySymbol($conf->currency) : ''); - print ')'; - print ' - '.$langs->trans("PriceFormatInCurrentLanguage", $langs->defaultlang).' : '.price(price2num('99.333333333', 'MT'), 1, $langs, 1, -1, -1, $conf->currency); - print '
'.$langs->trans("Phone").'' . dol_print_phone($conf->global->MAIN_INFO_SOCIETE_TEL, $mysoc->country_code) . '
'.$langs->trans("Fax").'' . dol_print_phone($conf->global->MAIN_INFO_SOCIETE_FAX, $mysoc->country_code) . '
'.$langs->trans("Mail").'' . dol_print_email($conf->global->MAIN_INFO_SOCIETE_MAIL, 0, 0, 0, 80) . '
'.$langs->trans("Web").''; - $arrayofurl = preg_split('/\s/', $conf->global->MAIN_INFO_SOCIETE_WEB); - foreach($arrayofurl as $urltoshow) - { - if ($urltoshow) print dol_print_url($urltoshow, '_blank', 80); - } - print '
'.$langs->trans("Gencod").'' . $conf->global->MAIN_INFO_SOCIETE_GENCOD . '
'.$langs->trans("Logo").''; - - $tagtd='tagtd '; - if ($conf->browser->layout == 'phone') $tagtd=''; - print '
'; - print $mysoc->logo; - print '
'; - - // It offers the generation of the thumbnail if it does not exist - if (!is_file($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini) && preg_match('/(\.jpg|\.jpeg|\.png)$/i', $mysoc->logo)) - { - print '  '; - } - elseif ($mysoc->logo_mini && is_file($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini)) - { - print ''; + print ''; } else { - print ''; + print $countrynotdefined; } - print '
'; - print '
'.$langs->trans("Note").'' . (! empty($conf->global->MAIN_INFO_SOCIETE_NOTE) ? nl2br($conf->global->MAIN_INFO_SOCIETE_NOTE) : '') . '
'; - print "
"; - - print '
'; - - - // IDs of the company (country-specific) - print '
'; - print ''; - - print '
'; - print ''; - print ''; - - // Managing Director(s) - - print ''; - - // GDPR Contact - - print ''; - - // Capital - - print ''; - - // Juridical Status - - print ''; - - // ProfId1 - if ($langs->transcountry("ProfId1", $mysoc->country_code) != '-') + print ''; - } - - // ProfId2 - if ($langs->transcountry("ProfId2", $mysoc->country_code) != '-') - { - - print ''; - } - - // ProfId3 - if ($langs->transcountry("ProfId3", $mysoc->country_code) != '-') - { - - print ''; - } - - // ProfId4 - if ($langs->transcountry("ProfId4", $mysoc->country_code) != '-') - { - - print ''; - } - - // ProfId5 - if ($langs->transcountry("ProfId5", $mysoc->country_code) != '-') - { - - print ''; - } - - // ProfId6 - if ($langs->transcountry("ProfId6", $mysoc->country_code) != '-') - { - - print ''; - } - - // VAT - - print ''; - print ''; - print ''; + print ''; +} + +// ProfId4 +if ($langs->transcountry("ProfId4", $mysoc->country_code) != '-') +{ + + print ''; +} + +// ProfId5 +if ($langs->transcountry("ProfId5", $mysoc->country_code) != '-') +{ + + print ''; +} + +// ProfId6 +if ($langs->transcountry("ProfId6", $mysoc->country_code) != '-') +{ + + print ''; +} + +// TVA Intra + +print ''; + +// Object of the company + +print ''; +print ''; + +print '
'.$langs->trans("CompanyIds").''.$langs->trans("Value").'
'.$langs->trans("ManagingDirectors").''; - print $conf->global->MAIN_INFO_SOCIETE_MANAGERS . '
'.$langs->trans("GDPRContact").''; - print $conf->global->MAIN_INFO_GDPR . '
'.$langs->trans("Capital").''; - print $conf->global->MAIN_INFO_CAPITAL . '
'.$langs->trans("JuridicalStatus").''; - print getFormeJuridiqueLabel($conf->global->MAIN_INFO_SOCIETE_FORME_JURIDIQUE); - print '
'; + if (! empty($mysoc->country_code)) { - - print '
'.$langs->transcountry("ProfId1", $mysoc->country_code).''; - if (! empty($conf->global->MAIN_INFO_SIREN)) - { - print $conf->global->MAIN_INFO_SIREN; - $s = $mysoc->id_prof_url(1, $mysoc); - if ($s) print ' - '.$s; - } else { - print ' '; - } - print '
'.$langs->transcountry("ProfId2", $mysoc->country_code).''; - if (! empty($conf->global->MAIN_INFO_SIRET)) - { - print $conf->global->MAIN_INFO_SIRET; - $s = $mysoc->id_prof_url(2, $mysoc); - if ($s) print ' - '.$s; - } else { - print ' '; - } - print '
'.$langs->transcountry("ProfId3", $mysoc->country_code).''; - if (! empty($conf->global->MAIN_INFO_APE)) - { - print $conf->global->MAIN_INFO_APE; - $s = $mysoc->id_prof_url(3, $mysoc); - if ($s) print ' - '.$s; - } else { - print ' '; - } - print '
'.$langs->transcountry("ProfId4", $mysoc->country_code).''; - if (! empty($conf->global->MAIN_INFO_RCS)) - { - print $conf->global->MAIN_INFO_RCS; - $s = $mysoc->id_prof_url(4, $mysoc); - if ($s) print ' - '.$s; - } else { - print ' '; - } - print '
'.$langs->transcountry("ProfId5", $mysoc->country_code).''; - if (! empty($conf->global->MAIN_INFO_PROFID5)) - { - print $conf->global->MAIN_INFO_PROFID5; - $s = $mysoc->id_prof_url(5, $mysoc); - if ($s) print ' - '.$s; - } else { - print ' '; - } - print '
'.$langs->transcountry("ProfId6", $mysoc->country_code).''; - if (! empty($conf->global->MAIN_INFO_PROFID6)) - { - print $conf->global->MAIN_INFO_PROFID6; - $s = $mysoc->id_prof_url(6, $mysoc); - if ($s) print ' - '.$s; - } else { - print ' '; - } - print '
'.$langs->trans("VATIntra").''; - if (! empty($conf->global->MAIN_INFO_TVAINTRA)) - { - $s=''; - $s.=$conf->global->MAIN_INFO_TVAINTRA; - $s.=''; - if (empty($conf->global->MAIN_DISABLEVATCHECK) && $mysoc->isInEEC()) - { - $s.=' - '; - if (! empty($conf->use_javascript_ajax)) - { - print "\n"; - print ''; - print "\n"; - $s.=''.$langs->trans("VATIntraCheck").''; - $s = $form->textwithpicto($s, $langs->trans("VATIntraCheckDesc", $langs->transnoentitiesnoconv("VATIntraCheck")), 1); - } - else - { - $s.='id_country).'" target="_blank">'.img_picto($langs->trans("VATIntraCheckableOnEUSite"), 'help').''; - } - } - print $s; + print ''; } else { - print ' '; + print $countrynotdefined; } - print '
'; + if (! empty($mysoc->country_code)) + { + print ''; + } + else + { + print $countrynotdefined; + } + print '
'; + if (! empty($mysoc->country_code)) + { + print ''; + } + else + { + print $countrynotdefined; + } + print '
'; + if (! empty($mysoc->country_code)) + { + print ''; + } + else + { + print $countrynotdefined; + } + print '
'; +print ''; +print '
'; +print '
'; - print '
'.$langs->trans("CompanyObject").'' . (! empty($conf->global->MAIN_INFO_SOCIETE_OBJECT) ? nl2br($conf->global->MAIN_INFO_SOCIETE_OBJECT) : '') . '
'; +print ''; +print ''; +print "\n"; - print '
'.$langs->trans("FiscalYearInformation").''.$langs->trans("Value").'
'; - print ""; +print ''; +print $formother->select_month($conf->global->SOCIETE_FISCAL_MONTH_START, 'SOCIETE_FISCAL_MONTH_START', 0, 1, 'maxwidth100') . ''; - print ''; +print ""; - /* - * fiscal year beginning - */ + +// Fiscal options +print '
'; +print ''; +print ''; +print ''; +print ''; +print "\n"; + + +print ""; +print '\n"; + + +print ""; +print '\n"; + +print "
'.$langs->trans("VATManagement").''.$langs->trans("Description").' 
'; +print ""; +print ""; +if ($mysoc->country_code == 'FR') print "\n"; +print "
".$langs->trans("Example").': '.$langs->trans("VATIsUsedExampleFR")."
"; +print "
'; +print ""; +print ""; +if ($mysoc->country_code == 'FR') print "\n"; +print "
".$langs->trans("Example").': '.$langs->trans("VATIsNotUsedExampleFR")."
"; +print "
"; + +/* + * Local Taxes + */ +if ($mysoc->useLocalTax(1)) +{ + // Local Tax 1 print '
'; - - print '
'; print ''; print ''; - print ''; + print ''; + print ''; print "\n"; + // Note: When option is not set, it must not appears as set on on, because there is no default value for this option + print ""; + print '\n"; - /* - * tax options - */ + + print ""; + print '\n"; + print "
'.$langs->trans("FiscalYearInformation").''.$langs->trans("Value").''.$langs->transcountry("LocalTax1Management", $mysoc->country_code).''.$langs->trans("Description").' 
global->FACTURE_LOCAL_TAX1_OPTION == '1' || $conf->global->FACTURE_LOCAL_TAX1_OPTION == "localtax1on")?" checked":"")."> ".$langs->transcountry("LocalTax1IsUsed", $mysoc->country_code)."'; + print ''; + print ""; + $example=$langs->transcountry("LocalTax1IsUsedExample", $mysoc->country_code); + print ($example!="LocalTax1IsUsedExample"?"\n":""); + if(! isOnlyOneLocalTax(1)) + { + print ''; + } - print ''; + $opcions=array($langs->trans("CalcLocaltax1").' '.$langs->trans("CalcLocaltax1Desc"),$langs->trans("CalcLocaltax2").' - '.$langs->trans("CalcLocaltax2Desc"),$langs->trans("CalcLocaltax3").' - '.$langs->trans("CalcLocaltax3Desc")); + print ''; print "
".$langs->trans("Example").': '.$langs->transcountry("LocalTax1IsUsedExample", $mysoc->country_code)."
: '; + $formcompany->select_localtax(1, $conf->global->MAIN_INFO_VALUE_LOCALTAX1, "lt1"); + print '
'.$langs->trans("FiscalMonthStart").''; - $monthstart=(! empty($conf->global->SOCIETE_FISCAL_MONTH_START)) ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1; - print dol_print_date(dol_mktime(12, 0, 0, $monthstart, 1, 2000, 1), '%B', 'gm') . '
'.$langs->trans("CalcLocaltax").': '; + print $form->selectarray("clt1", $opcions, $conf->global->MAIN_INFO_LOCALTAX_CALC1); + print '
"; - print ""; + print "
global->FACTURE_LOCAL_TAX1_OPTION) || $conf->global->FACTURE_LOCAL_TAX1_OPTION == "localtax1off")?" checked":"")."> ".$langs->transcountry("LocalTax1IsNotUsed", $mysoc->country_code)."'; + print ""; + print ""; + $example=$langs->transcountry("LocalTax1IsNotUsedExample", $mysoc->country_code); + print ($example!="LocalTax1IsNotUsedExample"?"\n":""); + print "
".$langs->trans("Example").': '.$langs->transcountry("LocalTax1IsNotUsedExample", $mysoc->country_code)."
"; + print "
"; +} +if ($mysoc->useLocalTax(2)) +{ + // Local Tax 2 print '
'; - print '
'; print ''; print ''; - print ''; + print ''; print ''; print "\n"; - print '"; + // Note: When option is not set, it must not appears as set on on, because there is no default value for this option + print ""; print '\n"; - print '"; + print ""; print '\n"; - print "
'.$langs->trans("VATManagement").''.$langs->trans("Description").''.$langs->transcountry("LocalTax2Management", $mysoc->country_code).''.$langs->trans("Description").' 
'; - print "global->FACTURE_TVAOPTION)?"":" checked")."> ".$langs->trans("VATIsUsed")."
global->FACTURE_LOCAL_TAX2_OPTION == '1' || $conf->global->FACTURE_LOCAL_TAX2_OPTION == "localtax2on")?" checked":"")."> ".$langs->transcountry("LocalTax2IsUsed", $mysoc->country_code)."'; - print ""; - print ""; - if ($mysoc->country_code == 'FR') print "\n"; + print '
".$langs->trans("Example").': '.$langs->trans("VATIsUsedExampleFR")."
'; + print ""; + $example=$langs->transcountry("LocalTax2IsUsedExample", $mysoc->country_code); + print ($example!="LocalTax2IsUsedExample"?"\n":""); + if(! isOnlyOneLocalTax(2)) + { + print ''; + } + print ''; print "
".$langs->trans("Example").': '.$langs->transcountry("LocalTax2IsUsedExample", $mysoc->country_code)."
: '; + $formcompany->select_localtax(2, $conf->global->MAIN_INFO_VALUE_LOCALTAX2, "lt2"); + print '
: '; + print $form->selectarray("clt2", $opcions, $conf->global->MAIN_INFO_LOCALTAX_CALC2); + print '
"; print "
'; - print "global->FACTURE_TVAOPTION)?" checked":"")."> ".$langs->trans("VATIsNotUsed")."
global->FACTURE_LOCAL_TAX2_OPTION) || $conf->global->FACTURE_LOCAL_TAX2_OPTION == "localtax2off")?" checked":"")."> ".$langs->transcountry("LocalTax2IsNotUsed", $mysoc->country_code)."'; print ""; - print ""; - if ($mysoc->country_code == 'FR') print "\n"; + print ""; + $example=$langs->transcountry("LocalTax2IsNotUsedExample", $mysoc->country_code); + print ($example!="LocalTax2IsNotUsedExample"?"\n":""); print "
".$langs->trans("VATIsNotUsedDesc")."
".$langs->trans("Example").': '.$langs->trans("VATIsNotUsedExampleFR")."
".$langs->trans("Example").': '.$langs->transcountry("LocalTax2IsNotUsedExample", $mysoc->country_code)."
"; print "
"; - print "
"; - - /* - * Local Taxes - */ - if ($mysoc->useLocalTax(1)) // True if we found at least on vat with a setup adding a localtax 1 - { - // Local Tax 1 - print '
'; - print '
'; - print ''; - print ''; - print ''; - print ''; - print "\n"; - - - print ""; - print '\n"; - - - print '"; - print '\n"; - - print "
'.$langs->transcountry("LocalTax1Management", $mysoc->country_code).''.$langs->trans("Description").' 
"; - print "global->FACTURE_LOCAL_TAX1_OPTION == '1' || $conf->global->FACTURE_LOCAL_TAX1_OPTION == "localtax1on")?" checked":"")."> ".$langs->transcountry("LocalTax1IsUsed", $mysoc->country_code)."'; - print ""; - print ""; - $example=$langs->transcountry("LocalTax1IsUsedExample", $mysoc->country_code); - print ($example!="LocalTax1IsUsedExample"?"\n":""); - if($conf->global->MAIN_INFO_VALUE_LOCALTAX1!=0) - { - print ''; - } - print ''; - print "
".$langs->transcountry("LocalTax1IsUsedDesc", $mysoc->country_code)."
".$langs->trans("Example").': '.$langs->transcountry("LocalTax1IsUsedExample", $mysoc->country_code)."
'.$langs->trans("LTRate").': '. $conf->global->MAIN_INFO_VALUE_LOCALTAX1 .'
'.$langs->trans("CalcLocaltax").': '; - if($conf->global->MAIN_INFO_LOCALTAX_CALC1==0) - { - print $langs->trans("CalcLocaltax1").' - '.$langs->trans("CalcLocaltax1Desc"); - } - elseif($conf->global->MAIN_INFO_LOCALTAX_CALC1==1) - { - print $langs->trans("CalcLocaltax2").' - '.$langs->trans("CalcLocaltax2Desc"); - } - elseif($conf->global->MAIN_INFO_LOCALTAX_CALC1==2){ - print $langs->trans("CalcLocaltax3").' - '.$langs->trans("CalcLocaltax3Desc"); - } - - print '
"; - print "
'; - print "global->FACTURE_LOCAL_TAX1_OPTION) || $conf->global->FACTURE_LOCAL_TAX1_OPTION == "localtax1off")?" checked":"")."> ".$langs->transcountry("LocalTax1IsNotUsed", $mysoc->country_code)."'; - print ""; - print ""; - $example=$langs->transcountry("LocalTax1IsNotUsedExample", $mysoc->country_code); - print ($example!="LocalTax1IsNotUsedExample"?"\n":""); - print "
".$langs->trans("Example").': '.$langs->transcountry("LocalTax1IsNotUsedExample", $mysoc->country_code)."
"; - print "
"; - print "
"; - } - if ($mysoc->useLocalTax(2)) // True if we found at least on vat with a setup adding a localtax 1 - { - // Local Tax 2 - print '
'; - print '
'; - print ''; - print ''; - print ''; - print ''; - print "\n"; - - - print ""; - print '\n"; - - - print ""; - print '\n"; - - print "
'.$langs->transcountry("LocalTax2Management", $mysoc->country_code).''.$langs->trans("Description").' 
"; - print "global->FACTURE_LOCAL_TAX2_OPTION == '1' || $conf->global->FACTURE_LOCAL_TAX2_OPTION == "localtax2on")?" checked":"")."> ".$langs->transcountry("LocalTax2IsUsed", $mysoc->country_code)."'; - print ""; - print ""; - $example=$langs->transcountry("LocalTax2IsUsedExample", $mysoc->country_code); - print ($example!="LocalTax2IsUsedExample"?"\n":""); - if($conf->global->MAIN_INFO_VALUE_LOCALTAX2!=0) - { - print ''; - } - print ''; - print "
".$langs->trans("Example").': '.$langs->transcountry("LocalTax2IsUsedExample", $mysoc->country_code)."
'.$langs->trans("LTRate").': '. $conf->global->MAIN_INFO_VALUE_LOCALTAX2 .'
'.$langs->trans("CalcLocaltax").': '; - if($conf->global->MAIN_INFO_LOCALTAX_CALC2==0) - { - print $langs->trans("CalcLocaltax1").' - '.$langs->trans("CalcLocaltax1Desc"); - } - elseif($conf->global->MAIN_INFO_LOCALTAX_CALC2==1) - { - print $langs->trans("CalcLocaltax2").' - '.$langs->trans("CalcLocaltax2Desc"); - } - elseif($conf->global->MAIN_INFO_LOCALTAX_CALC2==2) - { - print $langs->trans("CalcLocaltax3").' - '.$langs->trans("CalcLocaltax3Desc"); - } - - print '
"; - print "
global->FACTURE_LOCAL_TAX2_OPTION) || $conf->global->FACTURE_LOCAL_TAX2_OPTION == "localtax2off")?" checked":"")."> ".$langs->transcountry("LocalTax2IsNotUsed", $mysoc->country_code)."'; - print ""; - print ""; - $example=$langs->transcountry("LocalTax2IsNotUsedExample", $mysoc->country_code); - print ($example!="LocalTax2IsNotUsedExample"?"\n":""); - print "
".$langs->trans("Example").': '.$langs->transcountry("LocalTax2IsNotUsedExample", $mysoc->country_code)."
"; - print "
"; - print "
"; - } - - - // Actions buttons - print '
'; - print ''; - print '
'; } + +print '
'; +print ''; +print '
'; + +print ''; + + // End of page llxFooter(); $db->close(); diff --git a/htdocs/admin/ihm.php b/htdocs/admin/ihm.php index b07a7984e09..df8929fd8fe 100644 --- a/htdocs/admin/ihm.php +++ b/htdocs/admin/ihm.php @@ -224,373 +224,217 @@ print load_fiche_titre($langs->trans("GUISetup"), '', 'title_setup'); print ''.$langs->trans("DisplayDesc")."
\n"; print "
\n"; +//WYSIWYG Editor +require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; -if ($action == 'edit') // Edit +print '
'; +print ''; +print ''; + +clearstatcache(); + +print '
'; +print ''; +print ''; +print ''; +print ''; + +// Default language +print ''; +print ''; +print ''; + +// Multilingual GUI +print ''; +print ''; +print ''; + +print '
'.$langs->trans("Language").' 
'.$langs->trans("DefaultLanguage").''; +print $formadmin->select_language($conf->global->MAIN_LANG_DEFAULT, 'MAIN_LANG_DEFAULT', 1, 0, 0, 0, 0, 'minwidth300', 2); +print ' 
'.$langs->trans("EnableMultilangInterface").''; +print $form->selectyesno('MAIN_MULTILANGS', $conf->global->MAIN_MULTILANGS, 1); +print ' 

'."\n"; + +// Themes and themes options +showSkins(null, 1); +print '
'; + +// Other +print ''; +print ''; +print ''; +print ''; + +// Disable javascript and ajax +print ''; +print ''; +print ''; + +// Max size of lists +print ''; +print ''; +print ''; + +// Max size of short lists on customer card +print ''; +print ''; +print ''; + +// show input border +/* + print ''; + print ''; + print ''; + */ + +// First day for weeks +print ''; +print ''; +print ''; + +// DefaultWorkingDays +print ''; +print ''; +print ''; + +// DefaultWorkingHours +print ''; +print ''; +print ''; + +// Firstname/Name +print ''; +print ''; +print ''; + +// Hide unauthorized button +print ''; +print ''; +print ''; + +// Hide version link +/* + +print ''; +print ''; +print ''; +*/ + +// Show bugtrack link +print ''; +print ''; +print ''; + +// Hide wiki link on login page +$pictohelp=''; +print ''; +print ''; +print ''; + +// Message of the day on home page +$substitutionarray=getCommonSubstitutionArray($langs, 0, array('object','objectamount')); +complete_substitutions_array($substitutionarray, $langs); + +print ''."\n"; + +print '
'.$langs->trans("Miscellaneous").' 
'.$langs->trans("DisableJavascript").''; +print $form->selectyesno('MAIN_DISABLE_JAVASCRIPT', isset($conf->global->MAIN_DISABLE_JAVASCRIPT)?$conf->global->MAIN_DISABLE_JAVASCRIPT:0, 1); +print ' 
'.$langs->trans("DefaultMaxSizeList").' 
'.$langs->trans("DefaultMaxSizeShortList").' 
'.$langs->trans("showInputBorder").''; + print $form->selectyesno('main_showInputBorder',isset($conf->global->THEME_ELDY_SHOW_BORDER_INPUT)?$conf->global->THEME_ELDY_SHOW_BORDER_INPUT:0,1); + print ' 
'.$langs->trans("WeekStartOnDay").''; +print $formother->select_dayofweek((isset($conf->global->MAIN_START_WEEK)?$conf->global->MAIN_START_WEEK:'1'), 'MAIN_START_WEEK', 0); +print ' 
'.$langs->trans("DefaultWorkingDays").''; +print ''; +print ' 
'.$langs->trans("DefaultWorkingHours").''; +print ''; +print ' 
'.$langs->trans("FirstnameNamePosition").''; +$array=array(0=>$langs->trans("Firstname").' '.$langs->trans("Lastname"), 1=>$langs->trans("Lastname").' '.$langs->trans("Firstname")); +print $form->selectarray('MAIN_FIRSTNAME_NAME_POSITION', $array, (isset($conf->global->MAIN_FIRSTNAME_NAME_POSITION)?$conf->global->MAIN_FIRSTNAME_NAME_POSITION:0)); +print ' 
'.$langs->trans("ButtonHideUnauthorized").''; +print $form->selectyesno('MAIN_BUTTON_HIDE_UNAUTHORIZED', isset($conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED)?$conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED:0, 1); +print ' 
'.$langs->trans("HideVersionLink").''; +print $form->selectyesno('MAIN_HIDE_VERSION',$conf->global->MAIN_HIDE_VERSION,1); +print ' 
'.$langs->trans("ShowBugTrackLink", $langs->transnoentitiesnoconv("FindBug")).''; +print $form->selectyesno('MAIN_BUGTRACK_ENABLELINK', $conf->global->MAIN_BUGTRACK_ENABLELINK, 1); +print ' 
'.$langs->trans("DisableLinkToHelp", $pictohelp).''; +print $form->selectyesno('MAIN_HELP_DISABLELINK', isset($conf->global->MAIN_HELP_DISABLELINK)?$conf->global->MAIN_HELP_DISABLELINK:0, 1); +print ' 
'; +$texthelp=$langs->trans("FollowingConstantsWillBeSubstituted").'
'; +foreach($substitutionarray as $key => $val) { - //WYSIWYG Editor - require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; - - print ''; - print ''; - print ''; - - clearstatcache(); - - print '
'; - print ''; - print ''; - print ''; - print ''; - - // Default language - print ''; - print ''; - print ''; - - // Multilingual GUI - print ''; - print ''; - print ''; - - print '
'.$langs->trans("Language").' 
'.$langs->trans("DefaultLanguage").''; - print $formadmin->select_language($conf->global->MAIN_LANG_DEFAULT, 'MAIN_LANG_DEFAULT', 1, 0, 0, 0, 0, 'minwidth300', 2); - print ' 
'.$langs->trans("EnableMultilangInterface").''; - print $form->selectyesno('MAIN_MULTILANGS', $conf->global->MAIN_MULTILANGS, 1); - print ' 

'."\n"; - - // Themes and themes options - showSkins(null, 1); - print '
'; - - // Other - print ''; - print ''; - print ''; - print ''; - - // Disable javascript and ajax - print ''; - print ''; - print ''; - - // Max size of lists - print ''; - print ''; - print ''; - - // Max size of short lists on customer card - print ''; - print ''; - print ''; - - // show input border - /* - print ''; - print ''; - print ''; - */ - - // First day for weeks - print ''; - print ''; - print ''; - - // DefaultWorkingDays - print ''; - print ''; - print ''; - - // DefaultWorkingHours - print ''; - print ''; - print ''; - - // Firstname/Name - print ''; - print ''; - print ''; - - // Hide unauthorized button - print ''; - print ''; - print ''; - - // Show logo - print ''; - print ''; - print ''; - - // Hide version link - /* - - print ''; - print ''; - print ''; - */ - - // Show bugtrack link - print ''; - print ''; - print ''; - - // Hide wiki link on login page - $pictohelp=''; - print ''; - print ''; - print ''; - - // Message of the day on home page - $substitutionarray=getCommonSubstitutionArray($langs, 0, array('object','objectamount')); - complete_substitutions_array($substitutionarray, $langs); - - print ''."\n"; - - print '
'.$langs->trans("Parameters").''.$langs->trans("Value").' 
'.$langs->trans("DisableJavascript").''; - print $form->selectyesno('MAIN_DISABLE_JAVASCRIPT', isset($conf->global->MAIN_DISABLE_JAVASCRIPT)?$conf->global->MAIN_DISABLE_JAVASCRIPT:0, 1); - print ' 
'.$langs->trans("DefaultMaxSizeList").' 
'.$langs->trans("DefaultMaxSizeShortList").' 
'.$langs->trans("showInputBorder").''; - print $form->selectyesno('main_showInputBorder',isset($conf->global->THEME_ELDY_SHOW_BORDER_INPUT)?$conf->global->THEME_ELDY_SHOW_BORDER_INPUT:0,1); - print ' 
'.$langs->trans("WeekStartOnDay").''; - print $formother->select_dayofweek((isset($conf->global->MAIN_START_WEEK)?$conf->global->MAIN_START_WEEK:'1'), 'MAIN_START_WEEK', 0); - print ' 
'.$langs->trans("DefaultWorkingDays").''; - print ''; - print ' 
'.$langs->trans("DefaultWorkingHours").''; - print ''; - print ' 
'.$langs->trans("FirstnameNamePosition").''; - $array=array(0=>$langs->trans("Firstname").' '.$langs->trans("Lastname"), 1=>$langs->trans("Lastname").' '.$langs->trans("Firstname")); - print $form->selectarray('MAIN_FIRSTNAME_NAME_POSITION', $array, (isset($conf->global->MAIN_FIRSTNAME_NAME_POSITION)?$conf->global->MAIN_FIRSTNAME_NAME_POSITION:0)); - print ' 
'.$langs->trans("ButtonHideUnauthorized").''; - print $form->selectyesno('MAIN_BUTTON_HIDE_UNAUTHORIZED', isset($conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED)?$conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED:0, 1); - print ' 
'.$langs->trans("EnableShowLogo").''; - print $form->selectyesno('MAIN_SHOW_LOGO', $conf->global->MAIN_SHOW_LOGO, 1); - print ' 
'.$langs->trans("HideVersionLink").''; - print $form->selectyesno('MAIN_HIDE_VERSION',$conf->global->MAIN_HIDE_VERSION,1); - print ' 
'.$langs->trans("ShowBugTrackLink", $langs->transnoentitiesnoconv("FindBug")).''; - print $form->selectyesno('MAIN_BUGTRACK_ENABLELINK', $conf->global->MAIN_BUGTRACK_ENABLELINK, 1); - print ' 
'.$langs->trans("DisableLinkToHelp", $pictohelp).''; - print $form->selectyesno('MAIN_HELP_DISABLELINK', isset($conf->global->MAIN_HELP_DISABLELINK)?$conf->global->MAIN_HELP_DISABLELINK:0, 1); - print ' 
'; - $texthelp=$langs->trans("FollowingConstantsWillBeSubstituted").'
'; - foreach($substitutionarray as $key => $val) - { - $texthelp.=$key.'
'; - } - print $form->textwithpicto($langs->trans("MessageOfDay"), $texthelp, 1, 'help', '', 0, 2, 'tooltipmessageofday'); - - print '
'; - - $doleditor = new DolEditor('main_motd', (isset($conf->global->MAIN_MOTD)?$conf->global->MAIN_MOTD:''), '', 142, 'dolibarr_notes', 'In', false, true, true, ROWS_4, '90%'); - $doleditor->Create(); - - print '
'."\n"; - - print '
'; - - // Other - print ''; - print ''; - print ''; - print ''; - - // Message on login page - $substitutionarray=getCommonSubstitutionArray($langs, 0, array('object','objectamount','user')); - complete_substitutions_array($substitutionarray, $langs); - print ''."\n"; - - // Hide helpcenter link on login page - print ''; - print ''; - print ''; - - // Background - print ''; - - print '
'.$langs->trans("LoginPage").' 
'; - $texthelp=$langs->trans("FollowingConstantsWillBeSubstituted").'
'; - foreach($substitutionarray as $key => $val) - { - $texthelp.=$key.'
'; - } - print $form->textwithpicto($langs->trans("MessageLogin"), $texthelp, 1, 'help', '', 0, 2, 'tooltipmessagelogin'); - print '
'; - $doleditor = new DolEditor('main_home', (isset($conf->global->MAIN_HOME)?$conf->global->MAIN_HOME:''), '', 142, 'dolibarr_notes', 'In', false, true, true, ROWS_4, '90%'); - $doleditor->Create(); - print '
'.$langs->trans("DisableLinkToHelpCenter").''; - print $form->selectyesno('MAIN_HELPCENTER_DISABLELINK', isset($conf->global->MAIN_HELPCENTER_DISABLELINK)?$conf->global->MAIN_HELPCENTER_DISABLELINK:0, 1); - print ' 
'; - print '
'; - print ''; - if (! empty($conf->global->MAIN_LOGIN_BACKGROUND)) { - print ''.img_delete($langs->trans("Delete")).''; - if (file_exists($conf->mycompany->dir_output.'/logos/'.$conf->global->MAIN_LOGIN_BACKGROUND)) { - print '   '; - print ''; - } - } else { - print ''; - } - print '
'; - print '
'."\n"; - - - print '
'; - print '
'; - print ''; - print '   '; - print ''; - print '
'; - print '
'; - - print ''; + $texthelp.=$key.'
'; } -else // Show +print $form->textwithpicto($langs->trans("MessageOfDay"), $texthelp, 1, 'help', '', 0, 2, 'tooltipmessageofday'); + +print '
'; + +$doleditor = new DolEditor('main_motd', (isset($conf->global->MAIN_MOTD)?$conf->global->MAIN_MOTD:''), '', 142, 'dolibarr_notes', 'In', false, true, true, ROWS_4, '90%'); +$doleditor->Create(); + +print '
'."\n"; + +print '
'; + +// Other +print ''; +print ''; +print ''; +print ''; + +// Message on login page +$substitutionarray=getCommonSubstitutionArray($langs, 0, array('object','objectamount','user')); +complete_substitutions_array($substitutionarray, $langs); +print ''."\n"; + +// Hide helpcenter link on login page +print ''; +print ''; +print ''; + +// Background +print ''; + +print '
'.$langs->trans("LoginPage").' 
'; +$texthelp=$langs->trans("FollowingConstantsWillBeSubstituted").'
'; +foreach($substitutionarray as $key => $val) { - // Language - print ''; - print ''; - - print ''; - print ''; - print ""; - - print ''; - print ''; - print ""; - - print '
'.$langs->trans("Language").'  
'.$langs->trans("DefaultLanguage").''; - $s=picto_from_langcode($conf->global->MAIN_LANG_DEFAULT); - print ($s?$s.' ':''); - print ($conf->global->MAIN_LANG_DEFAULT=='auto'?$langs->trans("AutoDetectLang"):$langs->trans("Language_".$conf->global->MAIN_LANG_DEFAULT)); - print ''; - if ($user->admin && $conf->global->MAIN_LANG_DEFAULT!='auto') print info_admin($langs->trans("SubmitTranslation".($conf->global->MAIN_LANG_DEFAULT=='en_US'?'ENUS':''), $conf->global->MAIN_LANG_DEFAULT), 1); - print '
'.$langs->trans("EnableMultilangInterface").'' . yn($conf->global->MAIN_MULTILANGS) . ' 

'."\n"; - - - // Themes - showSkins(null, 0); - print '
'; - - - // Other - print ''; - print ''; - - // Disable javascript/ajax - print '"; - print ""; - - // Max size of lists - print ''; - print ""; - - // Max size of short lists - print ''; - print ""; - - // First day for weeks - print ''; - print ''; - - // DefaultWorkingDays - print ''; - print ''; - - // DefaultWorkingHours - print ''; - print ''; - - // Firstname / Name position - print ''; - print ''; - - // Hide unauthorized button - print ''; - - // Show logo - print ''; - print ""; - - // Hide version link - /* - print ''; - print ''; - */ - - // Show bugtrack link - print '"; - print ""; - - // Link to wiki help - $pictohelp=''; - print ''; - - // Message of the day - print ''."\n"; - - print '
'.$langs->trans("Parameters").''.$langs->trans("Value").'
'.$langs->trans("DisableJavascript").''; - print yn($conf->global->MAIN_DISABLE_JAVASCRIPT); - print '   -   '.$langs->trans("DisableJavascriptNote").''; - print "
'.$langs->trans("DefaultMaxSizeList").'' . $conf->global->MAIN_SIZE_LISTE_LIMIT . '
'.$langs->trans("DefaultMaxSizeShortList").'' . $conf->global->MAIN_SIZE_SHORTLIST_LIMIT . '
'.$langs->trans("WeekStartOnDay").''; - print $langs->trans("Day".(isset($conf->global->MAIN_START_WEEK)?$conf->global->MAIN_START_WEEK:'1')); - print '
'.$langs->trans("DefaultWorkingDays").''; - print isset($conf->global->MAIN_DEFAULT_WORKING_DAYS)?$conf->global->MAIN_DEFAULT_WORKING_DAYS:'1-5'; - print '
'.$langs->trans("DefaultWorkingHours").''; - print isset($conf->global->MAIN_DEFAULT_WORKING_HOURS)?$conf->global->MAIN_DEFAULT_WORKING_HOURS:'9-18'; - print '
'.$langs->trans("FirstnameNamePosition").''; - if (empty($conf->global->MAIN_FIRSTNAME_NAME_POSITION)) { print $langs->trans("Firstname").' '.$langs->trans("Lastname"); } - else { print $langs->trans("Lastname").' '.$langs->trans("Firstname"); } - print '
'.$langs->trans("ButtonHideUnauthorized").''; - print yn((isset($conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED)?$conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED:0), 1); - print '
'.$langs->trans("EnableShowLogo").'' . yn($conf->global->MAIN_SHOW_LOGO) . '
'.$langs->trans("HideVersionLink").''; - print yn($conf->global->MAIN_HIDE_VERSION); - print '
'.$langs->trans("ShowBugTrackLink", $langs->transnoentitiesnoconv("FindBug")).''; - print yn($conf->global->MAIN_BUGTRACK_ENABLELINK)."
'.$langs->trans("DisableLinkToHelp", $pictohelp).''; - print yn((isset($conf->global->MAIN_HELP_DISABLELINK)?$conf->global->MAIN_HELP_DISABLELINK:0), 1); - print '
'.$langs->trans("MessageOfDay").''; - if (isset($conf->global->MAIN_MOTD)) print dol_htmlcleanlastbr($conf->global->MAIN_MOTD); - else print ' '; - print '
'."\n"; - - print '
'; - - // Login page - print '
'; - - print ''; - print ''; - - // Message login - print ''."\n"; - - // Link to help center - print ''; - - // Background login - print ''; - - print '
'.$langs->trans("LoginPage").'
'.$langs->trans("MessageLogin").''; - if (isset($conf->global->MAIN_HOME)) print dol_htmlcleanlastbr($conf->global->MAIN_HOME); - else print ' '; - print '
'.$langs->trans("DisableLinkToHelpCenter").''; - print yn((isset($conf->global->MAIN_HELPCENTER_DISABLELINK)?$conf->global->MAIN_HELPCENTER_DISABLELINK:0), 1); - print '
'.$langs->trans("BackgroundImageLogin").''; - print '
'; - print $conf->global->MAIN_LOGIN_BACKGROUND; - if ($conf->global->MAIN_LOGIN_BACKGROUND && is_file($conf->mycompany->dir_output.'/logos/'.$conf->global->MAIN_LOGIN_BACKGROUND)) - { - print ''; - } - else - { - print ''; - } - print '
'; - print '
'."\n"; - print '
'; - - print '
'; - print ''.$langs->trans("Modify").''; - print '
'; + $texthelp.=$key.'
'; } +print $form->textwithpicto($langs->trans("MessageLogin"), $texthelp, 1, 'help', '', 0, 2, 'tooltipmessagelogin'); +print '
'; +$doleditor = new DolEditor('main_home', (isset($conf->global->MAIN_HOME)?$conf->global->MAIN_HOME:''), '', 142, 'dolibarr_notes', 'In', false, true, true, ROWS_4, '90%'); +$doleditor->Create(); +print '
'.$langs->trans("DisableLinkToHelpCenter").''; +print $form->selectyesno('MAIN_HELPCENTER_DISABLELINK', isset($conf->global->MAIN_HELPCENTER_DISABLELINK)?$conf->global->MAIN_HELPCENTER_DISABLELINK:0, 1); +print ' 
'; +print '
'; +$disabled = ''; +if (! empty($conf->global->ADD_UNSPLASH_LOGIN_BACKGROUND)) $disabled = ' disabled="disabled"'; +print ''; +if ($disabled) +{ + print '('.$langs->trans("DisabledByOptionADD_UNSPLASH_LOGIN_BACKGROUND").') '; +} +if (! empty($conf->global->MAIN_LOGIN_BACKGROUND)) { + print ''.img_delete($langs->trans("Delete")).''; + if (file_exists($conf->mycompany->dir_output.'/logos/'.$conf->global->MAIN_LOGIN_BACKGROUND)) { + print '   '; + print ''; + } +} else { + print ''; +} +print '
'; +print '
'."\n"; + + +print '
'; +print '
'; +print ''; +print '
'; + +print ''; + // End of page llxFooter(); diff --git a/htdocs/core/lib/security2.lib.php b/htdocs/core/lib/security2.lib.php index 07eecf0f352..c81ea9d98d7 100644 --- a/htdocs/core/lib/security2.lib.php +++ b/htdocs/core/lib/security2.lib.php @@ -282,8 +282,11 @@ if (! function_exists('dol_loginfunction')) // Set jquery theme $dol_loginmesg = (! empty($_SESSION["dol_loginmesg"])?$_SESSION["dol_loginmesg"]:''); - $favicon=dol_buildpath('/theme/'.$conf->theme.'/img/favicon.ico', 1); + + $favicon = DOL_URL_ROOT.'/theme/common/dolibarr_logo_256x256.png'; + if (! empty($mysoc->logo_squarred_mini)) $favicon = DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/thumbs/'.$mysoc->logo_squarred_mini); if (! empty($conf->global->MAIN_FAVICON_URL)) $favicon=$conf->global->MAIN_FAVICON_URL; + $jquerytheme = 'base'; if (! empty($conf->global->MAIN_USE_JQUERY_THEME)) $jquerytheme = $conf->global->MAIN_USE_JQUERY_THEME; diff --git a/htdocs/core/lib/usergroups.lib.php b/htdocs/core/lib/usergroups.lib.php index b4140ba90a7..66698be76cc 100644 --- a/htdocs/core/lib/usergroups.lib.php +++ b/htdocs/core/lib/usergroups.lib.php @@ -348,23 +348,21 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) } else { - print ''.$langs->trans("DefaultSkin").''; + $dirthemestring = ''; + foreach($dirthemes as $dirtheme) + { + $dirthemestring .= '"'.$dirtheme.'" '; + } + + print ''; + print $form->textwithpicto($langs->trans("DefaultSkin"), $langs->trans("ThemeDir").' : '.$dirthemestring); + print ''; print ''; $url='https://www.dolistore.com/4-skins'; print ''; print $langs->trans('DownloadMoreSkins'); print ''; print ''; - - print ''; - print ''.$langs->trans("ThemeDir").''; - print ''; - foreach($dirthemes as $dirtheme) - { - echo '"'.$dirtheme.'" '; - } - print ''; - print ''; } print ''; @@ -422,6 +420,31 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) print ''; + // Show logo + if ($foruserprofile) + { + // Nothing + } + else + { + // Show logo + print ''.$langs->trans("EnableShowLogo").''; + if ($edit) + { + print $form->selectyesno('MAIN_SHOW_LOGO', $conf->global->MAIN_SHOW_LOGO, 1); + } + else + { + print yn($conf->global->MAIN_SHOW_LOGO); + } + print ''; + print ''; + /* + print ''.$langs->trans("EnableShowLogo").'' . yn($conf->global->MAIN_SHOW_LOGO) . ''; + print "";*/ + } + + // TopMenuDisableImages if ($foruserprofile) { diff --git a/htdocs/core/menus/standard/auguria.lib.php b/htdocs/core/menus/standard/auguria.lib.php index 66f4dac2a44..39e2150280e 100644 --- a/htdocs/core/menus/standard/auguria.lib.php +++ b/htdocs/core/menus/standard/auguria.lib.php @@ -39,10 +39,11 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/menubase.class.php'; */ function print_auguria_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = 0, $mode = '') { - global $user,$conf,$langs,$dolibarr_main_db_name; + global $user,$conf,$langs,$mysoc; + global $dolibarr_main_db_name; - $mainmenu=$_SESSION["mainmenu"]; - $leftmenu=$_SESSION["leftmenu"]; + $mainmenu=(empty($_SESSION["mainmenu"])?'':$_SESSION["mainmenu"]); + $leftmenu=(empty($_SESSION["leftmenu"])?'':$_SESSION["leftmenu"]); $id='mainmenu'; $listofmodulesforexternal=explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL); @@ -53,17 +54,17 @@ function print_auguria_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout if (empty($noout)) print_start_menu_array_auguria(); - global $usemenuhider; - $usemenuhider = 1; + global $usemenuhider; + $usemenuhider = 1; - // Show/Hide vertical menu - if ($mode != 'jmobile' && $mode != 'topnb' && $usemenuhider && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) + // Show/Hide vertical menu. The hamburger icon for .menuhider action. + if ($mode != 'jmobile' && $mode != 'topnb' && $usemenuhider && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { $showmode=1; $classname = 'class="tmenu menuhider"'; $idsel='menu'; - $menu->add('#', '', 0, $showmode, $atarget, "xxx", '', 0, $id, $idsel, $classname); + $menu->add('#', (! empty($conf->global->THEME_TOPMENU_DISABLE_IMAGE) ? '' : ''), 0, $showmode, $atarget, "xxx", '', 0, $id, $idsel, $classname); } $num = count($newTabMenu); @@ -125,20 +126,44 @@ function print_auguria_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout $menu->liste = dol_sort_array($menu->liste, 'position'); // Output menu entries - foreach($menu->liste as $menkey => $menuval) + // Show logo company + if (empty($conf->global->MAIN_MENU_INVERT) && empty($noout) && ! empty($conf->global->MAIN_SHOW_LOGO) && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { - if (empty($noout)) print_start_menu_entry_auguria($menuval['idsel'], $menuval['classname'], $menuval['enabled']); - if (empty($noout)) print_text_menu_entry_auguria($menuval['titre'], $menuval['enabled'], ($menuval['url']!='#'?DOL_URL_ROOT:'').$menuval['url'], $menuval['id'], $menuval['idsel'], $menuval['classname'], ($menuval['target']?$menuval['target']:$atarget)); - if (empty($noout)) print_end_menu_entry_auguria($menuval['enabled']); + //$mysoc->logo_mini=(empty($conf->global->MAIN_INFO_SOCIETE_LOGO_MINI)?'':$conf->global->MAIN_INFO_SOCIETE_LOGO_MINI); + $mysoc->logo_squarred_mini=(empty($conf->global->MAIN_INFO_SOCIETE_LOGO_SQUARRED_MINI)?'':$conf->global->MAIN_INFO_SOCIETE_LOGO_SQUARRED_MINI); + if (! empty($mysoc->logo_squarred_mini) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_squarred_mini)) + { + $urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/thumbs/'.$mysoc->logo_squarred_mini); + } + else + { + $urllogo=DOL_URL_ROOT.'/theme/dolibarr_logo_squarred.png'; + } + $title=$langs->trans("GoIntoSetupToChangeLogo"); + + print "\n".''."\n"; + print_start_menu_entry_auguria('companylogo', 'class="tmenu tmenucompanylogo"', 1); + + print ''."\n"; + + print_end_menu_entry_auguria(4); + } + + if (empty($noout)) { + foreach($menu->liste as $menuval) + { + print_start_menu_entry_auguria($menuval['idsel'], $menuval['classname'], $menuval['enabled']); + print_text_menu_entry_auguria($menuval['titre'], $menuval['enabled'], ($menuval['url']!='#'?DOL_URL_ROOT:'').$menuval['url'], $menuval['id'], $menuval['idsel'], $menuval['classname'], ($menuval['target']?$menuval['target']:$atarget)); + print_end_menu_entry_auguria($menuval['enabled']); + } } $showmode=1; - if (empty($noout)) print_start_menu_entry_auguria('', 'class="tmenuend"', $showmode); - if (empty($noout)) print_end_menu_entry_auguria($showmode); - - if (empty($noout)) print_end_menu_array_auguria(); - - print "\n"; + if (empty($noout)) { + print_start_menu_entry_auguria('', 'class="tmenuend"', $showmode); + print_end_menu_entry_auguria($showmode); + print_end_menu_array_auguria(); + } return 0; } @@ -193,16 +218,16 @@ function print_text_menu_entry_auguria($text, $showmode, $url, $id, $idsel, $cla if ($showmode == 1) { - print ''; + print ''; print '
'; print '
'; - print ''; + print ''; print ''; print $text; print ''; print ''; } - if ($showmode == 2) + elseif ($showmode == 2) { print '
'; print ''; @@ -244,17 +269,18 @@ function print_end_menu_array_auguria() /** * Core function to output left menu auguria + * Fill &$menu (example with $forcemainmenu='home' $forceleftmenu='all', return left menu tree of Home) * * @param DoliDB $db Database handler - * @param array $menu_array_before Table of menu entries to show before entries of menu handler - * @param array $menu_array_after Table of menu entries to show after entries of menu handler + * @param array $menu_array_before Table of menu entries to show before entries of menu handler (menu->liste filled with menu->add) + * @param array $menu_array_after Table of menu entries to show after entries of menu handler (menu->liste filled with menu->add) * @param array $tabMenu If array with menu entries already loaded, we put this array here (in most cases, it's empty) * @param Menu $menu Object Menu to return back list of menu entries * @param int $noout Disable output (Initialise &$menu only). * @param string $forcemainmenu 'x'=Force mainmenu to mainmenu='x' - * @param string $forceleftmenu 'all'=Force leftmenu to '' (= all) + * @param string $forceleftmenu 'all'=Force leftmenu to '' (= all). If value come being '', we change it to value in session and 'none' if not defined in session. * @param array $moredata An array with more data to output - * @return int Nb of entries + * @return int Nb of menu entries */ function print_left_auguria_menu($db, $menu_array_before, $menu_array_after, &$tabMenu, &$menu, $noout = 0, $forcemainmenu = '', $forceleftmenu = '', $moredata = null) { @@ -268,35 +294,6 @@ function print_left_auguria_menu($db, $menu_array_before, $menu_array_after, &$t global $usemenuhider; $usemenuhider = 0; - // Show logo company - if (empty($noout) && ! empty($conf->global->MAIN_SHOW_LOGO) && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) - { - $mysoc->logo_mini=(empty($conf->global->MAIN_INFO_SOCIETE_LOGO_MINI)?'':$conf->global->MAIN_INFO_SOCIETE_LOGO_MINI); - $mysoc->logo_squarred_mini=(empty($conf->global->MAIN_INFO_SOCIETE_LOGO_SQUARRED_MINI)?'':$conf->global->MAIN_INFO_SOCIETE_LOGO_SQUARRED_MINI); - if (! empty($mysoc->logo_squarred_mini) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_squarred_mini)) - { - $urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/thumbs/'.$mysoc->logo_squarred_mini); - } - elseif (! empty($mysoc->logo_mini) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini)) - { - $urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/thumbs/'.$mysoc->logo_mini); - } - else - { - $urllogo=DOL_URL_ROOT.'/theme/dolibarr_logo_squarred.png'; - } - $title=$langs->trans("GoIntoSetupToChangeLogo"); - print "\n".''."\n"; - print ''."\n"; - } - if (is_array($moredata) && ! empty($moredata['searchform'])) // searchform can contains select2 code or link to show old search form or link to switch on search page { print "\n"; @@ -355,9 +352,9 @@ function print_left_auguria_menu($db, $menu_array_before, $menu_array_after, &$t $db->free($resql); } - if (! empty($conf->accounting->enabled) && !empty($user->rights->accounting->mouvements->lire) && $mainmenu == 'accountancy') // Entry in accountancy journal for each bank account + if (! empty($conf->accounting->enabled) && !empty($user->rights->accounting->comptarapport->lire) && $mainmenu == 'accountancy') // Entry in accountancy journal for each bank account { - $newmenu->add('', $langs->trans("Journalization"), 0, $user->rights->accounting->comptarapport->lire, '', 'accountancy', 'accountancy'); + $newmenu->add('', $langs->trans("RegistrationInAccounting"), 1, $user->rights->accounting->comptarapport->lire, '', 'accountancy', 'accountancy'); // Multi journal $sql = "SELECT rowid, code, label, nature"; @@ -390,7 +387,7 @@ function print_left_auguria_menu($db, $menu_array_before, $menu_array_after, &$t if ($objp->nature == 9) $nature="hasnew"; // To enable when page exists - if (! empty($conf->global->ACCOUNTANCY_SHOW_DEVELOP_JOURNAL)) + if (empty($conf->global->ACCOUNTANCY_SHOW_DEVELOP_JOURNAL)) { if ($nature == 'various' || $nature == 'hasnew' || $nature == 'inventory') $nature=''; } @@ -399,7 +396,7 @@ function print_left_auguria_menu($db, $menu_array_before, $menu_array_after, &$t { $langs->load('accountancy'); $journallabel=$langs->transnoentities($objp->label); // Labels in this table are set by loading llx_accounting_abc.sql. Label can be 'ACCOUNTING_SELL_JOURNAL', 'InventoryJournal', ... - if (empty($leftmenu) || preg_match('/accountancy/', $leftmenu)) $newmenu->add('/accountancy/journal/'.$nature.'journal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal='.$objp->rowid, $journallabel, 2, $user->rights->accounting->comptarapport->lire); + $newmenu->add('/accountancy/journal/'.$nature.'journal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal='.$objp->rowid, $journallabel, 2, $user->rights->accounting->comptarapport->lire); } $i++; } @@ -444,7 +441,7 @@ function print_left_auguria_menu($db, $menu_array_before, $menu_array_after, &$t */ } - if ($conf->ftp->enabled && $mainmenu == 'ftp') // Entry for FTP + if (! empty($conf->ftp->enabled) && $mainmenu == 'ftp') // Entry for FTP { $MAXFTP=20; $i=1; diff --git a/htdocs/core/menus/standard/auguria_menu.php b/htdocs/core/menus/standard/auguria_menu.php index c4622f2d6ee..b3c5814240c 100644 --- a/htdocs/core/menus/standard/auguria_menu.php +++ b/htdocs/core/menus/standard/auguria_menu.php @@ -111,15 +111,18 @@ class MenuManager $tabMenu=array(); $menuArbo = new Menubase($this->db, 'auguria'); $menuArbo->menuLoad($mainmenu, $leftmenu, $this->type_user, 'auguria', $tabMenu); - $this->tabMenu=$tabMenu; - } + //var_dump($tabMenu); + + //if ($forcemainmenu == 'all') { var_dump($this->tabMenu); exit; } + } /** * Show menu + * Menu defined in sql tables were stored into $this->tabMenu BEFORE this is called. * - * @param string $mode 'top', 'left', 'jmobile' (used to get full xml ul/li menu) + * @param string $mode 'top', 'topnb', 'left', 'jmobile' (used to get full xml ul/li menu) * @param array $moredata An array with more data to output * @return int 0 or nb of top menu entries if $mode = 'topnb' */ @@ -138,9 +141,18 @@ class MenuManager require_once DOL_DOCUMENT_ROOT.'/core/class/menu.class.php'; $this->menu=new Menu(); - if ($mode == 'top') print_auguria_menu($this->db, $this->atarget, $this->type_user, $this->tabMenu, $this->menu, 0, $mode); - if ($mode == 'left') print_left_auguria_menu($this->db, $this->menu_array, $this->menu_array_after, $this->tabMenu, $this->menu, 0, '', '', $moredata); - + if (empty($conf->global->MAIN_MENU_INVERT)) + { + if ($mode == 'top') print_auguria_menu($this->db, $this->atarget, $this->type_user, $this->tabMenu, $this->menu, 0, $mode); + if ($mode == 'left') print_left_auguria_menu($this->db, $this->menu_array, $this->menu_array_after, $this->tabMenu, $this->menu, 0, '', '', $moredata); + } + else + { + $conf->global->MAIN_SHOW_LOGO=0; + if ($mode == 'top') print_left_auguria_menu($this->db, $this->menu_array, $this->menu_array_after, $this->tabMenu, $this->menu, 0); + if ($mode == 'left') print_auguria_menu($this->db, $this->atarget, $this->type_user, $this->tabMenu, $this->menu, 0, $mode); + } + if ($mode == 'topnb') { print_auguria_menu($this->db, $this->atarget, $this->type_user, $this->tabMenu, $this->menu, 1, $mode); @@ -315,5 +327,8 @@ class MenuManager } unset($this->menu); + + //print 'xx'.$mode; + return 0; } } diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index d1ec07a2152..c72ac79334a 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -478,7 +478,7 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = // Show logo company if (empty($conf->global->MAIN_MENU_INVERT) && empty($noout) && ! empty($conf->global->MAIN_SHOW_LOGO) && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { - $mysoc->logo_mini=(empty($conf->global->MAIN_INFO_SOCIETE_LOGO_MINI)?'':$conf->global->MAIN_INFO_SOCIETE_LOGO_MINI); + //$mysoc->logo_mini=(empty($conf->global->MAIN_INFO_SOCIETE_LOGO_MINI)?'':$conf->global->MAIN_INFO_SOCIETE_LOGO_MINI); $mysoc->logo_squarred_mini=(empty($conf->global->MAIN_INFO_SOCIETE_LOGO_SQUARRED_MINI)?'':$conf->global->MAIN_INFO_SOCIETE_LOGO_SQUARRED_MINI); $logoContainerAdditionalClass = 'backgroundforcompanylogo'; @@ -490,10 +490,10 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = { $urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/thumbs/'.$mysoc->logo_squarred_mini); } - elseif (! empty($mysoc->logo_mini) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini)) + /*elseif (! empty($mysoc->logo_mini) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini)) { $urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/thumbs/'.$mysoc->logo_mini); - } + }*/ else { $urllogo=DOL_URL_ROOT.'/theme/dolibarr_logo_squarred.png'; @@ -636,7 +636,7 @@ function print_end_menu_array() * @param string $forcemainmenu 'x'=Force mainmenu to mainmenu='x' * @param string $forceleftmenu 'all'=Force leftmenu to '' (= all). If value come being '', we change it to value in session and 'none' if not defined in session. * @param array $moredata An array with more data to output - * @return int nb of menu entries + * @return int Nb of menu entries */ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabMenu, &$menu, $noout = 0, $forcemainmenu = '', $forceleftmenu = '', $moredata = null) { diff --git a/htdocs/core/menus/standard/eldy_menu.php b/htdocs/core/menus/standard/eldy_menu.php index d8a47d45c68..8389db029be 100644 --- a/htdocs/core/menus/standard/eldy_menu.php +++ b/htdocs/core/menus/standard/eldy_menu.php @@ -64,6 +64,8 @@ class MenuManager */ public function loadMenu($forcemainmenu = '', $forceleftmenu = '') { + global $conf, $user, $langs; + // On sauve en session le menu principal choisi if (isset($_GET["mainmenu"])) $_SESSION["mainmenu"]=$_GET["mainmenu"]; if (isset($_GET["idmenu"])) $_SESSION["idmenu"]=$_GET["idmenu"]; @@ -117,7 +119,7 @@ class MenuManager /** * Show menu. - * Module defined in sql tables were stored into $this->tabMenu BEFORE this is called. + * Menu defined in sql tables were stored into $this->tabMenu BEFORE this is called. * * @param string $mode 'top', 'topnb', 'left', 'jmobile' (used to get full xml ul/li menu) * @param array $moredata An array with more data to output diff --git a/htdocs/install/mysql/migration/10.0.0-11.0.0.sql b/htdocs/install/mysql/migration/10.0.0-11.0.0.sql index 1948ce28a57..a857898f5dc 100644 --- a/htdocs/install/mysql/migration/10.0.0-11.0.0.sql +++ b/htdocs/install/mysql/migration/10.0.0-11.0.0.sql @@ -76,6 +76,8 @@ ALTER TABLE llx_holiday_extrafields ADD INDEX idx_holiday_extrafields (fk_object ALTER TABLE llx_societe_rib MODIFY label varchar(200); +ALTER TABLE llx_societe ADD COLUMN logo_squarred varchar(255); + insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('USER_SENTBYMAIL','Email sent','Executed when an email is sent from user card','user',300); create table llx_entrepot_extrafields diff --git a/htdocs/install/mysql/tables/llx_societe.sql b/htdocs/install/mysql/tables/llx_societe.sql index 4db88defc68..f312015a662 100644 --- a/htdocs/install/mysql/tables/llx_societe.sql +++ b/htdocs/install/mysql/tables/llx_societe.sql @@ -107,6 +107,7 @@ create table llx_societe supplier_order_min_amount double(24,8) DEFAULT NULL, -- min amount for supplier orders default_lang varchar(6), -- default language logo varchar(255) DEFAULT NULL, + logo_squarred varchar(255) DEFAULT NULL, canvas varchar(32) DEFAULT NULL, -- type of canvas if used (null by default) fk_entrepot integer DEFAULT 0, -- if we need a link between third party and warehouse webservices_url varchar(255), -- supplier webservice url diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index afce2e4fa34..58cd78e102b 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1070,6 +1070,9 @@ CompanyCountry=Country CompanyCurrency=Main currency CompanyObject=Object of the company Logo=Logo +LogoDesc=Main logo of company. Will be used into generated documents (PDF, ...) +LogoSquarred=Logo (squarred) +LogoSquarredDesc=Must be a squarred icon (width = height). This logo will be used as the favorite icon or other need like for the top menu bar (if not disabled into display setup). DoNotSuggestPaymentMode=Do not suggest NoActiveBankAccountDefined=No active bank account defined OwnerOfBankAccount=Owner of bank account %s @@ -1115,7 +1118,7 @@ LogEventDesc=Enable logging for specific security events. Administrators the log AreaForAdminOnly=Setup parameters can be set by administrator users only. SystemInfoDesc=System information is miscellaneous technical information you get in read only mode and visible for administrators only. SystemAreaForAdminOnly=This area is available to administrator users only. Dolibarr user permissions cannot change this restriction. -CompanyFundationDesc=Edit the information of the company/entity. Click on "%s" or "%s" button at the bottom of the page. +CompanyFundationDesc=Edit the information of the company/entity. Click on "%s" button at the bottom of the page. AccountantDesc=If you have an external accountant/bookkeeper, you can edit here its information. AccountantFileNumber=Accountant code DisplayDesc=Parameters affecting the look and behaviour of Dolibarr can be modified here. diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 2d612f5808d..b7bef1aa46a 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1195,7 +1195,7 @@ function top_httphead($contenttype = 'text/html', $forcenocache = 0) */ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arrayofjs = '', $arrayofcss = '', $disablejmobile = 0, $disablenofollow = 0) { - global $db, $conf, $langs, $user, $hookmanager; + global $db, $conf, $langs, $user, $mysoc, $hookmanager; top_httphead(); @@ -1224,15 +1224,17 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr print ''."\n"; // Favicon - $favicon = DOL_MAIN_URL_ROOT . '/theme/'.$conf->theme.'/img/favicon.ico'; + $favicon = DOL_URL_ROOT.'/theme/common/dolibarr_logo_256x256.png'; + if (! empty($mysoc->logo_squarred_mini)) $favicon = DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/thumbs/'.$mysoc->logo_squarred_mini); if (! empty($conf->global->MAIN_FAVICON_URL)) $favicon=$conf->global->MAIN_FAVICON_URL; if (empty($conf->dol_use_jmobile)) print ''."\n"; // Not required into an Android webview + //if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) print ''."\n"; //if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) print ''."\n"; //if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) print ''."\n"; // Mobile appli like icon - $manifest = DOL_MAIN_URL_ROOT . '/theme/'.$conf->theme.'/manifest.json.php'; + $manifest = DOL_URL_ROOT . '/theme/'.$conf->theme.'/manifest.json.php'; if(!empty($manifest)){ print ''."\n"; } @@ -1614,9 +1616,6 @@ function top_menu($head, $title = '', $target = '', $disablejs = 0, $disablehead print '