From: Moritz Bunkus Date: Fri, 9 Nov 2012 14:37:43 +0000 (+0100) Subject: Merge branch 'master' of vc.linet-services.de:public/lx-office-erp X-Git-Tag: release-3.0.0beta1~10^2~4 X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/commitdiff_plain/a068401e5840f1748bd79afb0af6bd963badf3f1?ds=inline;hp=-c Merge branch 'master' of vc.linet-services.de:public/lx-office-erp --- a068401e5840f1748bd79afb0af6bd963badf3f1 diff --combined bin/mozilla/oe.pl index c7309dc86,3908f7435..5df518fc7 --- a/bin/mozilla/oe.pl +++ b/bin/mozilla/oe.pl @@@ -409,7 -409,6 +409,6 @@@ sub form_header } elsif ($form->{resubmit}) { # emulate click for resubmitting actions $dispatch_to_popup = "document.oe.${_}.click(); " for grep { /^action_/ } keys %$form; - $dispatch_to_popup .= "document.oe.submit();"; } elsif ($creditwarning) { $::request->{layout}->add_javascripts_inline("alert('$credittext')"); } @@@ -1736,14 -1735,13 +1735,14 @@@ sub purchase_order $form->{cp_id} *= 1; + my $source_type = $form->{type}; $form->{title} = $locale->text('Add Purchase Order'); $form->{vc} = "vendor"; $form->{type} = "purchase_order"; $form->get_employee(); - &poso; + poso(source_type => $form->{type}); delete $form->{sales_order_to_purchase_order}; @@@ -1765,14 -1763,13 +1764,14 @@@ sub sales_order $form->{cp_id} *= 1; + my $source_type = $form->{type}; $form->{title} = $locale->text('Add Sales Order'); $form->{vc} = "customer"; $form->{type} = "sales_order"; $form->get_employee(); - &poso; + poso(source_type => $source_type); $main::lxdebug->leave_sub(); } @@@ -1780,7 -1777,6 +1779,7 @@@ sub poso { $main::lxdebug->enter_sub(); + my %param = @_; my $form = $main::form; my %myconfig = %main::myconfig; @@@ -1790,11 -1786,6 +1789,11 @@@ $form->{transdate} = $form->current_date(\%myconfig); delete $form->{duedate}; + # "reqdate" is the validity date for a quotation and the delivery + # date for an order. Therefore it makes no sense to keep the value + # when converting from one into the other. + delete $form->{reqdate} if ($param{source_type} =~ /_quotation$/) == ($form->{type} =~ /_quotation$/); + $form->{convert_from_oe_ids} = $form->{id}; $form->{closed} = 0;