X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fio.pl;h=fed2ff74c108147a93d05fe13cdf2305eca21bff;hb=044d18fff505b6823db1e5093fef96577e420afa;hp=6a0d2fc403a0ef94d01520f8361c5c4a17dd3767;hpb=ad2e3220c7da79f7849f6931ed6cdb6e3f497feb;p=kivitendo-erp.git diff --git a/bin/mozilla/io.pl b/bin/mozilla/io.pl index 6a0d2fc40..fed2ff74c 100644 --- a/bin/mozilla/io.pl +++ b/bin/mozilla/io.pl @@ -229,7 +229,6 @@ sub display_row { } my $this_unit = $form->{"unit_$i"}; $this_unit = $form->{"selected_unit_$i"} if AM->convert_unit($this_unit, $form->{"selected_unit_$i"}, $all_units); - $this_unit ||= "kg"; if (0 < scalar @{ $form->{ALL_PRICE_FACTORS} }) { my @values = ('', map { $_->{id} } @{ $form->{ALL_PRICE_FACTORS} }); @@ -1166,7 +1165,7 @@ sub print_options { push @MEDIA, grep $_, opthash("screen", $form->{OP}{screen}, $locale->text('Screen')), - (scalar @{ $form->{printers} } && $main::latex_templates) ? + ($form->{printers} && scalar @{ $form->{printers} } && $main::latex_templates) ? opthash("printer", $form->{OP}{printer}, $locale->text('Printer')) : undef, ($main::latex_templates && !$options{no_queue}) ? opthash("queue", $form->{OP}{queue}, $locale->text('Queue')) : undef @@ -1781,7 +1780,7 @@ sub ship_to { my @shipto_vars = qw(shiptoname shiptostreet shiptozipcode shiptocity shiptocountry - shiptocontact shiptophone shiptofax shiptoemail + shiptocontact shiptocp_gender shiptophone shiptofax shiptoemail shiptodepartment_1 shiptodepartment_2); my @addr_vars = @@ -1796,6 +1795,19 @@ sub ship_to { ? $locale->text('Customer Number') : $locale->text('Vendor Number'); + # sieht nicht nett aus, funktioniert aber + # das vorausgewählte select-feld wird über shiptocp_gender + # entsprechend vorbelegt + my $selected_m=''; + my $selected_f=''; + if ($form->{shiptocp_gender} eq 'm') { + $selected_m='selected'; + $selected_f=''; + } elsif ($form->{shiptocp_gender} eq 'f') { + $selected_m=''; + $selected_f='selected'; + } + # get pricegroups for parts IS->get_pricegroups_for_parts(\%myconfig, \%$form); @@ -1868,6 +1880,15 @@ sub ship_to { $form->{contact} + + | . $locale->text('Gender') . qq| + + + + | . $locale->text('Phone') . qq| $form->{phone} @@ -1977,11 +1998,7 @@ sub relink_accounts { } $form->{"taxaccounts"} = ""; - for (my $i = 1; $i <= $form->{"rowcount"}; $i++) { - if ($form->{"id_$i"}) { - IC->retrieve_accounts(\%myconfig, $form, $form->{"id_$i"}, $i, 1); - } - } + IC->retrieve_accounts(\%myconfig, $form, map { $_ => $form->{"id_$_"} } 1 .. $form->{rowcount}); $main::lxdebug->leave_sub(); } @@ -2076,7 +2093,7 @@ sub _update_custom_variables { my $form = $main::form; - $form->{CVAR_CONFIGS} ||= { }; + $form->{CVAR_CONFIGS} = { } unless ref $form->{CVAR_CONFIGS} eq 'HASH'; $form->{CVAR_CONFIGS}->{IC} ||= CVar->get_configs(module => 'IC'); $main::lxdebug->leave_sub();