package SL::DB::Order;
+use utf8;
use strict;
use SL::RecordLinks;
use SL::DB::MetaSetup::Order;
use SL::DB::Manager::Order;
use SL::DB::Invoice;
-
-__PACKAGE__->attr_number($_, places => -2) for qw(amount netamount marge_total marge_percent);
-__PACKAGE__->attr_date($_) for qw(transdate reqdate);
+use SL::DB::Helper::LinkedRecords;
+use SL::DB::Helper::PriceTaxCalculator;
+use SL::DB::Helper::TransNumberGenerator;
__PACKAGE__->meta->add_relationship(
orderitems => {
manager_args => {
with_objects => [ 'part' ]
}
- }
+ },
+ periodic_invoices_config => {
+ type => 'one to one',
+ class => 'SL::DB::PeriodicInvoicesConfig',
+ column_map => { id => 'oe_id' },
+ },
+ periodic_invoices => {
+ type => 'one to many',
+ class => 'SL::DB::PeriodicInvoice',
+ column_map => { id => 'oe_id' },
+ },
+ payment_term => {
+ type => 'one to one',
+ class => 'SL::DB::PaymentTerm',
+ column_map => { payment_id => 'id' },
+ },
);
__PACKAGE__->meta->initialize;
# methods
+sub items { goto &orderitems; }
+
sub type {
my $self = shift;
=head1 AUTHOR
- Sven Schöling <s.schoeling@linet-services.de>
+Sven Schöling <s.schoeling@linet-services.de>
=cut