1
0
Fork 0

Puts amount with 2 decimals into snipped PDFs

This commit is contained in:
7u83 2020-03-09 13:36:54 +00:00
parent d199e664c9
commit 24aefba7e3
1 changed files with 5 additions and 1 deletions

View File

@ -236,12 +236,16 @@ function mkSnippedPdf($key){
$amount = $_POST['amount'][$key]; $amount = $_POST['amount'][$key];
$desc = $_POST['description'][$key]; $desc = $_POST['description'][$key];
$am = floatval(str_replace(",",".",$amount));
$am = str_replace(".",",",sprintf("%.2f",$am));
$html = $html =
<<<EOD <<<EOD
<h1>Position $pos</h1> <h1>Position $pos</h1>
<p>$desc</p><br> <p>$desc</p><br>
<p>$amount EUR</p><br> <p>$am EUR</p><br>
EOD; EOD;
// Print text using writeHTMLCell() // Print text using writeHTMLCell()