projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
locales-Lauf en
[kivitendo-erp.git]
/
SL
/
DB
/
Assembly.pm
diff --git
a/SL/DB/Assembly.pm
b/SL/DB/Assembly.pm
index
42d155f
..
fd645c2
100644
(file)
--- a/
SL/DB/Assembly.pm
+++ b/
SL/DB/Assembly.pm
@@
-23,4
+23,11
@@
sub linetotal_lastcost {
return $self->qty * $self->part->lastcost / ( $self->part->price_factor_id ? $self->part->price_factor->factor : 1 );
}
return $self->qty * $self->part->lastcost / ( $self->part->price_factor_id ? $self->part->price_factor->factor : 1 );
}
+sub linetotal_weight {
+ my ($self) = @_;
+
+ return 0 unless $self->qty > 0 and ($self->part->weight||0) > 0;
+ return $self->qty * $self->part->weight;
+}
+
1;
1;