}
  return $self->{locked};
 }
+sub imported {
+ my $self = shift;
+
+ if (@_) {
+   $self->{imported} = $_[0];
+ }
+ return $self->{imported};
+}
 
 sub generate_datev_data {
   $main::lxdebug->enter_sub();
     $ar_accno = "CASE WHEN ac.chart_link = 'AR' THEN ct.customernumber ELSE c.accno END as accno";
     $ap_accno = "CASE WHEN ac.chart_link = 'AP' THEN ct.vendornumber   ELSE c.accno END as accno";
   }
+  my $gl_imported;
+  if ( !$self->imported ) {
+    $gl_imported = " AND NOT imported";
+  }
 
   my $query    =
     qq|SELECT ac.acc_trans_id, ac.transdate, ac.gldate, ac.trans_id,ar.id, ac.amount, ac.taxkey, ac.memo,
          $trans_id_filter
          $gl_itime_filter
          $gl_department_id_filter
+         $gl_imported
          $filter
 
        ORDER BY trans_id, acc_trans_id|;
 
   employee_id    => { type => 'integer' },
   gldate         => { type => 'date', default => 'now' },
   id             => { type => 'integer', not_null => 1, sequence => 'glid' },
+  imported       => { type => 'boolean', default => 'false' },
   itime          => { type => 'timestamp', default => 'now()' },
   mtime          => { type => 'timestamp' },
   notes          => { type => 'text' },
 
     );
     $data{use_pk} = $::form->{use_pk};
     $data{locked} = $::form->{locked};
+    $data{imported} = $::form->{imported};
   } else {
     die 'invalid exporttype';
   }
 
   'Export date to'              => 'Exportdatum bis',
   'Export error in transaction #1: Rounding error too large #2' => 'Exportfehler in Transaktion #1: Zu großer Rundungsfehler (#2)',
   'Export error in transaction #1: Unbalanced ledger before next transaction (#2)' => 'Exportfehler in Transaktion #1: Unausgeglichene Buchung',
+  'Export imported bookings'    => 'Importierte Buchungen exportieren',
   'Export with CV Charts'       => 'Mit Personenkonten exportieren',
   'Extend automatically by n months' => 'Automatische Verlängerung um x Monate',
   'Extended'                    => 'Gesamt',
 
--- /dev/null
+-- @tag: add_gl_imported
+-- @description: Dialogbuchungsimport entsprechend kennzeichnen
+-- @depends: release_3_5_6
+
+ALTER TABLE gl ADD imported BOOLEAN DEFAULT 'f';
+
 
            <td align=left>[% 'Lock bookings' | $T8 %]</td>
            <td align=left></td>
            <td colspan="3">[% L.yes_no_tag('locked', 0) %]</td>
+        </tr>
+         <tr>
+           <td align=left>[% 'Export imported bookings' | $T8 %]</td>
+           <td align=left></td>
+           <td colspan="3">[% L.yes_no_tag('imported', 0) %]</td>
         </tr>
         </table>
      </td>