Revision 43ad317e
Von Moritz Bunkus vor mehr als 10 Jahren hinzugefügt
SL/Form.pm | ||
---|---|---|
3363 | 3363 |
my ($language_tc, $output_numberformat, $output_dateformat, $output_longdates); |
3364 | 3364 |
if ($self->{language_id}) { |
3365 | 3365 |
($language_tc, $output_numberformat, $output_dateformat, $output_longdates) = AM->get_language_details(\%::myconfig, $self, $self->{language_id}); |
3366 |
} else { |
|
3367 |
$output_dateformat = $::myconfig{dateformat}; |
|
3368 |
$output_numberformat = $::myconfig{numberformat}; |
|
3369 |
$output_longdates = 1; |
|
3370 | 3366 |
} |
3371 | 3367 |
|
3372 |
$self->{myconfig_output_dateformat} = $output_dateformat; |
|
3373 |
$self->{myconfig_output_longdates} = $output_longdates; |
|
3374 |
$self->{myconfig_output_numberformat} = $output_numberformat; |
|
3368 |
$output_dateformat ||= $::myconfig{dateformat}; |
|
3369 |
$output_numberformat ||= $::myconfig{numberformat}; |
|
3370 |
$output_longdates //= 1; |
|
3371 |
|
|
3372 |
$self->{myconfig_output_dateformat} = $output_dateformat // $::myconfig{dateformat}; |
|
3373 |
$self->{myconfig_output_longdates} = $output_longdates // 1; |
|
3374 |
$self->{myconfig_output_numberformat} = $output_numberformat // $::myconfig{numberformat}; |
|
3375 | 3375 |
|
3376 | 3376 |
# Retrieve accounts for tax calculation. |
3377 | 3377 |
IC->retrieve_accounts(\%::myconfig, $self, map { $_ => $self->{"id_$_"} } 1 .. $self->{rowcount}); |
Auch abrufbar als: Unified diff
Form->prepare_for_printing: output_*-Variablen als Fallback auf %myconfig-Werte setzen
Wenn für eine Sprache kein Ausgabeformat für Datum und/oder Zahlen
festgelegt ist, so muss hier der Wert der angemeldeten Benutzerin
genommen werden, weil ansonsten die Werte falsch formatiert
werden. Außerdem kann es sein, dass die Vorlagen dann falsch rechnen,
wenn sie \numprint nutzen.
Behebt Formatierungsprobleme in wiederkehrenden Rechnungen, wenn der
Auftrag eine Sprache gewählt hat, in der die Ausgabeformate nicht
definiert sind.