X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/98452aaaecf90a5689c21cc959074976985506c6..fce441db:/SL/IS.pm diff --git a/SL/IS.pm b/SL/IS.pm index b19705364..e17efc6e6 100644 --- a/SL/IS.pm +++ b/SL/IS.pm @@ -34,8 +34,6 @@ package IS; -#use strict; - use List::Util qw(max); use SL::AM; @@ -49,6 +47,8 @@ use SL::MoreCommon; use SL::IC; use Data::Dumper; +use strict; + sub invoice_details { $main::lxdebug->enter_sub(); @@ -155,7 +155,7 @@ sub invoice_details { my @payment_arrays = qw(payment paymentaccount paymentdate paymentsource paymentmemo); - map { $form->{TEMPLATE_ARRAYS}{$_} => [] } (@arrays, @tax_arrays, @payment_arrays); + map { $form->{TEMPLATE_ARRAYS}->{$_} = [] } (@arrays, @tax_arrays, @payment_arrays); foreach $item (sort { $a->[1] cmp $b->[1] } @partsgroup) { $i = $item->[0]; @@ -737,8 +737,6 @@ sub post_invoice { } } - $form->{datepaid} = $form->{invdate}; - # total payments, don't move we need it here for my $i (1 .. $form->{paidaccounts}) { if ($form->{type} eq "credit_note") { @@ -1978,12 +1976,10 @@ sub get_pricegroups_for_parts { $id = $form->{"id_$i"}; if (!($form->{"id_$i"}) and $form->{"new_id_$i"}) { - $id = $form->{"new_id_$i"}; } - my ($price, $selectedpricegroup_id) = split(/--/, - $form->{"sellprice_pg_$i"}); + my ($price, $selectedpricegroup_id) = split(/--/, $form->{"sellprice_pg_$i"}); my $pricegroup_old = $form->{"pricegroup_old_$i"}; $form->{"new_pricegroup_$i"} = $selectedpricegroup_id; @@ -2056,14 +2052,11 @@ sub get_pricegroups_for_parts { # if there is an exchange rate change price if (($form->{exchangerate} * 1) != 0) { - $pkr->{price} /= $form->{exchangerate}; } $pkr->{price} *= $form->{"basefactor_$i"}; - $pkr->{price} *= $basefactor; - $pkr->{price} = $form->format_amount($myconfig, $pkr->{price}, 5); if ($selectedpricegroup_id eq undef) {