X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fdo.pl;h=d5e8d3a0e43ad374cf29fdcf5c0ec8fcb797785f;hb=24b6b41bbc19de53e40315124350df14314c6fd6;hp=1ce1c4694124b941f0028436f95a588d96fff50b;hpb=684e4405d2a330043bcdb99fa5a1bb39caed7601;p=kivitendo-erp.git diff --git a/bin/mozilla/do.pl b/bin/mozilla/do.pl index 1ce1c4694..d5e8d3a0e 100644 --- a/bin/mozilla/do.pl +++ b/bin/mozilla/do.pl @@ -48,8 +48,6 @@ require "bin/mozilla/reportgenerator.pl"; use strict; -my $print_post; - 1; # end of main @@ -235,6 +233,7 @@ sub prepare_order { $form->{"reqdate_$i"} = $form->{"deliverydate_$i"} unless $form->{"reqdate_$i"}; $form->{"sellprice_$i"} = $form->format_amount(\%myconfig, $form->{"sellprice_$i"}, $decimalplaces); + $form->{"lastcost_$i"} = $form->format_amount(\%myconfig, $form->{"lastcost_$i"}, $decimalplaces); (my $dec_qty) = ($form->{"qty_$i"} =~ /\.(\d+)/); $dec_qty = length $dec_qty; @@ -366,7 +365,7 @@ sub update_delivery_order { if ($rows > 1) { select_item(); - exit; + ::end_of_request(); } else { @@ -374,6 +373,7 @@ sub update_delivery_order { $form->{"marge_price_factor_$i"} = $form->{item_list}->[0]->{price_factor}; $form->{"sellprice_$i"} = $form->format_amount(\%myconfig, $form->{"sellprice_$i"}); + $form->{"lastcost_$i"} = $form->format_amount(\%myconfig, $form->{"lastcost_$i"}); $form->{"qty_$i"} = $form->format_amount(\%myconfig, $form->{"qty_$i"}); } @@ -617,7 +617,7 @@ sub save { # if the name changed get new values if (check_name($form->{vc})) { update(); - exit; + ::end_of_request(); } $form->{id} = 0 if $form->{saveasnew}; @@ -645,7 +645,7 @@ sub save { if(!$form->{print_and_save}) { set_headings("edit"); update(); - exit; + ::end_of_request(); } $main::lxdebug->leave_sub(); } @@ -688,7 +688,7 @@ sub delete_delivery_order { # /saving the history $form->info($locale->text('Delivery Order deleted!')); - exit(); + ::end_of_request(); } $form->error($locale->text('Cannot delete delivery order!')); @@ -736,7 +736,7 @@ sub invoice { # und keinen anderen discount wert an $i ... $form->{"discount_$i"} ||= $form->{discount}*100; # ... nehmen wir den kundenrabatt } - map { $form->{"${_}_${i}"} = $form->parse_amount(\%myconfig, $form->{"${_}_${i}"}) if $form->{"${_}_${i}"} } qw(ship qty sellprice listprice basefactor); + map { $form->{"${_}_${i}"} = $form->parse_amount(\%myconfig, $form->{"${_}_${i}"}) if $form->{"${_}_${i}"} } qw(ship qty sellprice listprice lastcost basefactor); } $form->{type} = "invoice"; @@ -769,10 +769,15 @@ sub invoice { $form->{"deliverydate_$i"} = $form->{"reqdate_$i"} unless $form->{"deliverydate_$i"}; + $form->{"sellprice_$i"} = $form->format_amount(\%myconfig, $form->{"sellprice_$i"}, $decimalplaces); + $form->{"lastcost_$i"} = + $form->format_amount(\%myconfig, $form->{"lastcost_$i"}, + $decimalplaces); + (my $dec_qty) = ($form->{"qty_$i"} =~ /\.(\d+)/); $dec_qty = length $dec_qty; $form->{"qty_$i"} = @@ -898,8 +903,6 @@ sub e_mail { $form->{print_and_save} = 1; - $print_post = 1; - my $saved_form = save_form(); save(); @@ -1225,7 +1228,7 @@ sub transfer_in { update(); $main::lxdebug->leave_sub(); - exit 0; + ::end_of_request(); } } @@ -1339,7 +1342,7 @@ sub transfer_out { update(); $main::lxdebug->leave_sub(); - exit 0; + ::end_of_request(); } }