X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FDB%2FOrder.pm;h=6b31cd235437961d9f2e0137aeca10edca43a854;hb=82349c1ed1027244965c0da6ecdd8793d365d01a;hp=d74f9414dc8958283ad3f8069156c0714919c37d;hpb=2209370ef80da58725187ec1c3d68719898f79c4;p=kivitendo-erp.git diff --git a/SL/DB/Order.pm b/SL/DB/Order.pm index d74f9414d..6b31cd235 100644 --- a/SL/DB/Order.pm +++ b/SL/DB/Order.pm @@ -10,6 +10,7 @@ use List::Util qw(max); use SL::DB::MetaSetup::Order; use SL::DB::Manager::Order; use SL::DB::Invoice; +use SL::DB::Helper::FlattenToForm; use SL::DB::Helper::LinkedRecords; use SL::DB::Helper::PriceTaxCalculator; use SL::DB::Helper::PriceUpdater; @@ -40,6 +41,26 @@ __PACKAGE__->meta->add_relationship( class => 'SL::DB::PaymentTerm', column_map => { payment_id => 'id' }, }, + contact => { + type => 'one to one', + class => 'SL::DB::Contact', + column_map => { cp_id => 'cp_id' }, + }, + shipto => { + type => 'one to one', + class => 'SL::DB::Shipto', + column_map => { shipto_id => 'shipto_id' }, + }, + department => { + type => 'one to one', + class => 'SL::DB::Department', + column_map => { department_id => 'id' }, + }, + language => { + type => 'one to one', + class => 'SL::DB::Language', + column_map => { language_id => 'id' }, + }, ); __PACKAGE__->meta->initialize; @@ -115,13 +136,13 @@ SL::DB::Order - Order Datenbank Objekt. =head1 FUNCTIONS -=head2 type +=head2 C Returns one of the following string types: =over 4 -=item saes_order +=item sales_order =item purchase_order @@ -131,11 +152,11 @@ Returns one of the following string types: =back -=head2 is_type TYPE +=head2 C -Rreturns true if the order is of the given type. +Returns true if the order is of the given type. -=item C +=head2 C Creates a new invoice with C<$self> as the basis by calling L. That invoice is posted, and C<$self> is @@ -150,7 +171,7 @@ nothing is created or changed in the database. At the moment only sales quotations and sales orders can be converted. -=item C +=head2 C Creates and saves a new sales process. Can only be called for sales orders. @@ -160,8 +181,6 @@ C<$self> and to all sales quotations that are linked to C<$self>. Returns the newly created process instance. -=back - =head1 BUGS Nothing here yet.