Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision ef294a75

Von Moritz Bunkus vor fast 14 Jahren hinzugefügt

  • ID ef294a7520ae7e452f6671676d7a8077bf74a9cf
  • Vorgänger 880ae1e5
  • Nachfolger c872d063

Unterscheidung Bankeinzug/Überweisung bei Suchefunktion

Unterschiede anzeigen:

bin/mozilla/sepa.pl
167 167
  my $form   = $main::form;
168 168
  my $locale = $main::locale;
169 169
  my $cgi    = $main::cgi;
170
  my $vc     = $form->{vc} eq 'customer' ? 'customer' : 'vendor';
170 171

  
171
  $form->{title}     = $locale->text('List of bank transfers');
172
  $form->{title}     = $vc eq 'customer' ? $::locale->text('List of bank collections') : $locale->text('List of bank transfers');
172 173

  
173 174
  $form->{sort}    ||= 'id';
174 175
  $form->{sortdir}   = '1' if (!defined $form->{sortdir});
175 176

  
176
  $form->{callback}  = build_std_url('action=bank_transfer_list', 'sort', 'sortdir');
177
  $form->{callback}  = build_std_url('action=bank_transfer_list', 'sort', 'sortdir', 'vc');
177 178

  
178 179
  my %filter         = map  +( $_ => $form->{"f_${_}"} ),
179 180
                       grep  { $form->{"f_${_}"} }
180
                             (qw(vendor invnumber),
181
                             (qw(vc invnumber),
181 182
                              map { ("${_}_date_from", "${_}_date_to") }
182 183
                                  qw(export requested_execution execution));
183 184
  $filter{executed}  = $form->{l_executed} ? 1 : 0 if ($form->{l_executed} != $form->{l_not_executed});
......
185 186

  
186 187
  my $exports        = SL::SEPA->list_exports('filter'    => \%filter,
187 188
                                              'sortorder' => $form->{sort},
188
                                              'sortdir'   => $form->{sortdir});
189
                                              'sortdir'   => $form->{sortdir},
190
                                              'vc'        => $vc);
189 191

  
190 192
  my $open_available = any { !$_->{closed} } @{ $exports };
191 193

  
192 194
  my $report         = SL::ReportGenerator->new(\%main::myconfig, $form);
193 195

  
194
  my @hidden_vars    = grep { m/^[fl]_/ && $form->{$_} } keys %{ $form };
196
  my @hidden_vars    = ('vc', grep { m/^[fl]_/ && $form->{$_} } keys %{ $form });
195 197

  
196 198
  my $href           = build_std_url('action=bank_transfer_list', @hidden_vars);
197 199

  
......
216 218
  $column_defs{closed}->{visible}   = $form->{l_closed}   && $form->{l_open}         ? 1 : 0;
217 219

  
218 220
  my @options = ();
219
  push @options, $locale->text('Vendor')                        . ' : ' . $form->{f_vendor}                        if ($form->{f_vendor});
221
  push @options, ($vc eq 'customer' ? $::locale->text('Customer') : $locale->text('Vendor')) . ' : ' . $form->{f_vc} if ($form->{f_vc});
220 222
  push @options, $locale->text('Invoice number')                . ' : ' . $form->{f_invnumber}                     if ($form->{f_invnumber});
221 223
  push @options, $locale->text('Export date from')              . ' : ' . $form->{f_export_date_from}              if ($form->{f_export_date_from});
222 224
  push @options, $locale->text('Export date to')                . ' : ' . $form->{f_export_date_to}                if ($form->{f_export_date_to});
......
249 251

  
250 252
    map { $row->{$_}->{data} = $export->{$_} ? $locale->text('yes') : $locale->text('no') } qw(executed closed);
251 253

  
252
    $row->{id}->{link} = $edit_url . '&id=' . E($export->{id});
254
    $row->{id}->{link} = $edit_url . '&id=' . E($export->{id}) . '&vc=' . E($vc);
253 255

  
254 256
    if (!$export->{closed}) {
255 257
      $row->{selected}->{raw_data} =

Auch abrufbar als: Unified diff