Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision a3a6ec06

Von G. Richardson vor fast 7 Jahren hinzugefügt

  • ID a3a6ec066c6860a3aab44449d0620660665ed6e0
  • Vorgänger 0e5c0606
  • Nachfolger 69b298a0

DATEV-Export: Option "als Personenkonten exportieren"

statt der Sammelkontonummer wird beim Export immer die Kunden- bzw.
Lieferantennummer exportiert. Es wird noch nicht auf eine gültige
Kontonummer (z.B. 10000-69999 und 70000-99999) geprüft.

Unterschiede anzeigen:

SL/DATEV.pm
225 225
  }
226 226
}
227 227

  
228
sub use_pk {
229
 my $self = shift;
230

  
231
 if (@_) {
232
   $self->{use_pk} = $_[0];
233
 }
234

  
235
 return $self->{use_pk};
236
}
237

  
228 238
sub accnofrom {
229 239
 my $self = shift;
230 240

  
......
440 450

  
441 451
  my %all_taxchart_ids = selectall_as_map($form, $self->dbh, qq|SELECT DISTINCT chart_id, TRUE AS is_set FROM tax|, 'chart_id', 'is_set');
442 452

  
453
  my $ar_accno = "c.accno";
454
  my $ap_accno = "c.accno";
455
  if ( $self->use_pk ) {
456
    $ar_accno = "CASE WHEN ac.chart_link = 'AR' THEN ct.customernumber ELSE c.accno END as accno";
457
    $ap_accno = "CASE WHEN ac.chart_link = 'AP' THEN ct.vendornumber   ELSE c.accno END as accno";
458
  }
459

  
443 460
  my $query    =
444 461
    qq|SELECT ac.acc_trans_id, ac.transdate, ac.gldate, ac.trans_id,ar.id, ac.amount, ac.taxkey, ac.memo,
445 462
         ar.invnumber, ar.duedate, ar.amount as umsatz, ar.deliverydate, ar.itime::date,
446 463
         ct.name, ct.ustid, ct.customernumber AS vcnumber, ct.id AS customer_id, NULL AS vendor_id,
447
         c.accno, c.description AS accname, c.taxkey_id as charttax, c.datevautomatik, c.id, ac.chart_link AS link,
464
         $ar_accno, c.description AS accname, c.taxkey_id as charttax, c.datevautomatik, c.id, ac.chart_link AS link,
448 465
         ar.invoice,
449 466
         t.rate AS taxrate, t.taxdescription,
450 467
         'ar' as table,
......
473 490
       SELECT ac.acc_trans_id, ac.transdate, ac.gldate, ac.trans_id,ap.id, ac.amount, ac.taxkey, ac.memo,
474 491
         ap.invnumber, ap.duedate, ap.amount as umsatz, ap.deliverydate, ap.itime::date,
475 492
         ct.name, ct.ustid, ct.vendornumber AS vcnumber, NULL AS customer_id, ct.id AS vendor_id,
476
         c.accno, c.description AS accname, c.taxkey_id as charttax, c.datevautomatik, c.id, ac.chart_link AS link,
493
         $ap_accno, c.description AS accname, c.taxkey_id as charttax, c.datevautomatik, c.id, ac.chart_link AS link,
477 494
         ap.invoice,
478 495
         t.rate AS taxrate, t.taxdescription,
479 496
         'ap' as table,
......
956 973

  
957 974
    if ($trans_lines >= 2) {
958 975

  
976
      # Personenkontenerweiterung: accno has already been replaced if use_pk was set
959 977
      $datev_data{'gegenkonto'} = $transaction->[$haben]->{'accno'};
960 978
      $datev_data{'konto'}      = $transaction->[$soll]->{'accno'};
961 979
      if ($transaction->[$haben]->{'invnumber'} ne "") {
bin/mozilla/datev.pl
112 112
      $::form->{zeitraum}, $::form->{monat}, $::form->{quartal},
113 113
      $::form->{transdatefrom}, $::form->{transdateto},
114 114
    );
115
    $data{use_pk} = $::form->{use_pk};
115 116
  } else {
116 117
    die 'invalid exporttype';
117 118
  }
locale/de/all
1341 1341
  'Export date to'              => 'Exportdatum bis',
1342 1342
  'Export error in transaction #1: Rounding error too large #2' => 'Exportfehler in Transaktion #1: Zu großer Rundungsfehler (#2)',
1343 1343
  'Export error in transaction #1: Unbalanced ledger before next transaction (#2)' => 'Exportfehler in Transaktion #1: Unausgeglichene Buchung',
1344
  'Export with CV Charts'       => 'Mit Personenkonten exportieren',
1344 1345
  'Extend automatically by n months' => 'Automatische Verlängerung um x Monate',
1345 1346
  'Extended'                    => 'Gesamt',
1346 1347
  'Extended status'             => 'Erweiterter Status',
locale/en/all
1340 1340
  'Export date to'              => '',
1341 1341
  'Export error in transaction #1: Rounding error too large #2' => '',
1342 1342
  'Export error in transaction #1: Unbalanced ledger before next transaction (#2)' => '',
1343
  'Export with CV Charts'       => '',
1343 1344
  'Extend automatically by n months' => '',
1344 1345
  'Extended'                    => '',
1345 1346
  'Extended status'             => '',
templates/webpages/datev/export_bewegungsdaten.html
88 88
  <td><hr size=3 noshade></td>
89 89
  </tr>
90 90
  [% END %]
91
   <tr>
92
     <td>
93
        <table>
94
         <tr>
95
           <td align=left>[% 'Export with CV Charts' | $T8 %]</td>
96
           <td align=left></td>
97
           <td>[% L.checkbox_tag('use_pk', value => 1, checked => 0) %]</td>
98
         </tr>
99
        </table>
100
     </td>
101
   </tr>
102
   <tr>
103
  <td><hr size=3 noshade></td>
104
  </tr>
91 105
</table>
92 106

  
93 107
<input type=hidden name=beraternr value="[% beraternr %]">

Auch abrufbar als: Unified diff