X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/00738f6f4e43355ae9e70cd5350d7c75c1533f5f..94e11003809e9090514026a733e58e72e636a6bb:/bin/mozilla/do.pl diff --git a/bin/mozilla/do.pl b/bin/mozilla/do.pl index 228b8e68d..c88f3b0ec 100644 --- a/bin/mozilla/do.pl +++ b/bin/mozilla/do.pl @@ -648,17 +648,15 @@ sub invoice { check_do_access(); $auth->assert($form->{type} eq 'purchase_delivery_order' ? 'vendor_invoice_edit' : 'invoice_edit'); - $form->{close_do_ids} = $form->{id}; + $form->{convert_from_do_ids} = $form->{id}; + $form->{deliverydate} = $form->{transdate}; + $form->{transdate} = $form->{invdate} = $form->current_date(\%myconfig); + $form->{duedate} = $form->current_date(\%myconfig, $form->{invdate}, $form->{terms} * 1); + $form->{defaultcurrency} = $form->get_default_currency(\%myconfig); - $form->{deliverydate} = $form->{transdate}; - $form->{transdate} = $form->{invdate} = $form->current_date(\%myconfig); - $form->{duedate} = $form->current_date(\%myconfig, $form->{invdate}, $form->{terms} * 1); - - $form->{id} = ''; - $form->{closed} = 0; $form->{rowcount}--; - $form->{defaultcurrency} = $form->get_default_currency(\%myconfig); + delete @{$form}{qw(id closed delivered)}; if ($form->{type} eq 'purchase_delivery_order') { $form->{title} = $locale->text('Add Vendor Invoice'); @@ -742,13 +740,13 @@ sub invoice_multi { 'back_button' => 1); } - $form->{close_do_ids} = join ' ', @do_ids; - $form->{deliverydate} = $form->{transdate}; - $form->{transdate} = $form->current_date(\%myconfig); - $form->{duedate} = $form->current_date(\%myconfig, $form->{invdate}, $form->{terms} * 1); - $form->{type} = "invoice"; - $form->{closed} = 0; - $form->{defaultcurrency} = $form->get_default_currency(\%myconfig); + $form->{convert_from_do_ids} = join ' ', @do_ids; + $form->{deliverydate} = $form->{transdate}; + $form->{transdate} = $form->current_date(\%myconfig); + $form->{duedate} = $form->current_date(\%myconfig, $form->{invdate}, $form->{terms} * 1); + $form->{type} = "invoice"; + $form->{closed} = 0; + $form->{defaultcurrency} = $form->get_default_currency(\%myconfig); my $buysell; if ($form->{type} eq 'purchase_delivery_order') {