]> wagnertech.de Git - mfinanz.git/blobdiff - bin/mozilla/ar.pl
XUL - Menu für Firefox/Prism: Stylesheet geändert.
[mfinanz.git] / bin / mozilla / ar.pl
index f170407d894382bf0fbca5ea3ae2d5f422f638a6..b5bd9be6c37da269a011878ef291c6e46086aa07 100644 (file)
@@ -1089,6 +1089,12 @@ sub post {
   $form->isblank("duedate",   $locale->text('Due Date missing!'));
   $form->isblank("customer",  $locale->text('Customer missing!'));
 
+  if ($myconfig{mandatory_departments} && !$form->{department}) {
+    $form->{saved_message} = $::locale->text('You have to specify a department.');
+    update();
+    exit;
+  }
+
   my $closedto  = $form->datetonum($form->{closedto},  \%myconfig);
   my $transdate = $form->datetonum($form->{transdate}, \%myconfig);
   $form->error($locale->text('Cannot post transaction for a closed period!')) if ($form->date_closed($form->{"transdate"}, \%myconfig));
@@ -1127,7 +1133,6 @@ sub post {
   $form->{AR}{receivables} = $form->{ARselected};
   $form->{storno}          = 0;
 
-  $main::lxdebug->message(0, $form->{amount});
   $form->{id} = 0 if $form->{postasnew};
   $form->error($locale->text('Cannot post transaction!')) unless AR->post_transaction(\%myconfig, \%$form);
 
@@ -1268,7 +1273,6 @@ sub search {
   $form->all_vc(\%myconfig, "customer", "AR");
 
   $form->{title}    = $locale->text('AR Transactions');
-  $form->{fokus}    = "search.customer";
   $form->{jsscript} = 1;
 
   $form->get_lists("projects"     => { "key" => "ALL_PROJECTS", "all" => 1 },