From: Sven Schöling Date: Mon, 28 Sep 2009 09:42:05 +0000 (+0200) Subject: Aufräumen. X-Git-Tag: release-2.6.1beta1~113^2~19 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=ee792a3f74896ac23931fc34451d17ec95ac03cd;p=kivitendo-erp.git Aufräumen. --- diff --git a/bin/mozilla/is.pl b/bin/mozilla/is.pl index 0e67ed475..8490d05c0 100644 --- a/bin/mozilla/is.pl +++ b/bin/mozilla/is.pl @@ -89,6 +89,7 @@ sub edit { $main::lxdebug->enter_sub(); my $form = $main::form; + my $locale = $main::locale; $main::auth->assert('invoice_edit'); @@ -96,7 +97,14 @@ sub edit { $form->{javascript} = qq||; #/show hhistory button - $edit = 1; + if ($form->{type} eq "credit_note") { + $form->{title} = $locale->text('Edit Credit Note'); + $form->{title} = $locale->text('Edit Storno Credit Note') if $form->{storno}; + } else { + $form->{title} = $locale->text('Edit Sales Invoice'); + $form->{title} = $locale->text('Edit Storno Invoice') if $form->{storno}; + } + my ($language_id, $printer_id); if ($form->{print_and_post}) { $form->{action} = "print"; @@ -309,15 +317,6 @@ sub form_header { $form->{employee_id} = $form->{old_employee_id} if $form->{old_employee_id}; $form->{salesman_id} = $form->{old_salesman_id} if $form->{old_salesman_id}; - if ($edit) { - if ($form->{type} eq "credit_note") { - $form->{title} = $locale->text('Edit Credit Note'); - $form->{title} = $locale->text('Edit Storno Credit Note') if $form->{storno}; - } else { - $form->{title} = $locale->text('Edit Sales Invoice'); - $form->{title} = $locale->text('Edit Storno Invoice') if $form->{storno}; - } - } $form->{defaultcurrency} = $form->get_default_currency(\%myconfig); $form->{radier} = ($form->current_date(\%myconfig) eq $form->{gldate}) ? 1 : 0; @@ -332,8 +331,7 @@ sub form_header { my $set_duedate_url = "$form->{script}?action=set_duedate"; - my $pjx = new CGI::Ajax( 'set_duedate' => $set_duedate_url ); - push(@ { $form->{AJAX} }, $pjx); + push @ { $form->{AJAX} }, new CGI::Ajax( 'set_duedate' => $set_duedate_url ); my @old_project_ids = ($form->{"globalproject_id"}); map { push @old_project_ids, $form->{"project_id_$_"} if $form->{"project_id_$_"}; } 1..$form->{"rowcount"}; @@ -383,15 +381,15 @@ sub form_header { $TMPL_VAR{customer_name} = $follow_up_vc; # set option selected - foreach my $item (qw(AR customer currency department employee)) { + foreach my $item (qw(AR)) { $form->{"select$item"} =~ s/ selected//; $form->{"select$item"} =~ s/option>\Q$form->{$item}\E/option selected>$form->{$item}/; } - $TMPL_VAR{is_type_credit_note} = $form->{type} eq "credit_note"; - $TMPL_VAR{is_format_html} = $form->{format} eq 'html'; - $TMPL_VAR{dateformat} = $myconfig{dateformat}; - $TMPL_VAR{numberformat} = $myconfig{numberformat}; + $TMPL_VAR{is_type_credit_note} = $form->{type} eq "credit_note"; + $TMPL_VAR{is_format_html} = $form->{format} eq 'html'; + $TMPL_VAR{dateformat} = $myconfig{dateformat}; + $TMPL_VAR{numberformat} = $myconfig{numberformat}; # hiddens $TMPL_VAR{HIDDEN} = [qw( @@ -407,198 +405,6 @@ sub form_header { $form->{jsscript} = 1; $form->header(); -# print qq| -# -# -# -# -# -# -# -#
-#| ; -# -# $form->hide_form(qw(id action type media format queued printed emailed title vc discount -# creditlimit creditremaining tradediscount business closedto locked shipped storno storno_id -# max_dunning_level dunning_amount -# shiptoname shiptostreet shiptozipcode shiptocity shiptocountry shiptocontact shiptophone shiptofax -# shiptoemail shiptodepartment_1 shiptodepartment_2 message email subject cc bcc taxaccounts cursor_fokus -# convert_from_do_ids convert_from_oe_ids), -# map { $_.'_rate', $_.'_description', $_.'_taxnumber' } split / /, $form->{taxaccounts} ); -# -# print qq|

$form->{saved_message}

| if $form->{saved_message}; -# -# print qq| -# -# -# -# -# -# -# -# -#
$form->{title}
-# -# -# -# -# -# -#
-# -# -# $customers -# -# -# -# -# -# $contact -# $shipto -# -# -# -# -# $dunning -# $business -# -# -# -# -# -# $taxzone -# $department -# -# $currencies -# -# -# $exchangerate -# -# -# -# -# -# -# -# -# -# -# -# -# |; -## -## -## -#print qq|
| . $locale->text('Credit Limit') . qq|$form->{creditlimit}; | . $locale->text('Remaining') . qq| $form->{creditremaining}
| . $locale->text('Record in') . qq|
| . $locale->text('Shipping Point') . qq| | . -# $cgi->textfield("-name" => "shippingpoint", "-size" => 35, "-value" => $form->{shippingpoint}) . -# qq|
| . $locale->text('Ship via') . qq| | . -# $cgi->textfield("-name" => "shipvia", "-size" => 35, "-value" => $form->{shipvia}) . -# qq|
| . $locale->text('Transaction description') . qq|| . $cgi->textfield("-name" => "transaction_description", "-size" => 35, "-value" => $form->{transaction_description}) . qq|
-## -## -## -## -## -## -## -## -## -##
-## -## -##
-## -## -##
-##
-#
-# -# $employees -# $salesman -#|; -# -##ergänzung in der maske um das feld Lieferscheinnummer (Delivery Order Number), meiner meinung nach sinnvoll ueber dem feld lieferscheindatum 12.02.2009 jb -#if ($form->{type} eq "credit_note") { -#print qq| -# -# -# -# -# -# $button1 -# |; -#} else { -#print qq| -# -# -# -# -# -# $button1 -# -# -# -# $button2 -# -# -# -# -# -# -# -# $button3 -# |; -#} -#print qq| -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -#
| . $locale->text('Credit Note Number') . qq| |. -# $cgi->textfield("-name" => "invnumber", "-size" => 11, "-value" => $form->{invnumber}) . -# qq|
| . $locale->text('Credit Note Date') . qq|
| . $locale->text('Invoice Number') . qq| |. -# $cgi->textfield("-name" => "invnumber", "-size" => 11, "-value" => $form->{invnumber}) . -# qq|
| . $locale->text('Invoice Date') . qq|
| . $locale->text('Due Date') . qq|
| . $locale->text('Delivery Order Number') . qq| |. -# $cgi->textfield("-name" => "donumber", "-size" => 11, "-value" => $form->{donumber}) . -# qq|
| . $locale->text('Delivery Date') . qq|
| . $locale->text('Order Number') . qq| |. -# $cgi->textfield("-name" => "ordnumber", "-size" => 11, "-value" => $form->{ordnumber}) . -# qq|
| . $locale->text('Order Date') . qq| -#
| . $locale->text('Quotation Number') . qq| |. -# $cgi->textfield("-name" => "quonumber", "-size" => 11, "-value" => $form->{quonumber}) . -# qq|
| . $locale->text('Quotation Date') . qq| -#
| . $locale->text('Customer Order Number') . qq| |. -# $cgi->textfield("-name" => "cusordnumber", "-size" => 11, "-value" => $form->{cusordnumber}) . -# qq|
| . $locale->text('Project Number') . qq|$globalprojectnumber
-#
-# -# -# -# -# -# -# $jsscript -#|; -# print qq||; - print $form->parse_html_template("is/form_header", \%TMPL_VAR); $main::lxdebug->leave_sub();