From db9ec33ad27c32416647a21d82217959aa34bf0f Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Mon, 17 Feb 2014 14:16:01 +0100 Subject: [PATCH 1/1] =?utf8?q?SL::Form->prepare=5Ffor=5Fprinting:=20Variab?= =?utf8?q?len=20aus=20%::myconfig=20sowie=20output=5F*format=20zur=20Verf?= =?utf8?q?=C3=BCgung=20stellen?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/Form.pm | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/SL/Form.pm b/SL/Form.pm index 218172427..0c532ce6e 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -3326,6 +3326,13 @@ sub prepare_for_printing { # compatibility. $self->{$_} = $defaults->$_ for qw(company address taxnumber co_ustid duns sepa_creditor_id); + $self->{"myconfig_${_}"} = $::myconfig{$_} for grep { $_ ne 'dbpasswd' } keys %::myconfig; + + if (!$self->{employee_id}) { + $self->{"employee_${_}"} = $::myconfig{$_} for qw(email tel fax name signature); + $self->{"employee_${_}"} = $defaults->$_ for qw(address businessnumber co_ustid company duns sepa_creditor_id taxnumber); + } + # set shipto from billto unless set my $has_shipto = any { $self->{"shipto$_"} } qw(name street zipcode city country contact); if (!$has_shipto && ($self->{type} =~ m/^(?:purchase_order|request_quotation)$/)) { @@ -3344,6 +3351,10 @@ sub prepare_for_printing { $output_longdates = 1; } + $self->{myconfig_output_dateformat} = $output_dateformat; + $self->{myconfig_output_longdates} = $output_longdates; + $self->{myconfig_output_numberformat} = $output_numberformat; + # Retrieve accounts for tax calculation. IC->retrieve_accounts(\%::myconfig, $self, map { $_ => $self->{"id_$_"} } 1 .. $self->{rowcount}); -- 2.20.1