X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Foe.pl;h=32fe7a11fb6d7402a5dd1dd248f435f13dab1b72;hb=f06a2509037f88f8361d989b1bc638665c367558;hp=2b3ee832ca0723fe07cced82c131b2b8b6f550c9;hpb=a426a83959cee5ffc733f14d120677330f873e30;p=kivitendo-erp.git
diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl
index 2b3ee832c..32fe7a11f 100644
--- a/bin/mozilla/oe.pl
+++ b/bin/mozilla/oe.pl
@@ -30,15 +30,19 @@
# 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;
+use List::Util qw(max);
require "bin/mozilla/io.pl";
require "bin/mozilla/arap.pl";
+require "bin/mozilla/reportgenerator.pl";
1;
@@ -119,7 +123,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) {
@@ -162,9 +166,8 @@ sub order_links {
($form->{vc} eq 'customer') ? "AR" : "AP");
# retrieve order/quotation
- $form->{webdav} = $webdav;
- # set jscalendar
- $form->{jscalendar} = $jscalendar;
+ $form->{webdav} = $webdav;
+ $form->{jsscript} = 1;
my $editing = $form->{id};
@@ -322,75 +325,64 @@ sub prepare_order {
sub form_header {
$lxdebug->enter_sub();
- my $checkedclosed = $form->{"closed"} ? "checked" : "";
+ my $checkedclosed = $form->{"closed"} ? "checked" : "";
my $checkeddelivered = $form->{"delivered"} ? "checked" : "";
+ $form->{employee_id} = $form->{old_employee_id} if $form->{old_employee_id};
+ $form->{salesman_id} = $form->{old_salesman_id} if $form->{old_salesman_id};
+
+ $form->{defaultcurrency} = $form->get_default_currency(\%myconfig);
+
+ $form->{employee_id} = $form->{old_employee_id} if $form->{old_employee_id};
+ $form->{salesman_id} = $form->{old_salesman_id} if $form->{old_salesman_id};
+
map { $form->{$_} =~ s/\"/"/g }
qw(ordnumber quonumber shippingpoint shipvia notes intnotes shiptoname
shiptostreet shiptozipcode shiptocity shiptocountry shiptocontact
shiptophone shiptofax shiptodepartment_1 shiptodepartment_2);
# use JavaScript Calendar or not
- $form->{jsscript} = $form->{jscalendar};
+ $form->{jsscript} = 1;
$jsscript = "";
- if ($form->{jsscript}) {
-
- # with JavaScript Calendar
- $button1 = qq|
-