Skip to content

Commit

Permalink
Merge pull request #33132 from alsoft10/20.0.33130
Browse files Browse the repository at this point in the history
FeatureUpdate#33130
  • Loading branch information
eldy authored Feb 19, 2025
2 parents 2832c67 + f6ef7a6 commit 69e1f6f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions htdocs/core/lib/functions.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -4472,6 +4472,14 @@ function dol_print_phone($phone, $countrycode = '', $cid = 0, $socid = 0, $addli
$newphonewa = $newphone;
$newphone = substr($newphone, 0, 3).$separ.substr($newphone, 3, 3).$separ.substr($newphone, 6, 3).$separ.substr($newphone, 10, 3).$separ.substr($newphone, 14, 3);
}
} elseif (strtoupper($countrycode) == "IN") {//India
if (dol_strlen($phone) == 13) {
if ($withpicto == 'phone') {//ex: +91_AB_CDEF_GHIJ
$newphone = substr($newphone, 0, 3).$separ.substr($newphone, 3, 2).$separ.substr($newphone, 5, 4).$separ.substr($newphone, 9, 4);
} else {//ex: +91_ABCDE_FGHIJ
$newphone = substr($newphone, 0, 3).$separ.substr($newphone, 3, 5).$separ.substr($newphone, 8, 5);
}
}
}

$newphoneastart = $newphoneaend = '';
Expand Down

0 comments on commit 69e1f6f

Please sign in to comment.