Revision 72528ede
Von Tamino Steinert vor mehr als 2 Jahren hinzugefügt
- ID 72528edece18f8ac73ff702e83050c674db69b38
- Vorgänger 72b80f91
| SL/DB/Part.pm | ||
|---|---|---|
|     column_map   => { id => 'part_id' },
 | ||
|     manager_args => { sort_by => 'valid_from DESC', limit => 1 },
 | ||
|   },
 | ||
|   onhands => {
 | ||
|     type => 'one to one',
 | ||
|     class => 'SL::DB::Onhand',
 | ||
|     column_map => {id => 'parts_id' },
 | ||
|   },
 | ||
| );
 | ||
|  | ||
| __PACKAGE__->meta->initialize;
 | ||
| ... | ... | |
|   return $stock || 0; # never return undef
 | ||
| };
 | ||
|  | ||
| sub onhand {
 | ||
|   my ($self) = @_;
 | ||
|   return 0 unless $self->id;
 | ||
|   return $self->onhands->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 (onhands) für Artikel