Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 705d2fe1

Von Jan Büren vor mehr als 1 Jahr hinzugefügt

  • ID 705d2fe16cb418aaa2840d0fdd0f547940ce44d3
  • Vorgänger 87733d61
  • Nachfolger 4e795d54

pay_invoice git als ersten Wert den verbuchten Betrag der Bankbuchung zurück

Unterschiede anzeigen:

SL/DB/Helper/Payment.pm
137 137
  my $rounded_params_amount = _round( $params{amount} ); # / $exchangerate);
138 138
  my $fx_gain_loss_amount = 0; # for fx_gain and fx_loss
139 139

  
140
  my $return_bank_amount;  # will be returned for invoice_amount
140 141
  my $db = $self->db;
141 142
  $db->with_transaction(sub {
142 143
    my $new_acc_trans;
......
162 163

  
163 164

  
164 165
      # total amount against bank, do we already know this by now?
166
      # Yes, method requires this
165 167
      $new_acc_trans = SL::DB::AccTransaction->new(trans_id   => $self->id,
166 168
                                                   chart_id   => $account_bank->id,
167 169
                                                   chart_link => $account_bank->link,
......
386 388
    1;
387 389

  
388 390
  }) || die t8('error while paying invoice #1 : ', $self->invnumber) . $db->error . "\n";
389

  
390
  $return_bank_amount *= -1;   # negative booking is positive bank transaction
391
                               # positive booking is negative bank transaction
392
  return wantarray ? ( { return_bank_amount => $return_bank_amount }, @new_acc_ids) : 1;
391
  return wantarray ? (abs($return_bank_amount), @new_acc_ids) : 1;
393 392
}
394 393

  
395 394
sub skonto_date {

Auch abrufbar als: Unified diff