Reload page after saving, fix NULL value
authorJoey Schulze <joey@infodrom.org>
Thu, 11 Mar 2010 07:48:13 +0000 (08:48 +0100)
committerJoey Schulze <joey@infodrom.org>
Thu, 11 Mar 2010 07:48:13 +0000 (08:48 +0100)
masks/arbeitsberichte.php

index f2a5ffc..8d61a3c 100644 (file)
@@ -154,6 +154,7 @@ function einsatz_check()
 function einsatz_callback(data)
 {
     info('Neuer Arbeitsbericht gespeichert');
+    window.location.reload();
 }
 
 function einsatz_submit()
@@ -311,8 +312,8 @@ function einsatz_insert($mask)
                   "VALUES (%d,%d,%s,%.2f,'%s',now())",
                   $einsatz,
                   $_POST['geraet'.$app],
-                  $_POST['anbaugeraet'.$app],
-                  empty($_POST['stunden'.$app]) ? 'NULL' : intval($_POST['stunden'.$app]),
+                  empty($_POST['anbaugeraet'.$app]) ? 'NULL' : intval($_POST['anbaugeraet'.$app]),
+                  $_POST['stunden'.$app],
                   pg_escape_string($_SESSION['sys']['login']));
 
     $sth = pg_query($sql);