X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FDO.pm;h=8d61b0f1fb0869fad5ceb247a078c8cffcd45836;hb=b498a3939d86fd9fd7c83e5174103250d8662ca7;hp=8e413617211adff9994139f12dff89e137acc2f8;hpb=eaf5d78bfb9a14f47e014160422bac92861a3b4d;p=kivitendo-erp.git diff --git a/SL/DO.pm b/SL/DO.pm index 8e4136172..8d61b0f1f 100644 --- a/SL/DO.pm +++ b/SL/DO.pm @@ -76,10 +76,9 @@ sub transactions { push @where, ($form->{type} eq 'sales_delivery_order' ? '' : 'NOT ') . qq|COALESCE(dord.is_sales, FALSE)|; - my $department_id = (split /--/, $form->{department})[1]; - if ($department_id) { + if ($form->{department_id}) { push @where, qq|dord.department_id = ?|; - push @values, conv_i($department_id); + push @values, conv_i($form->{department_id}); } if ($form->{project_id}) { @@ -327,7 +326,6 @@ sub save { $h_item->finish(); $h_item_stock->finish(); - ($null, $form->{department_id}) = split(/--/, $form->{department}); # save DO record $query =