Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision c5dccb51

Von Jan Büren vor etwa 5 Jahren hinzugefügt

  • ID c5dccb51a821e57f3888370bea51dab9f82c0639
  • Vorgänger e7e7d67b
  • Nachfolger 07181f33

Payment-Helper pay_invoice um Rückgabewert der acc_trans_ids erweitert

Unterschiede anzeigen:

SL/DB/Helper/Payment.pm
30 30

  
31 31
  my $is_sales = ref($self) eq 'SL::DB::Invoice';
32 32
  my $mult = $is_sales ? 1 : -1;  # multiplier for getting the right sign depending on ar/ap
33

  
33
  my @new_acc_ids;
34 34
  my $paid_amount = 0; # the amount that will be later added to $self->paid, should be in default currency
35 35

  
36 36
  # default values if not set
......
306 306
      }
307 307
    }
308 308

  
309
    push @new_acc_ids, ($new_acc_trans->acc_trans_id, $arap_booking->acc_trans_id);
309 310
    1;
310 311

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

  
313
  return 1;
314
};
313
  return wantarray ? @new_acc_ids : 1;
314
}
315 315

  
316 316
sub skonto_date {
317 317

  
......
844 844
If neither currency or currency_id are given as params, the currency of the
845 845
invoice is assumed to be the payment currency.
846 846

  
847
If successful the return value will be 1 in scalar context or in list context
848
the two ids (acc_trans_id) of the newly created bookings.
847 849
=item C<reference_account>
848 850

  
849 851
Returns a chart object which is the chart of the invoice with link AR or AP.

Auch abrufbar als: Unified diff