Projekt

Allgemein

Profil

Herunterladen (956 Bytes) Statistiken
| Zweig: | Markierung: | Revision:
82515b2d Sven Schöling
package SL::DB::PurchaseInvoice;

use strict;

a93f1e39 Moritz Bunkus
use Carp;

82515b2d Sven Schöling
use SL::DB::MetaSetup::PurchaseInvoice;
use SL::DB::Manager::PurchaseInvoice;
e9fb6244 Moritz Bunkus
use SL::DB::Helper::LinkedRecords;
5547891f Moritz Bunkus
# The calculator hasn't been adjusted for purchase invoices yet.
# use SL::DB::Helper::PriceTaxCalculator;
82515b2d Sven Schöling
ce004da6 Moritz Bunkus
__PACKAGE__->meta->add_relationship(
invoiceitems => {
type => 'one to many',
class => 'SL::DB::InvoiceItem',
column_map => { id => 'trans_id' },
manager_args => { with_objects => [ 'part' ] }
},
fc1490e8 Moritz Bunkus
sepa_export_items => {
type => 'one to many',
class => 'SL::DB::SepaExportItem',
column_map => { id => 'ap_id' },
manager_args => { with_objects => [ 'sepa_export' ] }
},
ce004da6 Moritz Bunkus
);
82515b2d Sven Schöling
__PACKAGE__->meta->initialize;

0845c4b7 Moritz Bunkus
sub items { goto &invoiceitems; }
4ac74078 Moritz Bunkus
a93f1e39 Moritz Bunkus
sub is_sales {
# For compatibility with Order, DeliveryOrder
croak 'not an accessor' if @_ > 1;
return 0;
}

16c6be41 Moritz Bunkus
sub date {
goto &transdate;
}

82515b2d Sven Schöling
1;