From: Moritz Bunkus <m.bunkus@linet-services.de>
Date: Mon, 23 Jan 2017 12:52:14 +0000 (+0100)
Subject: Mahnungen: $form->all_vc nicht mehr verwenden
X-Git-Tag: release-3.5.4~1667^2~4
X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=f3f2ec384d905c686df842ac7175d48792273487;p=kivitendo-erp.git

Mahnungen: $form->all_vc nicht mehr verwenden
---

diff --git a/bin/mozilla/dn.pl b/bin/mozilla/dn.pl
index 443b693e0..c6c520e66 100644
--- a/bin/mozilla/dn.pl
+++ b/bin/mozilla/dn.pl
@@ -36,6 +36,7 @@ use POSIX qw(strftime);
 
 use SL::IS;
 use SL::DN;
+use SL::DB::Department;
 use SL::DB::Dunning;
 use SL::Helper::Flash qw(flash);
 use SL::Locale::String qw(t8);
@@ -98,12 +99,8 @@ sub add {
 
   $main::auth->assert('dunning_edit');
 
-  # setup customer selection
-  $form->all_vc(\%myconfig, "customer", "AR");
-
   DN->get_config(\%myconfig, \%$form);
 
-  $form->{SHOW_CUSTOMER_SELECTION}      = $form->{all_customer}    && scalar @{ $form->{all_customer} };
   $form->{SHOW_DUNNING_LEVEL_SELECTION} = $form->{DUNNING}         && scalar @{ $form->{DUNNING} };
   $form->{SHOW_DEPARTMENT_SELECTION}    = $form->{all_departments} && scalar @{ $form->{all_departments} || [] };
 
diff --git a/templates/webpages/dunning/add.html b/templates/webpages/dunning/add.html
index 4173a51af..d4a18df54 100644
--- a/templates/webpages/dunning/add.html
+++ b/templates/webpages/dunning/add.html
@@ -8,14 +8,7 @@
    <tr>
     <th align="right">[% 'Customer' | $T8 %]</th>
     <td colspan="3">
-     [% IF SHOW_CUSTOMER_SELECTION %]
-      <select name="customer" class="initial_focus">
-       <option></option>
-       [% FOREACH row = all_customer %]<option>[% HTML.escape(row.name) %]--[% HTML.escape(row.id) %]</option>[% END %]
-      </select>
-      [% ELSE %]
       <input name="customer" size="35" class="initial_focus">
-     [% END %]
     </td>
    </tr>
 
@@ -31,18 +24,6 @@
     </tr>
    [% END %]
 
-   [% IF SHOW_DEPARTMENT_SELECTION %]
-    <tr>
-     <th align="right">[% 'Department' | $T8 %]</th>
-     <td colspan="3">
-      <select name="department">
-       <option></option>
-       [% FOREACH row = all_departments %]<option>[% HTML.escape(row.description) %]--[% HTML.escape(row.id) %]</option>[% END %]
-      </select>
-     </td>
-    </tr>
-   [% END %]
-
    <tr>
     <th align="right" nowrap>[% 'Invoice Number' | $T8 %]</th>
     <td colspan="3"><input name="invnumber" size="20"></td>