-__PACKAGE__->meta->add_relationship(invoiceitems => { type => 'one to many',
- class => 'SL::DB::InvoiceItem',
- column_map => { id => 'trans_id' },
- manager_args => { with_objects => [ 'part' ] }
- },
- );
+__PACKAGE__->meta->add_relationship(
+ invoiceitems => {
+ type => 'one to many',
+ class => 'SL::DB::InvoiceItem',
+ column_map => { id => 'trans_id' },
+ manager_args => { with_objects => [ 'part' ] }
+ },
+ sepa_export_items => {
+ type => 'one to many',
+ class => 'SL::DB::SepaExportItem',
+ column_map => { id => 'ap_id' },
+ manager_args => { with_objects => [ 'sepa_export' ] }
+ },
+ sepa_exports => {
+ type => 'many to many',
+ map_class => 'SL::DB::SepaExportItem',
+ map_from => 'ap',
+ map_to => 'sepa_export',
+ },
+ custom_shipto => {
+ type => 'one to one',
+ class => 'SL::DB::Shipto',
+ column_map => { id => 'trans_id' },
+ query_args => [ module => 'AP' ],
+ },
+ transactions => {
+ type => 'one to many',
+ class => 'SL::DB::AccTransaction',
+ column_map => { id => 'trans_id' },
+ manager_args => { with_objects => [ 'chart' ],
+ sort_by => 'acc_trans_id ASC' }
+ },
+);