X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Foe.pl;h=abf4bf60e4ad6f1f4e3a71ca5f6415d0b5b3bd50;hb=a751b16cead5e56b62e18ee616e04323919f5fe1;hp=8b6a403f9fa621b4ccc02e0f37fb86c0f77e32af;hpb=50305a6d2b85e49fdfaa0c58be8094745762ba8d;p=kivitendo-erp.git diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl index 8b6a403f9..abf4bf60e 100644 --- a/bin/mozilla/oe.pl +++ b/bin/mozilla/oe.pl @@ -236,7 +236,7 @@ sub order_links { if ($taxzone_id) { $form->{taxzone_id} = $taxzone_id; } - $form->{intnotes} = $intnotes; + $form->{intnotes} = $intnotes if $intnotes; ($form->{ $form->{vc} }) = split /--/, $form->{ $form->{vc} }; $form->{"old$form->{vc}"} = qq|$form->{$form->{vc}}--$form->{"$form->{vc}_id"}|; @@ -2509,3 +2509,26 @@ sub poso { $lxdebug->leave_sub(); } +sub e_mail { + $lxdebug->enter_sub(); + + $form->{saveasnew} = 1; + $form->{closed} = 0; + $form->{print_and_save} = 1; + map { delete $form->{$_} } qw(printed emailed queued); + + # Let Lx-Office assign a new order number if the user hasn't changed the + # previous one. If it has been changed manually then use it as-is. + my $idx = $form->{type} =~ /_quotation$/ ? "quonumber" : "ordnumber"; + if ($form->{saved_xyznumber} && + ($form->{saved_xyznumber} eq $form->{$idx})) { + delete($form->{$idx}); + } + + &save; + + &edit_e_mail; + + $lxdebug->leave_sub(); +} +