diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php index 816a111e51d..5614659eac0 100644 --- a/htdocs/compta/index.php +++ b/htdocs/compta/index.php @@ -1049,7 +1049,7 @@ if (!empty($conf->facture->enabled) && $user->rights->facture->lire) if (!empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print ''.price($obj->total_ht).''; print ''.price($obj->total_ttc).''; print ''.price($obj->am).''; - print ''.$tmpinvoice->getLibStatut(3, $obj->am, $obj->type).''; + print ''.$tmpinvoice->getLibStatut(3, $obj->am).''; print ''; $total_ttc += $obj->total_ttc; diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php index 9d8673578dd..7d00fee0773 100644 --- a/htdocs/core/lib/functions2.lib.php +++ b/htdocs/core/lib/functions2.lib.php @@ -944,9 +944,8 @@ function get_next_value($db, $mask, $table, $field, $where = '', $objsoc = '', $ //print "masktri=".$masktri." maskcounter=".$maskcounter." maskraz=".$maskraz." maskoffset=".$maskoffset."
\n"; // Define $sqlstring - if (function_exists('mb_strrpos')) - { - $posnumstart = mb_strrpos($maskwithnocode, $maskcounter, 'UTF-8'); + if (function_exists('mb_strrpos')) { + $posnumstart = mb_strrpos($maskwithnocode, $maskcounter, 0, 'UTF-8'); } else { $posnumstart = strrpos($maskwithnocode, $maskcounter); } // Pos of counter in final string (from 0 to ...)