Revision 5f810b4b
Von Bernd Bleßmann vor mehr als 3 Jahren hinzugefügt
SL/Controller/TimeRecording.pm | ||
---|---|---|
16 | 16 |
use SL::DB::TimeRecording; |
17 | 17 |
use SL::DB::TimeRecordingArticle; |
18 | 18 |
use SL::Helper::Flash qw(flash); |
19 |
use SL::Helper::Number qw(_round_number _parse_number); |
|
19 | 20 |
use SL::Helper::UserPreferences::TimeRecording; |
20 | 21 |
use SL::Locale::String qw(t8); |
21 | 22 |
use SL::ReportGenerator; |
... | ... | |
146 | 147 |
|
147 | 148 |
my %attributes = %{ $::form->{time_recording} || {} }; |
148 | 149 |
|
149 |
if (!$self->use_duration) { |
|
150 |
if ($self->use_duration) { |
|
151 |
if ($::form->{duration_h} || $::form->{duration_m}) { |
|
152 |
$attributes{duration} = _round_number(_parse_number($::form->{duration_h}) * 60 + _parse_number($::form->{duration_m}), 0); |
|
153 |
} |
|
154 |
|
|
155 |
} else { |
|
150 | 156 |
foreach my $type (qw(start end)) { |
151 | 157 |
if ($::form->{$type . '_date'}) { |
152 | 158 |
my $date = DateTime->from_kivitendo($::form->{$type . '_date'}); |
locale/de/all | ||
---|---|---|
3983 | 3983 |
'VAT ID and/or taxnumber must be given.' => 'UStId und/oder Steuernummer muss angegeben werden.', |
3984 | 3984 |
'VN' => 'Kred.-Nr.', |
3985 | 3985 |
'Valid' => 'Gültig', |
3986 |
'Valid are integer values and floating point numbers, e.g. 4.75h = 4 hours and 45 minutes.' => 'Erlaubt sind ganzzahlige Werte und Kommawerte: Beispiel: 4,75h = 4 Stunden und 45 Minuten.', |
|
3986 | 3987 |
'Valid from' => 'Gültig ab', |
3987 | 3988 |
'Valid until' => 'gültig bis', |
3988 | 3989 |
'Valid/Obsolete' => 'Gültig/ungültig', |
... | ... | |
4269 | 4270 |
'http' => 'http', |
4270 | 4271 |
'https' => 'https', |
4271 | 4272 |
'imported' => 'Importiert', |
4272 |
'in minutes' => 'in Minuten', |
|
4273 | 4273 |
'inactive' => 'inaktiv', |
4274 | 4274 |
'income' => 'Einnahmen-Überschuß-Rechnung', |
4275 | 4275 |
'internal error (see details)' => 'Interner Fehler (siehe Details)!', |
... | ... | |
4301 | 4301 |
'list_of_transactions' => 'buchungsliste', |
4302 | 4302 |
'male' => 'männlich', |
4303 | 4303 |
'max filesize' => 'maximale Dateigröße', |
4304 |
'min' => 'min', |
|
4304 | 4305 |
'missing' => 'Fehlbestand', |
4305 | 4306 |
'missing file for action import' => 'Es wurde keine Datei zum Hochladen ausgewählt', |
4306 | 4307 |
'missing_br' => 'Fehl.', |
locale/en/all | ||
---|---|---|
3981 | 3981 |
'VAT ID and/or taxnumber must be given.' => '', |
3982 | 3982 |
'VN' => '', |
3983 | 3983 |
'Valid' => '', |
3984 |
'Valid are integer values and floating point numbers, e.g. 4.75h = 4 hours and 45 minutes.' => '', |
|
3984 | 3985 |
'Valid from' => '', |
3985 | 3986 |
'Valid until' => '', |
3986 | 3987 |
'Valid/Obsolete' => '', |
... | ... | |
4267 | 4268 |
'http' => '', |
4268 | 4269 |
'https' => '', |
4269 | 4270 |
'imported' => '', |
4270 |
'in minutes' => '', |
|
4271 | 4271 |
'inactive' => '', |
4272 | 4272 |
'income' => 'GUV and BWA', |
4273 | 4273 |
'internal error (see details)' => '', |
... | ... | |
4299 | 4299 |
'list_of_transactions' => '', |
4300 | 4300 |
'male' => '', |
4301 | 4301 |
'max filesize' => '', |
4302 |
'min' => '', |
|
4302 | 4303 |
'missing' => '', |
4303 | 4304 |
'missing file for action import' => '', |
4304 | 4305 |
'missing_br' => 'missing', |
templates/webpages/time_recording/form.html | ||
---|---|---|
21 | 21 |
</td> |
22 | 22 |
</tr> |
23 | 23 |
<tr> |
24 |
<th align="right">[% 'Duration' | $T8 %] ([% 'in minutes' | $T8 %])</th>
|
|
24 |
<th align="right">[% 'Duration' | $T8 %]</th> |
|
25 | 25 |
<td> |
26 |
[% P.input_tag('time_recording.duration', SELF.time_recording.duration, size=11) %] |
|
26 |
[% P.input_tag('duration_h', SELF.time_recording.duration_as_hours, size=4, class='numeric') %] [% 'h' | $T8 %]<sup>(1)</sup> |
|
27 |
[% P.input_tag('duration_m', SELF.time_recording.duration_as_minutes, size=4, class='numeric') %] [% 'min' | $T8%] |
|
27 | 28 |
</td> |
28 | 29 |
</tr> |
29 | 30 |
[%- ELSE %] |
... | ... | |
82 | 83 |
</tr> |
83 | 84 |
</table> |
84 | 85 |
|
86 |
[%- IF SELF.use_duration %] |
|
87 |
<p> |
|
88 |
<sup>(1)</sup> |
|
89 |
[% 'Valid are integer values and floating point numbers, e.g. 4.75h = 4 hours and 45 minutes.' | $T8 %] |
|
90 |
</p> |
|
91 |
[%- END %] |
|
92 |
|
|
85 | 93 |
</form> |
Auch abrufbar als: Unified diff
Zeiterfassung: Eingabemaske: Dauer auch in Stunden angeben können