Revision 5aa3647a
Von Tamino Steinert vor mehr als 1 Jahr hinzugefügt
SL/Controller/Part.pm | ||
---|---|---|
266 | 266 |
my ( $self ) = @_; |
267 | 267 |
|
268 | 268 |
if ( !$self->_is_in_purchase_basket && scalar @{$self->part->makemodels}) { |
269 |
|
|
270 |
my $part = $self->part; |
|
271 |
|
|
272 |
my $needed_qty = $part->order_qty < ($part->rop - $part->onhandqty) ? |
|
273 |
$part->rop - $part->onhandqty |
|
274 |
: $part->order_qty; |
|
275 |
|
|
269 | 276 |
my $basket_part = SL::DB::PurchaseBasketItem->new( |
270 |
part_id => $self->part->id,
|
|
271 |
qty => $self->part->order_qty || 1, # was ist wenn order_qty < (rop-onhand) ist? sollte dann nicht (rop-onhand) genommen werden?
|
|
277 |
part_id => $part->id, |
|
278 |
qty => $needed_qty,
|
|
272 | 279 |
orderer => SL::DB::Manager::Employee->current, |
273 | 280 |
)->save; |
274 | 281 |
|
Auch abrufbar als: Unified diff
WIP DispositionManager