package AP;
+use SL::DATEV qw(:CONSTANTS);
use SL::DBUtils;
use SL::IO;
use SL::MoreCommon;
IO->set_datepaid(table => 'ap', id => $form->{id}, dbh => $dbh);
+ # safety check datev export
+ if ($::lx_office_conf{datev_check}{check_on_ap_transaction}) {
+ my $transdate = $::form->{transdate} ? DateTime->from_lxoffice($::form->{transdate}) : undef;
+ $transdate ||= DateTime->today;
+
+ my $datev = SL::DATEV->new(
+ exporttype => DATEV_ET_BUCHUNGEN,
+ format => DATEV_FORMAT_KNE,
+ dbh => $dbh,
+ from => $transdate,
+ to => $transdate,
+ );
+
+ $datev->export;
+
+ if ($datev->errors) {
+ $dbh->rollback;
+ die join "\n", $::locale->text('DATEV check returned errors:'), $datev->errors;
+ }
+ }
+
if (!$provided_dbh) {
$dbh->commit();
$dbh->disconnect();
package AR;
use Data::Dumper;
+use SL::DATEV qw(:CONSTANTS);
use SL::DBUtils;
use SL::IO;
use SL::MoreCommon;
IO->set_datepaid(table => 'ar', id => $form->{id}, dbh => $dbh);
+ # safety check datev export
+ if ($::lx_office_conf{datev_check}{check_on_ar_transaction}) {
+ my $transdate = $::form->{transdate} ? DateTime->from_lxoffice($::form->{transdate}) : undef;
+ $transdate ||= DateTime->today;
+
+ my $datev = SL::DATEV->new(
+ exporttype => DATEV_ET_BUCHUNGEN,
+ format => DATEV_FORMAT_KNE,
+ dbh => $dbh,
+ from => $transdate,
+ to => $transdate,
+ );
+
+ $datev->export;
+
+ if ($datev->errors) {
+ $dbh->rollback;
+ die join "\n", $::locale->text('DATEV check returned errors:'), $datev->errors;
+ }
+ }
+
my $rc = 1;
if (!$provided_dbh) {
$rc = $dbh->commit();
package GL;
use Data::Dumper;
+use SL::DATEV qw(:CONSTANTS);
use SL::DBUtils;
use strict;
do_query($form, $dbh, qq|UPDATE gl SET storno = 't' WHERE id = ?|, conv_i($form->{storno_id}));
}
+ # safety check datev export
+ if ($::lx_office_conf{datev_check}{check_on_gl_transaction}) {
+ my $transdate = $::form->{transdate} ? DateTime->from_lxoffice($::form->{transdate}) : undef;
+ $transdate ||= DateTime->today;
+
+ my $datev = SL::DATEV->new(
+ exporttype => DATEV_ET_BUCHUNGEN,
+ format => DATEV_FORMAT_KNE,
+ dbh => $dbh,
+ from => $transdate,
+ to => $transdate,
+ );
+
+ $datev->export;
+
+ if ($datev->errors) {
+ $dbh->rollback;
+ die join "\n", $::locale->text('DATEV check returned errors:'), $datev->errors;
+ }
+ }
+
# commit and redirect
my $rc = $dbh->commit;
$dbh->disconnect;
use SL::ARAP;
use SL::Common;
use SL::CVar;
+use SL::DATEV qw(:CONSTANTS);
use SL::DBUtils;
use SL::DO;
use SL::GenericTranslations;
'arap_id' => $form->{id},
'table' => 'ap',);
+ # safety check datev export
+ if ($::lx_office_conf{datev_check}{check_on_purchase_invoice}) {
+ my $transdate = $::form->{invdate} ? DateTime->from_lxoffice($::form->{invdate}) : undef;
+ $transdate ||= DateTime->today;
+
+ my $datev = SL::DATEV->new(
+ exporttype => DATEV_ET_BUCHUNGEN,
+ format => DATEV_FORMAT_KNE,
+ dbh => $dbh,
+ from => $transdate,
+ to => $transdate,
+ );
+
+ $datev->export;
+
+ if ($datev->errors) {
+ $dbh->rollback;
+ die join "\n", $::locale->text('DATEV check returned errors:'), $datev->errors;
+ }
+ }
+
my $rc = 1;
if (!$provided_dbh) {
$rc = $dbh->commit();
use SL::ARAP;
use SL::CVar;
use SL::Common;
+use SL::DATEV qw(:CONSTANTS);
use SL::DBUtils;
use SL::DO;
use SL::GenericTranslations;
'arap_id' => $form->{id},
'table' => 'ar',);
+ # safety check datev export
+ if ($::lx_office_conf{datev_check}{check_on_sales_invoice}) {
+ my $transdate = $::form->{invdate} ? DateTime->from_lxoffice($::form->{invdate}) : undef;
+ $transdate ||= DateTime->today;
+
+ my $datev = SL::DATEV->new(
+ exporttype => DATEV_ET_BUCHUNGEN,
+ format => DATEV_FORMAT_KNE,
+ dbh => $dbh,
+ from => $transdate,
+ to => $transdate,
+ );
+
+ $datev->export;
+
+ if ($datev->errors) {
+ $dbh->rollback;
+ die join "\n", $::locale->text('DATEV check returned errors:'), $datev->errors;
+ }
+ }
+
my $rc = 1;
$dbh->commit if !$provided_dbh;
# The template file used for the email's body.
email_template = templates/webpages/oe/periodic_invoices_email.txt
+[datev_check]
+# it is possible to make a quick DATEV export everytime you post a record to ensure things
+# work nicely with their data requirements. This will result in a slight overhead though
+# you can enable this for each type of record independantly.
+
+# check when a sales invoice or a payment for a sales invoice is posted
+check_on_sales_invoice = 0
+# check when a purchase invoice or a payment for a purchase invoice is posted
+check_on_purchase_invoice = 0
+# check when an ar transaction is posted
+check_on_ar_transaction = 0
+# check when an ap transaction is posted
+check_on_ap_transaction = 0
+# check when a gl transaction is posted
+check_on_gl_transaction = 0
+
+# not implemented yet:
+#check_on_cash_and_receipt = 0
+#check_on_dunning = 0
+#check_on_sepa_import = 0
+
[console]
# autologin to use if none is given
login =
'DATEV - Export Assistent' => 'DATEV-Exportassistent',
'DATEV Angaben' => 'DATEV-Angaben',
'DATEV Export' => 'DATEV-Export',
+ 'DATEV check returned errors:' => 'Die DATEV Prüfung dieser Buchung ergab Fehler:',
'DATEX - Export Assistent' => 'DATEV-Exportassistent',
'DELETED' => 'Gelöscht',
'DFV-Kennzeichen' => 'DFV-Kennzeichen',
'Delivery Order created' => 'Lieferschein erstellt',
'Delivery Order deleted!' => 'Lieferschein gelöscht!',
'Delivery Orders' => 'Lieferscheine',
- 'Delivery Orders for this document' => 'Lieferscheine für dieses Dokument',
'Delivery Plan' => 'Lieferplan',
'Delivery Plan for currently outstanding sales orders' => 'Lieferplan für offene Verkaufsaufträge',
- 'Delivery information deleted.' => 'Lieferinformation gelöscht.',
- 'Delivery information saved.' => 'Lieferinformation gespeichert.',
'Department' => 'Abteilung',
'Department 1' => 'Abteilung (1)',
'Department 2' => 'Abteilung (2)',
'Missing amount' => 'Fehlbetrag',
'Missing parameter #1 in call to sub #2.' => 'Fehlernder Parameter \'#1\' in Funktionsaufruf \'#2\'.',
'Missing parameter (at least one of #1) in call to sub #2.' => 'Fehlernder Parameter (mindestens einer aus \'#1\') in Funktionsaufruf \'#2\'.',
+ 'Missing qty' => '',
'Missing taxkeys in invoices with taxes.' => 'Fehlende Steuerschlüssel in Rechnungen mit Steuern',
'Missing user id!' => 'Benutzer ID fehlt!',
'Mitarbeiter' => 'Mitarbeiter',
'Number pages' => 'Seiten nummerieren',
'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.',
'OB Transaction' => 'EB-Buchung',
- 'OBE-Export erfolgreich!' => 'OBE-Export erfolgreich!',
'Objects have been imported.' => 'Objekte wurden importiert.',
'Obsolete' => 'Ungültig',
'Oct' => 'Okt',