sub items_sorted {
my ($self) = @_;
- return [ sort {$a->id <=> $b->id } @{ $self->items } ];
+ return [ sort {$a->position <=> $b->position } @{ $self->items } ];
}
sub sales_order {
return ($delivery_order, $custom_shipto);
}
+sub customervendor {
+ $_[0]->is_sales ? $_[0]->customer : $_[0]->vendor;
+}
+
1;
__END__