]> wagnertech.de Git - mfinanz.git/commitdiff
DATEV-Check für nur eine Buchung
authorNiclas Zimmermann <niclas@kivitendo-premium.de>
Thu, 16 May 2013 10:28:50 +0000 (12:28 +0200)
committerNiclas Zimmermann <niclas@kivitendo-premium.de>
Thu, 16 May 2013 10:28:50 +0000 (12:28 +0200)
Bisher hat der DATEV-Check nach Erstellung einer Buchung immer den
ganzen Tag geprüft. Jetzt wird nur noch die Buchung selbst auf
DATEV-Kompatibilität geprüft.

SL/AP.pm
SL/AR.pm
SL/DATEV.pm
SL/GL.pm
SL/IR.pm
SL/IS.pm

index 54abcd17e4ada7633a51a3e72ed821ee3f9fdb63..171b82a11ef25073f5b1dbe4291d9c903f82dab1 100644 (file)
--- a/SL/AP.pm
+++ b/SL/AP.pm
@@ -416,6 +416,7 @@ sub post_transaction {
       dbh        => $dbh,
       from       => $transdate,
       to         => $transdate,
+      trans_id   => $form->{id},
     );
 
     $datev->export;
index 7958495839946f911cf257c2156c97b70d7c0afa..dd5488ad78da119db98b4575fe0fb10671ef22ff 100644 (file)
--- a/SL/AR.pm
+++ b/SL/AR.pm
@@ -331,6 +331,7 @@ sub post_transaction {
       dbh        => $dbh,
       from       => $transdate,
       to         => $transdate,
+      trans_id   => $form->{id},
     );
 
     $datev->export;
index 406f09d76be5cc9ae04b8227be49104e8530782d..dfd154236afea3d27729af5933a3235925a6a0c0 100644 (file)
@@ -193,6 +193,16 @@ sub to {
  return $self->{to};
 }
 
+sub trans_id {
+  my $self = shift;
+
+  if (@_) {
+    $self->{trans_id} = $_[0];
+  }
+
+  return $self->{trans_id};
+}
+
 sub accnofrom {
  my $self = shift;
 
@@ -342,6 +352,10 @@ sub _get_transactions {
 
   my $form     =  $main::form;
 
+  my $trans_id_filter = '';
+
+  $trans_id_filter = 'AND ac.trans_id = ' . $self->trans_id if $self->trans_id;
+
   my ($notsplitindex);
 
   $fromto      =~ s/transdate/ac\.transdate/g;
@@ -363,6 +377,7 @@ sub _get_transactions {
        LEFT JOIN chart c     ON (ac.chart_id    = c.id)
        WHERE (ar.id IS NOT NULL)
          AND $fromto
+         $trans_id_filter
          $filter
 
        UNION ALL
@@ -378,6 +393,7 @@ sub _get_transactions {
        LEFT JOIN chart c   ON (ac.chart_id  = c.id)
        WHERE (ap.id IS NOT NULL)
          AND $fromto
+         $trans_id_filter
          $filter
 
        UNION ALL
@@ -392,6 +408,7 @@ sub _get_transactions {
        LEFT JOIN chart c ON (ac.chart_id  = c.id)
        WHERE (gl.id IS NOT NULL)
          AND $fromto
+         $trans_id_filter
          $filter
 
        ORDER BY trans_id, acc_trans_id|;
index a422877356583d853d30ba8914d524de884aa576..864c02eabcecd09130cf0b9b5fa602d16a5b4e72 100644 (file)
--- a/SL/GL.pm
+++ b/SL/GL.pm
@@ -198,6 +198,7 @@ sub post_transaction {
       dbh        => $dbh,
       from       => $transdate,
       to         => $transdate,
+      trans_id   => $form->{id},
     );
 
     $datev->export;
index 73b3e14eda3ac703692421615b680a70bbbdbb64..35f5dcec4e6488cd83a266fee8262c218654507d 100644 (file)
--- a/SL/IR.pm
+++ b/SL/IR.pm
@@ -768,6 +768,7 @@ sub post_invoice {
       dbh        => $dbh,
       from       => $transdate,
       to         => $transdate,
+      trans_id   => $form->{id},
     );
 
     $datev->export;
index ce8db64b96ab4325cc4c366ffdd9b85f13392dc0..9ecc64818c9e3f17dfda5cca8c195aca2e49e394 100644 (file)
--- a/SL/IS.pm
+++ b/SL/IS.pm
@@ -1174,6 +1174,7 @@ sub post_invoice {
       dbh        => $dbh,
       from       => $transdate,
       to         => $transdate,
+      trans_id   => $form->{id},
     );
 
     $datev->export;