X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fic.pl;h=b86623b5103673b15198e6e6175311474ea90998;hb=947583f50e01c950349274b6707702293f6c495a;hp=2cbad4f62ce5b38f9a60809d72e8cb771c90c71c;hpb=fc41222c61dbee590005f04c50e8603581462543;p=kivitendo-erp.git diff --git a/bin/mozilla/ic.pl b/bin/mozilla/ic.pl index 2cbad4f62..b86623b51 100644 --- a/bin/mozilla/ic.pl +++ b/bin/mozilla/ic.pl @@ -38,6 +38,7 @@ use List::MoreUtils qw(any); use SL::AM; use SL::CVar; use SL::IC; +use SL::Helper::Flash; use SL::ReportGenerator; #use SL::PE; @@ -1585,6 +1586,10 @@ sub form_header { IC->retrieve_buchungsgruppen(\%myconfig, $form); @{ $form->{BUCHUNGSGRUPPEN} } = grep { $_->{id} eq $form->{buchungsgruppen_id} || ($form->{id} && $form->{orphaned}) || !$form->{id} } @{ $form->{BUCHUNGSGRUPPEN} }; + if (!SL::TransNumber->new(number => $form->{partnumber}, type => $form->{item}, id => $form->{id})->is_unique) { + flash('info', $::locale->text('This partnumber is not unique. You should change it.')); + } + # use JavaScript Calendar or not (yes!) $form->{jsscript} = 1; @@ -1593,7 +1598,7 @@ sub form_header { $form->{defaults} = AM->get_defaults(); - $form->{fokus} = "ic.partnumber"; + $::request->{layout}->focus("#partnumber"); $form->{CUSTOM_VARIABLES} = CVar->get_custom_variables('module' => 'IC', 'trans_id' => $form->{id});