X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Foe.pl;h=e076691a1b326263f13d93e0606ddbc42ec78d2c;hb=a9d015d8e68020faaed94c1d9db08e0151b84c92;hp=173ad770fdefefaafcf7cb711f6cee2db7d5626b;hpb=6e50e0c2879d0e9b4dbb13b84a51d24388fc8d1f;p=kivitendo-erp.git diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl index 173ad770f..e076691a1 100644 --- a/bin/mozilla/oe.pl +++ b/bin/mozilla/oe.pl @@ -37,8 +37,8 @@ use SL::IR; use SL::IS; use SL::PE; -require "$form->{path}/io.pl"; -require "$form->{path}/arap.pl"; +require "bin/mozilla/io.pl"; +require "bin/mozilla/arap.pl"; 1; @@ -98,7 +98,7 @@ sub add { set_headings("add"); $form->{callback} = - "$form->{script}?action=add&type=$form->{type}&vc=$form->{vc}&login=$form->{login}&path=$form->{path}&password=$form->{password}" + "$form->{script}?action=add&type=$form->{type}&vc=$form->{vc}&login=$form->{login}&password=$form->{password}" unless $form->{callback}; &order_links; @@ -361,12 +361,12 @@ sub form_header { # with JavaScript Calendar $button1 = qq| - {transdate}> + {transdate} onBlur=\"check_right_date_format(this)\"> text('button') . qq|> |; $button2 = qq| - {reqdate}> + {reqdate} onBlur=\"check_right_date_format(this)\"> text('button') . qq|> |; @@ -380,28 +380,30 @@ sub form_header { # without JavaScript Calendar $button1 = qq| - {transdate}>|; + {transdate} onBlur=\"check_right_date_format(this)\">|; $button2 = qq| - {reqdate}>|; + {reqdate} onBlur=\"check_right_date_format(this)\">|; } - if ($form->{id}) { - $openclosed = qq| - - - - -|; + my @tmp; - if (($form->{"type"} eq "sales_order") || - ($form->{"type"} eq "purchase_order")) { - $openclosed .= qq| + if (($form->{"type"} eq "sales_order") || + ($form->{"type"} eq "purchase_order")) { + push(@tmp, qq| - -|; - } + |); + } + if ($form->{id}) { + push(@tmp, qq| + + |); + } + + if (@tmp) { $openclosed .= qq| + + | . join("\n", @tmp) . qq| |; @@ -429,7 +431,8 @@ sub form_header { "projects" => { "key" => "ALL_PROJECTS", "all" => 0, "old_id" => \@old_project_ids }, - "employees" => "ALL_SALESMEN"); + "employees" => "ALL_SALESMEN", + "taxzones" => "ALL_TAXZONES"); my %labels; my @values = (undef); @@ -487,6 +490,23 @@ sub form_header { |; } + + %labels = (); + @values = (); + foreach my $item (@{ $form->{"ALL_TAXZONES"} }) { + push(@values, $item->{"id"}); + $labels{$item->{"id"}} = $item->{"description"}; + } + + $taxzone = qq| + + | . $locale->text('Steuersatz') . qq| + | . + NTI($cgi->popup_menu('-name' => 'taxzone_id', '-default' => $form->{"taxzone_id"}, + '-values' => \@values, '-labels' => \%labels)) . qq| + + |; + $form->{exchangerate} = $form->format_amount(\%myconfig, $form->{exchangerate}); @@ -558,34 +578,6 @@ sub form_header { |; } - if (@{ $form->{TAXZONE} }) { - $form->{selecttaxzone} = ""; - foreach $item (@{ $form->{TAXZONE} }) { - if ($item->{id} == $form->{taxzone_id}) { - $form->{selecttaxzone} .= - ""; - } else { - $form->{selecttaxzone} .= - ""; - } - - } - } else { - $form->{selecttaxzone} =~ s/ selected//g; - if ($form->{taxzone_id} ne "") { - $form->{selecttaxzone} =~ s/value=$form->{taxzone_id}>/value=$form->{taxzone_id} selected>/; - } - } - - $taxzone = qq| - - | . $locale->text('Steuersatz') . qq| - - - |; - - if ($form->{type} !~ /_quotation$/) { $ordnumber = qq| @@ -723,14 +715,17 @@ onchange="document.getElementById('update_button').click();">| . } elsif ($form->{resubmit}) { $onload = qq|document.oe.submit()|; } else { - $onload = "fokus()"; + $onload = "focus()"; } $credittext = $locale->text('Credit Limit exceeded!!!'); if ($creditwarning) { $onload = qq|alert('$credittext')|; } - + + $onload .= qq|;setupDateFormat('|. $myconfig{dateformat} .qq|', '|. $locale->text("Falsches Datumsformat!") .qq|')|; + $onload .= qq|;setupPoints('|. $myconfig{numberformat} .qq|', '|. $locale->text("wrongformat") .qq|')|; + $form->{"javascript"} .= qq||; # show history button js $form->{javascript} .= qq||; @@ -1063,7 +1058,7 @@ sub form_footer { |; - &print_options; + print_options(); print qq| @@ -1158,7 +1153,6 @@ sub form_footer { -{path}> {login}> {password}> @@ -1398,12 +1392,12 @@ sub search { # with JavaScript Calendar $button1 = qq| - + text('button') . qq|> |; $button2 = qq| - + text('button') . qq|> |; @@ -1416,9 +1410,9 @@ sub search { # without JavaScript Calendar $button1 = qq| - |; + |; $button2 = qq| - |; + |; } $form->get_lists("projects" => { "key" => "ALL_PROJECTS", @@ -1523,7 +1517,6 @@ $jsscript
-{path}> {login}> {password}> {vc}> @@ -1557,7 +1550,7 @@ sub orders { # construct href $href = - "$form->{script}?path=$form->{path}&action=orders&type=$form->{type}&vc=$form->{vc}&login=$form->{login}&password=$form->{password}&transdatefrom=$form->{transdatefrom}&transdateto=$form->{transdateto}&open=$form->{open}&closed=$form->{closed}¬delivered=$form->{notdelivered}&delivered=$form->{delivered}&$ordnumber=$number&$form->{vc}=$name&department=$department"; + "$form->{script}?action=orders&type=$form->{type}&vc=$form->{vc}&login=$form->{login}&password=$form->{password}&transdatefrom=$form->{transdatefrom}&transdateto=$form->{transdateto}&open=$form->{open}&closed=$form->{closed}¬delivered=$form->{notdelivered}&delivered=$form->{delivered}&$ordnumber=$number&$form->{vc}=$name&department=$department"; # construct callback $number = $form->escape($form->{$ordnumber}, 1); @@ -1565,7 +1558,7 @@ sub orders { $department = $form->escape($form->{department}, 1); $callback = - "$form->{script}?path=$form->{path}&action=orders&type=$form->{type}&vc=$form->{vc}&login=$form->{login}&password=$form->{password}&transdatefrom=$form->{transdatefrom}&transdateto=$form->{transdateto}&open=$form->{open}&closed=$form->{closed}¬delivered=$form->{notdelivered}&delivered=$form->{delivered}&$ordnumber=$number&$form->{vc}=$name&department=$department"; + "$form->{script}?action=orders&type=$form->{type}&vc=$form->{vc}&login=$form->{login}&password=$form->{password}&transdatefrom=$form->{transdatefrom}&transdateto=$form->{transdateto}&open=$form->{open}&closed=$form->{closed}¬delivered=$form->{notdelivered}&delivered=$form->{delivered}&$ordnumber=$number&$form->{vc}=$name&department=$department"; @columns = $form->sort_columns("transdate", "reqdate", "id", "$ordnumber", @@ -1767,7 +1760,7 @@ sub orders { $column_data{reqdate} = "$oe->{reqdate} "; $column_data{$ordnumber} = - "{path}&action=$action&type=$form->{type}&id=$oe->{id}&vc=$form->{vc}&login=$form->{login}&password=$form->{password}&callback=$callback_escaped>$oe->{$ordnumber}"; + "{type}&id=$oe->{id}&vc=$form->{vc}&login=$form->{login}&password=$form->{password}&callback=$callback_escaped>$oe->{$ordnumber}"; $column_data{name} = "$oe->{name}"; $column_data{employee} = "$oe->{employee} "; @@ -1835,7 +1828,6 @@ sub orders { if ($form->{type} =~ /sales_order/) { print qq| - @@ -1858,7 +1850,6 @@ sub orders { {type}> {vc}> -{path}> {login}> {password}> @@ -1976,6 +1967,7 @@ sub save_and_close { # saving the history if(!exists $form->{addition}) { + $form->{snumbers} = qq|ordnumber_| . $form->{ordnumber}; $form->{addition} = "SAVED"; $form->save_history($form->dbconnect(\%myconfig)); } @@ -2057,6 +2049,7 @@ sub save { # saving the history if(!exists $form->{addition}) { + $form->{snumbers} = qq|ordnumber_| . $form->{ordnumber}; $form->{addition} = "SAVED"; $form->save_history($form->dbconnect(\%myconfig)); } @@ -2128,6 +2121,7 @@ sub yes { $form->redirect($msg); # saving the history if(!exists $form->{addition}) { + $form->{snumbers} = qq|ordnumber_| . $form->{ordnumber}; $form->{addition} = "DELETED"; $form->save_history($form->dbconnect(\%myconfig)); } @@ -2241,7 +2235,7 @@ sub invoice { # locale messages $locale = new Locale "$myconfig{countrycode}", "$script"; - require "$form->{path}/$form->{script}"; + require "bin/mozilla/$form->{script}"; map { $form->{"select$_"} = "" } ($form->{vc}, currency); @@ -2322,7 +2316,6 @@ sub backorder_exchangerate { print qq| -{path}> {login}> {password}>