Revision e549422f
Von Moritz Bunkus vor etwa 17 Jahren hinzugefügt
bin/mozilla/am.pl | ||
---|---|---|
2302 | 2302 |
$lxdebug->leave_sub(); |
2303 | 2303 |
} |
2304 | 2304 |
|
2305 |
sub edit_defaults { |
|
2306 |
$lxdebug->enter_sub(); |
|
2307 |
|
|
2308 |
# get defaults for account numbers and last numbers |
|
2309 |
AM->defaultaccounts(\%myconfig, \%$form); |
|
2310 |
|
|
2311 |
map { $form->{"defaults_${_}"} = $form->{defaults}->{$_} } keys %{ $form->{defaults} }; |
|
2312 |
|
|
2313 |
foreach $key (keys %{ $form->{IC} }) { |
|
2314 |
foreach $accno (sort keys %{ $form->{IC}->{$key} }) { |
|
2315 |
my $array = "ACCNOS_" . uc($key); |
|
2316 |
$form->{$array} ||= []; |
|
2317 |
|
|
2318 |
my $value = "${accno}--" . $form->{IC}->{$key}->{$accno}->{description}; |
|
2319 |
push @{ $form->{$array} }, { |
|
2320 |
'name' => $value, |
|
2321 |
'value' => $value, |
|
2322 |
'selected' => $form->{IC}->{$key}->{$accno}->{id} == $form->{defaults}->{$key}, |
|
2323 |
}; |
|
2324 |
} |
|
2325 |
} |
|
2326 |
|
|
2327 |
$form->{title} = $locale->text('Ranges of numbers and default accounts'); |
|
2328 |
|
|
2329 |
$form->header(); |
|
2330 |
print $form->parse_html_template('am/edit_defaults'); |
|
2331 |
|
|
2332 |
$lxdebug->leave_sub(); |
|
2333 |
} |
|
2334 |
|
|
2335 |
sub save_defaults { |
|
2336 |
$lxdebug->enter_sub(); |
|
2337 |
|
|
2338 |
AM->save_defaults(); |
|
2339 |
|
|
2340 |
$form->redirect($locale->text('Defaults saved.')); |
|
2341 |
|
|
2342 |
$lxdebug->leave_sub(); |
|
2343 |
} |
|
2344 |
|
|
2305 | 2345 |
sub _build_cfg_options { |
2306 | 2346 |
my $idx = shift; |
2307 | 2347 |
my $array = uc($idx) . 'S'; |
... | ... | |
2319 | 2359 |
sub config { |
2320 | 2360 |
$lxdebug->enter_sub(); |
2321 | 2361 |
|
2322 |
# get defaults for account numbers and last numbers |
|
2323 |
AM->defaultaccounts(\%myconfig, \%$form); |
|
2324 |
|
|
2325 |
map { $form->{"defaults_${_}"} = $form->{defaults}->{$_} } keys %{ $form->{defaults} }; |
|
2326 |
|
|
2327 | 2362 |
_build_cfg_options('dateformat', qw(mm-dd-yy mm/dd/yy dd-mm-yy dd/mm/yy dd.mm.yy yyyy-mm-dd)); |
2328 | 2363 |
_build_cfg_options('numberformat', qw(1,000.00 1000.00 1.000,00 1000,00)); |
2329 | 2364 |
|
... | ... | |
2392 | 2427 |
}; |
2393 | 2428 |
} |
2394 | 2429 |
|
2395 |
foreach $key (keys %{ $form->{IC} }) { |
|
2396 |
foreach $accno (sort keys %{ $form->{IC}->{$key} }) { |
|
2397 |
my $array = "ACCNOS_" . uc($key); |
|
2398 |
$form->{$array} ||= []; |
|
2399 |
|
|
2400 |
my $value = "${accno}--" . $form->{IC}->{$key}->{$accno}->{description}; |
|
2401 |
push @{ $form->{$array} }, { |
|
2402 |
'name' => $value, |
|
2403 |
'value' => $value, |
|
2404 |
'selected' => $form->{IC}->{$key}->{$accno}->{id} == $form->{defaults}->{$key}, |
|
2405 |
}; |
|
2406 |
} |
|
2407 |
} |
|
2408 |
|
|
2409 | 2430 |
$form->{STYLESHEETS} = []; |
2410 | 2431 |
foreach $item (qw(lx-office-erp.css Win2000.css)) { |
2411 | 2432 |
push @{ $form->{STYLESHEETS} }, { |
Auch abrufbar als: Unified diff
Das Bearbeiten der Einstellungen, die in der Tabelle "defaults" gespeichert werden, wurde in eine eigene Maske ausgelagert, die unter "System -> Nummernkreise und Standardkonten" aufrufbar ist. Bei "Programm -> Benutzereinstellungen" hingegen befinden sich nur noch Einstellungen, die pro Benutzer einstellbar sind (also die Sachen aus %myconfig).