From: Sven Schöling Date: Mon, 12 Oct 2009 09:13:41 +0000 (+0200) Subject: Custom VAriables: Bei noch nicht erkannten Waren die Custom Vars erstmal ausblenden... X-Git-Tag: release-2.6.1beta1~236 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=5fc3e9bac3c6efa79600b86682fc8c4de8ff92f9;p=kivitendo-erp.git Custom VAriables: Bei noch nicht erkannten Waren die Custom Vars erstmal ausblenden (als invalid erkennen), bis das Gegenteil bekannt ist. --- diff --git a/bin/mozilla/io.pl b/bin/mozilla/io.pl index f3e92dc94..150f13a09 100644 --- a/bin/mozilla/io.pl +++ b/bin/mozilla/io.pl @@ -52,8 +52,8 @@ require "bin/mozilla/common.pl"; if (-f "bin/mozilla/custom_io.pl") { eval { require "bin/mozilla/custom_io.pl"; }; } -if (-f "bin/mozilla/$form->{login}_io.pl") { - eval { require "bin/mozilla/$form->{login}_io.pl"; }; +if (-f "bin/mozilla/$::form->{login}_io.pl") { + eval { require "bin/mozilla/$::form->{login}_io.pl"; }; } 1; @@ -93,7 +93,7 @@ use SL::AM; use Data::Dumper; sub _check_io_auth { - $auth->assert('part_service_assembly_edit | vendor_invoice_edit | sales_order_edit | invoice_edit |' . + $main::auth->assert('part_service_assembly_edit | vendor_invoice_edit | sales_order_edit | invoice_edit |' . 'request_quotation_edit | sales_quotation_edit | purchase_order_edit | ' . 'purchase_delivery_order_edit | sales_delivery_order_edit'); } @@ -950,7 +950,7 @@ sub quotation { require "bin/mozilla/$form->{script}"; - map { $form->{"select$_"} = "" } ($form->{vc}, currency); + map { $form->{"select$_"} = "" } ($form->{vc}, "currency"); $currency = $form->{currency}; @@ -1981,7 +1981,7 @@ sub _render_custom_variables_inputs { foreach my $cvar (@{ $form->{CVAR_CONFIGS}->{IC} }) { $cvar->{valid} = $params{part_id} ? CVar->get_custom_variables_validity(config_id => $cvar->{id}, trans_id => $params{part_id}) - : 1; + : 0; $cvar->{value} = $form->{"ic_cvar_" . $cvar->{name} . "_$params{row}"}; }