X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/f65440cb9d28d4862facc50858bd25fa138cb211..e47fdf34451bb7c091b29144e041532c4960718a:/SL/DB/Order.pm diff --git a/SL/DB/Order.pm b/SL/DB/Order.pm index 415896919..fe0b32153 100644 --- a/SL/DB/Order.pm +++ b/SL/DB/Order.pm @@ -275,7 +275,7 @@ sub convert_to_delivery_order { } } - $self->update_attributes(delivered => 1); + $self->update_attributes(delivered => 1) unless $::instance_conf->get_shipped_qty_require_stock_out; 1; })) { return undef; @@ -311,6 +311,7 @@ sub new_from { { from => 'sales_order', to => 'purchase_order', abbr => 'sopo' }, { from => 'purchase_order', to => 'sales_order', abbr => 'poso' }, { from => 'sales_order', to => 'sales_quotation', abbr => 'sosq' }, + { from => 'purchase_order', to => 'request_quotation', abbr => 'porq' }, ); my $from_to = (grep { $_->{from} eq $source->type && $_->{to} eq $destination_type} @from_tos)[0]; croak("Cannot convert from '" . $source->type . "' to '" . $destination_type . "'") if !$from_to; @@ -355,7 +356,7 @@ sub new_from { if ( $is_abbr_any->(qw(soso)) ) { $args{periodic_invoices_config} = $source->periodic_invoices_config->clone_and_reset if $source->periodic_invoices_config; } - if ( $is_abbr_any->(qw(sosq)) ) { + if ( $is_abbr_any->(qw(sosq porq)) ) { $args{ordnumber} = undef; $args{quonumber} = undef; $args{reqdate} = DateTime->today_local->next_workday(); @@ -392,6 +393,7 @@ sub new_from { marge_percent marge_price_factor marge_total ordnumber parts_id price_factor price_factor_id pricegroup_id project_id qty reqdate sellprice serialnumber ship subtotal transdate unit + optional )), custom_variables => \@custom_variables, );