Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 47b5e5c8

Von Moritz Bunkus vor etwa 4 Jahren hinzugefügt

  • ID 47b5e5c83df21577bbfd56d313acbbcf99b8588e
  • Vorgänger a44b0487
  • Nachfolger 9582c372

Kundenstammdatensuche: Filter auf ZUGFeRD-Einstellungen

Unterschiede anzeigen:

SL/CT.pm
239 239
    push @values, ("%$_%")x2 for @tokens;
240 240
  }
241 241

  
242
  if (($form->{create_zugferd_invoices} // '') ne '') {
243
    $where .= qq| AND (ct.create_zugferd_invoices = ?)|;
244
    push @values, $form->{create_zugferd_invoices};
245
  }
246

  
242 247
  # Nur Kunden finden, bei denen ich selber der Verkäufer bin
243 248
  # Gilt nicht für Lieferanten
244 249
  if ($cv eq 'customer' &&   !$main::auth->assert('customer_vendor_all_edit', 1)) {
bin/mozilla/ct.pl
67 67

  
68 68
# end of main
69 69

  
70
sub _zugferd_settings {
71
  return ([ -1, $::locale->text('Use settings from client configuration') ],
72
          [  0, $::locale->text('Do not create ZUGFeRD invoices') ],
73
          [  1, $::locale->text('Create ZUGFeRD invoices') ],
74
          [  2, $::locale->text('Create ZUGFeRD invoices in test mode') ]);
75
}
76

  
70 77
sub search {
71 78
  $main::lxdebug->enter_sub();
72 79

  
......
89 96

  
90 97
  $form->{title}    = $form->{IS_CUSTOMER} ? $locale->text('Customers') : $locale->text('Vendors');
91 98

  
99
  $form->{ZUGFERD_SETTINGS} = [ _zugferd_settings() ];
100

  
92 101
  setup_ct_search_action_bar();
93 102

  
94 103
  $form->header();
......
141 150
    push @options, $locale->text('Orphaned');
142 151
  }
143 152

  
153
  my @zugferd_settings_list = _zugferd_settings();
154
  my $zugferd_filter        = $form->{create_zugferd_invoices} eq '' ? undef : $zugferd_settings_list[$form->{create_zugferd_invoices} + 1]->[1];
155

  
144 156
  push @options, $locale->text('Name') . " : $form->{name}"                                       if $form->{name};
145 157
  push @options, $locale->text('Contact') . " : $form->{contact}"                                 if $form->{contact};
146 158
  push @options, $locale->text('Number') . qq| : $form->{"$form->{db}number"}|                    if $form->{"$form->{db}number"};
......
152 164
  push @options, $locale->text('Billing/shipping address (country)') . " : $form->{addr_country}" if $form->{addr_country};
153 165
  push @options, $locale->text('Billing/shipping address (GLN)')     . " : $form->{addr_gln}"     if $form->{addr_gln};
154 166
  push @options, $locale->text('Quick Search')                       . " : $form->{all}"          if $form->{all};
167
  push @options, $locale->text('ZUGFeRD settings')                   . " : $zugferd_filter"       if $zugferd_filter;
155 168

  
156 169
  if ($form->{business_id}) {
157 170
    my $business = SL::DB::Manager::Business->find_by(id => $form->{business_id});
......
219 232
    'creditlimit'       => { 'text' => $locale->text('Credit Limit'), },
220 233
    'ustid'             => { 'text' => $locale->text('VAT ID'), },
221 234
    'commercial_court'  => { 'text' => $locale->text('Commercial court'), },
235
    create_zugferd_invoices => { text => $locale->text('ZUGFeRD settings'), },
222 236
    %column_defs_cvars,
223 237
  );
224 238

  
locale/de/all
4064 4064
  'ZUGFeRD import'              => 'ZUGFeRD Import',
4065 4065
  'ZUGFeRD invoice'             => 'ZUGFeRD-Rechnung',
4066 4066
  'ZUGFeRD notes for each invoice' => 'ZUGFeRD-Notizen für jede Rechnung',
4067
  'ZUGFeRD settings'            => 'ZUGFeRD-Einstellungen',
4067 4068
  'Zeitraum'                    => 'Zeitraum',
4068 4069
  'Zero amount posting!'        => 'Buchung ohne Wert',
4069 4070
  'Zip'                         => 'PLZ',
templates/webpages/ct/search.html
1 1
[%- USE T8 %]
2 2
[%- USE L %]
3
[%- USE HTML %]
3
[%- USE HTML %][%- USE LxERP -%]
4 4
<h1>[% title %]</h1>
5 5

  
6 6
 <form method="post" action="ct.pl" name="Form" id="form">
......
61 61
   </tr>
62 62
   [% END %]
63 63

  
64
[% IF IS_CUSTOMER %]
65
   <tr>
66
     <th align="right" nowrap>[% LxERP.t8("ZUGFeRD settings") %]</th>
67
     <td>[% L.select_tag('create_zugferd_invoices', ZUGFERD_SETTINGS, with_empty = 1) %]</td>
68
   </tr>
69
[% END %]
70

  
64 71
   [% IF IS_CUSTOMER && ALL_SALESMEN.size %]
65 72
   <tr>
66 73
    <th align="right" nowrap>[% 'Salesman' | $T8 %]</th>

Auch abrufbar als: Unified diff