Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision afd79356

Von Jan Büren vor mehr als 8 Jahren hinzugefügt

  • ID afd79356b5ca54caac3f4f1d7e1a2b2dd1e97bd7
  • Vorgänger 081bb700
  • Nachfolger aa949f27

Keine Rechnungen mit Bankauszug verbuchen überbezahlen

Unterschiede anzeigen:

SL/Controller/BankTransaction.pm
397 397
        last;
398 398
      }
399 399
      # pay invoice or go to the next bank transaction if the amount is not sufficiently high
400
      if ($invoice->amount <= $amount_of_transaction) {
400
      if ($invoice->amount_open <= $amount_of_transaction) {
401 401
        $invoice->pay_invoice(chart_id     => $bank_transaction->local_bank_account->chart_id,
402 402
                              trans_id     => $invoice->id,
403
                              amount       => $invoice->amount,
403
                              amount       => $invoice->amount_open,
404 404
                              payment_type => $payment_type,
405 405
                              transdate    => $bank_transaction->transdate->to_kivitendo);
406 406
        if ($invoice->is_sales) {
407
          $amount_of_transaction -= $sign * $invoice->amount;
408
          $bank_transaction->invoice_amount($bank_transaction->invoice_amount + $invoice->amount);
407
          $amount_of_transaction -= $sign * $invoice->amount_open;
408
          $bank_transaction->invoice_amount($bank_transaction->invoice_amount + $invoice->amount_open);
409 409
        } else {
410
          $amount_of_transaction += $sign * $invoice->amount if (!$invoice->is_sales);
411
          $bank_transaction->invoice_amount($bank_transaction->invoice_amount - $invoice->amount);
410
          $amount_of_transaction += $sign * $invoice->amount_open if (!$invoice->is_sales);
411
          $bank_transaction->invoice_amount($bank_transaction->invoice_amount - $invoice->amount_open);
412 412
        }
413 413
      } else {
414 414
        $invoice->pay_invoice(chart_id     => $bank_transaction->local_bank_account->chart_id,

Auch abrufbar als: Unified diff