2
0
forked from Wavyzz/dolibarr

Debug v22

This commit is contained in:
ldestailleur
2025-04-11 13:57:07 +02:00
parent 7c46eeebb9
commit 26613998eb
3 changed files with 6 additions and 5 deletions

View File

@@ -420,7 +420,7 @@ if (getDolGlobalString('FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS')) {
if (getDolGlobalString('ACCOUNTANCY_USE_PRODUCT_ACCOUNT_ON_THIRDPARTY')) { if (getDolGlobalString('ACCOUNTANCY_USE_PRODUCT_ACCOUNT_ON_THIRDPARTY')) {
print '<div class="info">' . $langs->trans("ConstantIsOn", "ACCOUNTANCY_USE_PRODUCT_ACCOUNT_ON_THIRDPARTY") . '</div>'; print '<div class="info">' . $langs->trans("ConstantIsOn", "ACCOUNTANCY_USE_PRODUCT_ACCOUNT_ON_THIRDPARTY") . '</div>';
} }
if (!getDolGlobalString('MAIN_COMPANY_PERENTITY_SHARED')) { if (getDolGlobalString('MAIN_COMPANY_PERENTITY_SHARED')) {
print '<div class="info">' . $langs->trans("ConstantIsOn", "MAIN_COMPANY_PERENTITY_SHARED") . '</div>'; print '<div class="info">' . $langs->trans("ConstantIsOn", "MAIN_COMPANY_PERENTITY_SHARED") . '</div>';
} }
if (getDolGlobalString('MAIN_PRODUCT_PERENTITY_SHARED')) { if (getDolGlobalString('MAIN_PRODUCT_PERENTITY_SHARED')) {

View File

@@ -4300,10 +4300,13 @@ function dol_print_socialnetworks($value, $cid, $socid, $type, $dictsocialnetwor
$networkconstname = 'MAIN_INFO_SOCIETE_'.strtoupper($type).'_URL'; $networkconstname = 'MAIN_INFO_SOCIETE_'.strtoupper($type).'_URL';
if (getDolGlobalString($networkconstname)) { if (getDolGlobalString($networkconstname)) {
$link = str_replace('{socialid}', $value, getDolGlobalString($networkconstname)); $link = str_replace('{socialid}', $value, getDolGlobalString($networkconstname));
$valuetoshow = $value;
if (preg_match('/^https?:\/\//i', $link)) { if (preg_match('/^https?:\/\//i', $link)) {
$htmllink .= '<a href="'.dol_sanitizeUrl($link, 0).'" target="_blank" rel="noopener noreferrer">'.dol_escape_htmltag($value).'</a>'; $valuetoshow = preg_replace('/https:\/\/www\.linkedin\./', 'linkedin.', $valuetoshow);
//$valuetoshow = preg_replace('/www\.twitter\./', 'twitter.', $valuetoshow);
$htmllink .= '<a href="'.dol_sanitizeUrl($link, 0).'" target="_blank" rel="noopener noreferrer">'.dol_escape_htmltag($valuetoshow).'</a>';
} elseif ($link) { } elseif ($link) {
$htmllink .= '<a href="'.dol_sanitizeUrl($link, 1).'" target="_blank" rel="noopener noreferrer">'.dol_escape_htmltag($value).'</a>'; $htmllink .= '<a href="'.dol_sanitizeUrl($link, 1).'" target="_blank" rel="noopener noreferrer">'.dol_escape_htmltag($valuetoshow).'</a>';
} }
} elseif (!empty($dictsocialnetworks[$type]['url'])) { } elseif (!empty($dictsocialnetworks[$type]['url'])) {
$tmpvirginurl = preg_replace('/\/?{socialid}/', '', $dictsocialnetworks[$type]['url']); $tmpvirginurl = preg_replace('/\/?{socialid}/', '', $dictsocialnetworks[$type]['url']);

View File

@@ -293,8 +293,6 @@ class mod_codecompta_digitaria extends ModeleAccountancyCode
*/ */
public function checkIfAccountancyCodeIsAlreadyUsed($db, $code, $type = '') public function checkIfAccountancyCodeIsAlreadyUsed($db, $code, $type = '')
{ {
global $conf;
if ($type == 'supplier') { if ($type == 'supplier') {
if (getDolGlobalString('MAIN_COMPANY_PERENTITY_SHARED')) { if (getDolGlobalString('MAIN_COMPANY_PERENTITY_SHARED')) {
$typethirdparty = 'accountancy_code_supplier'; $typethirdparty = 'accountancy_code_supplier';