mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-31 00:54:32 -04:00
Reversion for unit cost precision
This commit is contained in:
parent
374ba354bc
commit
e558edb795
@ -200,13 +200,13 @@ class Number
|
|||||||
|
|
||||||
/* 08-01-2022 allow increased precision for unit price*/
|
/* 08-01-2022 allow increased precision for unit price*/
|
||||||
$v = rtrim(sprintf('%f', $value),"0");
|
$v = rtrim(sprintf('%f', $value),"0");
|
||||||
$precision = strlen(substr(strrchr($v, $decimal), 1));
|
// $precision = strlen(substr(strrchr($v, $decimal), 1));
|
||||||
|
|
||||||
// if($v<1)
|
if($v<1)
|
||||||
// $precision = strlen($v) - strrpos($v, '.') - 1;
|
$precision = strlen($v) - strrpos($v, '.') - 1;
|
||||||
|
|
||||||
if($precision == 1)
|
// if($precision == 1)
|
||||||
$precision = 2;
|
// $precision = 2;
|
||||||
|
|
||||||
$value = number_format($v, $precision, $decimal, $thousand);
|
$value = number_format($v, $precision, $decimal, $thousand);
|
||||||
$symbol = $currency->symbol;
|
$symbol = $currency->symbol;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user