require SL::DB::Customer;
my $customer = SL::DB::Manager::Customer->find_by(id => $form->{customer_id});
die "Can't find customer" unless $customer;
+ die $main::locale->text("Error while creating project with project number of new order number, project number #1 already exists!", $form->{ordnumber})
+ if SL::DB::Manager::Project->find_by(projectnumber => $form->{ordnumber});
+
my $new_project = SL::DB::Project->new(
projectnumber => $form->{ordnumber},
description => $customer->name,
'Error message from the webshop api:' => 'Fehlermeldung der Webshop Api',
'Error when saving: #1' => 'Fehler beim Speichern: #1',
'Error while applying year-end bookings!' => 'Fehler beim Durchführen der Abschlußbuchungen!',
+ 'Error while creating project with project number of new order number, project number #1 already exists!' => 'Fehler beim Erstellen eines Projekts mit der Projektnummer der neuen Auftragsnummer, Projektnummer #1 existiert bereits!',
'Error with default taxzone' => 'Ungültige Standardsteuerzone',
'Error!' => 'Fehler!',
'Error: #1' => 'Fehler: #1',
'Error message from the webshop api:' => '',
'Error when saving: #1' => '',
'Error while applying year-end bookings!' => '',
+ 'Error while creating project with project number of new order number, project number #1 already exists!' => '',
'Error with default taxzone' => '',
'Error!' => '',
'Error: #1' => '',