Add phone format for Jamaica

This commit is contained in:
dolibarr95 2019-08-01 15:46:34 +02:00 committed by GitHub
parent d7a41c6b72
commit b066431e0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2447,6 +2447,13 @@ function dol_print_phone($phone, $countrycode = '', $cid = 0, $socid = 0, $addli
$newphone = substr($newphone, 0, 4).$separ.substr($newphone, 4, 1).$separ.substr($newphone, 5, 3).$separ.substr($newphone, 7, 2).$separ.substr($newphone, 9, 2);
}
}
elseif (strtoupper($countrycode) == "JM")
{//Jamaïque
if(dol_strlen($newphone) == 12)
{//ex: +1867_ABC_DEFG
$newphone = substr($newphone,0,5).$separ.substr($newphone,5,3).$separ.substr($newphone,8,4);
}
}
elseif (strtoupper($countrycode) == "MG")
{//Madagascar
if(dol_strlen($phone) == 13)