Revision 79f2d060
Von Tamino Steinert vor mehr als 1 Jahr hinzugefügt
- ID 79f2d06057d9c34e02767c5836e746a50406735f
- Vorgänger 9788b84f
bin/mozilla/do.pl | ||
---|---|---|
55 | 55 |
require "bin/mozilla/io.pl"; |
56 | 56 |
require "bin/mozilla/reportgenerator.pl"; |
57 | 57 |
|
58 |
use SL::Helper::Flash qw(flash flash_later render_flash); |
|
59 |
|
|
58 | 60 |
use strict; |
59 | 61 |
|
60 | 62 |
1; |
... | ... | |
1008 | 1010 |
validate_items(); |
1009 | 1011 |
|
1010 | 1012 |
# check for serial number if part needs one |
1013 |
my $missing_serialnr = ''; |
|
1011 | 1014 |
for my $i (1 .. $form->{rowcount} - 1) { |
1012 |
next unless $form->{"has_sernumber_$i"}; |
|
1013 |
$form->isblank("serialnumber_$i", |
|
1014 |
$locale->text('Serial Number missing in Row') . " $i"); |
|
1015 |
next if !$form->{"has_sernumber_$i"} || $form->{"serialnumber_$i"} ne ''; |
|
1016 |
$missing_serialnr .= $missing_serialnr ? ", $i" : " $i"; |
|
1015 | 1017 |
} |
1018 |
if ($missing_serialnr ne '') { |
|
1019 |
flash('error', $locale->text('Serial Number missing in Row') . $missing_serialnr); |
|
1020 |
render_flash(); |
|
1021 |
&update; |
|
1022 |
$::dispatcher->end_request; |
|
1023 |
return; |
|
1024 |
} |
|
1025 |
|
|
1016 | 1026 |
# if the name changed get new values |
1017 | 1027 |
my $vc = $form->{vc}; |
1018 | 1028 |
if (($form->{"previous_${vc}_id"} || $form->{"${vc}_id"}) != $form->{"${vc}_id"}) { |
Auch abrufbar als: Unified diff
DO: Flash bei fehlender Seriennummer