Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 7e7a1369

Von Sven Schöling vor mehr als 12 Jahren hinzugefügt

  • ID 7e7a13692ac4dd952cf85a972d2919eed80edca1
  • Vorgänger 631b4c04
  • Nachfolger 6f0f5d2b

DATEV check in die 5 haupt buchungsmasken verlinkt

Unterschiede anzeigen:

SL/AP.pm
34 34

  
35 35
package AP;
36 36

  
37
use SL::DATEV qw(:CONSTANTS);
37 38
use SL::DBUtils;
38 39
use SL::IO;
39 40
use SL::MoreCommon;
......
353 354

  
354 355
  IO->set_datepaid(table => 'ap', id => $form->{id}, dbh => $dbh);
355 356

  
357
  # safety check datev export
358
  if ($::lx_office_conf{datev_check}{check_on_ap_transaction}) {
359
    my $transdate = $::form->{transdate} ? DateTime->from_lxoffice($::form->{transdate}) : undef;
360
    $transdate  ||= DateTime->today;
361

  
362
    my $datev = SL::DATEV->new(
363
      exporttype => DATEV_ET_BUCHUNGEN,
364
      format     => DATEV_FORMAT_KNE,
365
      dbh        => $dbh,
366
      from       => $transdate,
367
      to         => $transdate,
368
    );
369

  
370
    $datev->export;
371

  
372
    if ($datev->errors) {
373
      $dbh->rollback;
374
      die join "\n", $::locale->text('DATEV check returned errors:'), $datev->errors;
375
    }
376
  }
377

  
356 378
  if (!$provided_dbh) {
357 379
    $dbh->commit();
358 380
    $dbh->disconnect();
SL/AR.pm
35 35
package AR;
36 36

  
37 37
use Data::Dumper;
38
use SL::DATEV qw(:CONSTANTS);
38 39
use SL::DBUtils;
39 40
use SL::IO;
40 41
use SL::MoreCommon;
......
273 274

  
274 275
  IO->set_datepaid(table => 'ar', id => $form->{id}, dbh => $dbh);
275 276

  
277
  # safety check datev export
278
  if ($::lx_office_conf{datev_check}{check_on_ar_transaction}) {
279
    my $transdate = $::form->{transdate} ? DateTime->from_lxoffice($::form->{transdate}) : undef;
280
    $transdate  ||= DateTime->today;
281

  
282
    my $datev = SL::DATEV->new(
283
      exporttype => DATEV_ET_BUCHUNGEN,
284
      format     => DATEV_FORMAT_KNE,
285
      dbh        => $dbh,
286
      from       => $transdate,
287
      to         => $transdate,
288
    );
289

  
290
    $datev->export;
291

  
292
    if ($datev->errors) {
293
      $dbh->rollback;
294
      die join "\n", $::locale->text('DATEV check returned errors:'), $datev->errors;
295
    }
296
  }
297

  
276 298
  my $rc = 1;
277 299
  if (!$provided_dbh) {
278 300
    $rc = $dbh->commit();
SL/GL.pm
39 39
package GL;
40 40

  
41 41
use Data::Dumper;
42
use SL::DATEV qw(:CONSTANTS);
42 43
use SL::DBUtils;
43 44

  
44 45
use strict;
......
184 185
    do_query($form, $dbh, qq|UPDATE gl SET storno = 't' WHERE id = ?|, conv_i($form->{storno_id}));
185 186
  }
186 187

  
188
  # safety check datev export
189
  if ($::lx_office_conf{datev_check}{check_on_gl_transaction}) {
190
    my $transdate = $::form->{transdate} ? DateTime->from_lxoffice($::form->{transdate}) : undef;
191
    $transdate  ||= DateTime->today;
192

  
193
    my $datev = SL::DATEV->new(
194
      exporttype => DATEV_ET_BUCHUNGEN,
195
      format     => DATEV_FORMAT_KNE,
196
      dbh        => $dbh,
197
      from       => $transdate,
198
      to         => $transdate,
199
    );
200

  
201
    $datev->export;
202

  
203
    if ($datev->errors) {
204
      $dbh->rollback;
205
      die join "\n", $::locale->text('DATEV check returned errors:'), $datev->errors;
206
    }
207
  }
208

  
187 209
  # commit and redirect
188 210
  my $rc = $dbh->commit;
189 211
  $dbh->disconnect;
SL/IR.pm
38 38
use SL::ARAP;
39 39
use SL::Common;
40 40
use SL::CVar;
41
use SL::DATEV qw(:CONSTANTS);
41 42
use SL::DBUtils;
42 43
use SL::DO;
43 44
use SL::GenericTranslations;
......
683 684
                               'arap_id' => $form->{id},
684 685
                               'table'   => 'ap',);
685 686

  
687
  # safety check datev export
688
  if ($::lx_office_conf{datev_check}{check_on_purchase_invoice}) {
689
    my $transdate = $::form->{invdate} ? DateTime->from_lxoffice($::form->{invdate}) : undef;
690
    $transdate  ||= DateTime->today;
691

  
692
    my $datev = SL::DATEV->new(
693
      exporttype => DATEV_ET_BUCHUNGEN,
694
      format     => DATEV_FORMAT_KNE,
695
      dbh        => $dbh,
696
      from       => $transdate,
697
      to         => $transdate,
698
    );
699

  
700
    $datev->export;
701

  
702
    if ($datev->errors) {
703
      $dbh->rollback;
704
      die join "\n", $::locale->text('DATEV check returned errors:'), $datev->errors;
705
    }
706
  }
707

  
686 708
  my $rc = 1;
687 709
  if (!$provided_dbh) {
688 710
    $rc = $dbh->commit();
SL/IS.pm
40 40
use SL::ARAP;
41 41
use SL::CVar;
42 42
use SL::Common;
43
use SL::DATEV qw(:CONSTANTS);
43 44
use SL::DBUtils;
44 45
use SL::DO;
45 46
use SL::GenericTranslations;
......
1080 1081
                               'arap_id' => $form->{id},
1081 1082
                               'table'   => 'ar',);
1082 1083

  
1084
  # safety check datev export
1085
  if ($::lx_office_conf{datev_check}{check_on_sales_invoice}) {
1086
    my $transdate = $::form->{invdate} ? DateTime->from_lxoffice($::form->{invdate}) : undef;
1087
    $transdate  ||= DateTime->today;
1088

  
1089
    my $datev = SL::DATEV->new(
1090
      exporttype => DATEV_ET_BUCHUNGEN,
1091
      format     => DATEV_FORMAT_KNE,
1092
      dbh        => $dbh,
1093
      from       => $transdate,
1094
      to         => $transdate,
1095
    );
1096

  
1097
    $datev->export;
1098

  
1099
    if ($datev->errors) {
1100
      $dbh->rollback;
1101
      die join "\n", $::locale->text('DATEV check returned errors:'), $datev->errors;
1102
    }
1103
  }
1104

  
1083 1105
  my $rc = 1;
1084 1106
  $dbh->commit if !$provided_dbh;
1085 1107

  
config/lx_office.conf.default
163 163
# The template file used for the email's body.
164 164
email_template = templates/webpages/oe/periodic_invoices_email.txt
165 165

  
166
[datev_check]
167
# it is possible to make a quick DATEV export everytime you post a record to ensure things
168
# work nicely with their data requirements. This will result in a slight overhead though
169
# you can enable this for each type of record independantly.
170

  
171
# check when a sales invoice or a payment for a sales invoice is posted
172
check_on_sales_invoice = 0
173
# check when a purchase invoice or a payment for a purchase invoice is posted
174
check_on_purchase_invoice = 0
175
# check when an ar transaction is posted
176
check_on_ar_transaction = 0
177
# check when an ap transaction is posted
178
check_on_ap_transaction = 0
179
# check when a gl transaction is posted
180
check_on_gl_transaction = 0
181

  
182
# not implemented yet:
183
#check_on_cash_and_receipt = 0
184
#check_on_dunning = 0
185
#check_on_sepa_import = 0
186

  
166 187
[console]
167 188
# autologin to use if none is given
168 189
login =
locale/de/all
523 523
  'DATEV - Export Assistent'    => 'DATEV-Exportassistent',
524 524
  'DATEV Angaben'               => 'DATEV-Angaben',
525 525
  'DATEV Export'                => 'DATEV-Export',
526
  'DATEV check returned errors:' => 'Die DATEV Prüfung dieser Buchung ergab Fehler:',
526 527
  'DATEX - Export Assistent'    => 'DATEV-Exportassistent',
527 528
  'DELETED'                     => 'Gelöscht',
528 529
  'DFV-Kennzeichen'             => 'DFV-Kennzeichen',
......
593 594
  'Delivery Order created'      => 'Lieferschein erstellt',
594 595
  'Delivery Order deleted!'     => 'Lieferschein gelöscht!',
595 596
  'Delivery Orders'             => 'Lieferscheine',
596
  'Delivery Orders for this document' => 'Lieferscheine für dieses Dokument',
597 597
  'Delivery Plan'               => 'Lieferplan',
598 598
  'Delivery Plan for currently outstanding sales orders' => 'Lieferplan für offene Verkaufsaufträge',
599
  'Delivery information deleted.' => 'Lieferinformation gelöscht.',
600
  'Delivery information saved.' => 'Lieferinformation gespeichert.',
601 599
  'Department'                  => 'Abteilung',
602 600
  'Department 1'                => 'Abteilung (1)',
603 601
  'Department 2'                => 'Abteilung (2)',
......
1142 1140
  'Missing amount'              => 'Fehlbetrag',
1143 1141
  'Missing parameter #1 in call to sub #2.' => 'Fehlernder Parameter \'#1\' in Funktionsaufruf \'#2\'.',
1144 1142
  'Missing parameter (at least one of #1) in call to sub #2.' => 'Fehlernder Parameter (mindestens einer aus \'#1\') in Funktionsaufruf \'#2\'.',
1143
  'Missing qty'                 => '',
1145 1144
  'Missing taxkeys in invoices with taxes.' => 'Fehlende Steuerschlüssel in Rechnungen mit Steuern',
1146 1145
  'Missing user id!'            => 'Benutzer ID fehlt!',
1147 1146
  'Mitarbeiter'                 => 'Mitarbeiter',
......
1250 1249
  'Number pages'                => 'Seiten nummerieren',
1251 1250
  'Number variables: \'PRECISION=n\' forces numbers to be shown with exactly n decimal places.' => 'Zahlenvariablen: Mit \'PRECISION=n\' erzwingt man, dass Zahlen mit n Nachkommastellen formatiert werden.',
1252 1251
  'OB Transaction'              => 'EB-Buchung',
1253
  'OBE-Export erfolgreich!'     => 'OBE-Export erfolgreich!',
1254 1252
  'Objects have been imported.' => 'Objekte wurden importiert.',
1255 1253
  'Obsolete'                    => 'Ungültig',
1256 1254
  'Oct'                         => 'Okt',

Auch abrufbar als: Unified diff