projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Sortieren von Steuerzonen in Belegen
[kivitendo-erp.git]
/
SL
/
DB
/
OrderItem.pm
diff --git
a/SL/DB/OrderItem.pm
b/SL/DB/OrderItem.pm
index
862a215
..
e75c78f
100644
(file)
--- a/
SL/DB/OrderItem.pm
+++ b/
SL/DB/OrderItem.pm
@@
-3,7
+3,6
@@
package SL::DB::OrderItem;
use strict;
use List::Util qw(sum);
use strict;
use List::Util qw(sum);
-use SL::AM;
use SL::DB::MetaSetup::OrderItem;
use SL::DB::Manager::OrderItem;
use SL::DB::MetaSetup::OrderItem;
use SL::DB::Manager::OrderItem;
@@
-11,15
+10,10
@@
use SL::DB::Helper::CustomVariables (
sub_module => 'orderitems',
cvars_alias => 1,
overloads => {
sub_module => 'orderitems',
cvars_alias => 1,
overloads => {
- parts_id => 'SL::DB::Part',
- },
-);
-
-__PACKAGE__->meta->add_relationship(
- unit_obj => {
- type => 'many to one',
- class => 'SL::DB::Unit',
- column_map => { unit => 'name' },
+ parts_id => {
+ class => 'SL::DB::Part',
+ module => 'IC',
+ }
},
);
},
);
@@
-36,6
+30,7
@@
sub shipped_qty {
my $d_orders = $self->order->linked_records(direction => 'to', to => 'SL::DB::DeliveryOrder');
my @doi = grep { $_->parts_id == $self->parts_id } map { $_->orderitems } @$d_orders;
my $d_orders = $self->order->linked_records(direction => 'to', to => 'SL::DB::DeliveryOrder');
my @doi = grep { $_->parts_id == $self->parts_id } map { $_->orderitems } @$d_orders;
+ require SL::AM;
return sum(map { AM->convert_unit($_->unit => $self->unit) * $_->qty } @doi);
}
return sum(map { AM->convert_unit($_->unit => $self->unit) * $_->qty } @doi);
}