mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-31 14:12:29 +01:00
Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 16.0
Conflicts: htdocs/core/actions_massactions.inc.php htdocs/core/class/extrafields.class.php
This commit is contained in:
@@ -5458,9 +5458,10 @@ function print_fleche_navigation($page, $file, $options = '', $nextpage = 0, $be
|
||||
* @param boolean $addpercent Add a percent % sign in output
|
||||
* @param int $info_bits Miscellaneous information on vat (0=Default, 1=French NPR vat)
|
||||
* @param int $usestarfornpr -1=Never show, 0 or 1=Use '*' for NPR vat rates
|
||||
* @param int $html Used for html output
|
||||
* @return string String with formated amounts ('19,6' or '19,6%' or '8.5% (NPR)' or '8.5% *' or '19,6 (CODEX)')
|
||||
*/
|
||||
function vatrate($rate, $addpercent = false, $info_bits = 0, $usestarfornpr = 0)
|
||||
function vatrate($rate, $addpercent = false, $info_bits = 0, $usestarfornpr = 0, $html = 0)
|
||||
{
|
||||
$morelabel = '';
|
||||
|
||||
@@ -5468,9 +5469,11 @@ function vatrate($rate, $addpercent = false, $info_bits = 0, $usestarfornpr = 0)
|
||||
$rate = str_replace('%', '', $rate);
|
||||
$addpercent = true;
|
||||
}
|
||||
$reg = array();
|
||||
if (preg_match('/\((.*)\)/', $rate, $reg)) {
|
||||
$morelabel = ' ('.$reg[1].')';
|
||||
$rate = preg_replace('/\s*'.preg_quote($morelabel, '/').'/', '', $rate);
|
||||
$morelabel = ' '.($html ? '<span class="opacitymedium">' : '').'('.$reg[1].')'.($html ? '</span>' : '');
|
||||
}
|
||||
if (preg_match('/\*/', $rate)) {
|
||||
$rate = str_replace('*', '', $rate);
|
||||
|
||||
Reference in New Issue
Block a user