projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bug in verstecktem Feld: <input type=hidden name=fxloss_accno_id values=
[kivitendo-erp.git]
/
bin
/
mozilla
/
is.pl
diff --git
a/bin/mozilla/is.pl
b/bin/mozilla/is.pl
index
2baf7ec
..
b547947
100644
(file)
--- a/
bin/mozilla/is.pl
+++ b/
bin/mozilla/is.pl
@@
-59,7
+59,7
@@
sub add {
}
&invoice_links;
&prepare_invoice;
}
&invoice_links;
&prepare_invoice;
- $form->{format} ="pdf";
+ $form->{format} =
"pdf";
&display_form;
&display_form;
@@
-76,7
+76,7
@@
sub edit {
$form->error("Access Denied");
}
if ($form->{print_and_post}) {
$form->error("Access Denied");
}
if ($form->{print_and_post}) {
- $form->{action}
= "print";
+ $form->{action} = "print";
$form->{resubmit} = 1;
}
&invoice_links;
$form->{resubmit} = 1;
}
&invoice_links;
@@
-334,11
+334,20
@@
sub form_header {
<td width="4"><input type=button name=duedate id="trigger2" value=|
. $locale->text('button') . qq|></td></td>
|;
<td width="4"><input type=button name=duedate id="trigger2" value=|
. $locale->text('button') . qq|></td></td>
|;
+ $button3 = qq|
+ <td width="13"><input name=deliverydate id=deliverydate size=11 title="$myconfig{dateformat}" value=$form->{deliverydate}></td>
+ <td width="4"><input type=button name=deliverydate id="trigger3" value=|
+ . $locale->text('button') . qq|></td></td>
+ |;
#write Trigger
$jsscript =
#write Trigger
$jsscript =
- Form->write_trigger(\%myconfig, "2", "invdate", "BL", "trigger1",
- "duedate", "BL", "trigger2");
+ Form->write_trigger(\%myconfig, "3",
+ "invdate", "BL",
+ "trigger1", "duedate",
+ "BL", "trigger2",
+ "deliverydate", "BL",
+ "trigger3");
} else {
# without JavaScript Calendar
} else {
# without JavaScript Calendar
@@
-348,8
+357,9
@@
sub form_header {
qq|<td width="13"><input name=duedate size=11 title="$myconfig{dateformat}" value=$form->{duedate}></td>|;
}
if ($form->{resubmit} && ($form->{format} eq "html")) {
qq|<td width="13"><input name=duedate size=11 title="$myconfig{dateformat}" value=$form->{duedate}></td>|;
}
if ($form->{resubmit} && ($form->{format} eq "html")) {
- $onload = qq|window.open('about:blank','Beleg'); document.invoice.target = 'Beleg';document.invoice.submit()|;
- } elsif($form->{resubmit}) {
+ $onload =
+ qq|window.open('about:blank','Beleg'); document.invoice.target = 'Beleg';document.invoice.submit()|;
+ } elsif ($form->{resubmit}) {
$onload = qq|document.invoice.submit()|;
} else {
$onload = "fokus()";
$onload = qq|document.invoice.submit()|;
} else {
$onload = "fokus()";
@@
-470,6
+480,10
@@
sub form_header {
<th align=right>| . $locale->text('Due Date') . qq|</th>
$button2
</tr>
<th align=right>| . $locale->text('Due Date') . qq|</th>
$button2
</tr>
+ <tr>
+ <th align=right>| . $locale->text('Delivery Date') . qq|</th>
+ $button3
+ </tr>
<tr>
<th align=right nowrap>| . $locale->text('Order Number') . qq|</th>
<td><input name=ordnumber size=11 value="$form->{ordnumber}"></td>
<tr>
<th align=right nowrap>| . $locale->text('Order Number') . qq|</th>
<td><input name=ordnumber size=11 value="$form->{ordnumber}"></td>
@@
-1047,7
+1061,7
@@
sub post {
if ($form->{currency} ne $form->{defaultcurrency});
for $i (1 .. $form->{paidaccounts}) {
if ($form->{currency} ne $form->{defaultcurrency});
for $i (1 .. $form->{paidaccounts}) {
- if ($form->
{"paid_$i"}
) {
+ if ($form->
parse_amount(\%myconfig, $form->{"paid_$i"})
) {
$datepaid = $form->datetonum($form->{"datepaid_$i"}, \%myconfig);
$form->isblank("datepaid_$i", $locale->text('Payment date missing!'));
$datepaid = $form->datetonum($form->{"datepaid_$i"}, \%myconfig);
$form->isblank("datepaid_$i", $locale->text('Payment date missing!'));
@@
-1071,8
+1085,10
@@
sub post {
$form->{id} = 0 if $form->{postasnew};
$form->{id} = 0 if $form->{postasnew};
- $form->{invnumber} = $form->update_defaults(\%myconfig, "invnumber")
- unless $form->{invnumber};
+ # get new invnumber in sequence if no invnumber is given or if posasnew was requested
+ if (!$form->{invnumber} || $form->{postasnew}) {
+ $form->{invnumber} = $form->update_defaults(\%myconfig, "invnumber");
+ }
if ($print_post) {
if (!(IS->post_invoice(\%myconfig, \%$form))) {
$form->error($locale->text('Cannot post invoice!'));
if ($print_post) {
if (!(IS->post_invoice(\%myconfig, \%$form))) {
$form->error($locale->text('Cannot post invoice!'));