Revision 54707029
Von Tamino Steinert vor mehr als 1 Jahr hinzugefügt
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; |
... | ... | |
1011 | 1013 |
validate_items(); |
1012 | 1014 |
|
1013 | 1015 |
# check for serial number if part needs one |
1016 |
my $missing_serialnr = ''; |
|
1014 | 1017 |
for my $i (1 .. $form->{rowcount} - 1) { |
1015 |
next unless $form->{"has_sernumber_$i"}; |
|
1016 |
$form->isblank("serialnumber_$i", |
|
1017 |
$locale->text('Serial Number missing in Row') . " $i"); |
|
1018 |
next if !$form->{"has_sernumber_$i"} || $form->{"serialnumber_$i"} ne ''; |
|
1019 |
$missing_serialnr .= $missing_serialnr ? ", $i" : " $i"; |
|
1018 | 1020 |
} |
1021 |
if ($missing_serialnr ne '') { |
|
1022 |
flash('error', $locale->text('Serial Number missing in Row') . $missing_serialnr); |
|
1023 |
render_flash(); |
|
1024 |
&update; |
|
1025 |
$::dispatcher->end_request; |
|
1026 |
return; |
|
1027 |
} |
|
1028 |
|
|
1019 | 1029 |
# if the name changed get new values |
1020 | 1030 |
my $vc = $form->{vc}; |
1021 | 1031 |
if (($form->{"previous_${vc}_id"} || $form->{"${vc}_id"}) != $form->{"${vc}_id"}) { |
Auch abrufbar als: Unified diff
DO: Flash bei fehlender Seriennummer