Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into

develop
This commit is contained in:
Laurent Destailleur 2026-01-19 21:18:00 +01:00
commit b79ade4c1f
3 changed files with 11 additions and 7 deletions

View file

@ -3165,8 +3165,8 @@ class BookKeeping extends CommonObject
$bookkeeping->fk_docdet = 0; // Useless, can be several lines that are source of this record to add
$bookkeeping->thirdparty_code = '';
/* $obj->subledger_account is not defined, so all code into if do the same then in else
if ($separate_auxiliary_account) {
/* $obj->subledger_account is not defined here, so all this code do nothing
$bookkeeping->subledger_account = $obj->subledger_account;
$sql = 'SELECT';
$sql .= " subledger_label";
@ -3182,13 +3182,14 @@ class BookKeeping extends CommonObject
}
$objtmp = $this->db->fetch_object($result);
$bookkeeping->subledger_label = $objtmp->subledger_label ?? null; // latest subledger label used
*/
$bookkeeping->subledger_account = null;
$bookkeeping->subledger_label = null;
} else {
*/
$bookkeeping->subledger_account = null;
$bookkeeping->subledger_label = null;
}
//}
$bookkeeping->numero_compte = $accountingaccount->account_number;
$bookkeeping->label_compte = $accountingaccount->label;

View file

@ -696,6 +696,7 @@ function getBrowserInfo($user_agent)
$user_agent = substr($user_agent, 0, 512); // Avoid to process too large user agent
// @phan-suppress-next-line PhanTypeMismatchArgumentProbablyReal Bad definition of Mobile_Detect function
$detectmobile = new Mobile_Detect(null, $user_agent);
$tablet = $detectmobile->isTablet();
@ -4891,12 +4892,12 @@ function dol_print_phone($phone, $countrycode = '', $contactid = 0, $socid = 0,
}
} elseif (strtoupper($countrycode) == "PE") {
// Peru
if (dol_strlen($phone) == 7) { // fix 7 chiffres without code AAA_BBBB
if (dol_strlen($phone) == 7) { // fix 7 numbers without code AAA_BBBB
$newphone = substr($newphone, 0, 3) . $separ . substr($newphone, 3, 4);
} elseif (dol_strlen($phone) == 9) { // mobile add code and fix 9 chiffres +51_AAA_BBB_CCC
} elseif (dol_strlen($phone) == 9) { // mobile add code and fix 9 numbers +51_AAA_BBB_CCC
$newphonewa = '+51' . $newphone;
$newphone = substr($newphone, 0, 3) . $separ . substr($newphone, 3, 3) . $separ . substr($newphone, 6, 3) . $separ . substr($newphone, 10, 3);
} elseif (dol_strlen($phone) == 11) { // fix 11 chiffres +511_AAA_BBBB
} elseif (dol_strlen($phone) == 11) { // fix 11 numbers +511_AAA_BBBB
$newphone = substr($newphone, 0, 4) . $separ . substr($newphone, 4, 3) . $separ . substr($newphone, 8, 4);
} elseif (dol_strlen($phone) == 12) { // mobile +51_AAA_BBB_CCC
$newphonewa = $newphone;
@ -8913,7 +8914,7 @@ function dolChmod($filepath, $newmask = '')
/**
* Return picto saying a field is required
*
* @return string Chaine avec picto obligatoire
* @return string String with the picto mandatory
*/
function picto_required()
{

View file

@ -2753,6 +2753,8 @@ class EmailCollector extends CommonObject
}
$from = (string) $from;
$from = (string) $from;
$result = $contactstatic->fetch(0, null, '', $from);
if ($result < 0) {
$errorforactions++;