X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Foe.pl;h=df883fc21d85587a9b570b93fe4f9792f4d43880;hb=796b3881fae7c5f5feacfc5914a2d47cb85e18e6;hp=ac4dcf5b4c6b425add16835e4316bc20fc507569;hpb=f5e0cdb2123962a7ced378468c6fb29c384c0d4a;p=kivitendo-erp.git diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl index ac4dcf5b4..df883fc21 100644 --- a/bin/mozilla/oe.pl +++ b/bin/mozilla/oe.pl @@ -30,15 +30,18 @@ # Order entry module # Quotation module #====================================================================== -use Data::Dumper; + +use POSIX qw(strftime); use SL::OE; use SL::IR; use SL::IS; use SL::PE; +use SL::ReportGenerator; require "bin/mozilla/io.pl"; require "bin/mozilla/arap.pl"; +require "bin/mozilla/report_generator.pl"; 1; @@ -119,7 +122,7 @@ sub edit { set_headings("edit"); # editing without stuff to edit? try adding it first - if ($form->{rowcount}) { + if ($form->{rowcount} && !$form->{print_and_save}) { map { $id++ if $form->{"multi_id_$_"} } (1 .. $form->{rowcount}); if (!$id) { @@ -324,6 +327,23 @@ sub form_header { my $checkedclosed = $form->{"closed"} ? "checked" : ""; my $checkeddelivered = $form->{"delivered"} ? "checked" : ""; + if ($form->{old_employee_id}) { + $form->{employee_id} = $form->{old_employee_id}; + } + if ($form->{old_salesman_id}) { + $form->{salesman_id} = $form->{old_salesman_id}; + } + + $form->{defaultcurrency} = $form->get_default_currency(\%myconfig); + + + if ($form->{old_employee_id}) { + $form->{employee_id} = $form->{old_employee_id}; + } + if ($form->{old_salesman_id}) { + $form->{salesman_id} = $form->{old_salesman_id}; + } + map { $form->{$_} =~ s/\"/"/g } qw(ordnumber quonumber shippingpoint shipvia notes intnotes shiptoname shiptostreet shiptozipcode shiptocity shiptocountry shiptocontact @@ -563,6 +583,10 @@ sub form_header { $form->{exchangerate} = $form->format_amount(\%myconfig, $form->{exchangerate}); + if (!$form->{exchangerate}) { + $form->{exchangerate} = ""; + } + if (($form->{creditlimit} != 0) && ($form->{creditremaining} < 0) && !$form->{update}) { $creditwarning = 1; } else { @@ -1386,7 +1410,7 @@ sub search { $form->get_lists("projects" => { "key" => "ALL_PROJECTS", "all" => 1 }, - "employees" => "ALL_EMPLOYEES", + "employees" => "ALL_EMPLOYEES", $vc => "ALL_" . uc($vc)); my %labels = (); @@ -1401,7 +1425,7 @@ sub search { #employees %labels = (); - @values = (); + @values = (""); foreach my $item (@{ $form->{"ALL_EMPLOYEES"} }) { push(@values, $item->{"id"}); $labels{$item->{"id"}} = $item->{"name"} ne "" ? $item->{"name"} : $item->{"login"}; @@ -1411,8 +1435,9 @@ sub search {