Invoice - add_ar_amount_row - bessere 'die' Fehlermeldung
authorG. Richardson <information@kivitendo-premium.de>
Mon, 16 May 2016 14:28:19 +0000 (16:28 +0200)
committerG. Richardson <information@kivitendo-premium.de>
Fri, 8 Jul 2016 13:03:53 +0000 (15:03 +0200)
SL/DB/Invoice.pm

index 99c2e11..7800daa 100644 (file)
@@ -325,7 +325,7 @@ sub add_ar_amount_row {
   die "not an ar invoice" if $self->invoice and not $self->customer_id;
 
   die "add_ar_amount_row needs a chart object as chart param" unless $params{chart} && $params{chart}->isa('SL::DB::Chart');
-  die unless $params{chart}->link =~ /AR_amount/;
+  die "chart must be an AR_amount chart" unless $params{chart}->link =~ /AR_amount/;
 
   my $acc_trans = [];