-- Aperçu
SELECT
CT_Intitule,
CONCAT('0', RPAD(SUBSTRING(SUBSTRING_INDEX(CT_Intitule, ' ', 1), 1, 7), 8, '0'))
FROM
f_comptet
WHERE
CT_Type = 0
AND CT_NumPayeur NOT LIKE '0%';
-- Update du CT_NumPayeur pour QUADRA
Et le hook :
$tabINTITULE = explode(' ', $tabDONNEES['CT_Intitule']);
$tabDONNEES['CT_NumPayeur']=str_pad('0'.substr($tabINTITULE[0], 0, 7), 8, '0', STR_PAD_RIGHT);