X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fis.pl;h=10dc43ef1574bb0c4ef6777295c3773c87f85b87;hb=3c5e4df9e938a8f2c9b045774bda00095b976e49;hp=459e1b9446ef40f03b7c6807360c497df5b9540a;hpb=1514a9d0b358fad627d81e8c88f71536c4e0aaba;p=kivitendo-erp.git
diff --git a/bin/mozilla/is.pl b/bin/mozilla/is.pl
index 459e1b944..10dc43ef1 100644
--- a/bin/mozilla/is.pl
+++ b/bin/mozilla/is.pl
@@ -35,8 +35,8 @@ use SL::IS;
use SL::PE;
use Data::Dumper;
-require "$form->{path}/io.pl";
-require "$form->{path}/arap.pl";
+require "bin/mozilla/io.pl";
+require "bin/mozilla/arap.pl";
require "bin/mozilla/drafts.pl";
1;
@@ -61,7 +61,7 @@ sub add {
$form->{callback} =
- "$form->{script}?action=add&type=$form->{type}&login=$form->{login}&path=$form->{path}&password=$form->{password}"
+ "$form->{script}?action=add&type=$form->{type}&login=$form->{login}&password=$form->{password}"
unless $form->{callback};
$form{jsscript} = "date";
@@ -329,38 +329,11 @@ sub form_header {
}
my $set_duedate_url =
- "$form->{script}?login=$form->{login}&path=$form->{path}&password=$form->{password}&action=set_duedate";
+ "$form->{script}?login=$form->{login}&password=$form->{password}&action=set_duedate";
my $pjx = new CGI::Ajax( 'set_duedate' => $set_duedate_url );
push(@ { $form->{AJAX} }, $pjx);
- 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| |
- |
-
-
|;
-
my @old_project_ids = ($form->{"globalproject_id"});
map({ push(@old_project_ids, $form->{"project_id_$_"})
if ($form->{"project_id_$_"}); } (1..$form->{"rowcount"}));
@@ -370,7 +343,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);
@@ -425,6 +399,34 @@ sub form_header {
. qq|
|;
+ %labels = ();
+ @values = ();
+ foreach my $item (@{ $form->{"ALL_TAXZONES"} }) {
+ push(@values, $item->{"id"});
+ $labels{$item->{"id"}} = $item->{"description"};
+ }
+
+ if (!$form->{"id"}) {
+ $taxzone = qq|
+
+ | . $locale->text('Steuersatz') . qq| |
+ | .
+ NTI($cgi->popup_menu('-name' => 'taxzone_id', '-default' => $form->{"taxzone_id"},
+ '-values' => \@values, '-labels' => \%labels)) . qq|
+ |
+
|;
+
+ } else {
+ $taxzone = qq|
+
+ | . $locale->text('Steuersatz') . qq| |
+
+
+ | . H($labels{$form->{"taxzone_id"}}) . qq|
+ |
+
|;
+ }
+
# set option selected
foreach $item (qw(AR customer currency department employee)) {
$form->{"select$item"} =~ s/ selected//;
@@ -531,7 +533,7 @@ onchange="document.getElementById('update_button').click();">| .
# with JavaScript Calendar
$button1 = qq|
- |
+ |
| |;
@@ -544,7 +546,7 @@ onchange="document.getElementById('update_button').click();">| .
# without JavaScript Calendar
$button1 =
- qq| | |;
+ qq| | |;
$button2 =
qq| | |;
}
@@ -553,17 +555,17 @@ onchange="document.getElementById('update_button').click();">| .
# with JavaScript Calendar
$button1 = qq|
- |
+ |
|
|;
$button2 = qq|
- |
+ |
|
|;
$button3 = qq|
- |
+ |
|
|;
@@ -580,9 +582,9 @@ onchange="document.getElementById('update_button').click();">| .
# without JavaScript Calendar
$button1 =
- qq| | |;
+ qq| | |;
$button2 =
- qq|{duedate}> | |;
+ qq|{duedate} onBlur=\"check_right_date_format(this)\"> | |;
}
}
if ($form->{resubmit} && ($form->{format} eq "html")) {
@@ -591,9 +593,10 @@ onchange="document.getElementById('update_button').click();">| .
} elsif ($form->{resubmit}) {
$onload = qq|document.invoice.submit()|;
} else {
- $onload = "fokus()";
+ $onload = "focus()";
}
-
+ $onload .= qq|;setupDateFormat('|. $myconfig{dateformat} .qq|', '|. $locale->text("Falsches Datumsformat!") .qq|')|;
+ $onload .= qq|;setupPoints('|. $myconfig{numberformat} .qq|', '|. $locale->text("wrongformat") .qq|')|;
$credittext = $locale->text('Credit Limit exceeded!!!');
if ($creditwarning) {
$onload = qq|alert('$credittext')|;
@@ -755,7 +758,7 @@ print qq|
| . $locale->text('Order Date') . qq| |
- |
+ |
|
@@ -764,7 +767,7 @@ print qq|
| . $locale->text('Quotation Date') . qq| |
- |
+ |
|
@@ -1041,12 +1044,12 @@ if ($form->{type} eq "credit_note") {
$exchangerate .= qq||;
$column_data{"paid_$i"} =
- qq| | |;
+ qq| | |;
$column_data{"exchangerate_$i"} = qq|$exchangerate | |;
$column_data{"AR_paid_$i"} =
qq| | |;
$column_data{"datepaid_$i"} =
- qq|{"datepaid_$i"}>
+ qq| |
| |;
$column_data{"source_$i"} =
qq| | |;
@@ -1162,7 +1165,7 @@ if ($form->{type} eq "credit_note") {
$cgi->hidden("-name" => "callback", "-value" => $form->{callback})
. $cgi->hidden('-name' => 'draft_id', '-default' => [$form->{draft_id}])
. $cgi->hidden('-name' => 'draft_description', '-default' => [$form->{draft_description}]);
-map({ print $cgi->hidden("-name" => $_ , "-value" => $form->{$_});} qw(path login password));
+map({ print $cgi->hidden("-name" => $_ , "-value" => $form->{$_});} qw(login password));
print qq|
@@ -1434,6 +1437,7 @@ sub post {
remove_draft() if $form->{remove_draft};
if(!exists $form->{addition}) {
+ $form->{snumbers} = qq|invnumber_| . $form->{invnumber};
$form->{addition} = $print_post ? "PRINTED AND POSTED" :
$form->{storno} ? "STORNO" :
"POSTED";
@@ -1483,7 +1487,7 @@ sub storno {
}
map({ my $key = $_; delete($form->{$key})
- unless (grep({ $key eq $_ } qw(path login password id type))); }
+ unless (grep({ $key eq $_ } qw(login password id type))); }
keys(%{ $form }));
&invoice_links;
@@ -1610,6 +1614,7 @@ sub yes {
if (IS->delete_invoice(\%myconfig, \%$form, $spool)) {
# saving the history
if(!exists $form->{addition}) {
+ $form->{snumbers} = qq|invnumber_| . $form->{invnumber};
$form->{addition} = "DELETED";
$form->save_history($form->dbconnect(\%myconfig));
}