Einkauf/Verkauf: Sprach-Drop-Down aus Print-Optionen in Hauptbeleg verschoben
authorMoritz Bunkus <m.bunkus@linet.de>
Mon, 9 Nov 2020 13:06:26 +0000 (14:06 +0100)
committerMoritz Bunkus <m.bunkus@linet.de>
Mon, 9 Nov 2020 13:06:26 +0000 (14:06 +0100)
Noch nicht erledigt ist der neue Angebots-/Auftragscontroller.

bin/mozilla/do.pl
bin/mozilla/io.pl
bin/mozilla/is.pl
bin/mozilla/oe.pl
templates/webpages/do/form_header.html
templates/webpages/is/form_header.html
templates/webpages/oe/form_header.html

index b1bc8b5..5de2959 100644 (file)
@@ -421,6 +421,7 @@ sub form_header {
                    "business_types" => "ALL_BUSINESS_TYPES",
     );
   $form->{ALL_DEPARTMENTS} = SL::DB::Manager::Department->get_all_sorted;
+  $form->{ALL_LANGUAGES}   = SL::DB::Manager::Language->get_all_sorted;
 
   # Projects
   my @old_project_ids = uniq grep { $_ } map { $_ * 1 } ($form->{"globalproject_id"}, map { $form->{"project_id_$_"} } 1..$form->{"rowcount"});
index ae158c7..0362e13 100644 (file)
@@ -2009,9 +2009,8 @@ sub _make_record {
 sub setup_sales_purchase_print_options {
   my $print_form = Form->new('');
   $print_form->{printers}  = SL::DB::Manager::Printer->get_all_sorted;
-  $print_form->{languages} = SL::DB::Manager::Language->get_all_sorted;
 
-  $print_form->{$_} = $::form->{$_} for qw(type media language_id printer_id storno formname groupitems);
+  $print_form->{$_} = $::form->{$_} for qw(type media printer_id storno formname groupitems);
 
   return SL::Helper::PrintOptions->get_print_options(
     form    => $print_form,
index c1b61d5..e80dd3f 100644 (file)
@@ -465,6 +465,7 @@ sub form_header {
                    "price_factors" => "ALL_PRICE_FACTORS");
 
   $form->{ALL_DEPARTMENTS} = SL::DB::Manager::Department->get_all_sorted;
+  $form->{ALL_LANGUAGES}   = SL::DB::Manager::Language->get_all_sorted;
 
   # Projects
   my @old_project_ids = uniq grep { $_ } map { $_ * 1 } ($form->{"globalproject_id"}, map { $form->{"project_id_$_"} } 1..$form->{"rowcount"});
index 524afc4..fa284f0 100644 (file)
@@ -526,6 +526,7 @@ sub form_header {
   $form->{ALL_PAYMENTS} = SL::DB::Manager::PaymentTerm->get_all( where => [ or => [ obsolete => 0, id => $form->{payment_id} || undef ] ]);
 
   $form->{ALL_DEPARTMENTS} = SL::DB::Manager::Department->get_all_sorted;
+  $form->{ALL_LANGUAGES}   = SL::DB::Manager::Language->get_all_sorted;
 
   # Projects
   my @old_project_ids = uniq grep { $_ } map { $_ * 1 } ($form->{"globalproject_id"}, map { $form->{"project_id_$_"} } 1..$form->{"rowcount"});
index 59fa98e..1cac15b 100644 (file)
         [%- END %]
        </tr>
 
+       [%- IF ALL_LANGUAGES.size %]
+       <tr>
+        <th align="right" nowrap>[% 'Language' | $T8 %]</th>
+        <td colspan="3">
+         [% L.select_tag('language_id', ALL_LANGUAGES, default = language_id, title_key = 'description', with_empty = 1, style = 'width: 250px' )%]
+        </td>
+       </tr>
+       [%- END %]
+
        [%- IF ALL_DEPARTMENTS.size %]
        <tr>
         <th align="right" nowrap>[% 'Department' | $T8 %]</th>
index c0f7363..e309740 100644 (file)
   [%- END %]
           </td>
         </tr>
+[%- IF ALL_LANGUAGES %]
+        <tr>
+          <th align="right" nowrap>[% 'Language' | $T8 %]</th>
+          <td colspan="3">
+            [% L.select_tag('language_id', ALL_LANGUAGES, default = language_id, title_key = 'description', with_empty = 1, style = 'width:250px') %]
+          </td>
+        </tr>
+[%- END %]
 [%- IF ALL_DEPARTMENTS %]
         <tr>
           <th align="right" nowrap>[% 'Department' | $T8 %]</th>
index 9f1cc1b..5569874 100644 (file)
                       [% L.select_tag('taxzone_id', ( id ? ALL_TAXZONES : ALL_ACTIVE_TAXZONES), default=taxzone_id, title_key='description', style='width: 250px') %]
                     </td>
                   </tr>
+[%- IF ALL_LANGUAGES.size %]
+                  <tr>
+                    <th align="right" nowrap>[% 'Language' | $T8 %]</th>
+                    <td colspan="3">
+                      [% L.select_tag('language_id', ALL_LANGUAGES, default=language_id, title_key = 'description', with_empty=1, style='width:250px') %]
+                    </td>
+                  </tr>
+[%- END %]
 [%- IF ALL_DEPARTMENTS.size %]
                   <tr>
                     <th align="right" nowrap>[% 'Department' | $T8 %]</th>