]> wagnertech.de Git - mfinanz.git/blobdiff - SL/IS.pm
Bugfixes zum Rechnungstemplate
[mfinanz.git] / SL / IS.pm
index b197053640cfb905c012e4a173e2e973348f21e7..e17efc6e6da991880d9056b1c6a3eb00682d2b55 100644 (file)
--- a/SL/IS.pm
+++ b/SL/IS.pm
@@ -34,8 +34,6 @@
 
 package IS;
 
 
 package IS;
 
-#use strict;
-
 use List::Util qw(max);
 
 use SL::AM;
 use List::Util qw(max);
 
 use SL::AM;
@@ -49,6 +47,8 @@ use SL::MoreCommon;
 use SL::IC;
 use Data::Dumper;
 
 use SL::IC;
 use Data::Dumper;
 
+use strict;
+
 sub invoice_details {
   $main::lxdebug->enter_sub();
 
 sub invoice_details {
   $main::lxdebug->enter_sub();
 
@@ -155,7 +155,7 @@ sub invoice_details {
 
   my @payment_arrays = qw(payment paymentaccount paymentdate paymentsource paymentmemo);
 
 
   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];
 
   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") {
   # 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->{"id_$i"};
 
     if (!($form->{"id_$i"}) and $form->{"new_id_$i"}) {
-
       $id = $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;
 
     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) {
 
       # if there is an exchange rate change price
       if (($form->{exchangerate} * 1) != 0) {
-
         $pkr->{price} /= $form->{exchangerate};
       }
 
       $pkr->{price} *= $form->{"basefactor_$i"};
         $pkr->{price} /= $form->{exchangerate};
       }
 
       $pkr->{price} *= $form->{"basefactor_$i"};
-
       $pkr->{price} *= $basefactor;
       $pkr->{price} *= $basefactor;
-
       $pkr->{price} = $form->format_amount($myconfig, $pkr->{price}, 5);
 
       if ($selectedpricegroup_id eq undef) {
       $pkr->{price} = $form->format_amount($myconfig, $pkr->{price}, 5);
 
       if ($selectedpricegroup_id eq undef) {