Globale Projektnummer in Einzelpositionen
authorNiclas Zimmermann <niclas@kivitendo-premium.de>
Fri, 9 Nov 2012 11:31:46 +0000 (12:31 +0100)
committerNiclas Zimmermann <niclas@kivitendo-premium.de>
Fri, 9 Nov 2012 11:59:37 +0000 (12:59 +0100)
In Debitoren/Kreditorenbuchungen wird jetzt die globale Projektnummer als
Projektnummer in der letzten Position übernommen.

Behebt #1939.

bin/mozilla/ap.pl
bin/mozilla/ar.pl

index 0654d86..dcca628 100644 (file)
@@ -569,7 +569,7 @@ $jsscript
       NTI($cgi->popup_menu('-name' => "project_id_$i",
                            '-values' => \@project_values,
                            '-labels' => \%project_labels,
-                           '-default' => $form->{"project_id_$i"} ));
+                           '-default' => ($i==$form->{rowcount})? $form->{globalproject_id} : $form->{"project_id_$i"} ));
 
     print qq|
         <tr>
index 80c87f9..655f35a 100644 (file)
@@ -333,7 +333,7 @@ sub form_header {
     my $transaction = {
       amount     => $form->{"amount_$i"},
       tax        => $form->{"tax_$i"},
-      project_id => $form->{"project_id_$i"},
+      project_id => ($i==$form->{rowcount}) ? $form->{globalproject_id} : $form->{"project_id_$i"},
     };
 
     my $selected_accno_full;