diff --git a/ka.php b/ka.php
index 9375f6c..eef1eea 100644
--- a/ka.php
+++ b/ka.php
@@ -205,7 +205,7 @@ Grund für abweichende Kontoinhabende Person">
*/
- e += `
${a_currency} | `;
+ e += `
${a_currency}
+ |
+ `;
// `;
// add delete bnutton
diff --git a/submit.php b/submit.php
index fe7bfb3..bac6734 100644
--- a/submit.php
+++ b/submit.php
@@ -53,9 +53,6 @@ function mkFrontPDF(){
Kontoinhaber: $account_owner
IBAN: $_POST[iban]
BIC: $_POST[bic]
- Bank: $_POST[bankname]
- Verwendungszweck:
$_POST[purpose]
-
";
break;
case "bank-noneu":
@@ -78,6 +75,7 @@ function mkFrontPDF(){
}
+ $thtml = mkTable();
// create new PDF document
@@ -156,7 +154,7 @@ function mkFrontPDF(){
- Nickname: $_POST[nickname]
+
Name: $_POST[realname]
Telefon: $_POST[phone]
E-Mail: $_POST[email]
@@ -168,8 +166,16 @@ function mkFrontPDF(){
Auszahlungsweg: $aw
$aw_details
+
+ $thtml
+
+
EOD;
+
+#var_dump($thtml);
+#die;
+
//
WMDE Ansprechpartner: $_POST[wmdecontact]
// Telefon: $_POST[phone]
@@ -262,7 +268,50 @@ function calcSum(){
// var_dump($val);
$sum += floatval(str_replace(",",".",$val));
}
- return $sum;
+ return str_replace(".",",",sprintf("%0.2f",$sum));
+// return sprintf("%.2f",$sum);
+}
+
+
+function mkTable(){
+ $html = "
";
+ $pos = 1;
+ $sum =0;
+ if (!isset($_POST['amount'])) {
+ echo "wrong parameters";
+ die;
+ }
+
+
+
+ foreach ($_POST['amount'] as $key=>$val){
+ $html .='';
+
+ $html .= "$pos | ";
+
+ $html .= "".$_POST['date'][$key]." | ";
+ $html .= "".$_POST['description'][$key]." | ";
+ $am = floatval(str_replace(",",".",$val));
+ $am = str_replace(".",",",sprintf("%.2f",$am));
+ $html .= "".$am." ".$_POST['currency'][$key]. " | ";
+
+
+ $html .="
";
+
+
+
+ $sum += floatval(str_replace(",",".",$val));
+ $pos ++;
+ }
+
+ $html .= "
";
+ $html .="
";
+ $html .="
Summe: ".calcSum()."";
+ return $html;
+
+// return str_replace(".",",",sprintf("%0.2f",$sum));
+// return sprintf("%.2f",$sum);
+
}
@@ -310,7 +359,7 @@ foreach ($pdfs as $filename){
}
$cmd .= " cat output $resultnam.pdf";
exec ($cmd);
-//var_dump($_POST);
+#var_dump($_POST);
#echo "CMD: $cmd
";
#die;