commit 73a404b58ebe0de883558b898ee07ae3499461b7
Author: Bernd Bleßmann <bernd@kivitendo-premium.de>
Date:   Mon Mar 8 11:40:48 2010 +0100

    MHD-Behandlung in Fehlermeldung bei unzureichender Lagermenge.
    
    Der Fehlertext wird jetzt unterschiedich erzeugt, je nachdem,
    ob show_bestbefore in der config an oder aus ist.

diff --git a/bin/mozilla/do.pl b/bin/mozilla/do.pl
index dd4d2d01a..1ce1c4694 100644
--- a/bin/mozilla/do.pl
+++ b/bin/mozilla/do.pl
@@ -1310,13 +1310,26 @@ sub transfer_out {
         my $pinfo = $part_info_map{$request->{parts_id}};
         my $binfo = $bin_info_map{$request->{bin_id}};
 
-        push @{ $form->{ERRORS} }, $locale->text("There is not enough available of '#1' at warehouse '#2', bin '#3', #4, #5, for the transfer of #6.",
-                                                 $pinfo->{description}, $binfo->{warehouse_description}, $binfo->{bin_description},
-                                                 $request->{chargenumber} ? $locale->text('chargenumber #1', $request->{chargenumber}) : $locale->text('no chargenumber'),
-                                                 $request->{bestbefore} ? $locale->text('bestbefore #1', $request->{bestbefore}) : $locale->text('no bestbefore'),
-                                                 $form->format_amount_units('amount'      => $request->{sum_base_qty},
-                                                                            'part_unit'   => $pinfo->{unit},
-                                                                            'conv_units'  => 'convertible_not_smaller'));
+        if ($main::show_best_before) {
+            push @{ $form->{ERRORS} }, $locale->text("There is not enough available of '#1' at warehouse '#2', bin '#3', #4, #5, for the transfer of #6.",
+                                                     $pinfo->{description},
+                                                     $binfo->{warehouse_description},
+                                                     $binfo->{bin_description},
+                                                     $request->{chargenumber} ? $locale->text('chargenumber #1', $request->{chargenumber}) : $locale->text('no chargenumber'),
+                                                     $request->{bestbefore} ? $locale->text('bestbefore #1', $request->{bestbefore}) : $locale->text('no bestbefore'),
+                                                     $form->format_amount_units('amount'      => $request->{sum_base_qty},
+                                                                                'part_unit'   => $pinfo->{unit},
+                                                                                'conv_units'  => 'convertible_not_smaller'));
+        } else {
+            push @{ $form->{ERRORS} }, $locale->text("There is not enough available of '#1' at warehouse '#2', bin '#3', #4, for the transfer of #5.",
+                                                     $pinfo->{description},
+                                                     $binfo->{warehouse_description},
+                                                     $binfo->{bin_description},
+                                                     $request->{chargenumber} ? $locale->text('chargenumber #1', $request->{chargenumber}) : $locale->text('no chargenumber'),
+                                                     $form->format_amount_units('amount'      => $request->{sum_base_qty},
+                                                                                'part_unit'   => $pinfo->{unit},
+                                                                                'conv_units'  => 'convertible_not_smaller'));
+        }
       }
     }
 
diff --git a/locale/de/all b/locale/de/all
index 5828b1a79..33e350542 100644
--- a/locale/de/all
+++ b/locale/de/all
@@ -1660,6 +1660,7 @@ $self->{texts} = {
   'There is at least one sales or purchase invoice for which Lx-Office recorded an inventory transaction with taxkeys even though no tax was recorded.' => 'Es gibt mindestens eine Einkaufs- oder Verkaufsrechnung, f�r die Lx-Office einen Steuerschl�ssel ungleich 0 verzeichnet hat, obwohl f�r Warenbestandsbuchugen bei Rechnungen nie Steuern gebucht werden.',
   'There is at least one transaction for which the user has chosen a logically wrong taxkey.' => 'Es gibt mindestens eine Buchung, bei der ein logisch nicht passender Steuerschl�ssel ausgew�hlt wurde.',
   'There is not enough available of \'#1\' at warehouse \'#2\', bin \'#3\', #4, #5, for the transfer of #6.' => 'Von \'#1\' ist in Lager \'#2\', Lagerplatz \'#3\', #4, #5, nicht gen&uuml;gend eingelagert, um insgesamt #6 auszulagern.',
+  'There is not enough available of \'#1\' at warehouse \'#2\', bin \'#3\', #4, for the transfer of #5.' => 'Von \'#1\' ist in Lager \'#2\', Lagerplatz \'#3\', #4 nicht gen&uuml;gend eingelagert, um insgesamt #5 auszulagern.',
   'There is not enough left of \'#1\' in bin \'#2\' for the removal of #3.' => 'In Lagerplatz \'#2\' ist nicht genug von \'#1\' vorhanden, um #3 zu entnehmen.',
   'There is nothing to do in this step.' => 'In diesem Schritt gibt es nichts mehr zu tun.',
   'Therefore there\'s no need to create the same article more than once if it is sold or bought in/from another tax zone.' => 'Deswegen muss man den gleichen Artikel nicht mehr mehrmals anlegen, wenn er in verschiedenen Steuerzonen gehandelt werden soll.',
@@ -1893,7 +1894,7 @@ $self->{texts} = {
   'bank_transfer_payment_list_#1' => 'ueberweisungs_zahlungsliste_#1',
   'bankaccounts'                => 'Bankkonten',
   'banktransfers'               => 'ueberweisungen',
-  'bestbefore #1'               => 'Mindesthaltbarkeit',
+  'bestbefore #1'               => 'Mindesthaltbarkeit #1',
   'bin_list'                    => 'Lagerliste',
   'bis'                         => 'bis',
   'button'                      => '?',
diff --git a/locale/de/do b/locale/de/do
index ffdc85ce0..6e891b14d 100644
--- a/locale/de/do
+++ b/locale/de/do
@@ -263,6 +263,7 @@ $self->{texts} = {
   'The parts for this delivery order have already been transferred in.' => 'Die Artikel dieses Lieferscheins wurden bereits eingelagert.',
   'The parts for this delivery order have already been transferred out.' => 'Die Artikel dieses Lieferscheins wurden bereits ausgelagert.',
   'There is not enough available of \'#1\' at warehouse \'#2\', bin \'#3\', #4, #5, for the transfer of #6.' => 'Von \'#1\' ist in Lager \'#2\', Lagerplatz \'#3\', #4, #5, nicht gen&uuml;gend eingelagert, um insgesamt #6 auszulagern.',
+  'There is not enough available of \'#1\' at warehouse \'#2\', bin \'#3\', #4, for the transfer of #5.' => 'Von \'#1\' ist in Lager \'#2\', Lagerplatz \'#3\', #4 nicht gen&uuml;gend eingelagert, um insgesamt #5 auszulagern.',
   'To (email)'                  => 'An',
   'Transaction description'     => 'Vorgangsbezeichnung',
   'Transactions, AR transactions, AP transactions' => 'Dialogbuchen, Debitorenrechnungen, Kreditorenrechnungen',
@@ -290,7 +291,7 @@ $self->{texts} = {
   '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]',
-  'bestbefore #1'               => 'Mindesthaltbarkeit',
+  'bestbefore #1'               => 'Mindesthaltbarkeit #1',
   'bin_list'                    => 'Lagerliste',
   'chargenumber #1'             => 'Chargennummer #1',
   'config/authentication.pl: Key "DB_config" is missing.' => 'config/authentication.pl: Das Schl&uuml;sselwort "DB_config" fehlt.',
diff --git a/locale/de/login b/locale/de/login
index 226668e8e..0e9b6824a 100644
--- a/locale/de/login
+++ b/locale/de/login
@@ -328,6 +328,7 @@ $self->{texts} = {
   'The session is invalid or has expired.' => 'Die Session ist ung&uuml;ltig oder abgelaufen.',
   'The subject is missing.'     => 'Der Betreff fehlt.',
   'There is not enough available of \'#1\' at warehouse \'#2\', bin \'#3\', #4, #5, for the transfer of #6.' => 'Von \'#1\' ist in Lager \'#2\', Lagerplatz \'#3\', #4, #5, nicht gen&uuml;gend eingelagert, um insgesamt #6 auszulagern.',
+  'There is not enough available of \'#1\' at warehouse \'#2\', bin \'#3\', #4, for the transfer of #5.' => 'Von \'#1\' ist in Lager \'#2\', Lagerplatz \'#3\', #4 nicht gen&uuml;gend eingelagert, um insgesamt #5 auszulagern.',
   'To (email)'                  => 'An',
   'Total'                       => 'Summe',
   'Transaction description'     => 'Vorgangsbezeichnung',
@@ -367,7 +368,7 @@ $self->{texts} = {
   '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]',
-  'bestbefore #1'               => 'Mindesthaltbarkeit',
+  'bestbefore #1'               => 'Mindesthaltbarkeit #1',
   'bin_list'                    => 'Lagerliste',
   'chargenumber #1'             => 'Chargennummer #1',
   'config/authentication.pl: Key "DB_config" is missing.' => 'config/authentication.pl: Das Schl&uuml;sselwort "DB_config" fehlt.',
diff --git a/locale/de/oe b/locale/de/oe
index 00d5704ea..99a891a26 100644
--- a/locale/de/oe
+++ b/locale/de/oe
@@ -301,6 +301,7 @@ $self->{texts} = {
   'The parts for this delivery order have already been transferred in.' => 'Die Artikel dieses Lieferscheins wurden bereits eingelagert.',
   'The parts for this delivery order have already been transferred out.' => 'Die Artikel dieses Lieferscheins wurden bereits ausgelagert.',
   'There is not enough available of \'#1\' at warehouse \'#2\', bin \'#3\', #4, #5, for the transfer of #6.' => 'Von \'#1\' ist in Lager \'#2\', Lagerplatz \'#3\', #4, #5, nicht gen&uuml;gend eingelagert, um insgesamt #6 auszulagern.',
+  'There is not enough available of \'#1\' at warehouse \'#2\', bin \'#3\', #4, for the transfer of #5.' => 'Von \'#1\' ist in Lager \'#2\', Lagerplatz \'#3\', #4 nicht gen&uuml;gend eingelagert, um insgesamt #5 auszulagern.',
   'To (email)'                  => 'An',
   'Total'                       => 'Summe',
   'Transaction description'     => 'Vorgangsbezeichnung',
@@ -336,7 +337,7 @@ $self->{texts} = {
   '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]',
-  'bestbefore #1'               => 'Mindesthaltbarkeit',
+  'bestbefore #1'               => 'Mindesthaltbarkeit #1',
   'bin_list'                    => 'Lagerliste',
   'chargenumber #1'             => 'Chargennummer #1',
   'config/authentication.pl: Key "DB_config" is missing.' => 'config/authentication.pl: Das Schl&uuml;sselwort "DB_config" fehlt.',
diff --git a/locale/de/todo b/locale/de/todo
index 718783379..f9e7ef5a5 100644
--- a/locale/de/todo
+++ b/locale/de/todo
@@ -324,6 +324,7 @@ $self->{texts} = {
   'The parts for this delivery order have already been transferred out.' => 'Die Artikel dieses Lieferscheins wurden bereits ausgelagert.',
   'The subject is missing.'     => 'Der Betreff fehlt.',
   'There is not enough available of \'#1\' at warehouse \'#2\', bin \'#3\', #4, #5, for the transfer of #6.' => 'Von \'#1\' ist in Lager \'#2\', Lagerplatz \'#3\', #4, #5, nicht gen&uuml;gend eingelagert, um insgesamt #6 auszulagern.',
+  'There is not enough available of \'#1\' at warehouse \'#2\', bin \'#3\', #4, for the transfer of #5.' => 'Von \'#1\' ist in Lager \'#2\', Lagerplatz \'#3\', #4 nicht gen&uuml;gend eingelagert, um insgesamt #5 auszulagern.',
   'To (email)'                  => 'An',
   'Total'                       => 'Summe',
   'Transaction description'     => 'Vorgangsbezeichnung',
@@ -360,7 +361,7 @@ $self->{texts} = {
   '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]',
-  'bestbefore #1'               => 'Mindesthaltbarkeit',
+  'bestbefore #1'               => 'Mindesthaltbarkeit #1',
   'bin_list'                    => 'Lagerliste',
   'chargenumber #1'             => 'Chargennummer #1',
   'config/authentication.pl: Key "DB_config" is missing.' => 'config/authentication.pl: Das Schl&uuml;sselwort "DB_config" fehlt.',
diff --git a/locale/en/all b/locale/en/all
index f48a950d5..e25458002 100644
--- a/locale/en/all
+++ b/locale/en/all
@@ -1656,6 +1656,7 @@ $self->{texts} = {
   'There is at least one sales or purchase invoice for which Lx-Office recorded an inventory transaction with taxkeys even though no tax was recorded.' => '',
   'There is at least one transaction for which the user has chosen a logically wrong taxkey.' => '',
   'There is not enough available of \'#1\' at warehouse \'#2\', bin \'#3\', #4, #5, for the transfer of #6.' => '',
+  'There is not enough available of \'#1\' at warehouse \'#2\', bin \'#3\', #4, for the transfer of #5.' => '',
   'There is not enough left of \'#1\' in bin \'#2\' for the removal of #3.' => '',
   'There is nothing to do in this step.' => '',
   'Therefore there\'s no need to create the same article more than once if it is sold or bought in/from another tax zone.' => '',
diff --git a/locale/en/do b/locale/en/do
index 74a4d7ced..dc4cb34f0 100644
--- a/locale/en/do
+++ b/locale/en/do
@@ -263,6 +263,7 @@ $self->{texts} = {
   'The parts for this delivery order have already been transferred in.' => 'The parts for this delivery order have already been transferred in.',
   'The parts for this delivery order have already been transferred out.' => 'The parts for this delivery order have already been transferred out.',
   'There is not enough available of \'#1\' at warehouse \'#2\', bin \'#3\', #4, #5, for the transfer of #6.' => 'There is not enough available of \'#1\' at warehouse \'#2\', bin \'#3\', #4, #5, for the transfer of #6.',
+  'There is not enough available of \'#1\' at warehouse \'#2\', bin \'#3\', #4, for the transfer of #5.' => 'There is not enough available of \'#1\' at warehouse \'#2\', bin \'#3\', #4, for the transfer of #5.',
   'To (email)'                  => 'To (email)',
   'Transaction description'     => 'Transaction description',
   'Transactions, AR transactions, AP transactions' => 'Transactions, AR transactions, AP transactions',
diff --git a/locale/en/login b/locale/en/login
index c0996563b..60b1896b9 100644
--- a/locale/en/login
+++ b/locale/en/login
@@ -328,6 +328,7 @@ $self->{texts} = {
   'The session is invalid or has expired.' => 'The session is invalid or has expired.',
   'The subject is missing.'     => 'The subject is missing.',
   'There is not enough available of \'#1\' at warehouse \'#2\', bin \'#3\', #4, #5, for the transfer of #6.' => 'There is not enough available of \'#1\' at warehouse \'#2\', bin \'#3\', #4, #5, for the transfer of #6.',
+  'There is not enough available of \'#1\' at warehouse \'#2\', bin \'#3\', #4, for the transfer of #5.' => 'There is not enough available of \'#1\' at warehouse \'#2\', bin \'#3\', #4, for the transfer of #5.',
   'To (email)'                  => 'To (email)',
   'Total'                       => 'Total',
   'Transaction description'     => 'Transaction description',
diff --git a/locale/en/missing b/locale/en/missing
index da68055e8..c56e2cd7a 100644
--- a/locale/en/missing
+++ b/locale/en/missing
@@ -1640,6 +1640,7 @@ $missing = {
   'There is at least one sales or purchase invoice for which Lx-Office recorded an inventory transaction with taxkeys even though no tax was recorded.' => '',
   'There is at least one transaction for which the user has chosen a logically wrong taxkey.' => '',
   'There is not enough available of \'#1\' at warehouse \'#2\', bin \'#3\', #4, #5, for the transfer of #6.' => '',
+  'There is not enough available of \'#1\' at warehouse \'#2\', bin \'#3\', #4, for the transfer of #5.' => '',
   'There is not enough left of \'#1\' in bin \'#2\' for the removal of #3.' => '',
   'There is nothing to do in this step.' => '',
   'Therefore there\'s no need to create the same article more than once if it is sold or bought in/from another tax zone.' => '',
diff --git a/locale/en/oe b/locale/en/oe
index 2810b794e..430571772 100644
--- a/locale/en/oe
+++ b/locale/en/oe
@@ -301,6 +301,7 @@ $self->{texts} = {
   'The parts for this delivery order have already been transferred in.' => 'The parts for this delivery order have already been transferred in.',
   'The parts for this delivery order have already been transferred out.' => 'The parts for this delivery order have already been transferred out.',
   'There is not enough available of \'#1\' at warehouse \'#2\', bin \'#3\', #4, #5, for the transfer of #6.' => 'There is not enough available of \'#1\' at warehouse \'#2\', bin \'#3\', #4, #5, for the transfer of #6.',
+  'There is not enough available of \'#1\' at warehouse \'#2\', bin \'#3\', #4, for the transfer of #5.' => 'There is not enough available of \'#1\' at warehouse \'#2\', bin \'#3\', #4, for the transfer of #5.',
   'To (email)'                  => 'To (email)',
   'Total'                       => 'Total',
   'Transaction description'     => 'Transaction description',
diff --git a/locale/en/todo b/locale/en/todo
index 14826608e..a2bae66d1 100644
--- a/locale/en/todo
+++ b/locale/en/todo
@@ -324,6 +324,7 @@ $self->{texts} = {
   'The parts for this delivery order have already been transferred out.' => 'The parts for this delivery order have already been transferred out.',
   'The subject is missing.'     => 'The subject is missing.',
   'There is not enough available of \'#1\' at warehouse \'#2\', bin \'#3\', #4, #5, for the transfer of #6.' => 'There is not enough available of \'#1\' at warehouse \'#2\', bin \'#3\', #4, #5, for the transfer of #6.',
+  'There is not enough available of \'#1\' at warehouse \'#2\', bin \'#3\', #4, for the transfer of #5.' => 'There is not enough available of \'#1\' at warehouse \'#2\', bin \'#3\', #4, for the transfer of #5.',
   'To (email)'                  => 'To (email)',
   'Total'                       => 'Total',
   'Transaction description'     => 'Transaction description',
