X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/78034f2431414b414d171b720bc0438635e19ae5..a93f1e395694983593c65b35427a13d68e46d380:/SL/DB/PurchaseInvoice.pm diff --git a/SL/DB/PurchaseInvoice.pm b/SL/DB/PurchaseInvoice.pm index a06a3b639..9ec6035b8 100644 --- a/SL/DB/PurchaseInvoice.pm +++ b/SL/DB/PurchaseInvoice.pm @@ -2,8 +2,13 @@ package SL::DB::PurchaseInvoice; use strict; +use Carp; + use SL::DB::MetaSetup::PurchaseInvoice; use SL::DB::Manager::PurchaseInvoice; +use SL::DB::Helper::LinkedRecords; +# The calculator hasn't been adjusted for purchase invoices yet. +# use SL::DB::Helper::PriceTaxCalculator; __PACKAGE__->meta->add_relationship(invoiceitems => { type => 'one to many', class => 'SL::DB::InvoiceItem', @@ -14,4 +19,13 @@ __PACKAGE__->meta->add_relationship(invoiceitems => { type => 'one to ma __PACKAGE__->meta->initialize; +sub items { goto &invoiceitems; } +sub payment_term { goto &payment; } + +sub is_sales { + # For compatibility with Order, DeliveryOrder + croak 'not an accessor' if @_ > 1; + return 0; +} + 1;