projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
%myconfig ist ein Hash.
[kivitendo-erp.git]
/
bin
/
mozilla
/
is.pl
diff --git
a/bin/mozilla/is.pl
b/bin/mozilla/is.pl
index
fef4a3e
..
459e1b9
100644
(file)
--- a/
bin/mozilla/is.pl
+++ b/
bin/mozilla/is.pl
@@
-172,13
+172,13
@@
sub invoice_links {
chomp $curr[0];
$form->{defaultcurrency} = $curr[0];
chomp $curr[0];
$form->{defaultcurrency} = $curr[0];
- map { $form->{selectcurrency} .= "<option>$_\n" } @curr;
+ map { $form->{selectcurrency} .= "<option>$_
</option>
\n" } @curr;
$form->{oldcustomer} = "$form->{customer}--$form->{customer_id}";
if (@{ $form->{all_customer} }) {
$form->{customer} = "$form->{customer}--$form->{customer_id}";
$form->{oldcustomer} = "$form->{customer}--$form->{customer_id}";
if (@{ $form->{all_customer} }) {
$form->{customer} = "$form->{customer}--$form->{customer_id}";
- map { $form->{selectcustomer} .= "<option>$_->{name}--$_->{id}\n" }
+ map { $form->{selectcustomer} .= "<option>$_->{name}--$_->{id}
</option>
\n" }
(@{ $form->{all_customer} });
}
(@{ $form->{all_customer} });
}
@@
-189,7
+189,7
@@
sub invoice_links {
map {
$form->{selectdepartment} .=
map {
$form->{selectdepartment} .=
- "<option>$_->{description}--$_->{id}\n"
+ "<option>$_->{description}--$_->{id}
</option>
\n"
} (@{ $form->{all_departments} });
}
} (@{ $form->{all_departments} });
}
@@
-198,7
+198,7
@@
sub invoice_links {
# sales staff
if ($form->{all_employees}) {
$form->{selectemployee} = "";
# sales staff
if ($form->{all_employees}) {
$form->{selectemployee} = "";
- map { $form->{selectemployee} .= "<option>$_->{name}--$_->{id}\n" }
+ map { $form->{selectemployee} .= "<option>$_->{name}--$_->{id}
</option>
\n" }
(@{ $form->{all_employees} });
}
(@{ $form->{all_employees} });
}
@@
-208,7
+208,8
@@
sub invoice_links {
foreach $key (keys %{ $form->{AR_links} }) {
foreach $ref (@{ $form->{AR_links}{$key} }) {
foreach $key (keys %{ $form->{AR_links} }) {
foreach $ref (@{ $form->{AR_links}{$key} }) {
- $form->{"select$key"} .= "<option>$ref->{accno}--$ref->{description}\n";
+ $form->{"select$key"} .=
+"<option>$ref->{accno}--$ref->{description}</option>\n";
}
if ($key eq "AR_paid") {
}
if ($key eq "AR_paid") {
@@
-433,6
+434,9
@@
sub form_header {
#quote customer Bug 133
$form->{selectcustomer} = $form->quote($form->{selectcustomer});
#quote customer Bug 133
$form->{selectcustomer} = $form->quote($form->{selectcustomer});
+
+ #substitute \n and \r to \s (bug 543)
+ $form->{selectcustomer} =~ s/[\n\r]/ /g;
if (($form->{creditlimit} != 0) && ($form->{creditremaining} < 0) && !$form->{update}) {
$creditwarning = 1;
if (($form->{creditlimit} != 0) && ($form->{creditremaining} < 0) && !$form->{update}) {
$creditwarning = 1;
@@
-468,7
+472,10
@@
sub form_header {
$customer =
($form->{selectcustomer})
$customer =
($form->{selectcustomer})
- ? qq|<select name="customer">$form->{selectcustomer}</select>\n<input type="hidden" name="selectcustomer" value="$form->{selectcustomer}">|
+ ? qq|<select name="customer"
+onchange="document.getElementById('update_button').click();">| .
+ qq|$form->{selectcustomer}</select>\n<input type="hidden" name="selectcustomer" value="| .
+ Q($form->{selectcustomer}) . qq|">|
: qq|<input name="customer" value="$form->{customer}" size="35">|;
$department = qq|
: qq|<input name="customer" value="$form->{customer}" size="35">|;
$department = qq|
@@
-784,8
+791,7
@@
$jsscript
<!-- shipto are in hidden variables -->
| ;
map({ print($cgi->hidden("-name" => $_, "-value" => $form->{$_})); }
<!-- shipto are in hidden variables -->
| ;
map({ print($cgi->hidden("-name" => $_, "-value" => $form->{$_})); }
- qw(shiptoname shiptostreet shiptozipcode shiptocity shiptocountry
- shiptocontact shiptophone shiptofax shiptoemail));
+ qw(shiptoname shiptostreet shiptozipcode shiptocity shiptocountry shiptocontact shiptophone shiptofax shiptoemail shiptodepartment_1 shiptodepartment_2));
print qq|<!-- email variables --> |;
map({ print($cgi->hidden("-name" => $_, "-value" => $form->{$_})); }
qw(message email subject cc bcc taxaccounts));
print qq|<!-- email variables --> |;
map({ print($cgi->hidden("-name" => $_, "-value" => $form->{$_})); }
qw(message email subject cc bcc taxaccounts));
@@
-1065,7
+1071,7
@@
if ($form->{type} eq "credit_note") {
<td>
|;
<td>
|;
-
&print_options
;
+
print_options()
;
print qq|
</td>
print qq|
</td>
@@
-1618,11
+1624,20
@@
sub yes {
sub e_mail {
$lxdebug->enter_sub();
sub e_mail {
$lxdebug->enter_sub();
- $print_post = 1;
+ if (!$form->{id}) {
+ $print_post = 1;
+
+ my $saved_form = save_form();
- &post;
+ post();
+
+ my %saved_vars;
+ map({ $saved_vars{$_} = $form->{$_}; } qw(id invnumber));
+ restore_form($saved_form);
+ map({ $form->{$_} = $saved_vars{$_}; } qw(id invnumber));
+ }
-
&edit_e_mail
;
+
edit_e_mail()
;
$lxdebug->leave_sub();
}
$lxdebug->leave_sub();
}