Fix vat visiblity on pdf

This commit is contained in:
Laurent Destailleur
2017-09-27 21:58:42 +02:00
parent c5f30f0d80
commit 537a551bb5
5 changed files with 16 additions and 14 deletions

View File

@@ -3684,7 +3684,7 @@ function print_fleche_navigation($page, $file, $options='', $nextpage=0, $betwee
* @param string $rate Rate value to format ('19.6', '19,6', '19.6%', '19,6%', '19.6 (CODEX)', ...)
* @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=Use '*' for NPR vat rate intead of MAIN_LABEL_MENTION_NPR
* @param int $usestarfornpr -1=Never show, 0 or 1=Use '*' for NPR vat rates
* @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)
@@ -3714,7 +3714,7 @@ function vatrate($rate, $addpercent=false, $info_bits=0, $usestarfornpr=0)
// TODO Split on / and output with a price2num to have clean numbers without ton of 000.
$ret=$rate.($addpercent?'%':'');
}
if ($info_bits & 1) $ret.=' *';
if (($info_bits & 1) && $usestarfornpr >= 0) $ret.=' *';
$ret.=$morelabel;
return $ret;
}