From: Moritz Bunkus Date: Fri, 12 Apr 2013 14:46:44 +0000 (+0200) Subject: Rose-Fremdschlüssel richtig benennen: wiederkehrende Rechnungen fixen X-Git-Tag: release-3.1.0beta1~499 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=64262cd7d40e179101b61e14600741abb287c420;p=kivitendo-erp.git Rose-Fremdschlüssel richtig benennen: wiederkehrende Rechnungen fixen --- diff --git a/SL/DB/Invoice.pm b/SL/DB/Invoice.pm index 77d6769a8..861c92ae4 100644 --- a/SL/DB/Invoice.pm +++ b/SL/DB/Invoice.pm @@ -90,7 +90,7 @@ sub new_from { croak("Unsupported source object type '" . ref($source) . "'") unless ref($source) =~ m/^ SL::DB:: (?: Order | DeliveryOrder ) $/x; croak("Cannot create invoices for purchase records") unless $source->customer_id; - my $terms = $source->can('payment_id') && $source->payment_id ? $source->payment_term->terms_netto : 0; + my $terms = $source->can('payment_id') && $source->payment_id ? $source->payment_terms->terms_netto : 0; my %args = ( map({ ( $_ => $source->$_ ) } qw(customer_id taxincluded shippingpoint shipvia notes intnotes curr salesman_id cusordnumber ordnumber quonumber department_id cp_id language_id payment_id delivery_customer_id delivery_vendor_id taxzone_id shipto_id