Revision 9b67d27c
Von Sven Schöling vor etwa 13 Jahren hinzugefügt
bin/mozilla/do.pl | ||
---|---|---|
if ($form->{"project_id_$_"}); } (1..$form->{"rowcount"}));
|
||
|
||
my $vc = $form->{vc} eq "customer" ? "customers" : "vendors";
|
||
$form->get_lists("shipto" => "ALL_SHIPTO",
|
||
"projects" => {
|
||
$form->get_lists("projects" => {
|
||
"key" => "ALL_PROJECTS",
|
||
"all" => 0,
|
||
"old_id" => \@old_project_ids
|
||
... | ... | |
|
||
$::form->{ALL_EMPLOYEES} = SL::DB::Manager::Employee->get_all(query => [ or => [ id => $::form->{employee_id}, deleted => 0 ] ]);
|
||
$::form->{ALL_SALESMEN} = SL::DB::Manager::Employee->get_all(query => [ or => [ id => $::form->{salesman_id}, deleted => 0 ] ]);
|
||
$::form->{ALL_SHIPTO} = SL::DB::Manager::Shipto->get_all(query => [
|
||
or => [ trans_id => $::form->{"$::form->{vc}_id"} * 1, shipto_id => $::form->{shipto_id} * 1 ]
|
||
]);
|
||
$::form->{ALL_CONTACTS} = SL::DB::Manager::Contact->get_all(query => [
|
||
or => [
|
||
cp_cv_id => $::form->{"$::form->{vc}_id"} * 1,
|
bin/mozilla/ir.pl | ||
---|---|---|
my @old_project_ids = ($form->{"globalproject_id"});
|
||
map { push @old_project_ids, $form->{"project_id_$_"} if $form->{"project_id_$_"}; } 1..$form->{"rowcount"};
|
||
|
||
$form->get_lists("shipto" => "ALL_SHIPTO",
|
||
"projects" => { "key" => "ALL_PROJECTS",
|
||
$form->get_lists("projects" => { "key" => "ALL_PROJECTS",
|
||
"all" => 0,
|
||
"old_id" => \@old_project_ids },
|
||
"taxzones" => "ALL_TAXZONES",
|
bin/mozilla/is.pl | ||
---|---|---|
my @old_project_ids = ($form->{"globalproject_id"});
|
||
map { push @old_project_ids, $form->{"project_id_$_"} if $form->{"project_id_$_"}; } 1..$form->{"rowcount"};
|
||
|
||
$form->get_lists("shipto" => "ALL_SHIPTO",
|
||
"projects" => { "key" => "ALL_PROJECTS",
|
||
$form->get_lists("projects" => { "key" => "ALL_PROJECTS",
|
||
"all" => 0,
|
||
"old_id" => \@old_project_ids },
|
||
"taxzones" => "ALL_TAXZONES",
|
||
... | ... | |
|
||
$TMPL_VAR{ALL_EMPLOYEES} = SL::DB::Manager::Employee->get_all(query => [ or => [ id => $::form->{employee_id}, deleted => 0 ] ]);
|
||
$TMPL_VAR{ALL_SALESMEN} = SL::DB::Manager::Employee->get_all(query => [ or => [ id => $::form->{salesman_id}, deleted => 0 ] ]);
|
||
$TMPL_VAR{ALL_SHIPTO} = SL::DB::Manager::Shipto->get_all(query => [
|
||
or => [ trans_id => $::form->{"$::form->{vc}_id"} * 1, shipto_id => $::form->{shipto_id} * 1 ]
|
||
]);
|
||
$TMPL_VAR{ALL_CONTACTS} = SL::DB::Manager::Contact->get_all(query => [
|
||
or => [
|
||
cp_cv_id => $::form->{"$::form->{vc}_id"} * 1,
|
||
... | ... | |
]
|
||
]
|
||
]);
|
||
$TMPL_VAR{shipto_labels} = sub { join "; ", grep { $_ } map { $_[0]->{"shipto${_}" } } qw(name department_1 street city) };
|
||
$TMPL_VAR{department_labels} = sub { "$_[0]->{description}--$_[0]->{id}" };
|
||
|
||
# customer
|
bin/mozilla/oe.pl | ||
---|---|---|
my @old_project_ids = ($form->{"globalproject_id"}, grep { $_ } map { $form->{"project_id_$_"} } 1..$form->{"rowcount"});
|
||
|
||
my $vc = $form->{vc} eq "customer" ? "customers" : "vendors";
|
||
$form->get_lists("shipto" => "ALL_SHIPTO",
|
||
"projects" => { "key" => "ALL_PROJECTS",
|
||
$form->get_lists("projects" => { "key" => "ALL_PROJECTS",
|
||
"all" => 0,
|
||
"old_id" => \@old_project_ids },
|
||
"taxzones" => "ALL_TAXZONES",
|
||
... | ... | |
# label subs
|
||
$TMPL_VAR{ALL_EMPLOYEES} = SL::DB::Manager::Employee->get_all(query => [ or => [ id => $::form->{employee_id}, deleted => 0 ] ]);
|
||
$TMPL_VAR{ALL_SALESMEN} = SL::DB::Manager::Employee->get_all(query => [ or => [ id => $::form->{salesman_id}, deleted => 0 ] ]);
|
||
$TMPL_VAR{ALL_SHIPTO} = SL::DB::Manager::Shipto->get_all(query => [
|
||
or => [ trans_id => $::form->{"$::form->{vc}_id"} * 1, shipto_id => $::form->{shipto_id} * 1 ]
|
||
]);
|
||
$TMPL_VAR{ALL_CONTACTS} = SL::DB::Manager::Contact->get_all(query => [
|
||
or => [
|
||
cp_cv_id => $::form->{"$::form->{vc}_id"} * 1,
|
||
... | ... | |
]
|
||
]);
|
||
$TMPL_VAR{sales_employee_labels} = sub { $_[0]->{name} || $_[0]->{login} };
|
||
$TMPL_VAR{shipto_labels} = sub { join "; ", grep { $_ } map { $_[0]->{"shipto${_}" } } qw(name department_1 street city) };
|
||
$TMPL_VAR{department_labels} = sub { "$_[0]->{description}--$_[0]->{id}" };
|
||
|
||
# vendor/customer
|
templates/webpages/do/form_header.html | ||
---|---|---|
[%- END %]
|
||
|
||
[%- ELSE %]
|
||
<select name="shipto_id" class="fixed_width" >
|
||
<option></option>
|
||
[%- FOREACH row = ALL_SHIPTO %]
|
||
<option value="[% HTML.escape(row.shipto_id) %]"[% IF shipto_id == row.shipto_id %] selected[% END %]>
|
||
[%- HTML.escape(row.shiptoname) -%]
|
||
[%- IF row.shiptodepartment_1 %]; [% HTML.escape(row.shiptodepartment_1) -%][% END -%]
|
||
[%- IF row.shiptostreet %]; [% HTML.escape(row.shiptostreet) -%][% END -%]
|
||
[%- IF row.shiptocity %]; [% HTML.escape(row.shiptocity) -%][% END -%]
|
||
</option>
|
||
[%- END %]
|
||
</select>
|
||
[% L.select_tag('shipto_id', L.options_for_select(ALL_SHIPTO, default=shipto_id, value='shipto_id', title='displayable_id', with_empty=1), class='fixed_width') %]
|
||
[%- END %]
|
||
</td>
|
||
</tr>
|
templates/webpages/is/form_header.html | ||
---|---|---|
<tr>
|
||
<th align="right">[% 'Shipping Address' | $T8 %]</th>
|
||
<td>
|
||
[% L.select_tag('shipto_id', L.options_for_select(ALL_SHIPTO, default=shipto_id, value='shipto_id', title_sub=\shipto_labels, with_empty=1), style='width: 250px', onChange="document.getElementById('update_button').click();") %]
|
||
[% L.select_tag('shipto_id', L.options_for_select(ALL_SHIPTO, default=shipto_id, value='shipto_id', title='displayable_id', with_empty=1), style='width: 250px', onChange="document.getElementById('update_button').click();") %]
|
||
</td>
|
||
</tr>
|
||
[%- END %]
|
templates/webpages/oe/form_header.html | ||
---|---|---|
<tr>
|
||
<th align="right">[% 'Shipping Address' | $T8 %]</th>
|
||
<td>
|
||
[% L.select_tag('shipto_id', L.options_for_select(ALL_SHIPTO, default=shipto_id, value='shipto_id', title_sub=\shipto_labels, with_empty=1), style='width: 250px', onChange="document.getElementById('update_button').click();") %]
|
||
[% L.select_tag('shipto_id', L.options_for_select(ALL_SHIPTO, default=shipto_id, value='shipto_id', title='displayable_id', with_empty=1), style='width: 250px', onChange="document.getElementById('update_button').click();") %]
|
||
</td>
|
||
</tr>
|
||
[%- END %]
|
Auch abrufbar als: Unified diff
Lieferadressen, gelöschte aber ausgewählte weiterhin einblenden.