Round total batch volume to 2 ddecimals.

Mon, 28 Oct 2019 20:52:17 +0100

author
Michiel Broek <mbroek@mbse.eu>
date
Mon, 28 Oct 2019 20:52:17 +0100
changeset 543
c062eb0dd7ce
parent 542
dabe1c854a0f
child 544
f3faa54581ff

Round total batch volume to 2 ddecimals.

www/prod_print.php file | annotate | diff | comparison | revisions
--- a/www/prod_print.php	Mon Oct 28 19:55:42 2019 +0100
+++ b/www/prod_print.php	Mon Oct 28 20:52:17 2019 +0100
@@ -96,7 +96,7 @@
 		if ($divide_parts == 0)
 			$this->Cell(45,5,$row['batch_size'].' liter',0,0,'L',true);
 		else
-			$this->Cell(45,5,$row['batch_size'].' van '.($row['batch_size'] * (1 / $divide_factor)).' liter',0,0,'L',true);
+			$this->Cell(45,5,$row['batch_size'].' van '.sprintf("%.2f", ($row['batch_size'] * (1 / $divide_factor))).' liter',0,0,'L',true);
 		$this->Ln();
 
 		$this->SetX($this->TableX);

mercurial