Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision e6fed669

Von Jan Büren vor 3 Tagen hinzugefügt

  • ID e6fed669fb1585b9d541d9e109279df463c1b819
  • Vorgänger d0816eaf

DATEV: Fallunterschied Debit/Kredit für Dokumenten-Export bei DATEV

Unterschiede anzeigen:

SL/DATEV.pm
1105 1105
  $self->from($params{from});
1106 1106
  $self->to($params{to});
1107 1107

  
1108
  my $filter_type;
1109
  $filter_type .= ' AND trans_id in (SELECT id from ar) ' if $params{transaction_type} eq 'ar';
1110
  $filter_type .= ' AND trans_id in (SELECT id from ap) ' if $params{transaction_type} eq 'ap';
1111

  
1108 1112
  my $fromto = $self->fromto;
1109 1113
  # not all last month ar ap gl booking have an entry -> rent ?
1110 1114
  my $query = qq|
......
1112 1116
  left join files on files.object_id=trans_id
1113 1117
  where $fromto
1114 1118
  and object_id is null
1119
  $filter_type
1115 1120
  and trans_id not in (select id from gl)
1116 1121
  LIMIT 1|;
1117 1122

  
bin/mozilla/datev.pl
105 105
  $data{documents} = $::form->{documents};
106 106
  $data{transaction_type} = $::form->{transaction_type};
107 107

  
108
  if ($data{documents} && !SL::DATEV->new->check_all_bookings_have_documents(from => $data{from}, to => $data{to})) {
108
  if ($data{documents} && !SL::DATEV->new->check_all_bookings_have_documents(from => $data{from}, to => $data{to},
109
                                                                             transaction_type => $data{transaction_type})) {
109 110
    $::form->error(t8("Cannot export with documents because some transactions don't have a PDF document attached."));
110 111
  }
111 112
  my $datev = SL::DATEV->new(%data);

Auch abrufbar als: Unified diff