Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 9a12c524

Von Jan Büren vor fast 3 Jahren hinzugefügt

  • ID 9a12c524981abc83079bc7bf17717a47c1600f43
  • Vorgänger 8ce50957
  • Nachfolger c7364278

Anzahlungsrechnung: Beim Zahlungseingang auf das Steuertransfer-Konto buchen

DATEV benötigt das wirkliche Brutto-Automatik-Konto, um die MwSt zu buchen

Unterschiede anzeigen:

SL/DB/Helper/Payment.pm
312 312
        ($netamount, $taxamount) = Form->calculate_tax($arap_amount, $tax->rate, 1, $roundplaces);
313 313
        # for debugging database set
314 314
        my $fullmatch = $netamount == $entry->{amount} ? '::netamount total true' : '';
315
        my $transfer_chart = $tax->taxkey == 2 ? SL::DB::Chart->new(id => $::instance_conf->get_advance_payment_taxable_7_id)->load
316
                          :  $tax->taxkey == 3 ? SL::DB::Chart->new(id => $::instance_conf->get_advance_payment_taxable_19_id)->load
317
                          :  undef;
318
        die "No Transfer Chart for Advance Payment" unless ref $transfer_chart eq 'SL::DB::Chart';
319

  
320
        my $arap_full_booking= SL::DB::AccTransaction->new(trans_id   => $self->id,
321
                                                           chart_id   => $clearing_chart->id,
322
                                                           chart_link => $clearing_chart->link,
323
                                                           amount     => $arap_amount * -1, # full amount
324
                                                           transdate  => $transdate_obj,
325
                                                           source     => 'Automatic Tax Booking for Payment in Advance' . $fullmatch,
326
                                                           taxkey     => 0,
327
                                                           tax_id     => SL::DB::Manager::Tax->find_by(taxkey => 0)->id);
328
        $arap_full_booking->save;
329
        push @new_acc_ids, $arap_full_booking->acc_trans_id;
330

  
331
        my $arap_tax_booking= SL::DB::AccTransaction->new(trans_id   => $self->id,
332
                                                          chart_id   => $transfer_chart->id,
333
                                                          chart_link => $transfer_chart->link,
334
                                                          amount     => _round($netamount), # full amount
335
                                                          transdate  => $transdate_obj,
336
                                                          source     => 'Automatic Tax Booking for Payment in Advance' . $fullmatch,
337
                                                          taxkey     => $tax->taxkey,
338
                                                          tax_id     => $tax->id);
339
        $arap_tax_booking->save;
340
        push @new_acc_ids, $arap_tax_booking->acc_trans_id;
341

  
315 342
        my $tax_booking= SL::DB::AccTransaction->new(trans_id   => $self->id,
316 343
                                                     chart_id   => $tax->chart_id,
317 344
                                                     chart_link => $tax->chart->link,
318 345
                                                     amount     => _round($taxamount),
319 346
                                                     transdate  => $transdate_obj,
320 347
                                                     source     => 'Automatic Tax Booking for Payment in Advance' . $fullmatch,
321
                                                     taxkey     => $tax->taxkey,
322
                                                     tax_id     => $tax->id);
323
        $tax_booking->save;
324
        push @new_acc_ids, $tax_booking->acc_trans_id;
325
        my $arap_tax_booking= SL::DB::AccTransaction->new(trans_id   => $self->id,
326
                                                     chart_id   => $clearing_chart->id,
327
                                                     chart_link => $clearing_chart->link,
328
                                                     amount     => _round($taxamount * -1),
329
                                                     transdate  => $transdate_obj,
330
                                                     source     => 'Automatic Tax Booking for Payment in Advance' . $fullmatch,
331 348
                                                     taxkey     => 0,
332 349
                                                     tax_id     => SL::DB::Manager::Tax->find_by(taxkey => 0)->id);
333
        $arap_tax_booking->save;
334
        push @new_acc_ids, $arap_tax_booking->acc_trans_id;
350

  
351
        $tax_booking->save;
352
        push @new_acc_ids, $tax_booking->acc_trans_id;
335 353
      }
336 354
    }
337 355
    $fx_gain_loss_amount *= -1 if $self->is_sales;

Auch abrufbar als: Unified diff