X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fgl.pl;h=5834a485f0daf7f814df08f7f0903e72f42bf7e7;hb=3e0a049e40f2d68ed4d5f7c623afed5e85b8c017;hp=731f525767357c38d45bc2bfd75dec6041c71dd6;hpb=2dacd2790bb5e0990ec5fe89a9d59370b018c25c;p=kivitendo-erp.git diff --git a/bin/mozilla/gl.pl b/bin/mozilla/gl.pl index 731f52576..5834a485f 100644 --- a/bin/mozilla/gl.pl +++ b/bin/mozilla/gl.pl @@ -110,13 +110,13 @@ sub add { # departments $form->all_departments(\%myconfig); - if (@{ $form->{all_departments} }) { + if (@{ $form->{all_departments} || [] }) { $form->{selectdepartment} = "\n"; map { $form->{selectdepartment} .= "$_->{description}--$_->{id}\n" - } (@{ $form->{all_departments} }); + } (@{ $form->{all_departments} || [] }); } $form->{show_details} = $myconfig{show_form_details} unless defined $form->{show_details}; @@ -146,13 +146,13 @@ sub prepare_transaction { # departments $form->all_departments(\%myconfig); - if (@{ $form->{all_departments} }) { + if (@{ $form->{all_departments} || [] }) { $form->{selectdepartment} = "\n"; map { $form->{selectdepartment} .= "$_->{description}--$_->{id}\n" - } (@{ $form->{all_departments} }); + } (@{ $form->{all_departments} || [] }); } my $i = 1; @@ -240,20 +240,20 @@ sub search { $form->all_departments(\%myconfig); # departments - if (@{ $form->{all_departments} }) { + if (@{ $form->{all_departments} || [] }) { $form->{selectdepartment} = "\n"; map { $form->{selectdepartment} .= "$_->{description}--$_->{id}\n" - } (@{ $form->{all_departments} }); + } (@{ $form->{all_departments} || [] }); } my $department = qq| - - | . $locale->text('Department') . qq| - $form->{selectdepartment} - + + | . $locale->text('Department') . qq| + $form->{selectdepartment} + | if $form->{selectdepartment}; $form->get_lists("projects" => { "key" => "ALL_PROJECTS", @@ -321,83 +321,83 @@ sub search { - - | . $locale->text('Reference') . qq| - - | . $locale->text('Source') . qq| - - - $department - - | . $locale->text('Description') . qq| - - - - | . $locale->text('Notes') . qq| - - - - | . $locale->text('Project Number') . qq| - $projectnumber - - - | . $locale->text('From') . qq| + + | . $locale->text('Reference') . qq| + + | . $locale->text('Source') . qq| + + + $department + + | . $locale->text('Description') . qq| + + + + | . $locale->text('Notes') . qq| + + + + | . $locale->text('Project Number') . qq| + $projectnumber + + + | . $locale->text('From') . qq| $button1 - | . $locale->text('To (time)') . qq| + | . $locale->text('To (time)') . qq| $button2 - - - | . $locale->text('Include in Report') . qq| - - - - - | + + + | . $locale->text('Include in Report') . qq| + + + + + | . $locale->text('All') . qq| - | + | . $locale->text('Asset') . qq| - | + | . $locale->text('Liability') . qq| - | + | . $locale->text('Revenue') . qq| - | + | . $locale->text('Expense') . qq| - - - - - - - | . $locale->text('ID') . qq| - - | . $locale->text('Date') . qq| - - | . $locale->text('Reference') . qq| - - | . $locale->text('Description') . qq| - - | . $locale->text('Notes') . qq| - - - - | . $locale->text('Debit') . qq| - - | . $locale->text('Credit') . qq| - - | . $locale->text('Source') . qq| - - | . $locale->text('Account') . qq| - - - - | . $locale->text('Subtotal') . qq| - - | . $locale->text('Project Number') . qq| - - - - - + + + + + + + | . $locale->text('ID') . qq| + + | . $locale->text('Date') . qq| + + | . $locale->text('Reference') . qq| + + | . $locale->text('Description') . qq| + + | . $locale->text('Notes') . qq| + + + + | . $locale->text('Debit') . qq| + + | . $locale->text('Credit') . qq| + + | . $locale->text('Source') . qq| + + | . $locale->text('Account') . qq| + + + + | . $locale->text('Subtotal') . qq| + + | . $locale->text('Project Number') . qq| + + + + + @@ -965,6 +965,8 @@ sub display_rows { '-values' => \@project_values, '-labels' => \%project_labels, '-default' => $form->{"project_id_$i"} )); + my $projectnumber_hidden = qq| + |; my $copy2credit = 'onkeyup="copy_debit_to_credit()"' if $i == 1; @@ -983,10 +985,14 @@ sub display_rows { $memo $projectnumber |; - } + } else { print qq| $source_hidden $memo_hidden + $projectnumber_hidden + |; + } + print qq| |; } @@ -1085,11 +1091,11 @@ sub form_header { my $department; $department = qq| - - | . $locale->text('Department') . qq| - $form->{selectdepartment} - - + + | . $locale->text('Department') . qq| + $form->{selectdepartment} + + | if $form->{selectdepartment}; if ($init) { $form->{fokus} = "gl.reference"; @@ -1161,71 +1167,71 @@ sub form_header { . " $form->{previous_gldate}" . qq| - - | . $locale->text('Reference') . qq| - - - - - | . $locale->text('Date') . qq| + + | . $locale->text('Reference') . qq| + + + + + | . $locale->text('Date') . qq| $button1 - - - - |; + + + + |; if ($form->{id}) { print qq| - - | . $locale->text('Belegnummer') . qq| - - - - - | . $locale->text('Buchungsdatum') . qq| - {gldate} $readonly onBlur=\"check_right_date_format(this)\"> - - - - |; + + | . $locale->text('Belegnummer') . qq| + + + + + | . $locale->text('Buchungsdatum') . qq| + {gldate} $readonly onBlur=\"check_right_date_format(this)\"> + + + + |; } print qq| - $department|; + $department|; if ($form->{id}) { print qq| - - | . $locale->text('Description') . qq| - $description + + | . $locale->text('Description') . qq| + $description - - - | . $locale->text('MwSt. inkl.') . qq| - - - - - - - - | . $locale->text('Mitarbeiter') . qq| - - - - - |; + + + | . $locale->text('MwSt. inkl.') . qq| + + + + + + + + | . $locale->text('Mitarbeiter') . qq| + + + + + |; } else { print qq| - - | . $locale->text('Description') . qq| - $description - - - - | . $locale->text('MwSt. inkl.') . qq| - - - - - |; + + | . $locale->text('Description') . qq| + $description + + + + | . $locale->text('MwSt. inkl.') . qq| + + + + + |; } print qq| @@ -1247,13 +1253,13 @@ sub form_header { - - | + + | . $locale->text('Account') . qq| - | . $locale->text('Chart balance') . qq| - | + | . $locale->text('Chart balance') . qq| + | . $locale->text('Debit') . qq| - | + | . $locale->text('Credit') . qq| | . $locale->text('Tax') . qq| @@ -1262,14 +1268,14 @@ sub form_header { if ($form->{show_details}) { print qq| - | . $locale->text('Source') . qq| - | . $locale->text('Memo') . qq| - | . $locale->text('Project Number') . qq| + | . $locale->text('Source') . qq| + | . $locale->text('Memo') . qq| + | . $locale->text('Project Number') . qq| |; } print qq| - + $jsscript |; @@ -1422,8 +1428,8 @@ sub yes { # saving the history if(!exists $form->{addition} && $form->{id} ne "") { $form->{snumbers} = qq|ordnumber_| . $form->{ordnumber}; - $form->{addition} = "DELETED"; - $form->save_history($form->dbconnect(\%myconfig)); + $form->{addition} = "DELETED"; + $form->save_history($form->dbconnect(\%myconfig)); } # /saving the history $form->redirect($locale->text('Transaction deleted!'))