Revision 9b67d27c
Von Sven Schöling vor mehr als 12 Jahren hinzugefügt
bin/mozilla/do.pl | ||
---|---|---|
266 | 266 |
if ($form->{"project_id_$_"}); } (1..$form->{"rowcount"})); |
267 | 267 |
|
268 | 268 |
my $vc = $form->{vc} eq "customer" ? "customers" : "vendors"; |
269 |
$form->get_lists("shipto" => "ALL_SHIPTO", |
|
270 |
"projects" => { |
|
269 |
$form->get_lists("projects" => { |
|
271 | 270 |
"key" => "ALL_PROJECTS", |
272 | 271 |
"all" => 0, |
273 | 272 |
"old_id" => \@old_project_ids |
... | ... | |
280 | 279 |
|
281 | 280 |
$::form->{ALL_EMPLOYEES} = SL::DB::Manager::Employee->get_all(query => [ or => [ id => $::form->{employee_id}, deleted => 0 ] ]); |
282 | 281 |
$::form->{ALL_SALESMEN} = SL::DB::Manager::Employee->get_all(query => [ or => [ id => $::form->{salesman_id}, deleted => 0 ] ]); |
282 |
$::form->{ALL_SHIPTO} = SL::DB::Manager::Shipto->get_all(query => [ |
|
283 |
or => [ trans_id => $::form->{"$::form->{vc}_id"} * 1, shipto_id => $::form->{shipto_id} * 1 ] |
|
284 |
]); |
|
283 | 285 |
$::form->{ALL_CONTACTS} = SL::DB::Manager::Contact->get_all(query => [ |
284 | 286 |
or => [ |
285 | 287 |
cp_cv_id => $::form->{"$::form->{vc}_id"} * 1, |
bin/mozilla/ir.pl | ||
---|---|---|
283 | 283 |
my @old_project_ids = ($form->{"globalproject_id"}); |
284 | 284 |
map { push @old_project_ids, $form->{"project_id_$_"} if $form->{"project_id_$_"}; } 1..$form->{"rowcount"}; |
285 | 285 |
|
286 |
$form->get_lists("shipto" => "ALL_SHIPTO", |
|
287 |
"projects" => { "key" => "ALL_PROJECTS", |
|
286 |
$form->get_lists("projects" => { "key" => "ALL_PROJECTS", |
|
288 | 287 |
"all" => 0, |
289 | 288 |
"old_id" => \@old_project_ids }, |
290 | 289 |
"taxzones" => "ALL_TAXZONES", |
bin/mozilla/is.pl | ||
---|---|---|
300 | 300 |
my @old_project_ids = ($form->{"globalproject_id"}); |
301 | 301 |
map { push @old_project_ids, $form->{"project_id_$_"} if $form->{"project_id_$_"}; } 1..$form->{"rowcount"}; |
302 | 302 |
|
303 |
$form->get_lists("shipto" => "ALL_SHIPTO", |
|
304 |
"projects" => { "key" => "ALL_PROJECTS", |
|
303 |
$form->get_lists("projects" => { "key" => "ALL_PROJECTS", |
|
305 | 304 |
"all" => 0, |
306 | 305 |
"old_id" => \@old_project_ids }, |
307 | 306 |
"taxzones" => "ALL_TAXZONES", |
... | ... | |
312 | 311 |
|
313 | 312 |
$TMPL_VAR{ALL_EMPLOYEES} = SL::DB::Manager::Employee->get_all(query => [ or => [ id => $::form->{employee_id}, deleted => 0 ] ]); |
314 | 313 |
$TMPL_VAR{ALL_SALESMEN} = SL::DB::Manager::Employee->get_all(query => [ or => [ id => $::form->{salesman_id}, deleted => 0 ] ]); |
314 |
$TMPL_VAR{ALL_SHIPTO} = SL::DB::Manager::Shipto->get_all(query => [ |
|
315 |
or => [ trans_id => $::form->{"$::form->{vc}_id"} * 1, shipto_id => $::form->{shipto_id} * 1 ] |
|
316 |
]); |
|
315 | 317 |
$TMPL_VAR{ALL_CONTACTS} = SL::DB::Manager::Contact->get_all(query => [ |
316 | 318 |
or => [ |
317 | 319 |
cp_cv_id => $::form->{"$::form->{vc}_id"} * 1, |
... | ... | |
321 | 323 |
] |
322 | 324 |
] |
323 | 325 |
]); |
324 |
$TMPL_VAR{shipto_labels} = sub { join "; ", grep { $_ } map { $_[0]->{"shipto${_}" } } qw(name department_1 street city) }; |
|
325 | 326 |
$TMPL_VAR{department_labels} = sub { "$_[0]->{description}--$_[0]->{id}" }; |
326 | 327 |
|
327 | 328 |
# customer |
bin/mozilla/oe.pl | ||
---|---|---|
327 | 327 |
my @old_project_ids = ($form->{"globalproject_id"}, grep { $_ } map { $form->{"project_id_$_"} } 1..$form->{"rowcount"}); |
328 | 328 |
|
329 | 329 |
my $vc = $form->{vc} eq "customer" ? "customers" : "vendors"; |
330 |
$form->get_lists("shipto" => "ALL_SHIPTO", |
|
331 |
"projects" => { "key" => "ALL_PROJECTS", |
|
330 |
$form->get_lists("projects" => { "key" => "ALL_PROJECTS", |
|
332 | 331 |
"all" => 0, |
333 | 332 |
"old_id" => \@old_project_ids }, |
334 | 333 |
"taxzones" => "ALL_TAXZONES", |
... | ... | |
342 | 341 |
# label subs |
343 | 342 |
$TMPL_VAR{ALL_EMPLOYEES} = SL::DB::Manager::Employee->get_all(query => [ or => [ id => $::form->{employee_id}, deleted => 0 ] ]); |
344 | 343 |
$TMPL_VAR{ALL_SALESMEN} = SL::DB::Manager::Employee->get_all(query => [ or => [ id => $::form->{salesman_id}, deleted => 0 ] ]); |
344 |
$TMPL_VAR{ALL_SHIPTO} = SL::DB::Manager::Shipto->get_all(query => [ |
|
345 |
or => [ trans_id => $::form->{"$::form->{vc}_id"} * 1, shipto_id => $::form->{shipto_id} * 1 ] |
|
346 |
]); |
|
345 | 347 |
$TMPL_VAR{ALL_CONTACTS} = SL::DB::Manager::Contact->get_all(query => [ |
346 | 348 |
or => [ |
347 | 349 |
cp_cv_id => $::form->{"$::form->{vc}_id"} * 1, |
... | ... | |
352 | 354 |
] |
353 | 355 |
]); |
354 | 356 |
$TMPL_VAR{sales_employee_labels} = sub { $_[0]->{name} || $_[0]->{login} }; |
355 |
$TMPL_VAR{shipto_labels} = sub { join "; ", grep { $_ } map { $_[0]->{"shipto${_}" } } qw(name department_1 street city) }; |
|
356 | 357 |
$TMPL_VAR{department_labels} = sub { "$_[0]->{description}--$_[0]->{id}" }; |
357 | 358 |
|
358 | 359 |
# vendor/customer |
templates/webpages/do/form_header.html | ||
---|---|---|
159 | 159 |
[%- END %] |
160 | 160 |
|
161 | 161 |
[%- ELSE %] |
162 |
<select name="shipto_id" class="fixed_width" > |
|
163 |
<option></option> |
|
164 |
[%- FOREACH row = ALL_SHIPTO %] |
|
165 |
<option value="[% HTML.escape(row.shipto_id) %]"[% IF shipto_id == row.shipto_id %] selected[% END %]> |
|
166 |
[%- HTML.escape(row.shiptoname) -%] |
|
167 |
[%- IF row.shiptodepartment_1 %]; [% HTML.escape(row.shiptodepartment_1) -%][% END -%] |
|
168 |
[%- IF row.shiptostreet %]; [% HTML.escape(row.shiptostreet) -%][% END -%] |
|
169 |
[%- IF row.shiptocity %]; [% HTML.escape(row.shiptocity) -%][% END -%] |
|
170 |
</option> |
|
171 |
[%- END %] |
|
172 |
</select> |
|
162 |
[% 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') %] |
|
173 | 163 |
[%- END %] |
174 | 164 |
</td> |
175 | 165 |
</tr> |
templates/webpages/is/form_header.html | ||
---|---|---|
63 | 63 |
<tr> |
64 | 64 |
<th align="right">[% 'Shipping Address' | $T8 %]</th> |
65 | 65 |
<td> |
66 |
[% 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();") %]
|
|
66 |
[% 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();") %]
|
|
67 | 67 |
</td> |
68 | 68 |
</tr> |
69 | 69 |
[%- END %] |
templates/webpages/oe/form_header.html | ||
---|---|---|
66 | 66 |
<tr> |
67 | 67 |
<th align="right">[% 'Shipping Address' | $T8 %]</th> |
68 | 68 |
<td> |
69 |
[% 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();") %]
|
|
69 |
[% 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();") %]
|
|
70 | 70 |
</td> |
71 | 71 |
</tr> |
72 | 72 |
[%- END %] |
Auch abrufbar als: Unified diff
Lieferadressen, gelöschte aber ausgewählte weiterhin einblenden.