Revision affd886b
Von Sven Schöling vor mehr als 4 Jahren hinzugefügt
bin/mozilla/ap.pl | ||
---|---|---|
|
||
$form->{creditremaining_plus} = ($form->{creditremaining} =~ /-/) ? "0" : "1";
|
||
|
||
my @old_project_ids = ();
|
||
map(
|
||
{
|
||
if ($form->{"project_id_$_"}) {
|
||
push(@old_project_ids, $form->{"project_id_$_"});
|
||
}
|
||
}
|
||
(1..$form->{"rowcount"})
|
||
);
|
||
|
||
$form->get_lists("projects" => { "key" => "ALL_PROJECTS",
|
||
"all" => 0,
|
||
"old_id" => \@old_project_ids },
|
||
"charts" => { "key" => "ALL_CHARTS",
|
||
$form->get_lists("charts" => { "key" => "ALL_CHARTS",
|
||
"transdate" => $form->{transdate} },
|
||
);
|
||
|
||
... | ... | |
|
||
$form->{ALL_DEPARTMENTS} = SL::DB::Manager::Department->get_all_sorted;
|
||
|
||
my %project_labels = ();
|
||
foreach my $item (@{ $form->{"ALL_PROJECTS"} }) {
|
||
$project_labels{$item->{id}} = $item->{projectnumber};
|
||
}
|
||
my %project_labels = map { $_->id => $_->projectnumber } @{ SL::DB::Manager::Project->get_all };
|
||
|
||
my %charts;
|
||
my $default_ap_amount_chart_id;
|
||
... | ... | |
my $follow_up_vc = $form->{vendor_id} ? SL::DB::Vendor->load_cached($form->{vendor_id})->name : '';
|
||
my $follow_up_trans_info = "$form->{invnumber} ($follow_up_vc)";
|
||
|
||
$::request->layout->add_javascripts("autocomplete_chart.js", "show_vc_details.js", "show_history.js", "follow_up.js", "kivi.Draft.js", "kivi.GL.js", "kivi.RecordTemplate.js", "kivi.File.js", "kivi.AP.js", "kivi.CustomerVendor.js", "kivi.Validator.js");
|
||
$::request->layout->add_javascripts("autocomplete_chart.js", "show_vc_details.js", "show_history.js", "follow_up.js", "kivi.Draft.js", "kivi.GL.js", "kivi.RecordTemplate.js", "kivi.File.js", "kivi.AP.js", "kivi.CustomerVendor.js", "kivi.Validator.js", "autocomplete_project.js");
|
||
# $form->{totalpaid} is used by the action bar setup to determine
|
||
# whether or not canceling is allowed. Therefore it must be
|
||
# calculated prior to the action bar setup.
|
templates/webpages/ap/form_header.html | ||
---|---|---|
<tr>
|
||
<th align="right" nowrap>[% 'Project Number' | $T8 %]</th>
|
||
<td>
|
||
[% L.select_tag('globalproject_id', ALL_PROJECTS, with_empty = 1, default = globalproject_id, value_key = 'id', title_key = 'projectnumber', onChange = "document.getElementById('update_button').click();") %]
|
||
[% P.project.picker('globalproject_id', globalproject_id, onchange="document.getElementById('update_button').click();") %]
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
... | ... | |
</td>
|
||
<td>
|
||
[% temp = "project_id_"_ i %]
|
||
[% L.select_tag(temp, ALL_PROJECTS, with_empty = 1, default = loop.last ? globalproject_id : $temp, value_key = 'id', title_key = 'projectnumber') %]
|
||
[% P.project.picker(temp, loop.last ? globalproject_id : $temp) %]
|
||
</td>
|
||
</tr>
|
||
[% END %]
|
||
... | ... | |
<td align="center">
|
||
[% temp = "paid_project_id_"_ i %]
|
||
[% IF( changeable ) %]
|
||
[% L.select_tag(temp, ALL_PROJECTS, with_empty = 1, default = $temp, value_key = 'id', title_key = 'projectnumber') %]
|
||
[% P.project.picker(temp, $temp) %]
|
||
[% ELSE %]
|
||
<input type="hidden" name="[% temp %]" value="[% $temp | html %]">
|
||
[% temp = "label"_ temp %]
|
Auch abrufbar als: Unified diff
AP: Project picker in form