Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision dd48c9b7

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

  • ID dd48c9b71987bd6abc3beae25456a64f836fd74e
  • Vorgänger 020cc0b2
  • Nachfolger acba025a

DATEV: Debitoren/Kreditoren Split gilt nicht in Dialogbuchen

Unterschiede anzeigen:

SL/DATEV.pm
377 377
         ct.name, ct.ustid,
378 378
         c.accno, c.taxkey_id as charttax, c.datevautomatik, c.id, ac.chart_link AS link,
379 379
         ar.invoice,
380
         t.rate AS taxrate
380
         t.rate AS taxrate,
381
         'ar' as table
381 382
       FROM acc_trans ac
382 383
       LEFT JOIN ar          ON (ac.trans_id    = ar.id)
383 384
       LEFT JOIN customer ct ON (ar.customer_id = ct.id)
......
395 396
         ct.name,ct.ustid,
396 397
         c.accno, c.taxkey_id as charttax, c.datevautomatik, c.id, ac.chart_link AS link,
397 398
         ap.invoice,
398
         t.rate AS taxrate
399
         t.rate AS taxrate,
400
         'ap' as table
399 401
       FROM acc_trans ac
400 402
       LEFT JOIN ap        ON (ac.trans_id  = ap.id)
401 403
       LEFT JOIN vendor ct ON (ap.vendor_id = ct.id)
......
413 415
         gl.description AS name, NULL as ustid,
414 416
         c.accno, c.taxkey_id as charttax, c.datevautomatik, c.id, ac.chart_link AS link,
415 417
         FALSE AS invoice,
416
         t.rate AS taxrate
418
         t.rate AS taxrate,
419
         'gl' as table
417 420
       FROM acc_trans ac
418 421
       LEFT JOIN gl      ON (ac.trans_id  = gl.id)
419 422
       LEFT JOIN chart c ON (ac.chart_id  = c.id)
......
539 542
      # Problem: we can't distinguish between AR and AP and normal invoices via boolean "invoice"
540 543
      # for AR and AP transaction exit the loop as soon as an AR or AP account is found
541 544
      # there must be only one AR or AP chart in the booking
542
      if ( $trans->[$j]->{'link'} eq 'AR' or $trans->[$j]->{'link'} eq 'AP') {
545
      # since it is possible to do this kind of things with GL too, make sure those don't get aborted in case someone
546
      # manually pays an invoice in GL.
547
      if ($trans->[$j]->{table} ne 'gl' and ($trans->[$j]->{'link'} eq 'AR' or $trans->[$j]->{'link'} eq 'AP')) {
543 548
        $notsplitindex = $j;   # position in booking with highest amount
544 549
        $absumsatz     = $trans->[$j]->{'amount'};
545 550
        last;

Auch abrufbar als: Unified diff