From: Sven Schöling Date: Thu, 2 Sep 2010 09:28:29 +0000 (+0200) Subject: Kommissionenrest in SL::DB::Part entfernt. X-Git-Tag: release-2.6.2beta1~149 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=3af1d16a776c63cdcf624bcc3eba3e8738ff0ccd;p=kivitendo-erp.git Kommissionenrest in SL::DB::Part entfernt. --- diff --git a/SL/DB/Part.pm b/SL/DB/Part.pm index 6ea2be9b1..8c82e8a44 100644 --- a/SL/DB/Part.pm +++ b/SL/DB/Part.pm @@ -63,37 +63,6 @@ sub get_ordered_qty { return $result{ $self->id }; } -sub get_uncommissioned_qty { - my $self = shift; - my %params = @_; - - confess "Missing part id" unless $self->id; - - my $query = < 0)), - 0) - - - COALESCE((SELECT SUM(i.qty) AS qty - FROM inventory i - LEFT JOIN warehouse wh ON (i.warehouse_id = wh.id) - WHERE (i.parts_id = ?) - AND COALESCE(wh.commission)), - 0) - AS qty -SQL - - my $result = selectfirst_hashref_query($::form, $self->dbh, $query, $self->id, $self->id); - return $result ? $result->{qty} : 0; -} - sub available_units { shift->unit_obj->convertible_units; }