]> wagnertech.de Git - mfinanz.git/blobdiff - bin/mozilla/gl.pl
Abteilungen in Belegen sind nun Pflichtfelder, wenn der Benutzer das Flag "mandatory_...
[mfinanz.git] / bin / mozilla / gl.pl
index 5834a485f0daf7f814df08f7f0903e72f42bf7e7..1baed9102d9ae5d19005ec02617d77de475dc93d 100644 (file)
@@ -1154,7 +1154,14 @@ sub form_header {
 <table width=100%>
   <tr>
     <th class=listtop>$form->{title}</th>
-  </tr>
+  </tr>| .
+
+  ($form->{saved_message} ? qq|
+  <tr>
+    <td>$form->{saved_message}</th>
+  </tr>| : '') .
+
+qq|
   <tr height="5"></tr>
   <tr>
     <td>
@@ -1602,6 +1609,12 @@ sub post {
   my $form     = $main::form;
   my $locale   = $main::locale;
 
+  if ($::myconfig{mandatory_departments} && !$form->{department}) {
+    $form->{saved_message} = $::locale->text('You have to specify a department.');
+    update();
+    exit;
+  }
+
   $form->{title}  = $locale->text("$form->{title} General Ledger Transaction");
   $form->{storno} = 0;