From 40618d8d90a2726030009a8e151186a34c2687c6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Tue, 18 May 2021 13:21:59 +0200 Subject: [PATCH] Zeiterfassung: Logik-/Tippfehler in Validierung beim Speichern --- SL/DB/TimeRecording.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SL/DB/TimeRecording.pm b/SL/DB/TimeRecording.pm index 3749dab8f..575e219fb 100644 --- a/SL/DB/TimeRecording.pm +++ b/SL/DB/TimeRecording.pm @@ -38,7 +38,7 @@ sub validate { push @errors, t8('Employee must not be empty.') if !$self->employee_id; push @errors, t8('Description must not be empty.') if !$self->description; push @errors, t8('Start time must be earlier than end time.') if $self->is_time_in_wrong_order; - push @errors, t8('Assigned order must be a sales order.') if $self->order_id && 'sales_order' eq !$self->order->type; + push @errors, t8('Assigned order must be a sales order.') if $self->order_id && 'sales_order' ne $self->order->type; push @errors, t8('Customer of assigned order must match customer.') if $self->order_id && $self->order->customer_id != $self->customer_id; push @errors, t8('Customer of assigned project must match customer.') if $self->project_id && $self->project->customer_id && $self->project->customer_id != $self->customer_id; push @errors, t8('Project of assigned order must match assigned project.') -- 2.20.1