From 3f3b575b87cede02bbc8048b4b9e290f4597bed0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Fri, 30 Apr 2021 19:00:46 +0200 Subject: [PATCH] Zeiterfassung: Konvertierung: Auftrag als geliefert markieren, wenn komplett Todo: hier gibt es einen Bug mit Einheiten --- SL/BackgroundJob/ConvertTimeRecordings.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/SL/BackgroundJob/ConvertTimeRecordings.pm b/SL/BackgroundJob/ConvertTimeRecordings.pm index b3ec878d0..ffc2bae2c 100644 --- a/SL/BackgroundJob/ConvertTimeRecordings.pm +++ b/SL/BackgroundJob/ConvertTimeRecordings.pm @@ -8,6 +8,7 @@ use SL::DB::DeliveryOrder; use SL::DB::Part; use SL::DB::Project; use SL::DB::TimeRecording; +use SL::Helper::ShippedQty; use SL::Locale::String qw(t8); use DateTime; @@ -210,7 +211,8 @@ sub convert_with_linking { } } - # Todo: reduce qty on related order + my $helper = SL::Helper::ShippedQty->new->calculate($related_order)->write_to_objects; + $related_order->update_attributes(delivered => $related_order->{delivered}); 1; })) { -- 2.20.1