<?php
// чиним отчеты, меняем использование функции form_local_number, @param decimals = '2', а не '/2' (пример)
$result = run_query("SELECT id, code FROM " . $config['table_prefix'] . "reports");
while ($row = sql_fetch_assoc($result)) {
    $new_row_code = str_replace(
        array(
            'form_local_number($data[\'invoice\'],\'/2\');',
            'form_local_number($data[\'paid\'],\'/2\');',
            'form_local_number($data[\'bonus\'],\'/2\');',
            'form_local_number($sum_invoice,\'/2\');',
            'form_local_number($sum_paid,\'/2\');',
            'form_local_number($sum_bonus,\'/2\');'
        ),
        array(
            'form_local_number($data[\'invoice\'],\'2\');',
            'form_local_number($data[\'paid\'],\'2\');',
            'form_local_number($data[\'bonus\'],\'2\');',
            'form_local_number($sum_invoice,\'2\');',
            'form_local_number($sum_paid,\'2\');',
            'form_local_number($sum_bonus,\'2\');'
        ),
        $row['code']);
    run_query("UPDATE " . $config['table_prefix'] . "reports SET code='" . mysqli_real_escape_string($sql_global_link, $new_row_code) . "' WHERE id='" . $row['id'] . "' LIMIT 1");
}

?>