Revision 4b8e5682
Von Tamino Steinert vor mehr als 2 Jahren hinzugefügt
- ID 4b8e56821eac8b83856dca20e2ca8371081c13f5
- Vorgänger 72b80f91
SL/DB/Part.pm | ||
---|---|---|
column_map => { id => 'part_id' },
|
||
manager_args => { sort_by => 'valid_from DESC', limit => 1 },
|
||
},
|
||
stock => {
|
||
type => 'one to one',
|
||
class => 'SL::DB::Stock',
|
||
column_map => {id => 'part_id' },
|
||
},
|
||
);
|
||
|
||
__PACKAGE__->meta->initialize;
|
||
... | ... | |
return $stock || 0; # never return undef
|
||
};
|
||
|
||
sub onhand {
|
||
my ($self) = @_;
|
||
return 0 unless $self->id;
|
||
return $self->stock->onhand;
|
||
}
|
||
|
||
# this is designed to ignore chargenumbers, expiration dates and just give a list of how much <-> where
|
||
sub get_simple_stock {
|
Auch abrufbar als: Unified diff
Separate Tabelle für onhand (stocks) für Artikel