Mahnungen: $form->all_vc nicht mehr verwenden
authorMoritz Bunkus <m.bunkus@linet-services.de>
Mon, 23 Jan 2017 12:52:14 +0000 (13:52 +0100)
committerMoritz Bunkus <m.bunkus@linet-services.de>
Mon, 23 Jan 2017 13:57:25 +0000 (14:57 +0100)
bin/mozilla/dn.pl
templates/webpages/dunning/add.html

index 443b693..c6c520e 100644 (file)
@@ -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} || [] };
 
index 4173a51..d4a18df 100644 (file)
@@ -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>
 
     </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>