]> wagnertech.de Git - mfinanz.git/commitdiff
Abteilungen in Belegen sind nun Pflichtfelder, wenn der Benutzer das Flag "mandatory_...
authorSven Schöling <s.schoeling@linet-services.de>
Thu, 8 Jul 2010 10:54:18 +0000 (12:54 +0200)
committerSven Schöling <s.schoeling@linet-services.de>
Thu, 8 Jul 2010 10:54:18 +0000 (12:54 +0200)
13 files changed:
bin/mozilla/ap.pl
bin/mozilla/ar.pl
bin/mozilla/gl.pl
bin/mozilla/ir.pl
bin/mozilla/is.pl
locale/de/all
locale/de/ap
locale/de/ar
locale/de/gl
locale/de/ir
locale/de/is
templates/webpages/is/form_header_de.html
templates/webpages/is/form_header_master.html

index 62edff23ecaf063fd9ca3c2e7cc357628541b89e..91836ebb7aad6e58567affe7d131b10c366d76e9 100644 (file)
@@ -1017,6 +1017,12 @@ sub post {
   $form->isblank("duedate",   $locale->text("Due Date missing!"));
   $form->isblank("vendor",    $locale->text('Vendor missing!'));
 
   $form->isblank("duedate",   $locale->text("Due Date missing!"));
   $form->isblank("vendor",    $locale->text('Vendor 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));
   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));
index f03a74b7db99e31804a02c9b305b06f4fa12fad2..b5bd9be6c37da269a011878ef291c6e46086aa07 100644 (file)
@@ -1089,6 +1089,12 @@ sub post {
   $form->isblank("duedate",   $locale->text('Due Date missing!'));
   $form->isblank("customer",  $locale->text('Customer missing!'));
 
   $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));
   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));
index 5834a485f0daf7f814df08f7f0903e72f42bf7e7..1baed9102d9ae5d19005ec02617d77de475dc93d 100644 (file)
@@ -1154,7 +1154,14 @@ sub form_header {
 <table width=100%>
   <tr>
     <th class=listtop>$form->{title}</th>
 <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>
   <tr height="5"></tr>
   <tr>
     <td>
@@ -1602,6 +1609,12 @@ sub post {
   my $form     = $main::form;
   my $locale   = $main::locale;
 
   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;
 
   $form->{title}  = $locale->text("$form->{title} General Ledger Transaction");
   $form->{storno} = 0;
 
index 042fd4be945df47ccccd764c7fbd124e78ab4eb7..06f6d059b139419eba1508885cfeca448bf3e98d 100644 (file)
@@ -667,6 +667,12 @@ sub post {
     exit;
   }
 
     exit;
   }
 
+  if ($myconfig{mandatory_departments} && !$form->{department_id}) {
+    $form->{saved_message} = $::locale->text('You have to specify a department.');
+    update();
+    exit;
+  }
+
   remove_emptied_rows();
   &validate_items;
 
   remove_emptied_rows();
   &validate_items;
 
index a47b7e80911d478f2368e035818a9309a625f77b..3c5282cbe4bdcb6aec0972563cdbb160ed9e3bd4 100644 (file)
@@ -654,6 +654,13 @@ sub post {
     &update;
     exit;
   }
     &update;
     exit;
   }
+
+  if ($myconfig{mandatory_departments} && !$form->{department_id}) {
+    $form->{saved_message} = $::locale->text('You have to specify a department.');
+    update();
+    exit;
+  }
+
   if ($form->{second_run}) {
     $form->{print_and_post} = 0;
   }
   if ($form->{second_run}) {
     $form->{print_and_post} = 0;
   }
index 0dd4449fcc12aa04284901abc9f7f09fc2a739c2..73f22b11222484d8926946b089b38782cf3fc530 100644 (file)
@@ -1871,6 +1871,7 @@ $self->{texts} = {
   'You have to create new Buchungsgruppen for all the combinations of inventory, income and expense accounts that have been used already.' => 'Sie m&uuml;ssen neue Buchungsgruppen f&uuml;r alle Kombinationen aus Inventar-, Erl&ouml;s- und Aufwandskonto, die bereits benutzt wurden.',
   'You have to enter a company name in your user preferences (see the "Program" menu, "Preferences").' => 'Sie müssen einen Firmennamen in Ihren Benutzereinstellungen angeben (siehe "Programm"-Menü, "Benuztereinstellungen).',
   'You have to fill in at least an account number, the bank code, the IBAN and the BIC.' => 'Sie müssen zumindest die Kontonummer, die Bankleitzahl, die IBAN und den BIC angeben.',
   'You have to create new Buchungsgruppen for all the combinations of inventory, income and expense accounts that have been used already.' => 'Sie m&uuml;ssen neue Buchungsgruppen f&uuml;r alle Kombinationen aus Inventar-, Erl&ouml;s- und Aufwandskonto, die bereits benutzt wurden.',
   'You have to enter a company name in your user preferences (see the "Program" menu, "Preferences").' => 'Sie müssen einen Firmennamen in Ihren Benutzereinstellungen angeben (siehe "Programm"-Menü, "Benuztereinstellungen).',
   'You have to fill in at least an account number, the bank code, the IBAN and the BIC.' => 'Sie müssen zumindest die Kontonummer, die Bankleitzahl, die IBAN und den BIC angeben.',
+  'You have to specify a department.' => 'Sie müssen eine Abteilung wählen.',
   'You have to specify an execution date for each antry.' => 'Sie müssen für jeden zu buchenden Eintrag ein Ausführungsdatum angeben.',
   'You must chose a user.'      => 'Sie m&uuml;ssen einen Benutzer ausw&auml;hlen.',
   'You will now be forwarded to the administration panel.' => 'Sie werden nun zum Administrationsbereich weitergeleitet.',
   'You have to specify an execution date for each antry.' => 'Sie müssen für jeden zu buchenden Eintrag ein Ausführungsdatum angeben.',
   'You must chose a user.'      => 'Sie m&uuml;ssen einen Benutzer ausw&auml;hlen.',
   'You will now be forwarded to the administration panel.' => 'Sie werden nun zum Administrationsbereich weitergeleitet.',
index f8f3ae5f1e66e58947468ae7b569fd8ff085757b..4cabe32aa7dc2595229b9abefddce9009edd348c 100644 (file)
@@ -266,6 +266,7 @@ $self->{texts} = {
   'Warehouse management'        => 'Lagerverwaltung/Bestandsveränderung',
   'Yes'                         => 'Ja',
   'You do not have the permissions to access this function.' => 'Sie verf&uuml;gen nicht &uuml;ber die notwendigen Rechte, um auf diese Funktion zuzugreifen.',
   'Warehouse management'        => 'Lagerverwaltung/Bestandsveränderung',
   'Yes'                         => 'Ja',
   'You do not have the permissions to access this function.' => 'Sie verf&uuml;gen nicht &uuml;ber die notwendigen Rechte, um auf diese Funktion zuzugreifen.',
+  'You have to specify a department.' => 'Sie müssen eine Abteilung wählen.',
   'Your PostgreSQL installationen uses UTF-8 as its encoding. Therefore you have to configure Lx-Office to use UTF-8 as well.' => 'Ihre PostgreSQL-Installation benutzt UTF-8 als Zeichensatz. Sie müssen deshalb Lx-Office so konfigurieren, dass es ebenfalls UTF-8 als Zeichensatz benutzt.',
   'Zero amount posting!'        => 'Buchung ohne Wert',
   '[email]'                     => '[email]',
   'Your PostgreSQL installationen uses UTF-8 as its encoding. Therefore you have to configure Lx-Office to use UTF-8 as well.' => 'Ihre PostgreSQL-Installation benutzt UTF-8 als Zeichensatz. Sie müssen deshalb Lx-Office so konfigurieren, dass es ebenfalls UTF-8 als Zeichensatz benutzt.',
   'Zero amount posting!'        => 'Buchung ohne Wert',
   '[email]'                     => '[email]',
index 56e4af69e9104b947f8fb3341afc45ea24df394f..cdd81c4d0784b8dffe3c10eaf98185835384b67a 100644 (file)
@@ -270,6 +270,7 @@ $self->{texts} = {
   'Warehouse management'        => 'Lagerverwaltung/Bestandsveränderung',
   'Yes'                         => 'Ja',
   'You do not have the permissions to access this function.' => 'Sie verf&uuml;gen nicht &uuml;ber die notwendigen Rechte, um auf diese Funktion zuzugreifen.',
   'Warehouse management'        => 'Lagerverwaltung/Bestandsveränderung',
   'Yes'                         => 'Ja',
   'You do not have the permissions to access this function.' => 'Sie verf&uuml;gen nicht &uuml;ber die notwendigen Rechte, um auf diese Funktion zuzugreifen.',
+  'You have to specify a department.' => 'Sie müssen eine Abteilung wählen.',
   'Your PostgreSQL installationen uses UTF-8 as its encoding. Therefore you have to configure Lx-Office to use UTF-8 as well.' => 'Ihre PostgreSQL-Installation benutzt UTF-8 als Zeichensatz. Sie müssen deshalb Lx-Office so konfigurieren, dass es ebenfalls UTF-8 als Zeichensatz benutzt.',
   'Zero amount posting!'        => 'Buchung ohne Wert',
   '[email]'                     => '[email]',
   'Your PostgreSQL installationen uses UTF-8 as its encoding. Therefore you have to configure Lx-Office to use UTF-8 as well.' => 'Ihre PostgreSQL-Installation benutzt UTF-8 als Zeichensatz. Sie müssen deshalb Lx-Office so konfigurieren, dass es ebenfalls UTF-8 als Zeichensatz benutzt.',
   'Zero amount posting!'        => 'Buchung ohne Wert',
   '[email]'                     => '[email]',
index 79d85dab306e35fd27cd84648b3fefcc865affa2..e8e1ecaf508dde950aef76aa5037a24c85112fbe 100644 (file)
@@ -250,6 +250,7 @@ $self->{texts} = {
   'Warehouse management'        => 'Lagerverwaltung/Bestandsveränderung',
   'Yes'                         => 'Ja',
   'You do not have the permissions to access this function.' => 'Sie verf&uuml;gen nicht &uuml;ber die notwendigen Rechte, um auf diese Funktion zuzugreifen.',
   'Warehouse management'        => 'Lagerverwaltung/Bestandsveränderung',
   'Yes'                         => 'Ja',
   'You do not have the permissions to access this function.' => 'Sie verf&uuml;gen nicht &uuml;ber die notwendigen Rechte, um auf diese Funktion zuzugreifen.',
+  'You have to specify a department.' => 'Sie müssen eine Abteilung wählen.',
   'Your PostgreSQL installationen uses UTF-8 as its encoding. Therefore you have to configure Lx-Office to use UTF-8 as well.' => 'Ihre PostgreSQL-Installation benutzt UTF-8 als Zeichensatz. Sie müssen deshalb Lx-Office so konfigurieren, dass es ebenfalls UTF-8 als Zeichensatz benutzt.',
   '[email]'                     => '[email]',
   'bin_list'                    => 'Lagerliste',
   'Your PostgreSQL installationen uses UTF-8 as its encoding. Therefore you have to configure Lx-Office to use UTF-8 as well.' => 'Ihre PostgreSQL-Installation benutzt UTF-8 als Zeichensatz. Sie müssen deshalb Lx-Office so konfigurieren, dass es ebenfalls UTF-8 als Zeichensatz benutzt.',
   '[email]'                     => '[email]',
   'bin_list'                    => 'Lagerliste',
index f6614b346840df755ed7a50de11f13b100948a91..5ff645a7e43a82ba0ca22e34e6d4dc0f93478b84 100644 (file)
@@ -266,6 +266,7 @@ $self->{texts} = {
   'Warehouse management'        => 'Lagerverwaltung/Bestandsveränderung',
   'Yes'                         => 'Ja',
   'You do not have the permissions to access this function.' => 'Sie verf&uuml;gen nicht &uuml;ber die notwendigen Rechte, um auf diese Funktion zuzugreifen.',
   'Warehouse management'        => 'Lagerverwaltung/Bestandsveränderung',
   'Yes'                         => 'Ja',
   'You do not have the permissions to access this function.' => 'Sie verf&uuml;gen nicht &uuml;ber die notwendigen Rechte, um auf diese Funktion zuzugreifen.',
+  'You have to specify a department.' => 'Sie müssen eine Abteilung wählen.',
   'Your PostgreSQL installationen uses UTF-8 as its encoding. Therefore you have to configure Lx-Office to use UTF-8 as well.' => 'Ihre PostgreSQL-Installation benutzt UTF-8 als Zeichensatz. Sie müssen deshalb Lx-Office so konfigurieren, dass es ebenfalls UTF-8 als Zeichensatz benutzt.',
   'Zipcode'                     => 'PLZ',
   '[email]'                     => '[email]',
   'Your PostgreSQL installationen uses UTF-8 as its encoding. Therefore you have to configure Lx-Office to use UTF-8 as well.' => 'Ihre PostgreSQL-Installation benutzt UTF-8 als Zeichensatz. Sie müssen deshalb Lx-Office so konfigurieren, dass es ebenfalls UTF-8 als Zeichensatz benutzt.',
   'Zipcode'                     => 'PLZ',
   '[email]'                     => '[email]',
index 9b7ee618f0af14f3c3c781175ec3f8d7ff369c46..d328f54cdcbe8d0f444d977dea77a5cf884d34d9 100644 (file)
@@ -269,6 +269,7 @@ $self->{texts} = {
   'Warehouse management'        => 'Lagerverwaltung/Bestandsveränderung',
   'Yes'                         => 'Ja',
   'You do not have the permissions to access this function.' => 'Sie verf&uuml;gen nicht &uuml;ber die notwendigen Rechte, um auf diese Funktion zuzugreifen.',
   'Warehouse management'        => 'Lagerverwaltung/Bestandsveränderung',
   'Yes'                         => 'Ja',
   'You do not have the permissions to access this function.' => 'Sie verf&uuml;gen nicht &uuml;ber die notwendigen Rechte, um auf diese Funktion zuzugreifen.',
+  'You have to specify a department.' => 'Sie müssen eine Abteilung wählen.',
   'Your PostgreSQL installationen uses UTF-8 as its encoding. Therefore you have to configure Lx-Office to use UTF-8 as well.' => 'Ihre PostgreSQL-Installation benutzt UTF-8 als Zeichensatz. Sie müssen deshalb Lx-Office so konfigurieren, dass es ebenfalls UTF-8 als Zeichensatz benutzt.',
   'Zipcode'                     => 'PLZ',
   '[email]'                     => '[email]',
   'Your PostgreSQL installationen uses UTF-8 as its encoding. Therefore you have to configure Lx-Office to use UTF-8 as well.' => 'Ihre PostgreSQL-Installation benutzt UTF-8 als Zeichensatz. Sie müssen deshalb Lx-Office so konfigurieren, dass es ebenfalls UTF-8 als Zeichensatz benutzt.',
   'Zipcode'                     => 'PLZ',
   '[email]'                     => '[email]',
index 9a1af4a280853e8f7e6e88bec03ae2d3a917781f..692daddbf0afa8f36191f36733827eabc27c82ea 100644 (file)
@@ -11,8 +11,6 @@
 
 <form method="post" name="invoice" action="[% script %]">
 
 
 <form method="post" name="invoice" action="[% script %]">
 
-<p>[% saved_message %]</p>
-
 [%- FOREACH key = HIDDENS %]
 <input type="hidden" name="[% HTML.escape(key) %]" value="[% HTML.escape($key)  %]">
 [%- END %]
 [%- FOREACH key = HIDDENS %]
 <input type="hidden" name="[% HTML.escape(key) %]" value="[% HTML.escape($key)  %]">
 [%- END %]
@@ -25,6 +23,8 @@
 
 <p><div class="listtop" width="100%">[% title %]</div></p>
 
 
 <p><div class="listtop" width="100%">[% title %]</div></p>
 
+<p>[% saved_message %]</p>
+
 <table width="100%">
   <tr>
     <td valign="top">
 <table width="100%">
   <tr>
     <td valign="top">
index eb2be4e076d40a09c4fa595ef14668b970dd8f78..aa41c08a65c3479a6d4879ec438eed74a2970768 100644 (file)
@@ -11,8 +11,6 @@
 
 <form method="post" name="invoice" action="[% script %]">
 
 
 <form method="post" name="invoice" action="[% script %]">
 
-<p>[% saved_message %]</p>
-
 [%- FOREACH key = HIDDENS %]
 <input type="hidden" name="[% HTML.escape(key) %]" value="[% HTML.escape($key)  %]">
 [%- END %]
 [%- FOREACH key = HIDDENS %]
 <input type="hidden" name="[% HTML.escape(key) %]" value="[% HTML.escape($key)  %]">
 [%- END %]
@@ -25,6 +23,8 @@
 
 <p><div class="listtop" width="100%">[% title %]</div></p>
 
 
 <p><div class="listtop" width="100%">[% title %]</div></p>
 
+<p>[% saved_message %]</p>
+
 <table width="100%">
   <tr>
     <td valign="top">
 <table width="100%">
   <tr>
     <td valign="top">