X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fio.pl;h=866e5ec32a05050339a8b9a26e709495764a01af;hb=159b5368d8c1bb261cb36fc8643de5ca09a7f1d6;hp=af69e4488106bc8f1c873bdd96972462c7634505;hpb=e055700faea1906bea6c03184ba4516b57cac887;p=kivitendo-erp.git diff --git a/bin/mozilla/io.pl b/bin/mozilla/io.pl index af69e4488..866e5ec32 100644 --- a/bin/mozilla/io.pl +++ b/bin/mozilla/io.pl @@ -370,7 +370,7 @@ sub display_row { if ($is_delivery_order) { map { $form->{"${_}_${i}"} = $form->format_amount(\%myconfig, $form->{"${_}_${i}"}) } qw(sellprice discount lastcost); - push @hidden_vars, qw(sellprice discount price_factor_id lastcost); + push @hidden_vars, qw(sellprice discount not_discountable price_factor_id lastcost); push @hidden_vars, "stock_${stock_in_out}_sum_qty", "stock_${stock_in_out}"; } @@ -489,7 +489,7 @@ sub select_item { qw(bin listprice inventory_accno income_accno expense_accno unit weight assembly taxaccounts partsgroup formel longdescription not_discountable part_payment_id partnotes id lastcost price_factor_id price_factor); - push @new_fields, "lizenzen" if $::lx_office_conf{system}->{lizenzen}; + push @new_fields, "lizenzen" if $::lx_office_conf{features}->{lizenzen}; push @new_fields, grep { m/^ic_cvar_/ } keys %{ $form->{item_list}->[0] }; my $i = 0; @@ -497,7 +497,7 @@ sub select_item { foreach my $ref (@{ $form->{item_list} }) { my $checked = ($i++) ? "" : "checked"; - if ($::lx_office_conf{system}->{lizenzen}) { + if ($::lx_office_conf{features}->{lizenzen}) { if ($ref->{inventory_accno} > 0) { $ref->{"lizenzen"} = qq||; foreach my $item (@{ $form->{LIZENZEN}{ $ref->{"id"} } }) { @@ -622,7 +622,7 @@ sub item_selected { $form->{payment_id} = $form->{"part_payment_id_$i"}; } - if ($::lx_office_conf{system}->{lizenzen}) { + if ($::lx_office_conf{features}->{lizenzen}) { map { $form->{"${_}_$i"} = $form->{"new_${_}_$j"} } qw(lizenzen); } @@ -703,11 +703,11 @@ sub new_item { $form->{old_callback} = $form->escape($form->{callback}, 1); $form->{callback} = $form->escape("$form->{script}?action=display_form", 1); - # save all form variables except action in a previousform variable - my $previousform = join '&', map { my $value = $form->{$_}; $value =~ s/&/%26/; "$_=$value" } grep { !/action/ } keys %$form; + # save all form variables except action in the session and keep the key in the previousform variable + my $previousform = $::auth->save_form_in_session(skip_keys => [ qw(action) ]); my @HIDDENS; - push @HIDDENS, { 'name' => 'previousform', 'value' => $form->escape($previousform, 1) }; + push @HIDDENS, { 'name' => 'previousform', 'value' => $previousform }; push @HIDDENS, map +{ 'name' => $_, 'value' => $form->{$_} }, qw(rowcount vc); push @HIDDENS, map +{ 'name' => $_, 'value' => $form->{"${_}_$form->{rowcount}"} }, qw(partnumber description unit); push @HIDDENS, { 'name' => 'taxaccount2', 'value' => $form->{taxaccounts} }; @@ -1538,17 +1538,7 @@ sub print_form { qw(invtotal ordtotal quototal subtotal linetotal listprice sellprice netprice discount tax taxbase total paid), - grep({ /^linetotal_\d+$/ || - /^listprice_\d+$/ || - /^sellprice_\d+$/ || - /^netprice_\d+$/ || - /^taxbase_\d+$/ || - /^discount_\d+$/ || - /^paid_\d+$/ || - /^subtotal_\d+$/ || - /^total_\d+$/ || - /^tax_\d+$/ - } keys(%{$form}))); + grep({ /^(?:linetotal|nodiscount_linetotal|listprice|sellprice|netprice|taxbase|discount|p_discount|discount_sub|nodiscount_sub|paid|subtotal|total|tax)_\d+$/ } keys(%{$form}))); reformat_numbers($output_numberformat, undef, qw(qty price_factor),