-# This file has been auto-generated only because it didn't exist.
-# Feel free to modify it at will; it will not be overwritten automatically.
-
package SL::DB::Invoice;
use strict;
use SL::DB::Manager::Invoice;
use SL::DB::Helper::Payment qw(:ALL);
use SL::DB::Helper::AttrHTML;
+use SL::DB::Helper::AttrSorted;
use SL::DB::Helper::FlattenToForm;
use SL::DB::Helper::LinkedRecords;
use SL::DB::Helper::PriceTaxCalculator;
__PACKAGE__->meta->initialize;
__PACKAGE__->attr_html('notes');
+__PACKAGE__->attr_sorted('items');
__PACKAGE__->before_save('_before_save_set_invnumber');
sub items { goto &invoiceitems; }
sub add_items { goto &add_invoiceitems; }
-sub items_sorted {
- my ($self) = @_;
-
- return [ sort {$a->position <=> $b->position } @{ $self->items } ];
-}
-
sub is_sales {
# For compatibility with Order, DeliveryOrder
croak 'not an accessor' if @_ > 1;