Revision c0b95291
Von Sven Schöling vor etwa 4 Jahren hinzugefügt
bin/mozilla/gl.pl | ||
---|---|---|
792 | 792 |
$form->{totaldebit} = 0; |
793 | 793 |
$form->{totalcredit} = 0; |
794 | 794 |
|
795 |
my %project_labels = (); |
|
796 |
my @project_values = (""); |
|
797 |
foreach my $item (@{ $form->{"ALL_PROJECTS"} }) { |
|
798 |
push(@project_values, $item->{"id"}); |
|
799 |
$project_labels{$item->{"id"}} = $item->{"projectnumber"}; |
|
800 |
} |
|
801 |
|
|
802 | 795 |
my %charts_by_id = map { ($_->{id} => $_) } @{ $::form->{ALL_CHARTS} }; |
803 | 796 |
my $default_chart = $::form->{ALL_CHARTS}[0]; |
804 | 797 |
my $transdate = $::form->{transdate} ? DateTime->from_kivitendo($::form->{transdate}) : DateTime->today_local; |
... | ... | |
914 | 907 |
} |
915 | 908 |
} |
916 | 909 |
|
917 |
my $projectnumber = |
|
918 |
NTI($cgi->popup_menu('-name' => "project_id_$i", |
|
919 |
'-values' => \@project_values, |
|
920 |
'-labels' => \%project_labels, |
|
921 |
'-default' => $form->{"project_id_$i"} )); |
|
922 |
my $projectnumber_hidden = qq| |
|
923 |
<input type="hidden" name="project_id_$i" value="$form->{"project_id_$i"}">|; |
|
910 |
my $projectnumber = SL::Presenter::Project::picker("project_id_$i", $form->{"project_id_$i"}); |
|
911 |
my $projectnumber_hidden = SL::Presenter::Tag::hidden_tag("project_id_$i", $form->{"project_id_$i"}); |
|
924 | 912 |
|
925 | 913 |
my $copy2credit = $i == 1 ? 'onkeyup="copy_debit_to_credit()"' : ''; |
926 | 914 |
my $balance = $form->format_amount(\%::myconfig, $balances{$accno_id} // 0, 2, 'DRCR'); |
... | ... | |
1099 | 1087 |
|
1100 | 1088 |
my ($init) = @_; |
1101 | 1089 |
|
1102 |
$::request->layout->add_javascripts("autocomplete_chart.js", "kivi.File.js", "kivi.GL.js", "kivi.RecordTemplate.js"); |
|
1103 |
|
|
1104 |
my @old_project_ids = grep { $_ } map{ $::form->{"project_id_$_"} } 1..$::form->{rowcount}; |
|
1090 |
$::request->layout->add_javascripts("autocomplete_chart.js", "autocomplete_project.js", "kivi.File.js", "kivi.GL.js", "kivi.RecordTemplate.js"); |
|
1105 | 1091 |
|
1106 |
$::form->get_lists("projects" => { "key" => "ALL_PROJECTS",
|
|
1107 |
"all" => 0,
|
|
1108 |
"old_id" => \@old_project_ids },
|
|
1092 |
my @old_project_ids = grep { $_ } map{ $::form->{"project_id_$_"} } 1..$::form->{rowcount};
|
|
1093 |
my @conditions = @old_project_ids ? (id => \@old_project_ids) : ();
|
|
1094 |
$::form->{ALL_PROJECTS} = SL::DB::Manager::Project->get_all_sorted(query => [ or => [ active => 1, @conditions ]]);
|
|
1109 | 1095 |
|
1110 |
"charts" => { "key" => "ALL_CHARTS", |
|
1111 |
"transdate" => $::form->{transdate} }); |
|
1096 |
$::form->get_lists( |
|
1097 |
"charts" => { "key" => "ALL_CHARTS", "transdate" => $::form->{transdate} }, |
|
1098 |
); |
|
1112 | 1099 |
|
1113 | 1100 |
# we cannot book on charttype header |
1114 | 1101 |
@{ $::form->{ALL_CHARTS} } = grep { $_->{charttype} ne 'H' } @{ $::form->{ALL_CHARTS} }; |
Auch abrufbar als: Unified diff
GL: Projektpicker