Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 98a59d3e

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

  • ID 98a59d3e5f8bcb062e1a442f4cb1fbb5d0cca793
  • Vorgänger 2a6cee7b
  • Nachfolger 9b726ff9

Refactoring: BankTransaction

minimalen aufgeräumt. Alte Copy&Paste doppelte Checks
an der Stelle entfernt, die ich gelesen und verstanden habe.

Unterschiede anzeigen:

SL/Controller/BankTransaction.pm
405 405
          $amount_of_transaction -= $sign * $invoice->open_amount;
406 406
          $bank_transaction->invoice_amount($bank_transaction->invoice_amount + $invoice->open_amount);
407 407
        } else {
408
          $amount_of_transaction += $sign * $invoice->open_amount if (!$invoice->is_sales);
408
          $amount_of_transaction += $sign * $invoice->open_amount;
409 409
          $bank_transaction->invoice_amount($bank_transaction->invoice_amount - $invoice->open_amount);
410 410
        }
411 411
        # ... and then pay the invoice
......
420 420
                              amount       => $amount_of_transaction,
421 421
                              payment_type => $payment_type,
422 422
                              transdate    => $bank_transaction->transdate->to_kivitendo);
423
        $bank_transaction->invoice_amount($bank_transaction->amount) if $invoice->is_sales;
424
        $bank_transaction->invoice_amount($bank_transaction->amount) if !$invoice->is_sales;
423
        $bank_transaction->invoice_amount($bank_transaction->amount);
425 424
        $amount_of_transaction = 0;
426 425
      }
427 426

  

Auch abrufbar als: Unified diff