From: Martin Helmling martin.helmling@octosoft.eu Date: Fri, 24 Jun 2016 10:54:19 +0000 (+0200) Subject: Vendor/Customer Name in FlattenToForm setzen X-Git-Tag: release-3.4.1~17^2~1 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=5e9cefa2067da6326e3cb9ab6834c51f21bfca2c;p=kivitendo-erp.git Vendor/Customer Name in FlattenToForm setzen In For.pm wird bei der Druckvorbereitung Customer-/Vendorname gesetzt. Damit z.B. bei Massendruck oder neuen Controllern diese Variable auch zur Verfügung stehen werden sie , falls die Objekte vorhanden in die Form geladen --- diff --git a/SL/DB/Helper/FlattenToForm.pm b/SL/DB/Helper/FlattenToForm.pm index a0daf4491..7a3922c99 100644 --- a/SL/DB/Helper/FlattenToForm.pm +++ b/SL/DB/Helper/FlattenToForm.pm @@ -20,8 +20,10 @@ sub flatten_to_form { if ( $vc eq 'customer' ) { $form->{customer_id} = $self->customer_id; + $form->{customer} = $self->customer->name if $self->customer; } else { - $form->{vendor_id} = $self->vendor_id; + $form->{vendor_id} = $self->vendor_id; + $form->{vendor} = $self->vendor->name if $self->vendor; }; if (_has($self, 'transdate')) { @@ -31,7 +33,7 @@ sub flatten_to_form { $form->{$transdate_idx} = $self->transdate->to_lxoffice; } - $form->{vc} = $vc if ref($self) =~ m{^SL::DB::(?:.*Invoice|Order)}; + $form->{vc} = $vc if ref($self) =~ m{^SL::DB::(?:.*Invoice|.*Order)}; my @vc_fields = (qw(account_number bank bank_code bic business city contact country creditlimit department_1 department_2 discount email fax gln homepage iban language name