projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
kein use SL::DB::Object aus SL::DB::Object
[kivitendo-erp.git]
/
SL
/
DB
/
Order.pm
diff --git
a/SL/DB/Order.pm
b/SL/DB/Order.pm
index
b3edda5
..
00886d6
100644
(file)
--- a/
SL/DB/Order.pm
+++ b/
SL/DB/Order.pm
@@
-37,8
+37,13
@@
__PACKAGE__->meta->initialize;
# methods
# methods
-sub items { goto &orderitems; }
-sub payment_terms { goto &payment; }
+sub items { goto &orderitems; }
+
+sub items_sorted {
+ my ($self) = @_;
+
+ return [ sort {$a->id <=> $b->id } @{ $self->items } ];
+}
sub type {
my $self = shift;
sub type {
my $self = shift;
@@
-69,7
+74,7
@@
sub displayable_type {
sub is_sales {
croak 'not an accessor' if @_ > 1;
sub is_sales {
croak 'not an accessor' if @_ > 1;
- return shift->customer_id;
+ return
!!
shift->customer_id;
}
sub invoices {
}
sub invoices {
@@
-133,6
+138,10
@@
sub number {
return $self->${ \ $number_method{$self->type} }(@_);
}
return $self->${ \ $number_method{$self->type} }(@_);
}
+sub date {
+ goto &transdate;
+}
+
1;
__END__
1;
__END__