From 79cc78cabcd7792319f36aa278fa9b984bc7fe99 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Mon, 22 Nov 2010 18:02:38 +0100 Subject: [PATCH] =?utf8?q?Mehr=20Felder=20setzen=20(bessere=20Kompatibilit?= =?utf8?q?=C3=A4t=20mit=20=C3=A4lterem=20Lx-Office-Code)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/DB/Helper/FlattenToForm.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/SL/DB/Helper/FlattenToForm.pm b/SL/DB/Helper/FlattenToForm.pm index 710fb337b..eb034d647 100644 --- a/SL/DB/Helper/FlattenToForm.pm +++ b/SL/DB/Helper/FlattenToForm.pm @@ -16,8 +16,8 @@ sub flatten_to_form { _copy($self, $form, '', '', 0, qw(id type taxzone_id ordnumber quonumber invnumber donumber cusordnumber taxincluded shippingpoint shipvia notes intnotes curr cp_id employee_id salesman_id closed department_id language_id payment_id delivery_customer_id delivery_vendor_id shipto_id proforma - globalproject_id delivered transaction_description container_type accepted_by_customer orddate quodate reqdate gldate duedate deliverydate - datepaid invoice terms storno storno_id dunning_config_id)); + globalproject_id delivered transaction_description container_type accepted_by_customer invoice terms storno storno_id dunning_config_id + orddate quodate reqdate gldate duedate deliverydate datepaid transdate)); if (_has($self, 'transdate')) { my $transdate_idx = ref($self) eq 'SL::DB::Order' ? ($self->quotation ? 'quodate' : 'orddate') @@ -26,6 +26,8 @@ sub flatten_to_form { $form->{$transdate_idx} = $self->transdate->to_lxoffice; } + $self->{vc} = $vc if ref($self) =~ /^SL::DB::.*Invoice/; + _copy($self, $form, '', '', 1, qw(amount netamount marge_total marge_percent container_remaining_weight container_remaining_volume paid)); _copy($self->$vc, $form, "${vc}_", '', 0, map { $_->name } ref($self->$vc)->meta->columns); -- 2.20.1