Revision dc0dff70
Von Sven Schöling vor etwa 17 Jahren hinzugefügt
bin/mozilla/oe.pl | ||
---|---|---|
300 | 300 |
sub form_header { |
301 | 301 |
$lxdebug->enter_sub(); |
302 | 302 |
my @custom_hiddens; |
303 |
%TMPL_VAR = (); |
|
303 |
|
|
304 |
# Container for template variables. Unfortunately this has to be visible in form_footer too, so not my. |
|
305 |
our %TMPL_VAR = (); |
|
304 | 306 |
|
305 | 307 |
$form->{employee_id} = $form->{old_employee_id} if $form->{old_employee_id}; |
306 | 308 |
$form->{salesman_id} = $form->{old_salesman_id} if $form->{old_salesman_id}; |
... | ... | |
310 | 312 |
$form->{employee_id} = $form->{old_employee_id} if $form->{old_employee_id}; |
311 | 313 |
$form->{salesman_id} = $form->{old_salesman_id} if $form->{old_salesman_id}; |
312 | 314 |
|
313 |
map { $form->{$_} =~ s/\"/"/g }
|
|
314 |
qw(ordnumber quonumber shippingpoint shipvia notes intnotes shiptoname
|
|
315 |
map { $form->{$_} = H($form->{$_}) }
|
|
316 |
qw(shippingpoint shipvia notes intnotes shiptoname |
|
315 | 317 |
shiptostreet shiptozipcode shiptocity shiptocountry shiptocontact |
316 | 318 |
shiptophone shiptofax shiptodepartment_1 shiptodepartment_2); |
317 | 319 |
|
318 | 320 |
# use JavaScript Calendar or not |
319 | 321 |
$form->{jsscript} = 1; |
320 | 322 |
$TMPL_VAR{button1} = qq| |
321 |
<td><input name=transdate id=transdate size=11 title="$myconfig{dateformat}" value="$form->{transdate}" onBlur=\"check_right_date_format(this)\"> |
|
323 |
<td nowrap><input name=transdate id=transdate size=11 title="$myconfig{dateformat}" value="$form->{transdate}" onBlur=\"check_right_date_format(this)\">
|
|
322 | 324 |
<input type=button name=transdate id="trigger1" value=| . $locale->text('button') . qq|></td> |
323 | 325 |
|; |
324 | 326 |
$TMPL_VAR{button2} = qq| |
325 |
<td width="13"><input name=reqdate id=reqdate size=11 title="$myconfig{dateformat}" value="$form->{reqdate}" onBlur=\"check_right_date_format(this)\"> |
|
327 |
<td nowrap width="13"><input name=reqdate id=reqdate size=11 title="$myconfig{dateformat}" value="$form->{reqdate}" onBlur=\"check_right_date_format(this)\">
|
|
326 | 328 |
<input type=button name=reqdate name=reqdate id="trigger2" value=| . $locale->text('button') . qq|></td> |
327 | 329 |
|; |
328 | 330 |
#write Trigger |
... | ... | |
382 | 384 |
($myconfig{vclimit} <= scalar(@values)) |
383 | 385 |
? $cgi->textfield(-value => H($form->{"old$form->{vc}"} =~ /^(.*)\-\-.*$/), -name => $form->{vc}) |
384 | 386 |
: NTI($cgi->popup_menu('-name' => "$form->{vc}", '-default' => $form->{"old$form->{vc}"}, |
385 |
'-onChange' => 'document.getElementById(\'update_button\').click();',
|
|
387 |
'-onChange' => "document.getElementById('update_button').click();",
|
|
386 | 388 |
'-values' => \@values, '-labels' => \%labels, '-style' => 'width: 250px')); |
387 | 389 |
|
388 | 390 |
# payments (for footer) |
... | ... | |
393 | 395 |
|
394 | 396 |
# shipto |
395 | 397 |
@values = ("", map { $_->{shipto_id} } @{ $form->{ALL_SHIPTO} }); |
398 |
$TMPL_VAR{ALL_SHIPTO} = $form->{ALL_SHIPTO}; |
|
399 |
for my $item ( @{ $TMPL_VAR{ALL_SHIPTO} }) { |
|
400 |
$item->{label} = join "; ", grep { $_ } map { $item->{"shipto${_}" } } qw(name department_1 street city); |
|
401 |
} |
|
396 | 402 |
%labels = map { my $item=$_; $_->{shipto_id} => join "; ", grep { $_ } map { $item->{"shipto${_}" } } qw(name department_1 street city) } @{ $form->{ALL_SHIPTO} }; |
397 | 403 |
$TMPL_VAR{shipto} = NTI($cgi->popup_menu('-name' => 'shipto_id', '-values' => \@values, '-style' => 'width: 250px', |
398 | 404 |
'-labels' => \%labels, '-default' => $form->{"shipto_id"})) if scalar @values > 1; |
... | ... | |
2013 | 2019 |
{ id => 'projectnr', width => 10, value => $locale->text('Project'), display => 0, }, |
2014 | 2020 |
{ id => 'sellprice', width => 15, value => $locale->text('Price'), display => 1, }, |
2015 | 2021 |
{ id => 'sellprice_pg', width => 15, value => $locale->text('Pricegroup'), display => $form->{type} =~ /^sales_/, }, |
2016 |
{ id => 'discount', width => undef, value => $locale->text('Discount'), display => $form->{vc} eq 'customer', },
|
|
2022 |
{ id => 'discount', width => 5, value => $locale->text('Discount'), display => $form->{vc} eq 'customer', },
|
|
2017 | 2023 |
{ id => 'linetotal', width => 10, value => $locale->text('Extended'), display => 1, }, |
2018 | 2024 |
{ id => 'bin', width => 10, value => $locale->text('Bin'), display => 0, }, |
2019 | 2025 |
); |
Auch abrufbar als: Unified diff
Fix zu Bug 769