mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Fix: Change access to $conf->global to function getDolGlobal (automatique)
This commit is contained in:
parent
04c2317761
commit
fcd4c4e429
|
|
@ -103,7 +103,7 @@ class AccountancyExport
|
|||
|
||||
$this->db = $db;
|
||||
$this->separator = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV;
|
||||
$this->end_line = empty($conf->global->ACCOUNTING_EXPORT_ENDLINE) ? "\n" : ($conf->global->ACCOUNTING_EXPORT_ENDLINE == 1 ? "\n" : "\r\n");
|
||||
$this->end_line = empty($conf->global->ACCOUNTING_EXPORT_ENDLINE) ? "\n" : (getDolGlobalInt('ACCOUNTING_EXPORT_ENDLINE') == 1 ? "\n" : "\r\n");
|
||||
|
||||
$hookmanager->initHooks(array('accountancyexport'));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ if (isModEnabled('accounting')) {
|
|||
|
||||
print load_fiche_titre($langs->trans("AccountancyArea"), $resultboxes['selectboxlist'], 'accountancy', 0, '', '', $showtutorial);
|
||||
|
||||
if (!empty($conf->global->INVOICE_USE_SITUATION) && $conf->global->INVOICE_USE_SITUATION == 1) {
|
||||
if (getDolGlobalInt('INVOICE_USE_SITUATION') == 1) {
|
||||
print info_admin($langs->trans("SorryThisModuleIsNotCompatibleWithTheExperimentalFeatureOfSituationInvoices"));
|
||||
print "<br>";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1262,7 +1262,7 @@ if (empty($action) || $action == 'view') {
|
|||
if (empty($accounttoshow) || $accounttoshow == 'NotDefined') {
|
||||
if ($tabtype[$key] == 'unknown') {
|
||||
// We will accept writing, but into a waiting account
|
||||
if (empty($conf->global->ACCOUNTING_ACCOUNT_SUSPENSE) || $conf->global->ACCOUNTING_ACCOUNT_SUSPENSE == '-1') {
|
||||
if (empty($conf->global->ACCOUNTING_ACCOUNT_SUSPENSE) || getDolGlobalString('ACCOUNTING_ACCOUNT_SUSPENSE') == '-1') {
|
||||
$accounttoshow = '<span class="error small">'.$langs->trans('UnknownAccountForThirdpartyAndWaitingAccountNotDefinedBlocking').'</span>';
|
||||
} else {
|
||||
$accounttoshow = '<span class="warning small">'.$langs->trans('UnknownAccountForThirdparty', length_accountg($conf->global->ACCOUNTING_ACCOUNT_SUSPENSE)).'</span>'; // We will use a waiting account
|
||||
|
|
|
|||
|
|
@ -529,7 +529,7 @@ if (empty($action) || $action == 'view') {
|
|||
journalHead($nom, $nomlink, $period, $periodlink, $description, $builddate, $exportlink, array('action' => ''), '', $varlink);
|
||||
|
||||
// Button to write into Ledger
|
||||
if (empty($conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT) || $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT == '-1') {
|
||||
if (empty($conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT) || getDolGlobalString('SALARIES_ACCOUNTING_ACCOUNT_PAYMENT') == '-1') {
|
||||
print '<br><div class="warning">'.img_warning().' '.$langs->trans("SomeMandatoryStepsOfSetupWereNotDone");
|
||||
$desc = ' : '.$langs->trans("AccountancyAreaDescMisc", 4, '{link}');
|
||||
$desc = str_replace('{link}', '<strong>'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>', $desc);
|
||||
|
|
@ -541,7 +541,7 @@ if (empty($action) || $action == 'view') {
|
|||
if (!empty($conf->global->ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL) && $in_bookkeeping == 'notyet') {
|
||||
print '<input type="button" class="butAction" name="exportcsv" value="'.$langs->trans("ExportDraftJournal").'" onclick="launch_export();" />';
|
||||
}
|
||||
if (empty($conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT) || $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT == '-1') {
|
||||
if (empty($conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT) || getDolGlobalString('SALARIES_ACCOUNTING_ACCOUNT_PAYMENT') == '-1') {
|
||||
print '<input type="button" class="butActionRefused classfortooltip" title="'.dol_escape_htmltag($langs->trans("SomeMandatoryStepsOfSetupWereNotDone")).'" value="'.$langs->trans("WriteBookKeeping").'" />';
|
||||
} else {
|
||||
if ($in_bookkeeping == 'notyet') {
|
||||
|
|
|
|||
|
|
@ -165,20 +165,20 @@ if ($reload) {
|
|||
$form = new Form($db);
|
||||
|
||||
if ($object->nature == 2) {
|
||||
$some_mandatory_steps_of_setup_were_not_done = $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER == "" || $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER == '-1';
|
||||
$account_accounting_not_defined = $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER == "" || $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER == '-1';
|
||||
$some_mandatory_steps_of_setup_were_not_done = getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER') == "" || getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER') == '-1';
|
||||
$account_accounting_not_defined = getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER') == "" || getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER') == '-1';
|
||||
} elseif ($object->nature == 3) {
|
||||
$some_mandatory_steps_of_setup_were_not_done = $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER == "" || $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER == '-1';
|
||||
$account_accounting_not_defined = $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER == "" || $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER == '-1';
|
||||
$some_mandatory_steps_of_setup_were_not_done = getDolGlobalString('ACCOUNTING_ACCOUNT_SUPPLIER') == "" || getDolGlobalString('ACCOUNTING_ACCOUNT_SUPPLIER') == '-1';
|
||||
$account_accounting_not_defined = getDolGlobalString('ACCOUNTING_ACCOUNT_SUPPLIER') == "" || getDolGlobalString('ACCOUNTING_ACCOUNT_SUPPLIER') == '-1';
|
||||
} elseif ($object->nature == 4) {
|
||||
$some_mandatory_steps_of_setup_were_not_done = $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER == "" || $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER == '-1'
|
||||
|| $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER == "" || $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER == '-1'
|
||||
|| empty($conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT) || $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT == '-1';
|
||||
$account_accounting_not_defined = $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER == "" || $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER == '-1'
|
||||
|| $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER == "" || $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER == '-1';
|
||||
$some_mandatory_steps_of_setup_were_not_done = getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER') == "" || getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER') == '-1'
|
||||
|| getDolGlobalString('ACCOUNTING_ACCOUNT_SUPPLIER') == "" || getDolGlobalString('ACCOUNTING_ACCOUNT_SUPPLIER') == '-1'
|
||||
|| empty($conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT) || getDolGlobalString('SALARIES_ACCOUNTING_ACCOUNT_PAYMENT') == '-1';
|
||||
$account_accounting_not_defined = getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER') == "" || getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER') == '-1'
|
||||
|| getDolGlobalString('ACCOUNTING_ACCOUNT_SUPPLIER') == "" || getDolGlobalString('ACCOUNTING_ACCOUNT_SUPPLIER') == '-1';
|
||||
} elseif ($object->nature == 5) {
|
||||
$some_mandatory_steps_of_setup_were_not_done = empty($conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT) || $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT == '-1';
|
||||
$account_accounting_not_defined = empty($conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT) || $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT == '-1';
|
||||
$some_mandatory_steps_of_setup_were_not_done = empty($conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT) || getDolGlobalString('SALARIES_ACCOUNTING_ACCOUNT_PAYMENT') == '-1';
|
||||
$account_accounting_not_defined = empty($conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT) || getDolGlobalString('SALARIES_ACCOUNTING_ACCOUNT_PAYMENT') == '-1';
|
||||
} else {
|
||||
$title = $object->getLibType();
|
||||
$some_mandatory_steps_of_setup_were_not_done = false;
|
||||
|
|
|
|||
|
|
@ -1825,7 +1825,7 @@ class Adherent extends CommonObject
|
|||
}
|
||||
|
||||
$vattouse = 0;
|
||||
if (isset($conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS) && $conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS == 'defaultforfoundationcountry') {
|
||||
if (getDolGlobalString('ADHERENT_VAT_FOR_SUBSCRIPTIONS') == 'defaultforfoundationcountry') {
|
||||
$vattouse = get_default_tva($mysoc, $mysoc, $idprodsubscription);
|
||||
}
|
||||
//print xx".$vattouse." - ".$mysoc." - ".$customer;exit;
|
||||
|
|
|
|||
|
|
@ -854,11 +854,11 @@ if (($action == 'addsubscription' || $action == 'create_thirdparty') && $user->h
|
|||
$bankviainvoice = 1;
|
||||
}
|
||||
} else {
|
||||
if (!empty($conf->global->ADHERENT_BANK_USE) && $conf->global->ADHERENT_BANK_USE == 'bankviainvoice' && isModEnabled('banque') && isModEnabled('societe') && isModEnabled('facture')) {
|
||||
if (getDolGlobalString('ADHERENT_BANK_USE') == 'bankviainvoice' && isModEnabled('banque') && isModEnabled('societe') && isModEnabled('facture')) {
|
||||
$bankviainvoice = 1;
|
||||
} elseif (!empty($conf->global->ADHERENT_BANK_USE) && $conf->global->ADHERENT_BANK_USE == 'bankdirect' && isModEnabled('banque')) {
|
||||
} elseif (getDolGlobalString('ADHERENT_BANK_USE') == 'bankdirect' && isModEnabled('banque')) {
|
||||
$bankdirect = 1;
|
||||
} elseif (!empty($conf->global->ADHERENT_BANK_USE) && $conf->global->ADHERENT_BANK_USE == 'invoiceonly' && isModEnabled('banque') && isModEnabled('societe') && isModEnabled('facture')) {
|
||||
} elseif (getDolGlobalString('ADHERENT_BANK_USE') == 'invoiceonly' && isModEnabled('banque') && isModEnabled('societe') && isModEnabled('facture')) {
|
||||
$invoiceonly = 1;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -753,7 +753,7 @@ print "</tr>\n";
|
|||
|
||||
if ($mysoc->useLocalTax(1)) {
|
||||
// Note: When option is not set, it must not appears as set on on, because there is no default value for this option
|
||||
print '<tr class="oddeven"><td><input type="radio" name="optionlocaltax1" id="lt1" value="localtax1on"'.(($conf->global->FACTURE_LOCAL_TAX1_OPTION == '1' || $conf->global->FACTURE_LOCAL_TAX1_OPTION == "localtax1on") ? " checked" : "").'> <label for="lt1">'.$langs->transcountry("LocalTax1IsUsed", $mysoc->country_code)."</label></td>";
|
||||
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>";
|
||||
print '<td colspan="2">';
|
||||
print '<div class="nobordernopadding">';
|
||||
$tooltiphelp = $langs->transcountry("LocalTax1IsUsedExample", $mysoc->country_code);
|
||||
|
|
@ -771,7 +771,7 @@ if ($mysoc->useLocalTax(1)) {
|
|||
print "</div>";
|
||||
print "</td></tr>\n";
|
||||
|
||||
print '<tr class="oddeven"><td><input type="radio" name="optionlocaltax1" id="nolt1" value="localtax1off"'.((empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) || $conf->global->FACTURE_LOCAL_TAX1_OPTION == "localtax1off") ? " checked" : "").'> <label for="nolt1">'.$langs->transcountry("LocalTax1IsNotUsed", $mysoc->country_code)."</label></td>";
|
||||
print '<tr class="oddeven"><td><input type="radio" name="optionlocaltax1" id="nolt1" value="localtax1off"'.((empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) || getDolGlobalString('FACTURE_LOCAL_TAX1_OPTION') == "localtax1off") ? " checked" : "").'> <label for="nolt1">'.$langs->transcountry("LocalTax1IsNotUsed", $mysoc->country_code)."</label></td>";
|
||||
print '<td colspan="2">';
|
||||
$tooltiphelp = $langs->transcountry("LocalTax1IsNotUsedExample", $mysoc->country_code);
|
||||
$tooltiphelp = ($tooltiphelp != "LocalTax1IsNotUsedExample" ? "<i>".$langs->trans("Example").': '.$langs->transcountry("LocalTax1IsNotUsedExample", $mysoc->country_code)."</i>\n" : "");
|
||||
|
|
@ -797,7 +797,7 @@ print "</tr>\n";
|
|||
|
||||
if ($mysoc->useLocalTax(2)) {
|
||||
// Note: When option is not set, it must not appears as set on on, because there is no default value for this option
|
||||
print '<tr class="oddeven"><td><input type="radio" name="optionlocaltax2" id="lt2" value="localtax2on"'.(($conf->global->FACTURE_LOCAL_TAX2_OPTION == '1' || $conf->global->FACTURE_LOCAL_TAX2_OPTION == "localtax2on") ? " checked" : "").'> <label for="lt2">'.$langs->transcountry("LocalTax2IsUsed", $mysoc->country_code)."</label></td>";
|
||||
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>";
|
||||
print '<td colspan="2">';
|
||||
print '<div class="nobordernopadding">';
|
||||
print '<label for="lt2">'.$langs->transcountry("LocalTax2IsUsedDesc", $mysoc->country_code)."</label>";
|
||||
|
|
@ -812,7 +812,7 @@ if ($mysoc->useLocalTax(2)) {
|
|||
print "</div>";
|
||||
print "</td></tr>\n";
|
||||
|
||||
print '<tr class="oddeven"><td><input type="radio" name="optionlocaltax2" id="nolt2" value="localtax2off"'.((empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) || $conf->global->FACTURE_LOCAL_TAX2_OPTION == "localtax2off") ? " checked" : "").'> <label for="nolt2">'.$langs->transcountry("LocalTax2IsNotUsed", $mysoc->country_code)."</label></td>";
|
||||
print '<tr class="oddeven"><td><input type="radio" name="optionlocaltax2" id="nolt2" value="localtax2off"'.((empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) || getDolGlobalString('FACTURE_LOCAL_TAX2_OPTION') == "localtax2off") ? " checked" : "").'> <label for="nolt2">'.$langs->transcountry("LocalTax2IsNotUsed", $mysoc->country_code)."</label></td>";
|
||||
print '<td colspan="2">';
|
||||
print "<div>";
|
||||
$tooltiphelp = $langs->transcountry("LocalTax2IsNotUsedExample", $mysoc->country_code);
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ print '<tr class="oddeven"><td>'.$langs->trans("GeoIPLibVersion").'</td>';
|
|||
print '<td>';
|
||||
$arrayofvalues = array('php' => 'Native PHP functions', '1' => 'Embedded GeoIP v1', '2' => 'Embedded GeoIP v2');
|
||||
print $form->selectarray('geoipversion', $arrayofvalues, (isset($conf->global->GEOIP_VERSION) ? $conf->global->GEOIP_VERSION : '2'));
|
||||
if ($conf->global->GEOIP_VERSION == 'php') {
|
||||
if (getDolGlobalString('GEOIP_VERSION') == 'php') {
|
||||
if ($geoip) {
|
||||
$version = $geoip->getVersion();
|
||||
}
|
||||
|
|
@ -126,7 +126,7 @@ $gimcdf = getDolGlobalString('GEOIPMAXMIND_COUNTRY_DATAFILE');
|
|||
// Path to database file
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("PathToGeoIPMaxmindCountryDataFile").'</td>';
|
||||
print '<td>';
|
||||
if ($conf->global->GEOIP_VERSION == 'php') {
|
||||
if (getDolGlobalString('GEOIP_VERSION') == 'php') {
|
||||
print 'Using geoip PHP internal functions. Value must be '.geoip_db_filename(GEOIP_COUNTRY_EDITION).' or '.geoip_db_filename(GEOIP_CITY_EDITION_REV1).' or /pathtodatafile/GeoLite2-Country.mmdb<br>';
|
||||
}
|
||||
print '<input type="text" class="minwidth200" name="GEOIPMAXMIND_COUNTRY_DATAFILE" value="'.dol_escape_htmltag(getDolGlobalString('GEOIPMAXMIND_COUNTRY_DATAFILE')).'">';
|
||||
|
|
|
|||
|
|
@ -780,7 +780,7 @@ if ($action == 'edit') {
|
|||
print '</td></tr>';
|
||||
|
||||
|
||||
if ($conf->global->MAIN_MAIL_SENDMODE == 'swiftmailer') {
|
||||
if (getDolGlobalString('MAIN_MAIL_SENDMODE') == 'swiftmailer') {
|
||||
// DKIM
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_MAIL_EMAIL_DKIM_ENABLED").'</td><td>';
|
||||
if (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail'), array('swiftmailer'))) {
|
||||
|
|
|
|||
|
|
@ -334,7 +334,7 @@ if ($action == 'edit') {
|
|||
// Host server
|
||||
|
||||
print '<tr class="oddeven hideifdefault">';
|
||||
if (!$conf->use_javascript_ajax && $linuxlike && $conf->global->MAIN_MAIL_SENDMODE_EMAILING == 'mail') {
|
||||
if (!$conf->use_javascript_ajax && $linuxlike && getDolGlobalString('MAIN_MAIL_SENDMODE_EMAILING') == 'mail') {
|
||||
print '<td>';
|
||||
print $langs->trans("MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike");
|
||||
print '</td><td>';
|
||||
|
|
@ -369,7 +369,7 @@ if ($action == 'edit') {
|
|||
// Port
|
||||
|
||||
print '<tr class="oddeven hideifdefault"><td>';
|
||||
if (!$conf->use_javascript_ajax && $linuxlike && $conf->global->MAIN_MAIL_SENDMODE_EMAILING == 'mail') {
|
||||
if (!$conf->use_javascript_ajax && $linuxlike && getDolGlobalString('MAIN_MAIL_SENDMODE_EMAILING') == 'mail') {
|
||||
print $langs->trans("MAIN_MAIL_SMTP_PORT_NotAvailableOnLinuxLike");
|
||||
print '</td><td>';
|
||||
print '<span class="opacitymedium">'.$langs->trans("SeeLocalSendMailSetup").'</span>';
|
||||
|
|
@ -536,14 +536,14 @@ if ($action == 'edit') {
|
|||
|
||||
if (!empty($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && $conf->global->MAIN_MAIL_SENDMODE_EMAILING != 'default') {
|
||||
// Host server
|
||||
if ($linuxlike && (isset($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && $conf->global->MAIN_MAIL_SENDMODE_EMAILING == 'mail')) {
|
||||
if ($linuxlike && (getDolGlobalString('MAIN_MAIL_SENDMODE_EMAILING') == 'mail')) {
|
||||
print '<tr class="oddeven hideifdefault"><td>'.$langs->trans("MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike").'</td><td>'.$langs->trans("SeeLocalSendMailSetup").'</td></tr>';
|
||||
} else {
|
||||
print '<tr class="oddeven hideifdefault"><td>'.$langs->trans("MAIN_MAIL_SMTP_SERVER", ini_get('SMTP') ?ini_get('SMTP') : $langs->transnoentities("Undefined")).'</td><td>'.(!empty($conf->global->MAIN_MAIL_SMTP_SERVER_EMAILING) ? $conf->global->MAIN_MAIL_SMTP_SERVER_EMAILING : '').'</td></tr>';
|
||||
}
|
||||
|
||||
// Port
|
||||
if ($linuxlike && (isset($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && $conf->global->MAIN_MAIL_SENDMODE_EMAILING == 'mail')) {
|
||||
if ($linuxlike && (getDolGlobalString('MAIN_MAIL_SENDMODE_EMAILING') == 'mail')) {
|
||||
print '<tr class="oddeven hideifdefault"><td>'.$langs->trans("MAIN_MAIL_SMTP_PORT_NotAvailableOnLinuxLike").'</td><td>'.$langs->trans("SeeLocalSendMailSetup").'</td></tr>';
|
||||
} else {
|
||||
print '<tr class="oddeven hideifdefault"><td>'.$langs->trans("MAIN_MAIL_SMTP_PORT", ini_get('smtp_port') ?ini_get('smtp_port') : $langs->transnoentities("Undefined")).'</td><td>'.(!empty($conf->global->MAIN_MAIL_SMTP_PORT_EMAILING) ? $conf->global->MAIN_MAIL_SMTP_PORT_EMAILING : '').'</td></tr>';
|
||||
|
|
@ -622,7 +622,7 @@ if ($action == 'edit') {
|
|||
print dol_get_fiche_end();
|
||||
|
||||
|
||||
if ($conf->global->MAIN_MAIL_SENDMODE_EMAILING == 'mail' && empty($conf->global->MAIN_FIX_FOR_BUGGED_MTA)) {
|
||||
if (getDolGlobalString('MAIN_MAIL_SENDMODE_EMAILING') == 'mail' && empty($conf->global->MAIN_FIX_FOR_BUGGED_MTA)) {
|
||||
print '<br>';
|
||||
/*
|
||||
// Warning 1
|
||||
|
|
@ -662,7 +662,7 @@ if ($action == 'edit') {
|
|||
print '</div>';
|
||||
|
||||
|
||||
if ($conf->global->MAIN_MAIL_SENDMODE_EMAILING == 'mail' && !in_array($action, array('testconnect', 'test', 'testhtml'))) {
|
||||
if (getDolGlobalString('MAIN_MAIL_SENDMODE_EMAILING') == 'mail' && !in_array($action, array('testconnect', 'test', 'testhtml'))) {
|
||||
$text = $langs->trans("WarningPHPMail");
|
||||
print info_admin($text);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -323,7 +323,7 @@ if ($action == 'edit') {
|
|||
// Host server
|
||||
|
||||
print '<tr class="oddeven hideifdefault">';
|
||||
if (!$conf->use_javascript_ajax && $linuxlike && $conf->global->MAIN_MAIL_SENDMODE_TICKET == 'mail') {
|
||||
if (!$conf->use_javascript_ajax && $linuxlike && getDolGlobalString('MAIN_MAIL_SENDMODE_TICKET') == 'mail') {
|
||||
print '<td>';
|
||||
print $langs->trans("MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike");
|
||||
print '</td><td>';
|
||||
|
|
@ -357,7 +357,7 @@ if ($action == 'edit') {
|
|||
// Port
|
||||
|
||||
print '<tr class="oddeven hideifdefault"><td>';
|
||||
if (!$conf->use_javascript_ajax && $linuxlike && $conf->global->MAIN_MAIL_SENDMODE_TICKET == 'mail') {
|
||||
if (!$conf->use_javascript_ajax && $linuxlike && getDolGlobalString('MAIN_MAIL_SENDMODE_TICKET') == 'mail') {
|
||||
print $langs->trans("MAIN_MAIL_SMTP_PORT_NotAvailableOnLinuxLike");
|
||||
print '</td><td>';
|
||||
print '<span class="opacitymedium">'.$langs->trans("SeeLocalSendMailSetup").'</span>';
|
||||
|
|
@ -510,14 +510,14 @@ if ($action == 'edit') {
|
|||
|
||||
if (!empty($conf->global->MAIN_MAIL_SENDMODE_TICKET) && $conf->global->MAIN_MAIL_SENDMODE_TICKET != 'default') {
|
||||
// Host server
|
||||
if ($linuxlike && (isset($conf->global->MAIN_MAIL_SENDMODE_TICKET) && $conf->global->MAIN_MAIL_SENDMODE_TICKET == 'mail')) {
|
||||
if ($linuxlike && (getDolGlobalString('MAIN_MAIL_SENDMODE_TICKET') == 'mail')) {
|
||||
print '<tr class="oddeven hideifdefault"><td>'.$langs->trans("MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike").'</td><td>'.$langs->trans("SeeLocalSendMailSetup").'</td></tr>';
|
||||
} else {
|
||||
print '<tr class="oddeven hideifdefault"><td>'.$langs->trans("MAIN_MAIL_SMTP_SERVER", ini_get('SMTP') ?ini_get('SMTP') : $langs->transnoentities("Undefined")).'</td><td>'.(!empty($conf->global->MAIN_MAIL_SMTP_SERVER_TICKET) ? $conf->global->MAIN_MAIL_SMTP_SERVER_TICKET : '').'</td></tr>';
|
||||
}
|
||||
|
||||
// Port
|
||||
if ($linuxlike && (isset($conf->global->MAIN_MAIL_SENDMODE_TICKET) && $conf->global->MAIN_MAIL_SENDMODE_TICKET == 'mail')) {
|
||||
if ($linuxlike && (getDolGlobalString('MAIN_MAIL_SENDMODE_TICKET') == 'mail')) {
|
||||
print '<tr class="oddeven hideifdefault"><td>'.$langs->trans("MAIN_MAIL_SMTP_PORT_NotAvailableOnLinuxLike").'</td><td>'.$langs->trans("SeeLocalSendMailSetup").'</td></tr>';
|
||||
} else {
|
||||
print '<tr class="oddeven hideifdefault"><td>'.$langs->trans("MAIN_MAIL_SMTP_PORT", ini_get('smtp_port') ?ini_get('smtp_port') : $langs->transnoentities("Undefined")).'</td><td>'.(!empty($conf->global->MAIN_MAIL_SMTP_PORT_TICKET) ? $conf->global->MAIN_MAIL_SMTP_PORT_TICKET : '').'</td></tr>';
|
||||
|
|
@ -581,7 +581,7 @@ if ($action == 'edit') {
|
|||
print dol_get_fiche_end();
|
||||
|
||||
|
||||
if ($conf->global->MAIN_MAIL_SENDMODE_TICKET == 'mail' && empty($conf->global->MAIN_FIX_FOR_BUGGED_MTA)) {
|
||||
if (getDolGlobalString('MAIN_MAIL_SENDMODE_TICKET') == 'mail' && empty($conf->global->MAIN_FIX_FOR_BUGGED_MTA)) {
|
||||
print '<br>';
|
||||
/*
|
||||
// Warning 1
|
||||
|
|
@ -623,7 +623,7 @@ if ($action == 'edit') {
|
|||
print '</div>';
|
||||
|
||||
|
||||
if ($conf->global->MAIN_MAIL_SENDMODE_TICKET == 'mail' && !in_array($action, array('testconnect', 'test', 'testhtml'))) {
|
||||
if (getDolGlobalString('MAIN_MAIL_SENDMODE_TICKET') == 'mail' && !in_array($action, array('testconnect', 'test', 'testhtml'))) {
|
||||
$text = $langs->trans("WarningPHPMail");
|
||||
print info_admin($text);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -274,7 +274,7 @@ print '</form>';
|
|||
|
||||
|
||||
// Pattern for Password Perso
|
||||
if ($conf->global->USER_PASSWORD_GENERATED == "Perso") {
|
||||
if (getDolGlobalString('USER_PASSWORD_GENERATED') == "Perso") {
|
||||
print '<br>';
|
||||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ if (!isset($conf->global->ASTERISK_INDICATIF)) {
|
|||
if (!isset($conf->global->ASTERISK_PORT)) {
|
||||
$conf->global->ASTERISK_PORT = 5038;
|
||||
}
|
||||
if ($conf->global->ASTERISK_INDICATIF == 'NONE') {
|
||||
if (getDolGlobalString('ASTERISK_INDICATIF') == 'NONE') {
|
||||
$conf->global->ASTERISK_INDICATIF = '';
|
||||
}
|
||||
if (!isset($conf->global->ASTERISK_CONTEXT)) {
|
||||
|
|
|
|||
|
|
@ -1777,7 +1777,7 @@ class Account extends CommonObject
|
|||
|
||||
if (!empty($conf->global->BANK_SHOW_ORDER_OPTION)) {
|
||||
if (is_numeric($conf->global->BANK_SHOW_ORDER_OPTION)) {
|
||||
if ($conf->global->BANK_SHOW_ORDER_OPTION == '1') {
|
||||
if (getDolGlobalString('BANK_SHOW_ORDER_OPTION') == '1') {
|
||||
$fieldlists = array(
|
||||
'BankCode',
|
||||
'DeskCode',
|
||||
|
|
|
|||
|
|
@ -422,7 +422,7 @@ if ($action == "create" || $action == "start" || $action == 'close') {
|
|||
}
|
||||
$selectedposnumber = 0;
|
||||
$showempty = 1;
|
||||
if ($conf->global->TAKEPOS_NUM_TERMINALS == '1') {
|
||||
if (getDolGlobalString('TAKEPOS_NUM_TERMINALS') == '1') {
|
||||
$selectedposnumber = 1;
|
||||
$showempty = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1014,9 +1014,9 @@ class Facture extends CommonInvoice
|
|||
// If margin module defined on costprice, we try the costprice
|
||||
// If not defined or if module margin defined and pmp and stock module enabled, we try pmp price
|
||||
// else we get the best supplier price
|
||||
if ($conf->global->MARGIN_TYPE == 'costprice' && !empty($producttmp->cost_price)) {
|
||||
if (getDolGlobalString('MARGIN_TYPE') == 'costprice' && !empty($producttmp->cost_price)) {
|
||||
$buyprice = $producttmp->cost_price;
|
||||
} elseif (isModEnabled('stock') && ($conf->global->MARGIN_TYPE == 'costprice' || $conf->global->MARGIN_TYPE == 'pmp') && !empty($producttmp->pmp)) {
|
||||
} elseif (isModEnabled('stock') && (getDolGlobalString('MARGIN_TYPE') == 'costprice' || getDolGlobalString('MARGIN_TYPE') == 'pmp') && !empty($producttmp->pmp)) {
|
||||
$buyprice = $producttmp->pmp;
|
||||
} else {
|
||||
if ($producttmp->find_min_price_product_fournisseur($_facrec->lines[$i]->fk_product) > 0) {
|
||||
|
|
@ -4569,9 +4569,9 @@ class Facture extends CommonInvoice
|
|||
// Clean parameters (if not defined or using deprecated value)
|
||||
if (empty($conf->global->FACTURE_ADDON)) {
|
||||
$conf->global->FACTURE_ADDON = 'mod_facture_terre';
|
||||
} elseif ($conf->global->FACTURE_ADDON == 'terre') {
|
||||
} elseif (getDolGlobalString('FACTURE_ADDON') == 'terre') {
|
||||
$conf->global->FACTURE_ADDON = 'mod_facture_terre';
|
||||
} elseif ($conf->global->FACTURE_ADDON == 'mercure') {
|
||||
} elseif (getDolGlobalString('FACTURE_ADDON') == 'mercure') {
|
||||
$conf->global->FACTURE_ADDON = 'mod_facture_mercure';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -247,7 +247,7 @@ $arrayfields = array(
|
|||
'f.multicurrency_total_ttc'=>array('label'=>'MulticurrencyAmountTTC', 'checked'=>0, 'enabled'=>(!isModEnabled('multicurrency') ? 0 : 1), 'position'=>292),
|
||||
'multicurrency_dynamount_payed'=>array('label'=>'MulticurrencyAlreadyPaid', 'checked'=>0, 'enabled'=>(!isModEnabled('multicurrency') ? 0 : 1), 'position'=>295),
|
||||
'multicurrency_rtp'=>array('label'=>'MulticurrencyRemainderToPay', 'checked'=>0, 'enabled'=>(!isModEnabled('multicurrency') ? 0 : 1), 'position'=>296), // Not enabled by default because slow
|
||||
'total_pa' => array('label' => ((isset($conf->global->MARGIN_TYPE) && $conf->global->MARGIN_TYPE == '1') ? 'BuyingPrice' : 'CostPrice'), 'checked' => 0, 'position' => 300, 'enabled' => (!isModEnabled('margin') || empty($user->rights->margins->liretous) ? 0 : 1)),
|
||||
'total_pa' => array('label' => ((getDolGlobalString('MARGIN_TYPE') == '1') ? 'BuyingPrice' : 'CostPrice'), 'checked' => 0, 'position' => 300, 'enabled' => (!isModEnabled('margin') || empty($user->rights->margins->liretous) ? 0 : 1)),
|
||||
'total_margin' => array('label' => 'Margin', 'checked' => 0, 'position' => 301, 'enabled' => (!isModEnabled('margin') || empty($user->rights->margins->liretous) ? 0 : 1)),
|
||||
'total_margin_rate' => array('label' => 'MarginRate', 'checked' => 0, 'position' => 302, 'enabled' => (!isModEnabled('margin') || empty($user->rights->margins->liretous) || empty($conf->global->DISPLAY_MARGIN_RATES) ? 0 : 1)),
|
||||
'total_mark_rate' => array('label' => 'MarkRate', 'checked' => 0, 'position' => 303, 'enabled' => (!isModEnabled('margin') || empty($user->rights->margins->liretous) || empty($conf->global->DISPLAY_MARK_RATES) ? 0 : 1)),
|
||||
|
|
|
|||
|
|
@ -56,11 +56,11 @@ if (empty($date_start) || empty($date_end)) { // We define date_start and date_e
|
|||
$date_end = dol_get_last_day($year_start, GETPOST("month"), false);
|
||||
} else {
|
||||
$date_start = dol_get_first_day($year_start, empty($conf->global->SOCIETE_FISCAL_MONTH_START) ? 1 : $conf->global->SOCIETE_FISCAL_MONTH_START, false);
|
||||
if (empty($conf->global->MAIN_INFO_VAT_RETURN) || $conf->global->MAIN_INFO_VAT_RETURN == 2) {
|
||||
if (empty($conf->global->MAIN_INFO_VAT_RETURN) || getDolGlobalInt('MAIN_INFO_VAT_RETURN') == 2) {
|
||||
$date_end = dol_time_plus_duree($date_start, 3, 'm') - 1;
|
||||
} elseif ($conf->global->MAIN_INFO_VAT_RETURN == 3) {
|
||||
} elseif (getDolGlobalInt('MAIN_INFO_VAT_RETURN') == 3) {
|
||||
$date_end = dol_time_plus_duree($date_start, 1, 'y') - 1;
|
||||
} elseif ($conf->global->MAIN_INFO_VAT_RETURN == 1) {
|
||||
} elseif (getDolGlobalInt('MAIN_INFO_VAT_RETURN') == 1) {
|
||||
$date_end = dol_time_plus_duree($date_start, 1, 'm') - 1;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,11 +66,11 @@ if (empty($date_start) || empty($date_end)) { // We define date_start and date_e
|
|||
$date_end = dol_get_last_day($year_start, GETPOST("month", "int"), false);
|
||||
} else {
|
||||
$date_start = dol_get_first_day($year_start, empty($conf->global->SOCIETE_FISCAL_MONTH_START) ? 1 : $conf->global->SOCIETE_FISCAL_MONTH_START, false);
|
||||
if (empty($conf->global->MAIN_INFO_VAT_RETURN) || $conf->global->MAIN_INFO_VAT_RETURN == 2) {
|
||||
if (empty($conf->global->MAIN_INFO_VAT_RETURN) || getDolGlobalInt('MAIN_INFO_VAT_RETURN') == 2) {
|
||||
$date_end = dol_time_plus_duree($date_start, 3, 'm') - 1;
|
||||
} elseif ($conf->global->MAIN_INFO_VAT_RETURN == 3) {
|
||||
} elseif (getDolGlobalInt('MAIN_INFO_VAT_RETURN') == 3) {
|
||||
$date_end = dol_time_plus_duree($date_start, 1, 'y') - 1;
|
||||
} elseif ($conf->global->MAIN_INFO_VAT_RETURN == 1) {
|
||||
} elseif (getDolGlobalInt('MAIN_INFO_VAT_RETURN') == 1) {
|
||||
$date_end = dol_time_plus_duree($date_start, 1, 'm') - 1;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -401,9 +401,9 @@ class RemiseCheque extends CommonObject
|
|||
// Clean parameters (if not defined or using deprecated value)
|
||||
if (empty($conf->global->CHEQUERECEIPTS_ADDON)) {
|
||||
$conf->global->CHEQUERECEIPTS_ADDON = 'mod_chequereceipt_mint';
|
||||
} elseif ($conf->global->CHEQUERECEIPTS_ADDON == 'thyme') {
|
||||
} elseif (getDolGlobalString('CHEQUERECEIPTS_ADDON') == 'thyme') {
|
||||
$conf->global->CHEQUERECEIPTS_ADDON = 'mod_chequereceipt_thyme';
|
||||
} elseif ($conf->global->CHEQUERECEIPTS_ADDON == 'mint') {
|
||||
} elseif (getDolGlobalString('CHEQUERECEIPTS_ADDON') == 'mint') {
|
||||
$conf->global->CHEQUERECEIPTS_ADDON = 'mod_chequereceipt_mint';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1114,9 +1114,9 @@ class Paiement extends CommonObject
|
|||
// Clean parameters (if not defined or using deprecated value)
|
||||
if (empty($conf->global->PAYMENT_ADDON)) {
|
||||
$conf->global->PAYMENT_ADDON = 'mod_payment_cicada';
|
||||
} elseif ($conf->global->PAYMENT_ADDON == 'ant') {
|
||||
} elseif (getDolGlobalString('PAYMENT_ADDON') == 'ant') {
|
||||
$conf->global->PAYMENT_ADDON = 'mod_payment_ant';
|
||||
} elseif ($conf->global->PAYMENT_ADDON == 'cicada') {
|
||||
} elseif (getDolGlobalString('PAYMENT_ADDON') == 'cicada') {
|
||||
$conf->global->PAYMENT_ADDON = 'mod_payment_cicada';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -46,10 +46,10 @@ if (empty($date_start) || empty($date_end)) { // We define date_start and date_e
|
|||
$date_start = dol_get_first_day($year_start, GETPOST("month", 'int'), 'tzserver');
|
||||
$date_end = dol_get_last_day($year_start, GETPOST("month", 'int'), 'tzserver');
|
||||
} else {
|
||||
if (empty($conf->global->MAIN_INFO_VAT_RETURN) || $conf->global->MAIN_INFO_VAT_RETURN == 2) { // quaterly vat, we take last past complete quarter
|
||||
if (empty($conf->global->MAIN_INFO_VAT_RETURN) || getDolGlobalInt('MAIN_INFO_VAT_RETURN') == 2) { // quaterly vat, we take last past complete quarter
|
||||
$date_start = dol_time_plus_duree(dol_get_first_day($year_start, $current_date['mon'], false), -3 - (($current_date['mon'] - $conf->global->SOCIETE_FISCAL_MONTH_START) % 3), 'm');
|
||||
$date_end = dol_time_plus_duree($date_start, 3, 'm') - 1;
|
||||
} elseif ($conf->global->MAIN_INFO_VAT_RETURN == 3) { // yearly vat
|
||||
} elseif (getDolGlobalInt('MAIN_INFO_VAT_RETURN') == 3) { // yearly vat
|
||||
if ($current_date['mon'] < $conf->global->SOCIETE_FISCAL_MONTH_START) {
|
||||
if (($conf->global->SOCIETE_FISCAL_MONTH_START - $current_date['mon']) > 6) { // If period started from less than 6 years, we show past year
|
||||
$year_start--;
|
||||
|
|
@ -61,7 +61,7 @@ if (empty($date_start) || empty($date_end)) { // We define date_start and date_e
|
|||
}
|
||||
$date_start = dol_get_first_day($year_start, $conf->global->SOCIETE_FISCAL_MONTH_START, 'tzserver');
|
||||
$date_end = dol_time_plus_duree($date_start, 1, 'y') - 1;
|
||||
} elseif ($conf->global->MAIN_INFO_VAT_RETURN == 1) { // monthly vat, we take last past complete month
|
||||
} elseif (getDolGlobalInt('MAIN_INFO_VAT_RETURN') == 1) { // monthly vat, we take last past complete month
|
||||
$date_start = dol_time_plus_duree(dol_get_first_day($year_start, $current_date['mon'], false), -1, 'm');
|
||||
$date_end = dol_time_plus_duree($date_start, 1, 'm') - 1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -248,7 +248,7 @@ if (empty($reshook)) {
|
|||
$action = 'create';
|
||||
}
|
||||
|
||||
if (isModEnabled('mailing') && $conf->global->MAILING_CONTACT_DEFAULT_BULK_STATUS == 2 && $object->no_email == -1 && !empty($object->email)) {
|
||||
if (isModEnabled('mailing') && getDolGlobalInt('MAILING_CONTACT_DEFAULT_BULK_STATUS') == 2 && $object->no_email == -1 && !empty($object->email)) {
|
||||
$error++;
|
||||
$errors[] = $langs->trans("ErrorFieldRequired", $langs->transnoentities("No_Email"));
|
||||
$action = 'create';
|
||||
|
|
@ -338,7 +338,7 @@ if (empty($reshook)) {
|
|||
$action = 'edit';
|
||||
}
|
||||
|
||||
if (isModEnabled('mailing') && $conf->global->MAILING_CONTACT_DEFAULT_BULK_STATUS == 2 && GETPOST("no_email", "int") == -1 && !empty(GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL))) {
|
||||
if (isModEnabled('mailing') && getDolGlobalInt('MAILING_CONTACT_DEFAULT_BULK_STATUS') == 2 && GETPOST("no_email", "int") == -1 && !empty(GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL))) {
|
||||
$error++;
|
||||
$errors[] = $langs->trans("ErrorFieldRequired", $langs->transnoentities("No_Email"));
|
||||
$action = 'edit';
|
||||
|
|
@ -759,7 +759,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||
|
||||
// State
|
||||
if (empty($conf->global->SOCIETE_DISABLE_STATE)) {
|
||||
if (!empty($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT) && ($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT == 1 || $conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT == 2)) {
|
||||
if (!empty($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT) && (getDolGlobalInt('MAIN_SHOW_REGION_IN_STATE_SELECT') == 1 || getDolGlobalInt('MAIN_SHOW_REGION_IN_STATE_SELECT') == 2)) {
|
||||
print '<tr><td><label for="state_id">'.$langs->trans('Region-State').'</label></td><td colspan="'.$colspan.'" class="maxwidthonsmartphone">';
|
||||
} else {
|
||||
print '<tr><td><label for="state_id">'.$langs->trans('State').'</label></td><td colspan="'.$colspan.'" class="maxwidthonsmartphone">';
|
||||
|
|
@ -821,7 +821,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||
|
||||
// Unsubscribe
|
||||
if (isModEnabled('mailing')) {
|
||||
if ($conf->use_javascript_ajax && $conf->global->MAILING_CONTACT_DEFAULT_BULK_STATUS == 2) {
|
||||
if ($conf->use_javascript_ajax && getDolGlobalInt('MAILING_CONTACT_DEFAULT_BULK_STATUS') == 2) {
|
||||
print "\n".'<script type="text/javascript">'."\n";
|
||||
print '$(document).ready(function () {
|
||||
$("#email").keyup(function() {
|
||||
|
|
@ -843,7 +843,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||
print '<tr>';
|
||||
print '<td class="noemail"><label for="no_email">'.$langs->trans("No_Email").'</label></td>';
|
||||
print '<td>';
|
||||
print $form->selectyesno('no_email', (GETPOSTISSET("no_email") ? GETPOST("no_email", 'int') : $conf->global->MAILING_CONTACT_DEFAULT_BULK_STATUS), 1, false, ($conf->global->MAILING_CONTACT_DEFAULT_BULK_STATUS == 2));
|
||||
print $form->selectyesno('no_email', (GETPOSTISSET("no_email") ? GETPOST("no_email", 'int') : $conf->global->MAILING_CONTACT_DEFAULT_BULK_STATUS), 1, false, (getDolGlobalInt('MAILING_CONTACT_DEFAULT_BULK_STATUS') == 2));
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
|
@ -1040,7 +1040,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||
|
||||
// State
|
||||
if (empty($conf->global->SOCIETE_DISABLE_STATE)) {
|
||||
if (!empty($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT) && ($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT == 1 || $conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT == 2)) {
|
||||
if (!empty($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT) && (getDolGlobalInt('MAIN_SHOW_REGION_IN_STATE_SELECT') == 1 || getDolGlobalInt('MAIN_SHOW_REGION_IN_STATE_SELECT') == 2)) {
|
||||
print '<tr><td><label for="state_id">'.$langs->trans('Region-State').'</label></td><td colspan="3" class="maxwidthonsmartphone">';
|
||||
} else {
|
||||
print '<tr><td><label for="state_id">'.$langs->trans('State').'</label></td><td colspan="3" class="maxwidthonsmartphone">';
|
||||
|
|
@ -1092,7 +1092,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||
|
||||
// Unsubscribe
|
||||
if (isModEnabled('mailing')) {
|
||||
if ($conf->use_javascript_ajax && isset($conf->global->MAILING_CONTACT_DEFAULT_BULK_STATUS) && $conf->global->MAILING_CONTACT_DEFAULT_BULK_STATUS == 2) {
|
||||
if ($conf->use_javascript_ajax && isset($conf->global->MAILING_CONTACT_DEFAULT_BULK_STATUS) && getDolGlobalInt('MAILING_CONTACT_DEFAULT_BULK_STATUS') == 2) {
|
||||
print "\n".'<script type="text/javascript">'."\n";
|
||||
|
||||
print '
|
||||
|
|
@ -1120,7 +1120,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||
print '<tr>';
|
||||
print '<td class="noemail"><label for="no_email">'.$langs->trans("No_Email").'</label></td>';
|
||||
print '<td>';
|
||||
$useempty = (isset($conf->global->MAILING_CONTACT_DEFAULT_BULK_STATUS) && ($conf->global->MAILING_CONTACT_DEFAULT_BULK_STATUS == 2));
|
||||
$useempty = (getDolGlobalInt('MAILING_CONTACT_DEFAULT_BULK_STATUS') == 2);
|
||||
print $form->selectyesno('no_email', (GETPOSTISSET("no_email") ? GETPOST("no_email", 'int') : $object->no_email), 1, false, $useempty);
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
|
|
|||
|
|
@ -843,7 +843,7 @@ class Contact extends CommonObject
|
|||
$info[$conf->global->LDAP_CONTACT_FIELD_MAIL] = $this->email;
|
||||
}
|
||||
|
||||
if ($conf->global->LDAP_SERVER_TYPE == 'egroupware') {
|
||||
if (getDolGlobalString('LDAP_SERVER_TYPE') == 'egroupware') {
|
||||
$info["objectclass"][4] = "phpgwContact"; // compatibilite egroupware
|
||||
|
||||
$info['uidnumber'] = $this->id;
|
||||
|
|
|
|||
|
|
@ -8773,7 +8773,7 @@ abstract class CommonObject
|
|||
} else {
|
||||
// Get cost price for margin calculation
|
||||
if (!empty($fk_product) && $fk_product > 0) {
|
||||
if (isset($conf->global->MARGIN_TYPE) && $conf->global->MARGIN_TYPE == 'costprice') {
|
||||
if (getDolGlobalString('MARGIN_TYPE') == 'costprice') {
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||
$product = new Product($this->db);
|
||||
$result = $product->fetch($fk_product);
|
||||
|
|
@ -8786,7 +8786,7 @@ abstract class CommonObject
|
|||
} elseif ($product->pmp > 0) {
|
||||
$buyPrice = $product->pmp;
|
||||
}
|
||||
} elseif (isset($conf->global->MARGIN_TYPE) && $conf->global->MARGIN_TYPE == 'pmp') {
|
||||
} elseif (getDolGlobalString('MARGIN_TYPE') == 'pmp') {
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||
$product = new Product($this->db);
|
||||
$result = $product->fetch($fk_product);
|
||||
|
|
|
|||
|
|
@ -182,7 +182,7 @@ trait CommonPeople
|
|||
// If MAIN_FORCE_STATE_INTO_ADDRESS is on, state is already returned previously with getFullAddress
|
||||
if (!in_array($this->country_code, $countriesusingstate) && empty($conf->global->MAIN_FORCE_STATE_INTO_ADDRESS)
|
||||
&& empty($conf->global->SOCIETE_DISABLE_STATE) && $this->state) {
|
||||
if (!empty($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT) && $conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT == 1 && $this->region) {
|
||||
if (getDolGlobalInt('MAIN_SHOW_REGION_IN_STATE_SELECT') == 1 && $this->region) {
|
||||
$out .= ($outdone ? ' - ' : '').$this->region.' - '.$this->state;
|
||||
} else {
|
||||
$out .= ($outdone ? ' - ' : '').$this->state;
|
||||
|
|
|
|||
|
|
@ -908,9 +908,9 @@ class dolReceiptPrinter extends Printer
|
|||
}
|
||||
}
|
||||
// If is DummyPrintConnector send to log to debugging
|
||||
if ($this->printer->connector instanceof DummyPrintConnector || $conf->global->TAKEPOS_PRINT_METHOD == "takeposconnector") {
|
||||
if ($this->printer->connector instanceof DummyPrintConnector || getDolGlobalString('TAKEPOS_PRINT_METHOD') == "takeposconnector") {
|
||||
$data = $this->printer->connector->getData();
|
||||
if ($conf->global->TAKEPOS_PRINT_METHOD == "takeposconnector") {
|
||||
if (getDolGlobalString('TAKEPOS_PRINT_METHOD') == "takeposconnector") {
|
||||
echo rtrim(strtr(base64_encode($data), '+/', '-_'), '=');
|
||||
}
|
||||
dol_syslog($data);
|
||||
|
|
|
|||
|
|
@ -2831,7 +2831,7 @@ class Form
|
|||
if (!empty($conf->global->PRODUCT_SORT_BY_CATEGORY)) {
|
||||
$sql .= " ORDER BY categorie_product_id ";
|
||||
//ASC OR DESC order
|
||||
($conf->global->PRODUCT_SORT_BY_CATEGORY == 1) ? $sql .= "ASC" : $sql .= "DESC";
|
||||
(getDolGlobalInt('PRODUCT_SORT_BY_CATEGORY') == 1) ? $sql .= "ASC" : $sql .= "DESC";
|
||||
} else {
|
||||
$sql .= $this->db->order("p.ref");
|
||||
}
|
||||
|
|
@ -6765,7 +6765,7 @@ class Form
|
|||
// You can set MAIN_POPUP_CALENDAR to 'eldy' or 'jquery'
|
||||
$usecalendar = 'combo';
|
||||
if (!empty($conf->use_javascript_ajax) && (empty($conf->global->MAIN_POPUP_CALENDAR) || $conf->global->MAIN_POPUP_CALENDAR != "none")) {
|
||||
$usecalendar = ((empty($conf->global->MAIN_POPUP_CALENDAR) || $conf->global->MAIN_POPUP_CALENDAR == 'eldy') ? 'jquery' : $conf->global->MAIN_POPUP_CALENDAR);
|
||||
$usecalendar = ((empty($conf->global->MAIN_POPUP_CALENDAR) || getDolGlobalString('MAIN_POPUP_CALENDAR') == 'eldy') ? 'jquery' : $conf->global->MAIN_POPUP_CALENDAR);
|
||||
}
|
||||
|
||||
if ($d) {
|
||||
|
|
|
|||
|
|
@ -329,15 +329,15 @@ class FormCompany extends Form
|
|||
// Si traduction existe, on l'utilise, sinon on prend le libelle par defaut
|
||||
if (
|
||||
!empty($conf->global->MAIN_SHOW_STATE_CODE) &&
|
||||
($conf->global->MAIN_SHOW_STATE_CODE == 1 || $conf->global->MAIN_SHOW_STATE_CODE == 2 || $conf->global->MAIN_SHOW_STATE_CODE === 'all')
|
||||
(getDolGlobalInt('MAIN_SHOW_STATE_CODE') == 1 || getDolGlobalInt('MAIN_SHOW_STATE_CODE') == 2 || $conf->global->MAIN_SHOW_STATE_CODE === 'all')
|
||||
) {
|
||||
if (!empty($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT) && $conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT == 1) {
|
||||
if (getDolGlobalInt('MAIN_SHOW_REGION_IN_STATE_SELECT') == 1) {
|
||||
$out .= $obj->region_name . ' - ' . $obj->code . ' - ' . ($langs->trans($obj->code) != $obj->code ? $langs->trans($obj->code) : ($obj->name != '-' ? $obj->name : ''));
|
||||
} else {
|
||||
$out .= $obj->code . ' - ' . ($langs->trans($obj->code) != $obj->code ? $langs->trans($obj->code) : ($obj->name != '-' ? $obj->name : ''));
|
||||
}
|
||||
} else {
|
||||
if (!empty($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT) && $conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT == 1) {
|
||||
if (getDolGlobalInt('MAIN_SHOW_REGION_IN_STATE_SELECT') == 1) {
|
||||
$out .= $obj->region_name . ' - ' . ($langs->trans($obj->code) != $obj->code ? $langs->trans($obj->code) : ($obj->name != '-' ? $obj->name : ''));
|
||||
} else {
|
||||
$out .= ($langs->trans($obj->code) != $obj->code ? $langs->trans($obj->code) : ($obj->name != '-' ? $obj->name : ''));
|
||||
|
|
|
|||
|
|
@ -247,7 +247,7 @@ class FormMargin
|
|||
print '<tr class="liste_titre">';
|
||||
print '<td class="liste_titre">' . $langs->trans('Margins') . '</td>';
|
||||
print '<td class="liste_titre right">' . $langs->trans('SellingPrice') . '</td>';
|
||||
if ($conf->global->MARGIN_TYPE == "1") {
|
||||
if (getDolGlobalString('MARGIN_TYPE') == "1") {
|
||||
print '<td class="liste_titre right">' . $langs->trans('BuyingPrice') . '</td>';
|
||||
} else {
|
||||
print '<td class="liste_titre right">' . $langs->trans('CostPrice') . '</td>';
|
||||
|
|
|
|||
|
|
@ -495,14 +495,14 @@ class SMTPs
|
|||
if (!is_numeric($conf->global->MAIL_SMTP_USE_FROM_FOR_HELO)) {
|
||||
// If value of MAIL_SMTP_USE_FROM_FOR_HELO is a string, we use it as domain name
|
||||
$hosth = $conf->global->MAIL_SMTP_USE_FROM_FOR_HELO;
|
||||
} elseif ($conf->global->MAIL_SMTP_USE_FROM_FOR_HELO == 1) {
|
||||
} elseif (getDolGlobalInt('MAIL_SMTP_USE_FROM_FOR_HELO') == 1) {
|
||||
// If value of MAIL_SMTP_USE_FROM_FOR_HELO is 1, we use the domain in the from.
|
||||
// So if the from to is 'aaa <bbb@ccc.com>', we will keep 'ccc.com'
|
||||
$hosth = $this->getFrom('addr');
|
||||
$hosth = preg_replace('/^.*</', '', $hosth);
|
||||
$hosth = preg_replace('/>.*$/', '', $hosth);
|
||||
$hosth = preg_replace('/.*@/', '', $hosth);
|
||||
} elseif ($conf->global->MAIL_SMTP_USE_FROM_FOR_HELO == 2) {
|
||||
} elseif (getDolGlobalInt('MAIL_SMTP_USE_FROM_FOR_HELO') == 2) {
|
||||
// If value of MAIL_SMTP_USE_FROM_FOR_HELO is 2, we use the domain in the $dolibarr_main_url_root.
|
||||
global $dolibarr_main_url_root;
|
||||
$hosth = getDomainFromURL($dolibarr_main_url_root, 1);
|
||||
|
|
@ -685,14 +685,14 @@ class SMTPs
|
|||
if (!is_numeric($conf->global->MAIL_SMTP_USE_FROM_FOR_HELO)) {
|
||||
// If value of MAIL_SMTP_USE_FROM_FOR_HELO is a string, we use it as domain name
|
||||
$hosth = $conf->global->MAIL_SMTP_USE_FROM_FOR_HELO;
|
||||
} elseif ($conf->global->MAIL_SMTP_USE_FROM_FOR_HELO == 1) {
|
||||
} elseif (getDolGlobalInt('MAIL_SMTP_USE_FROM_FOR_HELO') == 1) {
|
||||
// If value of MAIL_SMTP_USE_FROM_FOR_HELO is 1, we use the domain in the from.
|
||||
// So if the from to is 'aaa <bbb@ccc.com>', we will keep 'ccc.com'
|
||||
$hosth = $this->getFrom('addr');
|
||||
$hosth = preg_replace('/^.*</', '', $hosth);
|
||||
$hosth = preg_replace('/>.*$/', '', $hosth);
|
||||
$hosth = preg_replace('/.*@/', '', $hosth);
|
||||
} elseif ($conf->global->MAIL_SMTP_USE_FROM_FOR_HELO == 2) {
|
||||
} elseif (getDolGlobalInt('MAIL_SMTP_USE_FROM_FOR_HELO') == 2) {
|
||||
// If value of MAIL_SMTP_USE_FROM_FOR_HELO is 2, we use the domain in the $dolibarr_main_url_root.
|
||||
global $dolibarr_main_url_root;
|
||||
$hosth = getDomainFromURL($dolibarr_main_url_root, 1);
|
||||
|
|
|
|||
|
|
@ -2482,7 +2482,7 @@ function dol_banner_tab($object, $paramid, $morehtml = '', $shownav = 1, $fieldi
|
|||
$morehtmlref .= '</div>';
|
||||
}
|
||||
}
|
||||
if (!empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && ($conf->global->MAIN_SHOW_TECHNICAL_ID == '1' || preg_match('/'.preg_quote($object->element, '/').'/i', $conf->global->MAIN_SHOW_TECHNICAL_ID)) && !empty($object->id)) {
|
||||
if (!empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && (getDolGlobalString('MAIN_SHOW_TECHNICAL_ID') == '1' || preg_match('/'.preg_quote($object->element, '/').'/i', $conf->global->MAIN_SHOW_TECHNICAL_ID)) && !empty($object->id)) {
|
||||
$morehtmlref .= '<div style="clear: both;"></div>';
|
||||
$morehtmlref .= '<div class="refidno opacitymedium">';
|
||||
$morehtmlref .= $langs->trans("TechnicalID").': '.((int) $object->id);
|
||||
|
|
|
|||
|
|
@ -2047,7 +2047,7 @@ function dol_buildlogin($lastname, $firstname)
|
|||
global $conf;
|
||||
|
||||
//$conf->global->MAIN_BUILD_LOGIN_RULE = 'f.lastname';
|
||||
if (!empty($conf->global->MAIN_BUILD_LOGIN_RULE) && $conf->global->MAIN_BUILD_LOGIN_RULE == 'f.lastname') { // f.lastname
|
||||
if (getDolGlobalString('MAIN_BUILD_LOGIN_RULE') == 'f.lastname') { // f.lastname
|
||||
$login = strtolower(dol_string_unaccent(dol_trunc($firstname, 1, 'right', 'UTF-8', 1)));
|
||||
$login .= ($login ? '.' : '');
|
||||
$login .= strtolower(dol_string_unaccent($lastname));
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ function pdf_getFormat(Translate $outputlangs = null, $mode = 'setup')
|
|||
$height = 297;
|
||||
$unit = 'mm';
|
||||
|
||||
if ($mode == 'auto' || empty($conf->global->MAIN_PDF_FORMAT) || $conf->global->MAIN_PDF_FORMAT == 'auto') {
|
||||
if ($mode == 'auto' || empty($conf->global->MAIN_PDF_FORMAT) || getDolGlobalString('MAIN_PDF_FORMAT') == 'auto') {
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
$pdfformat = dol_getDefaultFormat($outputlangs);
|
||||
} else {
|
||||
|
|
@ -1577,9 +1577,9 @@ function pdf_getlinedesc($object, $i, $outputlangs, $hideref = 0, $hidedesc = 0,
|
|||
if ($ref_supplier) {
|
||||
$ref_prodserv .= ($prodser->ref ? ' (' : '').$outputlangs->transnoentitiesnoconv("SupplierRef").' '.$ref_supplier.($prodser->ref ? ')' : '');
|
||||
}
|
||||
} elseif ($conf->global->PDF_HIDE_PRODUCT_REF_IN_SUPPLIER_LINES == 1) {
|
||||
} elseif (getDolGlobalInt('PDF_HIDE_PRODUCT_REF_IN_SUPPLIER_LINES') == 1) {
|
||||
$ref_prodserv = $ref_supplier;
|
||||
} elseif ($conf->global->PDF_HIDE_PRODUCT_REF_IN_SUPPLIER_LINES == 2) {
|
||||
} elseif (getDolGlobalInt('PDF_HIDE_PRODUCT_REF_IN_SUPPLIER_LINES') == 2) {
|
||||
$ref_prodserv = $ref_supplier.' ('.$outputlangs->transnoentitiesnoconv("InternalRef").' '.$prodser->ref.')';
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -234,7 +234,7 @@ function dol_hash($chain, $type = '0')
|
|||
global $conf;
|
||||
|
||||
// No need to add salt for password_hash
|
||||
if (($type == '0' || $type == 'auto') && !empty($conf->global->MAIN_SECURITY_HASH_ALGO) && $conf->global->MAIN_SECURITY_HASH_ALGO == 'password_hash' && function_exists('password_hash')) {
|
||||
if (($type == '0' || $type == 'auto') && !empty($conf->global->MAIN_SECURITY_HASH_ALGO) && getDolGlobalString('MAIN_SECURITY_HASH_ALGO') == 'password_hash' && function_exists('password_hash')) {
|
||||
return password_hash($chain, PASSWORD_DEFAULT);
|
||||
}
|
||||
|
||||
|
|
@ -255,9 +255,9 @@ function dol_hash($chain, $type = '0')
|
|||
return hash('sha256', $chain);
|
||||
} elseif ($type == '6' || $type == 'password_hash') {
|
||||
return password_hash($chain, PASSWORD_DEFAULT);
|
||||
} elseif (!empty($conf->global->MAIN_SECURITY_HASH_ALGO) && $conf->global->MAIN_SECURITY_HASH_ALGO == 'sha1') {
|
||||
} elseif (getDolGlobalString('MAIN_SECURITY_HASH_ALGO') == 'sha1') {
|
||||
return sha1($chain);
|
||||
} elseif (!empty($conf->global->MAIN_SECURITY_HASH_ALGO) && $conf->global->MAIN_SECURITY_HASH_ALGO == 'sha1md5') {
|
||||
} elseif (getDolGlobalString('MAIN_SECURITY_HASH_ALGO') == 'sha1md5') {
|
||||
return sha1(md5($chain));
|
||||
}
|
||||
|
||||
|
|
@ -281,7 +281,7 @@ function dol_verifyHash($chain, $hash, $type = '0')
|
|||
{
|
||||
global $conf;
|
||||
|
||||
if ($type == '0' && !empty($conf->global->MAIN_SECURITY_HASH_ALGO) && $conf->global->MAIN_SECURITY_HASH_ALGO == 'password_hash' && function_exists('password_verify')) {
|
||||
if ($type == '0' && !empty($conf->global->MAIN_SECURITY_HASH_ALGO) && getDolGlobalString('MAIN_SECURITY_HASH_ALGO') == 'password_hash' && function_exists('password_verify')) {
|
||||
if (! empty($hash[0]) && $hash[0] == '$') {
|
||||
return password_verify($chain, $hash);
|
||||
} elseif (dol_strlen($hash) == 32) {
|
||||
|
|
|
|||
|
|
@ -336,14 +336,14 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
|
|||
|
||||
$hoverdisabled = '';
|
||||
if (empty($foruserprofile)) {
|
||||
$hoverdisabled = (isset($conf->global->THEME_ELDY_USE_HOVER) && $conf->global->THEME_ELDY_USE_HOVER == '0');
|
||||
$hoverdisabled = (getDolGlobalString('THEME_ELDY_USE_HOVER') == '0');
|
||||
} else {
|
||||
$hoverdisabled = (is_object($fuser) ? (empty($fuser->conf->THEME_ELDY_USE_HOVER) || $fuser->conf->THEME_ELDY_USE_HOVER == '0') : '');
|
||||
}
|
||||
|
||||
$checkeddisabled = '';
|
||||
if (empty($foruserprofile)) {
|
||||
$checkeddisabled = (isset($conf->global->THEME_ELDY_USE_CHECKED) && $conf->global->THEME_ELDY_USE_CHECKED == '0');
|
||||
$checkeddisabled = (getDolGlobalString('THEME_ELDY_USE_CHECKED') == '0');
|
||||
} else {
|
||||
$checkeddisabled = (is_object($fuser) ? (empty($fuser->conf->THEME_ELDY_USE_CHECKED) || $fuser->conf->THEME_ELDY_USE_CHECKED == '0') : '');
|
||||
}
|
||||
|
|
@ -903,14 +903,14 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
|
|||
//print '<input name="check_THEME_ELDY_USE_HOVER"'.($edit?'':' disabled').' type="checkbox" '.($hoverdisabled?"":" checked").'>';
|
||||
//print ' ('.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')';
|
||||
if ($edit) {
|
||||
if (!empty($conf->global->THEME_ELDY_USE_HOVER) && $conf->global->THEME_ELDY_USE_HOVER == '1') {
|
||||
if (getDolGlobalString('THEME_ELDY_USE_HOVER') == '1') {
|
||||
$color = colorArrayToHex(colorStringToArray($colorbacklinepairhover));
|
||||
} else {
|
||||
$color = colorArrayToHex(colorStringToArray((!empty($conf->global->THEME_ELDY_USE_HOVER) ? $conf->global->THEME_ELDY_USE_HOVER : ''), array()), '');
|
||||
}
|
||||
print $formother->selectColor($color, 'THEME_ELDY_USE_HOVER', '', 1, '', '', 'colorbacklinepairhover', $default).' ';
|
||||
} else {
|
||||
if ($conf->global->THEME_ELDY_USE_HOVER == '1') {
|
||||
if (getDolGlobalString('THEME_ELDY_USE_HOVER') == '1') {
|
||||
$color = colorArrayToHex(colorStringToArray($colorbacklinepairhover));
|
||||
} else {
|
||||
$color = colorArrayToHex(colorStringToArray((!empty($conf->global->THEME_ELDY_USE_HOVER) ? $conf->global->THEME_ELDY_USE_HOVER : ''), array()), '');
|
||||
|
|
@ -951,14 +951,14 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
|
|||
//print '<input name="check_THEME_ELDY_USE_HOVER"'.($edit?'':' disabled').' type="checkbox" '.($hoverdisabled?"":" checked").'>';
|
||||
//print ' ('.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')';
|
||||
if ($edit) {
|
||||
if (!empty($conf->global->THEME_ELDY_USE_CHECKED) && $conf->global->THEME_ELDY_USE_CHECKED == '1') {
|
||||
if (getDolGlobalString('THEME_ELDY_USE_CHECKED') == '1') {
|
||||
$color = 'e6edf0';
|
||||
} else {
|
||||
$color = colorArrayToHex(colorStringToArray((!empty($conf->global->THEME_ELDY_USE_CHECKED) ? $conf->global->THEME_ELDY_USE_CHECKED : ''), array()), '');
|
||||
}
|
||||
print $formother->selectColor($color, 'THEME_ELDY_USE_CHECKED', '', 1, '', '', 'colorbacklinepairchecked', $default).' ';
|
||||
} else {
|
||||
if ($conf->global->THEME_ELDY_USE_CHECKED == '1') {
|
||||
if (getDolGlobalString('THEME_ELDY_USE_CHECKED') == '1') {
|
||||
$color = 'e6edf0';
|
||||
} else {
|
||||
$color = colorArrayToHex(colorStringToArray((!empty($conf->global->THEME_ELDY_USE_CHECKED) ? $conf->global->THEME_ELDY_USE_CHECKED : ''), array()), '');
|
||||
|
|
|
|||
|
|
@ -205,7 +205,7 @@ function check_user_password_ldap($usertotest, $passwordtotest, $entitytotest)
|
|||
|
||||
// On recherche le user dolibarr en fonction de son SID ldap (only for Active Directory)
|
||||
$sid = null;
|
||||
if ($conf->global->LDAP_SERVER_TYPE == "activedirectory") {
|
||||
if (getDolGlobalString('LDAP_SERVER_TYPE') == "activedirectory") {
|
||||
$sid = $ldap->getObjectSid($login);
|
||||
if ($ldapdebug) {
|
||||
print "DEBUG: sid = ".$sid."<br>\n";
|
||||
|
|
|
|||
|
|
@ -214,7 +214,7 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout =
|
|||
if (empty($conf->global->PROJECT_USE_OPPORTUNITIES)) {
|
||||
$titleboth = $langs->trans("Projects");
|
||||
}
|
||||
if (isset($conf->global->PROJECT_USE_OPPORTUNITIES) && $conf->global->PROJECT_USE_OPPORTUNITIES == 2) { // 2 = leads only
|
||||
if (getDolGlobalInt('PROJECT_USE_OPPORTUNITIES') == 2) { // 2 = leads only
|
||||
$titleboth = $langs->trans("Leads");
|
||||
}
|
||||
|
||||
|
|
@ -2228,7 +2228,7 @@ function get_left_menu_projects($mainmenu, &$newmenu, $usemenuhider = 1, $leftme
|
|||
$titleboth = $langs->trans("Projects");
|
||||
$titlenew = $langs->trans("NewProject");
|
||||
}
|
||||
if (isset($conf->global->PROJECT_USE_OPPORTUNITIES) && $conf->global->PROJECT_USE_OPPORTUNITIES == 2) { // 2 = leads only
|
||||
if (getDolGlobalInt('PROJECT_USE_OPPORTUNITIES') == 2) { // 2 = leads only
|
||||
$titleboth = $langs->trans("Leads");
|
||||
$titlenew = $langs->trans("NewLead");
|
||||
}
|
||||
|
|
@ -2239,11 +2239,11 @@ function get_left_menu_projects($mainmenu, &$newmenu, $usemenuhider = 1, $leftme
|
|||
|
||||
if (empty($conf->global->PROJECT_USE_OPPORTUNITIES)) {
|
||||
$newmenu->add("/projet/list.php?leftmenu=projets".($search_project_user ? '&search_project_user='.$search_project_user : '').'&search_status=99', $langs->trans("List"), 1, $showmode, '', 'project', 'list');
|
||||
} elseif (isset($conf->global->PROJECT_USE_OPPORTUNITIES) && $conf->global->PROJECT_USE_OPPORTUNITIES == 1) {
|
||||
} elseif (getDolGlobalInt('PROJECT_USE_OPPORTUNITIES') == 1) {
|
||||
$newmenu->add("/projet/list.php?leftmenu=projets".($search_project_user ? '&search_project_user='.$search_project_user : ''), $langs->trans("List"), 1, $showmode, '', 'project', 'list');
|
||||
$newmenu->add('/projet/list.php?mainmenu=project&leftmenu=list&search_usage_opportunity=1&search_status=99&search_opp_status=openedopp&contextpage=lead', $langs->trans("ListOpenLeads"), 2, $showmode);
|
||||
$newmenu->add('/projet/list.php?mainmenu=project&leftmenu=list&search_opp_status=notopenedopp&search_status=99&contextpage=project', $langs->trans("ListOpenProjects"), 2, $showmode);
|
||||
} elseif (isset($conf->global->PROJECT_USE_OPPORTUNITIES) && $conf->global->PROJECT_USE_OPPORTUNITIES == 2) { // 2 = leads only
|
||||
} elseif (getDolGlobalInt('PROJECT_USE_OPPORTUNITIES') == 2) { // 2 = leads only
|
||||
$newmenu->add('/projet/list.php?mainmenu=project&leftmenu=list&search_usage_opportunity=1&search_status=99', $langs->trans("List"), 2, $showmode);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -325,7 +325,7 @@ class ExportCsv extends ModeleExports
|
|||
$newvalue = str_replace("\n", '\n', $newvalue);
|
||||
if (!empty($conf->global->USE_STRICT_CSV_RULES) && $oldvalue != $newvalue) {
|
||||
// If we must use enclusure on text with CR/LF)
|
||||
if ($conf->global->USE_STRICT_CSV_RULES == 1) {
|
||||
if (getDolGlobalInt('USE_STRICT_CSV_RULES') == 1) {
|
||||
// If we use strict CSV rules (original value must remain but we add quote)
|
||||
$newvalue = $oldvalue;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1215,7 +1215,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||
// Decret n°2099-1299 2022-10-07
|
||||
// French mention : "Option pour le paiement de la taxe d'après les débits"
|
||||
if ($this->emetteur->country_code == 'FR') {
|
||||
if (isset($conf->global->TAX_MODE) && $conf->global->TAX_MODE == 1) {
|
||||
if (getDolGlobalInt('TAX_MODE') == 1) {
|
||||
$pdf->SetXY($this->marge_gauche, $posy);
|
||||
$pdf->writeHTMLCell(80, 5, '', '', $outputlangs->transnoentities("MentionVATDebitOptionIsOn"), 0, 1);
|
||||
|
||||
|
|
|
|||
|
|
@ -1312,7 +1312,7 @@ class pdf_sponge extends ModelePDFFactures
|
|||
// Decret n°2099-1299 2022-10-07
|
||||
// French mention : "Option pour le paiement de la taxe d'après les débits"
|
||||
if ($this->emetteur->country_code == 'FR') {
|
||||
if (isset($conf->global->TAX_MODE) && $conf->global->TAX_MODE == 1) {
|
||||
if (getDolGlobalInt('TAX_MODE') == 1) {
|
||||
$pdf->SetXY($this->marge_gauche, $posy);
|
||||
$pdf->writeHTMLCell(80, 5, '', '', $outputlangs->transnoentities("MentionVATDebitOptionIsOn"), 0, 1);
|
||||
|
||||
|
|
|
|||
|
|
@ -810,7 +810,7 @@ class pdf_vinci extends ModelePDFMo
|
|||
$pdf->MultiCell($largcol2, $tab2_hl, price($object->total_tva), 0, 'R', 1);
|
||||
|
||||
// Total LocalTax1
|
||||
if (!empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION == 'localtax1on' && $object->total_localtax1 > 0) {
|
||||
if (getDolGlobalString('FACTURE_LOCAL_TAX1_OPTION') == 'localtax1on' && $object->total_localtax1 > 0) {
|
||||
$index++;
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transcountrynoentities("TotalLT1", $mysoc->country_code), 0, 'L', 1);
|
||||
|
|
@ -819,7 +819,7 @@ class pdf_vinci extends ModelePDFMo
|
|||
}
|
||||
|
||||
// Total LocalTax2
|
||||
if (!empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION == 'localtax2on' && $object->total_localtax2 > 0) {
|
||||
if (getDolGlobalString('FACTURE_LOCAL_TAX2_OPTION') == 'localtax2on' && $object->total_localtax2 > 0) {
|
||||
$index++;
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transcountrynoentities("TotalLT2", $mysoc->country_code), 0, 'L', 1);
|
||||
|
|
|
|||
|
|
@ -686,7 +686,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
|||
$pdf->MultiCell($largcol2, $tab2_hl, price($object->total_tva, 0, $outputlangs), 0, 'R', 1);
|
||||
|
||||
// Total LocalTax1
|
||||
if (!empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION == 'localtax1on' && $object->total_localtax1 > 0) {
|
||||
if (getDolGlobalString('FACTURE_LOCAL_TAX1_OPTION') == 'localtax1on' && $object->total_localtax1 > 0) {
|
||||
$index++;
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transcountrynoentities("TotalLT1", $mysoc->country_code), 0, 'L', 1);
|
||||
|
|
@ -695,7 +695,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
|||
}
|
||||
|
||||
// Total LocalTax2
|
||||
if (!empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION == 'localtax2on' && $object->total_localtax2 > 0) {
|
||||
if (getDolGlobalString('FACTURE_LOCAL_TAX2_OPTION') == 'localtax2on' && $object->total_localtax2 > 0) {
|
||||
$index++;
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transcountrynoentities("TotalLT2", $mysoc->country_code), 0, 'L', 1);
|
||||
|
|
|
|||
|
|
@ -979,7 +979,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
|
|||
$pdf->MultiCell($largcol2, $tab2_hl, price($object->total_tva), 0, 'R', 1);
|
||||
|
||||
// Total LocalTax1
|
||||
if (!empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION == 'localtax1on' && $object->total_localtax1 > 0) {
|
||||
if (getDolGlobalString('FACTURE_LOCAL_TAX1_OPTION') == 'localtax1on' && $object->total_localtax1 > 0) {
|
||||
$index++;
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transcountrynoentities("TotalLT1", $mysoc->country_code), 0, 'L', 1);
|
||||
|
|
@ -988,7 +988,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
|
|||
}
|
||||
|
||||
// Total LocalTax2
|
||||
if (!empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION == 'localtax2on' && $object->total_localtax2 > 0) {
|
||||
if (getDolGlobalString('FACTURE_LOCAL_TAX2_OPTION') == 'localtax2on' && $object->total_localtax2 > 0) {
|
||||
$index++;
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transcountrynoentities("TotalLT2", $mysoc->country_code), 0, 'L', 1);
|
||||
|
|
|
|||
|
|
@ -858,7 +858,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||
$pdf->MultiCell($largcol2, $tab2_hl, price($object->total_tva), 0, 'R', 1);
|
||||
|
||||
// Total LocalTax1
|
||||
if (!empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION == 'localtax1on' && $object->total_localtax1 > 0) {
|
||||
if (getDolGlobalString('FACTURE_LOCAL_TAX1_OPTION') == 'localtax1on' && $object->total_localtax1 > 0) {
|
||||
$index++;
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transcountrynoentities("TotalLT1", $mysoc->country_code), 0, 'L', 1);
|
||||
|
|
@ -867,7 +867,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||
}
|
||||
|
||||
// Total LocalTax2
|
||||
if (!empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION == 'localtax2on' && $object->total_localtax2 > 0) {
|
||||
if (getDolGlobalString('FACTURE_LOCAL_TAX2_OPTION') == 'localtax2on' && $object->total_localtax2 > 0) {
|
||||
$index++;
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transcountrynoentities("TotalLT2", $mysoc->country_code), 0, 'L', 1);
|
||||
|
|
|
|||
|
|
@ -979,7 +979,7 @@ class pdf_zenith extends ModelePDFSupplierProposal
|
|||
$pdf->MultiCell($largcol2, $tab2_hl, price($object->total_tva), 0, 'R', 1);
|
||||
|
||||
// Total LocalTax1
|
||||
if (!empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION == 'localtax1on' && $object->total_localtax1 > 0) {
|
||||
if (getDolGlobalString('FACTURE_LOCAL_TAX1_OPTION') == 'localtax1on' && $object->total_localtax1 > 0) {
|
||||
$index++;
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transcountrynoentities("TotalLT1", $mysoc->country_code), 0, 'L', 1);
|
||||
|
|
@ -988,7 +988,7 @@ class pdf_zenith extends ModelePDFSupplierProposal
|
|||
}
|
||||
|
||||
// Total LocalTax2
|
||||
if (!empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION == 'localtax2on' && $object->total_localtax2 > 0) {
|
||||
if (getDolGlobalString('FACTURE_LOCAL_TAX2_OPTION') == 'localtax2on' && $object->total_localtax2 > 0) {
|
||||
$index++;
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transcountrynoentities("TotalLT2", $mysoc->country_code), 0, 'L', 1);
|
||||
|
|
|
|||
|
|
@ -114,10 +114,10 @@ class mod_syslog_file extends LogHandler implements LogHandlerInterface
|
|||
|
||||
if (!empty($conf->global->SYSLOG_FILE_ONEPERSESSION)) {
|
||||
if (is_numeric($conf->global->SYSLOG_FILE_ONEPERSESSION)) {
|
||||
if ($conf->global->SYSLOG_FILE_ONEPERSESSION == 1) { // file depend on instance session key name (Note that session name is same for the instance so for all users and is not a per user value)
|
||||
if (getDolGlobalInt('SYSLOG_FILE_ONEPERSESSION') == 1) { // file depend on instance session key name (Note that session name is same for the instance so for all users and is not a per user value)
|
||||
$suffixinfilename .= '_'.session_name();
|
||||
}
|
||||
if ($conf->global->SYSLOG_FILE_ONEPERSESSION == 2) { // file depend on instance session key name + ip so nearly per user
|
||||
if (getDolGlobalInt('SYSLOG_FILE_ONEPERSESSION') == 2) { // file depend on instance session key name + ip so nearly per user
|
||||
$suffixinfilename .= '_'.session_name().'_'.$_SERVER["REMOTE_ADDR"];
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ if ($nolinesbefore) {
|
|||
$colspan++;
|
||||
} else {
|
||||
print '<td class="margininfos linecolmargin1 right">';
|
||||
if ($conf->global->MARGIN_TYPE == "1") {
|
||||
if (getDolGlobalString('MARGIN_TYPE') == "1") {
|
||||
echo $langs->trans('BuyingPrice');
|
||||
} else {
|
||||
echo $langs->trans('CostPrice');
|
||||
|
|
@ -818,7 +818,7 @@ if (!empty($usemargins) && $user->rights->margins->creer) {
|
|||
$('#tva_tx option[value="'+stringforvatrateselection+'"]').prop('selected', true);
|
||||
|
||||
<?php
|
||||
if (!empty($conf->global->PRODUIT_AUTOFILL_DESC) && $conf->global->PRODUIT_AUTOFILL_DESC == 1) {
|
||||
if (getDolGlobalInt('PRODUIT_AUTOFILL_DESC') == 1) {
|
||||
if (getDolGlobalInt('MAIN_MULTILANGS') && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) { ?>
|
||||
var proddesc = data.desc_trans;
|
||||
<?php
|
||||
|
|
@ -880,13 +880,13 @@ if (!empty($usemargins) && $user->rights->margins->creer) {
|
|||
/* setup of margin calculation */
|
||||
var defaultbuyprice = '<?php
|
||||
if (isset($conf->global->MARGIN_TYPE)) {
|
||||
if ($conf->global->MARGIN_TYPE == '1') {
|
||||
if (getDolGlobalString('MARGIN_TYPE') == '1') {
|
||||
print 'bestsupplierprice';
|
||||
}
|
||||
if ($conf->global->MARGIN_TYPE == 'pmp') {
|
||||
if (getDolGlobalString('MARGIN_TYPE') == 'pmp') {
|
||||
print 'pmp';
|
||||
}
|
||||
if ($conf->global->MARGIN_TYPE == 'costprice') {
|
||||
if (getDolGlobalString('MARGIN_TYPE') == 'costprice') {
|
||||
print 'costprice';
|
||||
}
|
||||
} ?>';
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@ if (isset($this->situation_cycle_ref) && $this->situation_cycle_ref) {
|
|||
// Purchase price
|
||||
if ($usemargins && isModEnabled('margin') && empty($user->socid)) {
|
||||
if (!empty($user->rights->margins->creer)) {
|
||||
if ($conf->global->MARGIN_TYPE == "1") {
|
||||
if (getDolGlobalString('MARGIN_TYPE') == "1") {
|
||||
print '<th class="linecolmargin1 margininfos right width75">'.$langs->trans('BuyingPrice').'</th>';
|
||||
} else {
|
||||
print '<th class="linecolmargin1 margininfos right width75">'.$langs->trans('CostPrice').'</th>';
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ print "</tr>";
|
|||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td class="fieldrequired">'.$langs->trans("Label")."</td>";
|
||||
print "<td><input type=\"text\" class=\"flat\" name=\"EXTERNALSITE_LABEL\" value=\"".(GETPOST('EXTERNALSITE_LABEL', 'alpha') ?GETPOST('EXTERNALSITE_LABEL', 'alpha') : ((empty($conf->global->EXTERNALSITE_LABEL) || $conf->global->EXTERNALSITE_LABEL == 'ExternalSite') ? '' : $conf->global->EXTERNALSITE_LABEL))."\" size=\"12\"></td>";
|
||||
print "<td><input type=\"text\" class=\"flat\" name=\"EXTERNALSITE_LABEL\" value=\"".(GETPOST('EXTERNALSITE_LABEL', 'alpha') ?GETPOST('EXTERNALSITE_LABEL', 'alpha') : ((empty($conf->global->EXTERNALSITE_LABEL) || getDolGlobalString('EXTERNALSITE_LABEL') == 'ExternalSite') ? '' : $conf->global->EXTERNALSITE_LABEL))."\" size=\"12\"></td>";
|
||||
print "<td>".$langs->trans("ExampleMyMenuEntry")."</td>";
|
||||
print "</tr>";
|
||||
|
||||
|
|
|
|||
|
|
@ -739,9 +739,9 @@ class FactureFournisseur extends CommonInvoice
|
|||
// If margin module defined on costprice, we try the costprice
|
||||
// If not defined or if module margin defined and pmp and stock module enabled, we try pmp price
|
||||
// else we get the best supplier price
|
||||
if ($conf->global->MARGIN_TYPE == 'costprice' && !empty($producttmp->cost_price)) {
|
||||
if (getDolGlobalString('MARGIN_TYPE') == 'costprice' && !empty($producttmp->cost_price)) {
|
||||
$buyprice = $producttmp->cost_price;
|
||||
} elseif (isModEnabled('stock') && ($conf->global->MARGIN_TYPE == 'costprice' || $conf->global->MARGIN_TYPE == 'pmp') && !empty($producttmp->pmp)) {
|
||||
} elseif (isModEnabled('stock') && (getDolGlobalString('MARGIN_TYPE') == 'costprice' || getDolGlobalString('MARGIN_TYPE') == 'pmp') && !empty($producttmp->pmp)) {
|
||||
$buyprice = $producttmp->pmp;
|
||||
} else {
|
||||
if ($producttmp->find_min_price_product_fournisseur($_facrec->lines[$i]->fk_product) > 0) {
|
||||
|
|
|
|||
|
|
@ -767,9 +767,9 @@ class PaiementFourn extends Paiement
|
|||
// Clean parameters (if not defined or using deprecated value)
|
||||
if (empty($conf->global->SUPPLIER_PAYMENT_ADDON)) {
|
||||
$conf->global->SUPPLIER_PAYMENT_ADDON = 'mod_supplier_payment_bronan';
|
||||
} elseif ($conf->global->SUPPLIER_PAYMENT_ADDON == 'brodator') {
|
||||
} elseif (getDolGlobalString('SUPPLIER_PAYMENT_ADDON') == 'brodator') {
|
||||
$conf->global->SUPPLIER_PAYMENT_ADDON = 'mod_supplier_payment_brodator';
|
||||
} elseif ($conf->global->SUPPLIER_PAYMENT_ADDON == 'bronan') {
|
||||
} elseif (getDolGlobalString('SUPPLIER_PAYMENT_ADDON') == 'bronan') {
|
||||
$conf->global->SUPPLIER_PAYMENT_ADDON = 'mod_supplier_payment_bronan';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@ $langs->loadLangs(array('commercial', 'bills', 'orders', 'contracts'));
|
|||
|
||||
// Dolibarr Working Board with weather
|
||||
if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) {
|
||||
$showweather = (empty($conf->global->MAIN_DISABLE_METEO) || $conf->global->MAIN_DISABLE_METEO == 2) ? 1 : 0;
|
||||
$showweather = (empty($conf->global->MAIN_DISABLE_METEO) || getDolGlobalInt('MAIN_DISABLE_METEO') == 2) ? 1 : 0;
|
||||
|
||||
//Array that contains all WorkboardResponse classes to process them
|
||||
$dashboardlines = array();
|
||||
|
|
@ -614,7 +614,7 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) {
|
|||
}
|
||||
|
||||
if ($showweather && !empty($isIntopOpenedDashBoard)) {
|
||||
$appendClass = (!empty($conf->global->MAIN_DISABLE_METEO) && $conf->global->MAIN_DISABLE_METEO == 2 ? ' hideonsmartphone' : '');
|
||||
$appendClass = (getDolGlobalInt('MAIN_DISABLE_METEO') == 2 ? ' hideonsmartphone' : '');
|
||||
$weather = getWeatherStatus($totallate);
|
||||
|
||||
$text = '';
|
||||
|
|
|
|||
|
|
@ -586,7 +586,7 @@ $conf->file->instance_unique_id = (empty($dolibarr_main_instance_unique_id) ? (e
|
|||
|
||||
$hash_unique_id = md5('dolibarr'.$conf->file->instance_unique_id);
|
||||
|
||||
$out = '<input type="checkbox" name="dolibarrpingno" id="dolibarrpingno"'.((!empty($conf->global->MAIN_FIRST_PING_OK_ID) && $conf->global->MAIN_FIRST_PING_OK_ID == 'disabled') ? '' : ' value="checked" checked="true"').'> ';
|
||||
$out = '<input type="checkbox" name="dolibarrpingno" id="dolibarrpingno"'.((getDolGlobalString('MAIN_FIRST_PING_OK_ID') == 'disabled') ? '' : ' value="checked" checked="true"').'> ';
|
||||
$out .= '<label for="dolibarrpingno">'.$langs->trans("MakeAnonymousPing").'</label>';
|
||||
|
||||
$out .= '<!-- Add js script to manage the uncheck of option to not send the ping -->';
|
||||
|
|
|
|||
|
|
@ -871,7 +871,7 @@ function migrate_paiements_orphelins_1($db, $langs, $conf)
|
|||
$res = 0;
|
||||
$num = count($row);
|
||||
for ($i = 0; $i < $num; $i++) {
|
||||
if ($conf->global->MAIN_FEATURES_LEVEL == 2) {
|
||||
if (getDolGlobalInt('MAIN_FEATURES_LEVEL') == 2) {
|
||||
print '* '.$row[$i]['datec'].' paymentid='.$row[$i]['paymentid'].' pamount='.$row[$i]['pamount'].' fk_bank='.$row[$i]['fk_bank'].' bamount='.$row[$i]['bamount'].' socid='.$row[$i]['socid'].'<br>';
|
||||
}
|
||||
|
||||
|
|
@ -982,7 +982,7 @@ function migrate_paiements_orphelins_2($db, $langs, $conf)
|
|||
|
||||
$res = 0;
|
||||
for ($i = 0; $i < $num; $i++) {
|
||||
if ($conf->global->MAIN_FEATURES_LEVEL == 2) {
|
||||
if (getDolGlobalInt('MAIN_FEATURES_LEVEL') == 2) {
|
||||
print '* '.$row[$i]['datec'].' paymentid='.$row[$i]['paymentid'].' pamount='.$row[$i]['pamount'].' fk_bank='.$row[$i]['fk_bank'].' '.$row[$i]['bamount'].' socid='.$row[$i]['socid'].'<br>';
|
||||
}
|
||||
|
||||
|
|
@ -4373,8 +4373,8 @@ function migrate_reload_menu($db, $langs, $conf)
|
|||
|
||||
// Define list of menu handlers to initialize
|
||||
$listofmenuhandler = array();
|
||||
if ($conf->global->MAIN_MENU_STANDARD == 'auguria_menu' || $conf->global->MAIN_MENU_SMARTPHONE == 'auguria_menu'
|
||||
|| $conf->global->MAIN_MENUFRONT_STANDARD == 'auguria_menu' || $conf->global->MAIN_MENUFRONT_SMARTPHONE == 'auguria_menu') {
|
||||
if (getDolGlobalString('MAIN_MENU_STANDARD') == 'auguria_menu' || getDolGlobalString('MAIN_MENU_SMARTPHONE') == 'auguria_menu'
|
||||
|| getDolGlobalString('MAIN_MENUFRONT_STANDARD') == 'auguria_menu' || getDolGlobalString('MAIN_MENUFRONT_SMARTPHONE') == 'auguria_menu') {
|
||||
$listofmenuhandler['auguria'] = 1; // We set here only dynamic menu handlers
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1303,7 +1303,7 @@ if ((!empty($conf->browser->layout) && $conf->browser->layout == 'phone')
|
|||
) {
|
||||
$conf->dol_optimize_smallscreen = 1;
|
||||
|
||||
if (isset($conf->global->PRODUIT_DESC_IN_FORM) && $conf->global->PRODUIT_DESC_IN_FORM == 1) {
|
||||
if (getDolGlobalInt('PRODUIT_DESC_IN_FORM') == 1) {
|
||||
$conf->global->PRODUIT_DESC_IN_FORM_ACCORDING_TO_DEVICE = 0;
|
||||
}
|
||||
}
|
||||
|
|
@ -1896,7 +1896,7 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr
|
|||
print '<script nonce="'.getNonce().'" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/tablednd/jquery.tablednd.min.js'.($ext ? '?'.$ext : '').'"></script>'."\n";
|
||||
}
|
||||
// Chart
|
||||
if (empty($disableforlogin) && (empty($conf->global->MAIN_JS_GRAPH) || $conf->global->MAIN_JS_GRAPH == 'chart') && !defined('DISABLE_JS_GRAPH')) {
|
||||
if (empty($disableforlogin) && (empty($conf->global->MAIN_JS_GRAPH) || getDolGlobalString('MAIN_JS_GRAPH') == 'chart') && !defined('DISABLE_JS_GRAPH')) {
|
||||
print '<script nonce="'.getNonce().'" src="'.DOL_URL_ROOT.'/includes/nnnick/chartjs/dist/chart.min.js'.($ext ? '?'.$ext : '').'"></script>'."\n";
|
||||
}
|
||||
|
||||
|
|
@ -1936,7 +1936,7 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr
|
|||
|
||||
if (!$disablejs && !empty($conf->use_javascript_ajax)) {
|
||||
// CKEditor
|
||||
if (empty($disableforlogin) && (isModEnabled('fckeditor') && (empty($conf->global->FCKEDITOR_EDITORNAME) || $conf->global->FCKEDITOR_EDITORNAME == 'ckeditor') && !defined('DISABLE_CKEDITOR')) || defined('FORCE_CKEDITOR')) {
|
||||
if (empty($disableforlogin) && (isModEnabled('fckeditor') && (empty($conf->global->FCKEDITOR_EDITORNAME) || getDolGlobalString('FCKEDITOR_EDITORNAME') == 'ckeditor') && !defined('DISABLE_CKEDITOR')) || defined('FORCE_CKEDITOR')) {
|
||||
print '<!-- Includes JS for CKEditor -->'."\n";
|
||||
$pathckeditor = DOL_URL_ROOT.'/includes/ckeditor/ckeditor/';
|
||||
$jsckeditor = 'ckeditor.js';
|
||||
|
|
@ -3235,7 +3235,7 @@ function left_menu($menu_array_before, $helppagename = '', $notused = '', $menu_
|
|||
if (!empty($conf->global->MAIN_BUGTRACK_ENABLELINK)) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
|
||||
if ($conf->global->MAIN_BUGTRACK_ENABLELINK == 'github') {
|
||||
if (getDolGlobalString('MAIN_BUGTRACK_ENABLELINK') == 'github') {
|
||||
$bugbaseurl = 'https://github.com/Dolibarr/dolibarr/issues/new?labels=Bug';
|
||||
$bugbaseurl .= '&title=';
|
||||
$bugbaseurl .= urlencode("Bug: ");
|
||||
|
|
|
|||
|
|
@ -119,21 +119,21 @@ print '<tr class="oddeven">';
|
|||
print '<td>'.$langs->trans("MARGIN_TYPE").'</td>';
|
||||
print '<td>';
|
||||
print ' <input type="radio" name="MARGIN_TYPE" value="1" ';
|
||||
if (isset($conf->global->MARGIN_TYPE) && $conf->global->MARGIN_TYPE == '1') {
|
||||
if (getDolGlobalString('MARGIN_TYPE') == '1') {
|
||||
print 'checked ';
|
||||
}
|
||||
print '/> ';
|
||||
print $langs->trans('MargeType1');
|
||||
print '<br>';
|
||||
print ' <input type="radio" name="MARGIN_TYPE" value="pmp" ';
|
||||
if (isset($conf->global->MARGIN_TYPE) && $conf->global->MARGIN_TYPE == 'pmp') {
|
||||
if (getDolGlobalString('MARGIN_TYPE') == 'pmp') {
|
||||
print 'checked ';
|
||||
}
|
||||
print '/> ';
|
||||
print $langs->trans('MargeType2');
|
||||
print '<br>';
|
||||
print ' <input type="radio" name="MARGIN_TYPE" value="costprice" ';
|
||||
if (isset($conf->global->MARGIN_TYPE) && $conf->global->MARGIN_TYPE == 'costprice') {
|
||||
if (getDolGlobalString('MARGIN_TYPE') == 'costprice') {
|
||||
print 'checked ';
|
||||
}
|
||||
print '/> ';
|
||||
|
|
|
|||
|
|
@ -189,7 +189,7 @@ if (!empty($enddate)) {
|
|||
$sql .= " AND d.buy_price_ht IS NOT NULL";
|
||||
// We should not use this here. Option ForceBuyingPriceIfNull should have effect only when inserting data. Once data is recorded, it must be used as it is for report.
|
||||
// We keep it with value ForceBuyingPriceIfNull = 2 for retroactive effect but results are unpredicable.
|
||||
if (isset($conf->global->ForceBuyingPriceIfNull) && $conf->global->ForceBuyingPriceIfNull == 2) {
|
||||
if (getDolGlobalInt('ForceBuyingPriceIfNull') == 2) {
|
||||
$sql .= " AND d.buy_price_ht <> 0";
|
||||
}
|
||||
//if ($agentid > 0) $sql.= " GROUP BY s.rowid, s.nom, s.code_client, s.client, u.rowid, u.login, u.lastname, u.firstname";
|
||||
|
|
@ -235,7 +235,7 @@ if ($result) {
|
|||
print '<br>';
|
||||
print_barre_liste($langs->trans("MarginDetails"), $page, $_SERVER["PHP_SELF"], "", $sortfield, $sortorder, '', $num, $num, '', 0, '', '', 0, 1);
|
||||
|
||||
if ($conf->global->MARGIN_TYPE == "1") {
|
||||
if (getDolGlobalString('MARGIN_TYPE') == "1") {
|
||||
$labelcostprice = 'BuyingPrice';
|
||||
} else { // value is 'costprice' or 'pmp'
|
||||
$labelcostprice = 'CostPrice';
|
||||
|
|
|
|||
|
|
@ -249,7 +249,7 @@ if ($result) {
|
|||
print '<br>';
|
||||
print_barre_liste($langs->trans("MarginDetails"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, '', 0, '', '', $limit);
|
||||
|
||||
if ($conf->global->MARGIN_TYPE == "1") {
|
||||
if (getDolGlobalString('MARGIN_TYPE') == "1") {
|
||||
$labelcostprice = 'BuyingPrice';
|
||||
} else { // value is 'costprice' or 'pmp'
|
||||
$labelcostprice = 'CostPrice';
|
||||
|
|
|
|||
|
|
@ -261,7 +261,7 @@ if (!empty($enddate)) {
|
|||
$sql .= " AND d.buy_price_ht IS NOT NULL";
|
||||
// We should not use this here. Option ForceBuyingPriceIfNull should have effect only when inserting data. Once data is recorded, it must be used as it is for report.
|
||||
// We keep it with value ForceBuyingPriceIfNull = 2 for retroactive effect but results are unpredicable.
|
||||
if (isset($conf->global->ForceBuyingPriceIfNull) && $conf->global->ForceBuyingPriceIfNull == 2) {
|
||||
if (getDolGlobalInt('ForceBuyingPriceIfNull') == 2) {
|
||||
$sql .= " AND d.buy_price_ht <> 0";
|
||||
}
|
||||
if ($client) {
|
||||
|
|
@ -305,7 +305,7 @@ if ($result) {
|
|||
print '<br>';
|
||||
print_barre_liste($langs->trans("MarginDetails"), $page, $_SERVER["PHP_SELF"], "", $sortfield, $sortorder, '', $num, $num, '', 0, '', '', 0, 1);
|
||||
|
||||
if ($conf->global->MARGIN_TYPE == "1") {
|
||||
if (getDolGlobalString('MARGIN_TYPE') == "1") {
|
||||
$labelcostprice = 'BuyingPrice';
|
||||
} else { // value is 'costprice' or 'pmp'
|
||||
$labelcostprice = 'CostPrice';
|
||||
|
|
|
|||
|
|
@ -217,7 +217,7 @@ if (!empty($enddate)) {
|
|||
$sql .= " AND d.buy_price_ht IS NOT NULL";
|
||||
// We should not use this here. Option ForceBuyingPriceIfNull should have effect only when inserting data. Once data is recorded, it must be used as it is for report.
|
||||
// We keep it with value ForceBuyingPriceIfNull = 2 for retroactive effect but results are unpredicable.
|
||||
if (isset($conf->global->ForceBuyingPriceIfNull) && $conf->global->ForceBuyingPriceIfNull == 2) {
|
||||
if (getDolGlobalInt('ForceBuyingPriceIfNull') == 2) {
|
||||
$sql .= " AND d.buy_price_ht <> 0";
|
||||
}
|
||||
if ($id > 0) {
|
||||
|
|
@ -256,7 +256,7 @@ if ($result) {
|
|||
print_barre_liste($langs->trans("MarginDetails"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $num, '', 0, '', '', 0, 1);
|
||||
|
||||
//var_dump($conf->global->MARGIN_TYPE);
|
||||
if ($conf->global->MARGIN_TYPE == "1") {
|
||||
if (getDolGlobalString('MARGIN_TYPE') == "1") {
|
||||
$labelcostprice = 'BuyingPrice';
|
||||
} else { // value is 'costprice' or 'pmp'
|
||||
$labelcostprice = 'CostPrice';
|
||||
|
|
|
|||
|
|
@ -169,7 +169,7 @@ if ($id > 0 || !empty($ref)) {
|
|||
$sql .= " AND d.buy_price_ht IS NOT NULL";
|
||||
// We should not use this here. Option ForceBuyingPriceIfNull should have effect only when inserting data. Once data is recorded, it must be used as it is for report.
|
||||
// We keep it with value ForceBuyingPriceIfNull = 2 for retroactive effect but results are unpredicable.
|
||||
if (isset($conf->global->ForceBuyingPriceIfNull) && $conf->global->ForceBuyingPriceIfNull == 2) {
|
||||
if (getDolGlobalInt('ForceBuyingPriceIfNull') == 2) {
|
||||
$sql .= " AND d.buy_price_ht <> 0";
|
||||
}
|
||||
$sql .= " GROUP BY s.nom, s.rowid, s.code_client, f.rowid, f.ref, f.total_ht, f.datef, f.paye, f.fk_statut, f.type";
|
||||
|
|
|
|||
|
|
@ -186,7 +186,7 @@ if ($socid > 0) {
|
|||
$sql .= " AND d.buy_price_ht IS NOT NULL";
|
||||
// We should not use this here. Option ForceBuyingPriceIfNull should have effect only when inserting data. Once data is recorded, it must be used as it is for report.
|
||||
// We keep it with value ForceBuyingPriceIfNull = 2 for retroactive effect but results are unpredicable.
|
||||
if (isset($conf->global->ForceBuyingPriceIfNull) && $conf->global->ForceBuyingPriceIfNull == 2) {
|
||||
if (getDolGlobalInt('ForceBuyingPriceIfNull') == 2) {
|
||||
$sql .= " AND d.buy_price_ht <> 0";
|
||||
}
|
||||
$sql .= " GROUP BY s.nom, s.rowid, s.code_client, f.rowid, f.ref, f.total_ht, f.datef, f.paye, f.fk_statut, f.type";
|
||||
|
|
|
|||
|
|
@ -89,17 +89,17 @@ function print_paypal_redirect($paymentAmount, $currencyCodeType, $paymentType,
|
|||
$solutionType = 'Sole';
|
||||
$landingPage = 'Billing';
|
||||
// For payment with Paypal only
|
||||
if ($conf->global->PAYPAL_API_INTEGRAL_OR_PAYPALONLY == 'paypalonly') {
|
||||
if (getDolGlobalString('PAYPAL_API_INTEGRAL_OR_PAYPALONLY') == 'paypalonly') {
|
||||
$solutionType = 'Mark';
|
||||
$landingPage = 'Login';
|
||||
}
|
||||
// For payment with Credit card or Paypal
|
||||
if ($conf->global->PAYPAL_API_INTEGRAL_OR_PAYPALONLY == 'integral') {
|
||||
if (getDolGlobalString('PAYPAL_API_INTEGRAL_OR_PAYPALONLY') == 'integral') {
|
||||
$solutionType = 'Sole';
|
||||
$landingPage = 'Billing';
|
||||
}
|
||||
// For payment with Credit card
|
||||
if ($conf->global->PAYPAL_API_INTEGRAL_OR_PAYPALONLY == 'cconly') {
|
||||
if (getDolGlobalString('PAYPAL_API_INTEGRAL_OR_PAYPALONLY') == 'cconly') {
|
||||
$solutionType = 'Sole';
|
||||
$landingPage = 'Billing';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1406,8 +1406,8 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||
$tooltip .= '<br>'.$langs->trans("GenericMaskCodes3");
|
||||
$tooltip .= '<br>'.$langs->trans("GenericMaskCodes4a", $langs->transnoentities("Batch"), $langs->transnoentities("Batch"));
|
||||
$tooltip .= '<br>'.$langs->trans("GenericMaskCodes5");
|
||||
if ((!empty($conf->global->PRODUCTBATCH_LOT_USE_PRODUCT_MASKS) && $conf->global->PRODUCTBATCH_LOT_ADDON == 'mod_lot_advanced')
|
||||
|| (!empty($conf->global->PRODUCTBATCH_SN_USE_PRODUCT_MASKS) && $conf->global->PRODUCTBATCH_SN_ADDON == 'mod_sn_advanced')) {
|
||||
if ((getDolGlobalString('PRODUCTBATCH_LOT_ADDON') == 'mod_lot_advanced')
|
||||
|| (getDolGlobalString('PRODUCTBATCH_SN_ADDON') == 'mod_sn_advanced')) {
|
||||
print '<tr><td id="mask_option">'.$langs->trans("ManageLotMask").'</td>';
|
||||
$inherited_mask_lot = getDolGlobalString('LOT_ADVANCED_MASK');
|
||||
$inherited_mask_sn = getDolGlobalString('SN_ADVANCED_MASK');
|
||||
|
|
@ -1626,7 +1626,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||
// State
|
||||
if (empty($conf->global->PRODUCT_DISABLE_STATE)) {
|
||||
print '<tr>';
|
||||
if (!empty($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT) && ($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT == 1 || $conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT == 2)) {
|
||||
if (!empty($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT) && (getDolGlobalInt('MAIN_SHOW_REGION_IN_STATE_SELECT') == 1 || getDolGlobalInt('MAIN_SHOW_REGION_IN_STATE_SELECT') == 2)) {
|
||||
print '<td>'.$form->editfieldkey('RegionStateOrigin', 'state_id', '', $object, 0).'</td><td>';
|
||||
} else {
|
||||
print '<td>'.$form->editfieldkey('StateOrigin', 'state_id', '', $object, 0).'</td><td>';
|
||||
|
|
@ -2189,7 +2189,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||
// State
|
||||
if (empty($conf->global->PRODUCT_DISABLE_STATE)) {
|
||||
print '<tr>';
|
||||
if (!empty($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT) && ($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT == 1 || $conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT == 2)) {
|
||||
if (!empty($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT) && (getDolGlobalInt('MAIN_SHOW_REGION_IN_STATE_SELECT') == 1 || getDolGlobalInt('MAIN_SHOW_REGION_IN_STATE_SELECT') == 2)) {
|
||||
print '<td>'.$form->editfieldkey('RegionStateOrigin', 'state_id', '', $object, 0).'</td><td>';
|
||||
} else {
|
||||
print '<td>'.$form->editfieldkey('StateOrigin', 'state_id', '', $object, 0).'</td><td>';
|
||||
|
|
@ -2441,8 +2441,8 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||
print '<tr><td>'.$langs->trans("ManageLotSerial").'</td><td>';
|
||||
print $object->getLibStatut(0, 2);
|
||||
print '</td></tr>';
|
||||
if ((($object->status_batch == '1' && !empty($conf->global->PRODUCTBATCH_LOT_USE_PRODUCT_MASKS) && $conf->global->PRODUCTBATCH_LOT_ADDON == 'mod_lot_advanced')
|
||||
|| ($object->status_batch == '2' && $conf->global->PRODUCTBATCH_SN_ADDON == 'mod_sn_advanced' && !empty($conf->global->PRODUCTBATCH_SN_USE_PRODUCT_MASKS)))) {
|
||||
if ((($object->status_batch == '1' && !empty($conf->global->PRODUCTBATCH_LOT_USE_PRODUCT_MASKS) && getDolGlobalString('PRODUCTBATCH_LOT_ADDON') == 'mod_lot_advanced')
|
||||
|| ($object->status_batch == '2' && getDolGlobalString('PRODUCTBATCH_SN_ADDON') == 'mod_sn_advanced' && !empty($conf->global->PRODUCTBATCH_SN_USE_PRODUCT_MASKS)))) {
|
||||
print '<tr><td>'.$langs->trans("ManageLotMask").'</td><td>';
|
||||
print $object->batch_mask;
|
||||
print '</td></tr>';
|
||||
|
|
|
|||
|
|
@ -394,7 +394,7 @@ $title = $langs->trans("LeadsOrProjects");
|
|||
if (empty($conf->global->PROJECT_USE_OPPORTUNITIES)) {
|
||||
$title = $langs->trans("Projects");
|
||||
}
|
||||
if (isset($conf->global->PROJECT_USE_OPPORTUNITIES) && $conf->global->PROJECT_USE_OPPORTUNITIES == 2) { // 2 = leads only
|
||||
if (getDolGlobalInt('PROJECT_USE_OPPORTUNITIES') == 2) { // 2 = leads only
|
||||
$title = $langs->trans("Leads");
|
||||
}
|
||||
$morejs = array();
|
||||
|
|
|
|||
|
|
@ -2135,12 +2135,12 @@ if ($action != 'dopayment') {
|
|||
print '<div style="line-height: 1em"> </div>';
|
||||
}
|
||||
print '<span class="fa fa-paypal"></span> <input class="" type="submit" id="dopayment_paypal" name="dopayment_paypal" value="'.$langs->trans("PaypalDoPayment").'">';
|
||||
if ($conf->global->PAYPAL_API_INTEGRAL_OR_PAYPALONLY == 'integral') {
|
||||
if (getDolGlobalString('PAYPAL_API_INTEGRAL_OR_PAYPALONLY') == 'integral') {
|
||||
print '<br>';
|
||||
print '<span class="buttonpaymentsmall">'.$langs->trans("CreditOrDebitCard").'</span><span class="buttonpaymentsmall"> - </span>';
|
||||
print '<span class="buttonpaymentsmall">'.$langs->trans("PayPalBalance").'</span>';
|
||||
}
|
||||
if ($conf->global->PAYPAL_API_INTEGRAL_OR_PAYPALONLY == 'paypalonly') {
|
||||
if (getDolGlobalString('PAYPAL_API_INTEGRAL_OR_PAYPALONLY') == 'paypalonly') {
|
||||
//print '<br>';
|
||||
//print '<span class="buttonpaymentsmall">'.$langs->trans("PayPalBalance").'"></span>';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -571,11 +571,11 @@ if ($ispaymentok) {
|
|||
$emetteur_banque = '';
|
||||
// Define default choice for complementary actions
|
||||
$option = '';
|
||||
if (!empty($conf->global->ADHERENT_BANK_USE) && $conf->global->ADHERENT_BANK_USE == 'bankviainvoice' && isModEnabled("banque") && isModEnabled("societe") && isModEnabled('facture')) {
|
||||
if (getDolGlobalString('ADHERENT_BANK_USE') == 'bankviainvoice' && isModEnabled("banque") && isModEnabled("societe") && isModEnabled('facture')) {
|
||||
$option = 'bankviainvoice';
|
||||
} elseif (!empty($conf->global->ADHERENT_BANK_USE) && $conf->global->ADHERENT_BANK_USE == 'bankdirect' && isModEnabled("banque")) {
|
||||
} elseif (getDolGlobalString('ADHERENT_BANK_USE') == 'bankdirect' && isModEnabled("banque")) {
|
||||
$option = 'bankdirect';
|
||||
} elseif (!empty($conf->global->ADHERENT_BANK_USE) && $conf->global->ADHERENT_BANK_USE == 'invoiceonly' && isModEnabled("banque") && isModEnabled("societe") && isModEnabled('facture')) {
|
||||
} elseif (getDolGlobalString('ADHERENT_BANK_USE') == 'invoiceonly' && isModEnabled("banque") && isModEnabled("societe") && isModEnabled('facture')) {
|
||||
$option = 'invoiceonly';
|
||||
}
|
||||
if (empty($option)) {
|
||||
|
|
|
|||
|
|
@ -1307,7 +1307,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||
document.formsoc.action.value="create";
|
||||
document.formsoc.submit();
|
||||
});';
|
||||
if ($conf->global->MAILING_CONTACT_DEFAULT_BULK_STATUS == 2) {
|
||||
if (getDolGlobalInt('MAILING_CONTACT_DEFAULT_BULK_STATUS') == 2) {
|
||||
print '
|
||||
function init_check_no_email(input) {
|
||||
if (input.val()!="") {
|
||||
|
|
@ -1653,7 +1653,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||
|
||||
// Unsubscribe
|
||||
if (isModEnabled('mailing')) {
|
||||
if ($conf->use_javascript_ajax && $conf->global->MAILING_CONTACT_DEFAULT_BULK_STATUS == 2) {
|
||||
if ($conf->use_javascript_ajax && getDolGlobalInt('MAILING_CONTACT_DEFAULT_BULK_STATUS') == 2) {
|
||||
print "\n".'<script type="text/javascript">'."\n";
|
||||
print '$(document).ready(function () {
|
||||
$("#email").keyup(function() {
|
||||
|
|
@ -1675,7 +1675,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||
print '<tr>';
|
||||
print '<td class="noemail"><label for="no_email">'.$langs->trans("No_Email").'</label></td>';
|
||||
print '<td>';
|
||||
print $form->selectyesno('no_email', (GETPOSTISSET("no_email") ? GETPOST("no_email", 'int') : $conf->global->MAILING_CONTACT_DEFAULT_BULK_STATUS), 1, false, ($conf->global->MAILING_CONTACT_DEFAULT_BULK_STATUS == 2));
|
||||
print $form->selectyesno('no_email', (GETPOSTISSET("no_email") ? GETPOST("no_email", 'int') : $conf->global->MAILING_CONTACT_DEFAULT_BULK_STATUS), 1, false, (getDolGlobalInt('MAILING_CONTACT_DEFAULT_BULK_STATUS') == 2));
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
|
@ -2376,7 +2376,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||
|
||||
// Unsubscribe
|
||||
if (isModEnabled('mailing')) {
|
||||
if ($conf->use_javascript_ajax && isset($conf->global->MAILING_CONTACT_DEFAULT_BULK_STATUS) && $conf->global->MAILING_CONTACT_DEFAULT_BULK_STATUS == 2) {
|
||||
if ($conf->use_javascript_ajax && isset($conf->global->MAILING_CONTACT_DEFAULT_BULK_STATUS) && getDolGlobalInt('MAILING_CONTACT_DEFAULT_BULK_STATUS') == 2) {
|
||||
print "\n".'<script type="text/javascript">'."\n";
|
||||
|
||||
print '
|
||||
|
|
@ -2404,7 +2404,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||
print '<tr>';
|
||||
print '<td class="noemail"><label for="no_email">'.$langs->trans("No_Email").'</label></td>';
|
||||
print '<td>';
|
||||
$useempty = (isset($conf->global->MAILING_CONTACT_DEFAULT_BULK_STATUS) && ($conf->global->MAILING_CONTACT_DEFAULT_BULK_STATUS == 2));
|
||||
$useempty = (getDolGlobalInt('MAILING_CONTACT_DEFAULT_BULK_STATUS') == 2);
|
||||
print $form->selectyesno('no_email', (GETPOSTISSET("no_email") ? GETPOST("no_email", 'int') : $object->no_email), 1, false, $useempty);
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
|
|
|||
|
|
@ -2838,16 +2838,16 @@ class Societe extends CommonObject
|
|||
|
||||
if (!empty($conf->global->SOCIETE_ADD_REF_IN_LIST) && (!empty($withpicto))) {
|
||||
$code = '';
|
||||
if (($this->client) && (!empty($this->code_client)) && ($conf->global->SOCIETE_ADD_REF_IN_LIST == 1 || $conf->global->SOCIETE_ADD_REF_IN_LIST == 2)) {
|
||||
if (($this->client) && (!empty($this->code_client)) && (getDolGlobalInt('SOCIETE_ADD_REF_IN_LIST') == 1 || getDolGlobalInt('SOCIETE_ADD_REF_IN_LIST') == 2)) {
|
||||
$code = $this->code_client.' - ';
|
||||
}
|
||||
|
||||
if (($this->fournisseur) && (!empty($this->code_fournisseur)) && ($conf->global->SOCIETE_ADD_REF_IN_LIST == 1 || $conf->global->SOCIETE_ADD_REF_IN_LIST == 3)) {
|
||||
if (($this->fournisseur) && (!empty($this->code_fournisseur)) && (getDolGlobalInt('SOCIETE_ADD_REF_IN_LIST') == 1 || getDolGlobalInt('SOCIETE_ADD_REF_IN_LIST') == 3)) {
|
||||
$code .= $this->code_fournisseur.' - ';
|
||||
}
|
||||
|
||||
if ($code) {
|
||||
if ($conf->global->SOCIETE_ADD_REF_IN_LIST == 1) {
|
||||
if (getDolGlobalInt('SOCIETE_ADD_REF_IN_LIST') == 1) {
|
||||
$name = $code.' '.$name;
|
||||
} else {
|
||||
$name = $code;
|
||||
|
|
@ -4544,8 +4544,8 @@ class Societe extends CommonObject
|
|||
$this->tva_assuj = $conf->global->FACTURE_TVAOPTION;
|
||||
|
||||
// Define if company use local taxes
|
||||
$this->localtax1_assuj = ((isset($conf->global->FACTURE_LOCAL_TAX1_OPTION) && ($conf->global->FACTURE_LOCAL_TAX1_OPTION == '1' || $conf->global->FACTURE_LOCAL_TAX1_OPTION == 'localtax1on')) ? 1 : 0);
|
||||
$this->localtax2_assuj = ((isset($conf->global->FACTURE_LOCAL_TAX2_OPTION) && ($conf->global->FACTURE_LOCAL_TAX2_OPTION == '1' || $conf->global->FACTURE_LOCAL_TAX2_OPTION == 'localtax2on')) ? 1 : 0);
|
||||
$this->localtax1_assuj = ((isset($conf->global->FACTURE_LOCAL_TAX1_OPTION) && (getDolGlobalString('FACTURE_LOCAL_TAX1_OPTION') == '1' || getDolGlobalString('FACTURE_LOCAL_TAX1_OPTION') == 'localtax1on')) ? 1 : 0);
|
||||
$this->localtax2_assuj = ((isset($conf->global->FACTURE_LOCAL_TAX2_OPTION) && (getDolGlobalString('FACTURE_LOCAL_TAX2_OPTION') == '1' || getDolGlobalString('FACTURE_LOCAL_TAX2_OPTION') == 'localtax2on')) ? 1 : 0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ if ($conf->browser->layout == 'phone') {
|
|||
$maxcategbydefaultforthisdevice = 8;
|
||||
$maxproductbydefaultforthisdevice = 16;
|
||||
//REDIRECT TO BASIC LAYOUT IF TERMINAL SELECTED AND BASIC MOBILE LAYOUT ENABLED
|
||||
if ($_SESSION["takeposterminal"] != "" && $conf->global->TAKEPOS_PHONE_BASIC_LAYOUT == 1) {
|
||||
if ($_SESSION["takeposterminal"] != "" && getDolGlobalInt('TAKEPOS_PHONE_BASIC_LAYOUT') == 1) {
|
||||
$_SESSION["basiclayout"] = 1;
|
||||
header("Location: phone.php?mobilepage=invoice");
|
||||
exit;
|
||||
|
|
|
|||
|
|
@ -543,10 +543,10 @@ if (empty($reshook)) {
|
|||
|
||||
/* setup of margin calculation */
|
||||
if (isset($conf->global->MARGIN_TYPE)) {
|
||||
if ($conf->global->MARGIN_TYPE == 'pmp' && !empty($prod->pmp)) {
|
||||
if (getDolGlobalString('MARGIN_TYPE') == 'pmp' && !empty($prod->pmp)) {
|
||||
$line['fk_fournprice'] = null;
|
||||
$line['pa_ht'] = $prod->pmp;
|
||||
} elseif ($conf->global->MARGIN_TYPE == 'costprice' && !empty($prod->cost_price)) {
|
||||
} elseif (getDolGlobalString('MARGIN_TYPE') == 'costprice' && !empty($prod->cost_price)) {
|
||||
$line['fk_fournprice'] = null;
|
||||
$line['pa_ht'] = $prod->cost_price;
|
||||
} else {
|
||||
|
|
@ -764,7 +764,7 @@ if (empty($reshook)) {
|
|||
|
||||
if ($action == "order" and $placeid != 0) {
|
||||
include_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||
if ($conf->global->TAKEPOS_PRINT_METHOD == "receiptprinter" || $conf->global->TAKEPOS_PRINT_METHOD == "takeposconnector") {
|
||||
if (getDolGlobalString('TAKEPOS_PRINT_METHOD') == "receiptprinter" || getDolGlobalString('TAKEPOS_PRINT_METHOD') == "takeposconnector") {
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/dolreceiptprinter.class.php';
|
||||
$printer = new dolReceiptPrinter($db);
|
||||
}
|
||||
|
|
@ -809,7 +809,7 @@ if (empty($reshook)) {
|
|||
$order_receipt_printer1 .= '</td></tr>';
|
||||
}
|
||||
}
|
||||
if (($conf->global->TAKEPOS_PRINT_METHOD == "receiptprinter" || $conf->global->TAKEPOS_PRINT_METHOD == "takeposconnector") && $linestoprint > 0) {
|
||||
if ((getDolGlobalString('TAKEPOS_PRINT_METHOD') == "receiptprinter" || getDolGlobalString('TAKEPOS_PRINT_METHOD') == "takeposconnector") && $linestoprint > 0) {
|
||||
$invoice->fetch($placeid); //Reload object before send to printer
|
||||
$printer->orderprinter = 1;
|
||||
echo "<script>";
|
||||
|
|
@ -841,7 +841,7 @@ if (empty($reshook)) {
|
|||
$order_receipt_printer2 .= '</td></tr>';
|
||||
}
|
||||
}
|
||||
if (($conf->global->TAKEPOS_PRINT_METHOD == "receiptprinter" || $conf->global->TAKEPOS_PRINT_METHOD == "takeposconnector") && $linestoprint > 0) {
|
||||
if ((getDolGlobalString('TAKEPOS_PRINT_METHOD') == "receiptprinter" || getDolGlobalString('TAKEPOS_PRINT_METHOD') == "takeposconnector") && $linestoprint > 0) {
|
||||
$invoice->fetch($placeid); //Reload object before send to printer
|
||||
$printer->orderprinter = 2;
|
||||
echo "<script>";
|
||||
|
|
@ -873,7 +873,7 @@ if (empty($reshook)) {
|
|||
$order_receipt_printer3 .= '</td></tr>';
|
||||
}
|
||||
}
|
||||
if (($conf->global->TAKEPOS_PRINT_METHOD == "receiptprinter" || $conf->global->TAKEPOS_PRINT_METHOD == "takeposconnector") && $linestoprint > 0) {
|
||||
if ((getDolGlobalString('TAKEPOS_PRINT_METHOD') == "receiptprinter" || getDolGlobalString('TAKEPOS_PRINT_METHOD') == "takeposconnector") && $linestoprint > 0) {
|
||||
$invoice->fetch($placeid); //Reload object before send to printer
|
||||
$printer->orderprinter = 3;
|
||||
echo "<script>";
|
||||
|
|
|
|||
|
|
@ -254,7 +254,7 @@ if ($invoice->id > 0) {
|
|||
}
|
||||
$alreadypayed = (is_object($invoice) ? ($invoice->total_ttc - $remaintopay) : 0);
|
||||
|
||||
if ($conf->global->TAKEPOS_NUMPAD == 0) {
|
||||
if (getDolGlobalInt('TAKEPOS_NUMPAD') == 0) {
|
||||
print "var received='';";
|
||||
} else {
|
||||
print "var received=0;";
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ $theme_bordercolor = array(235, 235, 224);
|
|||
$theme_datacolor = array(array(137, 86, 161), array(60, 147, 183), array(250, 190, 80), array(80, 166, 90), array(190, 190, 100), array(91, 115, 247), array(140, 140, 220), array(190, 120, 120), array(115, 125, 150), array(100, 170, 20), array(150, 135, 125), array(85, 135, 150), array(150, 135, 80), array(150, 80, 150));
|
||||
if (!defined('ISLOADEDBYSTEELSHEET')) { // File is run after an include of a php page, not by the style sheet, if the constant is not defined.
|
||||
if (!empty($conf->global->MAIN_OPTIMIZEFORCOLORBLIND)) { // user is loaded by dolgraph.class.php
|
||||
if ($conf->global->MAIN_OPTIMIZEFORCOLORBLIND == 'flashy') {
|
||||
if (getDolGlobalString('MAIN_OPTIMIZEFORCOLORBLIND') == 'flashy') {
|
||||
$theme_datacolor = array(array(157, 56, 191), array(0, 147, 183), array(250, 190, 30), array(221, 75, 57), array(0, 166, 90), array(140, 140, 220), array(190, 120, 120), array(190, 190, 100), array(115, 125, 150), array(100, 170, 20), array(150, 135, 125), array(85, 135, 150), array(150, 135, 80), array(150, 80, 150));
|
||||
} else {
|
||||
// for now we use the same configuration for all types of color blind
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ $theme_bordercolor = array(235, 235, 224);
|
|||
$theme_datacolor = array(array(137, 86, 161), array(60, 147, 183), array(250, 190, 80), array(191, 75, 57), array(80, 166, 90), array(140, 140, 220), array(190, 120, 120), array(190, 190, 100), array(115, 125, 150), array(100, 170, 20), array(150, 135, 125), array(85, 135, 150), array(150, 135, 80), array(150, 80, 150));
|
||||
if (!defined('ISLOADEDBYSTEELSHEET')) { // File is run after an include of a php page, not by the style sheet, if the constant is not defined.
|
||||
if (!empty($conf->global->MAIN_OPTIMIZEFORCOLORBLIND)) { // user is loaded by dolgraph.class.php
|
||||
if ($conf->global->MAIN_OPTIMIZEFORCOLORBLIND == 'flashy') {
|
||||
if (getDolGlobalString('MAIN_OPTIMIZEFORCOLORBLIND') == 'flashy') {
|
||||
$theme_datacolor = array(array(157, 56, 191), array(0, 147, 183), array(250, 190, 30), array(221, 75, 57), array(0, 166, 90), array(140, 140, 220), array(190, 120, 120), array(190, 190, 100), array(115, 125, 150), array(100, 170, 20), array(150, 135, 125), array(85, 135, 150), array(150, 135, 80), array(150, 80, 150));
|
||||
} else {
|
||||
// for now we use the same configuration for all types of color blind
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ if ($object->ldap_sid) {
|
|||
}
|
||||
print '</tr>';
|
||||
|
||||
if ($conf->global->LDAP_SERVER_TYPE == "activedirectory") {
|
||||
if (getDolGlobalString('LDAP_SERVER_TYPE') == "activedirectory") {
|
||||
$ldap = new Ldap();
|
||||
$result = $ldap->connect_bind();
|
||||
if ($result > 0) {
|
||||
|
|
|
|||
|
|
@ -342,7 +342,7 @@ if ($action == 'edit') {
|
|||
print '<td>';
|
||||
$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 (getDolGlobalString('MAIN_LANG_DEFAULT') == 'auto' ? $langs->trans("AutoDetectLang") : $langs->trans("Language_".$conf->global->MAIN_LANG_DEFAULT));
|
||||
print '</td>';
|
||||
print '<td class="nowrap" width="20%"><input class="oddeven" name="check_MAIN_LANG_DEFAULT" id="check_MAIN_LANG_DEFAULT" type="checkbox" '.(!empty($object->conf->MAIN_LANG_DEFAULT) ? " checked" : "");
|
||||
print empty($dolibarr_main_demo) ? '' : ' disabled="disabled"'; // Disabled for demo
|
||||
|
|
@ -447,7 +447,7 @@ if ($action == 'edit') {
|
|||
print '<td>';
|
||||
$s = picto_from_langcode($conf->global->MAIN_LANG_DEFAULT);
|
||||
print ($s ? $s.' ' : '');
|
||||
print (isset($conf->global->MAIN_LANG_DEFAULT) && $conf->global->MAIN_LANG_DEFAULT == 'auto' ? $langs->trans("AutoDetectLang") : $langs->trans("Language_".$conf->global->MAIN_LANG_DEFAULT));
|
||||
print (getDolGlobalString('MAIN_LANG_DEFAULT') == 'auto' ? $langs->trans("AutoDetectLang") : $langs->trans("Language_".$conf->global->MAIN_LANG_DEFAULT));
|
||||
print '</td>';
|
||||
print '<td class="nowrap"><input class="oddeven" type="checkbox" disabled '.(!empty($object->conf->MAIN_LANG_DEFAULT) ? " checked" : "").'> '.$langs->trans("UsePersonalValue").'</td>';
|
||||
print '<td>';
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ if (!empty($conf->global->MAILING_DELAY)) {
|
|||
print 'A delay of '.((float) $conf->global->MAILING_DELAY).' seconds has been set between each email'."\n";
|
||||
}
|
||||
|
||||
if ($conf->global->MAILING_LIMIT_SENDBYCLI == '-1') {
|
||||
if (getDolGlobalString('MAILING_LIMIT_SENDBYCLI') == '-1') {
|
||||
}
|
||||
|
||||
if (!empty($dolibarr_main_db_readonly)) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user