Revision c103dedd
Von Philip Reetz vor etwa 19 Jahren hinzugefügt
bin/mozilla/is.pl | ||
---|---|---|
315 | 315 |
$button1 = qq| |
316 | 316 |
<td><input name=invdate id=invdate size=11 title="$myconfig{dateformat}" value=$form->{invdate}></td> |
317 | 317 |
<td><input type=button name=invdate id="trigger1" value=| |
318 |
. $locale->text('button') |
|
319 |
. qq|></td> |
|
318 |
. $locale->text('button') . qq|></td> |
|
320 | 319 |
|; |
321 | 320 |
$button2 = qq| |
322 | 321 |
<td width="13"><input name=duedate id=duedate size=11 title="$myconfig{dateformat}" value=$form->{duedate}></td> |
323 | 322 |
<td width="4"><input type=button name=duedate id="trigger2" value=| |
324 |
. $locale->text('button') |
|
325 |
. qq|></td></td> |
|
323 |
. $locale->text('button') . qq|></td></td> |
|
326 | 324 |
|; |
327 | 325 |
|
328 | 326 |
#write Trigger |
... | ... | |
337 | 335 |
$button2 = |
338 | 336 |
qq|<td width="13"><input name=duedate size=11 title="$myconfig{dateformat}" value=$form->{duedate}></td>|; |
339 | 337 |
} |
340 |
|
|
338 |
if ($form->{resubmit}) { |
|
339 |
$onload = "document.invoice.submit()"; |
|
340 |
} else { |
|
341 |
$onload = "fokus()"; |
|
342 |
} |
|
341 | 343 |
$form->header; |
342 | 344 |
|
343 | 345 |
print qq| |
344 |
<body onLoad="fokus()">
|
|
346 |
<body onLoad="$onload">
|
|
345 | 347 |
|
346 | 348 |
<form method=post name="invoice" action=$form->{script}> |
347 | 349 |
|
348 | 350 |
|
349 | 351 |
<input type=hidden name=id value=$form->{id}> |
352 |
<input type=hidden name=action value=$form->{action}> |
|
350 | 353 |
|
351 | 354 |
<input type=hidden name=type value=$form->{type}> |
352 | 355 |
<input type=hidden name=media value=$form->{media}> |
... | ... | |
389 | 392 |
<input type=hidden name=customer_id value=$form->{customer_id}> |
390 | 393 |
<input type=hidden name=oldcustomer value="$form->{oldcustomer}"> |
391 | 394 |
<th align=richt nowrap>| |
392 |
. $locale->text('Contact Person') |
|
393 |
. qq|</th> |
|
395 |
. $locale->text('Contact Person') . qq|</th> |
|
394 | 396 |
<td colspan=3>$contact</td> |
395 | 397 |
</tr> |
396 | 398 |
<tr> |
... | ... | |
533 | 535 |
if ($form->{taxaccounts}) { |
534 | 536 |
$taxincluded = qq| |
535 | 537 |
<input name=taxincluded class=checkbox type=checkbox value=1 $form->{taxincluded}> <b>| |
536 |
. $locale->text('Tax Included') |
|
537 |
. qq|</b><br><br>|; |
|
538 |
. $locale->text('Tax Included') . qq|</b><br><br>|; |
|
538 | 539 |
} |
539 | 540 |
|
540 | 541 |
if (!$form->{taxincluded}) { |
... | ... | |
673 | 674 |
<table width=100%> |
674 | 675 |
<tr class=listheading> |
675 | 676 |
<th colspan=6 class=listheading>| |
676 |
. $locale->text('Incoming Payments') |
|
677 |
. qq|</th> |
|
677 |
. $locale->text('Incoming Payments') . qq|</th> |
|
678 | 678 |
</tr> |
679 | 679 |
|; |
680 | 680 |
|
... | ... | |
753 | 753 |
<input type=hidden name=selectAR_paid value="$form->{selectAR_paid}"> |
754 | 754 |
<input type=hidden name=oldinvtotal value=$form->{oldinvtotal}> |
755 | 755 |
<input type=hidden name=oldtotalpaid value=$totalpaid> |
756 |
</table> |
|
756 |
<input type=hidden name=print_and_post value=$form->{print_and_post}> |
|
757 |
<input type=hidden name=second_run value=$form->{second_run}> |
|
758 |
</table> |
|
757 | 759 |
</td> |
758 | 760 |
</tr> |
759 | 761 |
<tr> |
... | ... | |
813 | 815 |
<input class=submit type=submit name=action value="| |
814 | 816 |
. $locale->text('Ship to') . qq|"> |
815 | 817 |
<input class=submit type=submit name=action value="| |
816 |
. $locale->text('Print') . qq|">
|
|
818 |
. $locale->text('Preview') . qq|">
|
|
817 | 819 |
<input class=submit type=submit name=action value="| |
818 | 820 |
. $locale->text('E-mail') . qq|"> |
821 |
<input class=submit type=submit name=action value="| |
|
822 |
. $locale->text('Print and Post') . qq|"> |
|
819 | 823 |
<input class=submit type=submit name=action value="| |
820 | 824 |
. $locale->text('Post') . qq|">|; |
821 | 825 |
} |
... | ... | |
1047 | 1051 |
|
1048 | 1052 |
$form->{invnumber} = $form->update_defaults(\%myconfig, "invnumber") |
1049 | 1053 |
unless $form->{invnumber}; |
1050 |
|
|
1051 |
$form->redirect( |
|
1054 |
if ($print_post) { |
|
1055 |
if (!(IS->post_invoice(\%myconfig, \%$form))) { |
|
1056 |
$form->error($locale->text('Cannot post invoice!')); |
|
1057 |
} |
|
1058 |
} else { |
|
1059 |
$form->redirect( |
|
1052 | 1060 |
$form->{label} . " $form->{invnumber} " . $locale->text('posted!')) |
1053 |
if (IS->post_invoice(\%myconfig, \%$form)); |
|
1054 |
$form->error($locale->text('Cannot post invoice!')); |
|
1061 |
if (IS->post_invoice(\%myconfig, \%$form)); |
|
1062 |
$form->error($locale->text('Cannot post invoice!')); |
|
1063 |
} |
|
1055 | 1064 |
|
1056 | 1065 |
$lxdebug->leave_sub(); |
1057 | 1066 |
} |
1058 | 1067 |
|
1068 |
sub print_and_post { |
|
1069 |
$lxdebug->enter_sub(); |
|
1070 |
|
|
1071 |
$old_form = new Form; |
|
1072 |
$print_post = 1; |
|
1073 |
$form->{print_and_post} = 1; |
|
1074 |
&post(); |
|
1075 |
&display_form(); |
|
1076 |
$lxdebug->leave_sub(); |
|
1077 |
|
|
1078 |
} |
|
1079 |
|
|
1080 |
sub preview { |
|
1081 |
$lxdebug->enter_sub(); |
|
1082 |
|
|
1083 |
$form->{preview} = 1; |
|
1084 |
$old_form = new Form; |
|
1085 |
for (keys %$form) { $old_form->{$_} = $form->{$_} } |
|
1086 |
$old_form->{rowcount}++; |
|
1087 |
|
|
1088 |
&print_form($old_form); |
|
1089 |
$lxdebug->leave_sub(); |
|
1090 |
|
|
1091 |
} |
|
1092 |
|
|
1059 | 1093 |
sub delete { |
1060 | 1094 |
$lxdebug->enter_sub(); |
1061 | 1095 |
|
Auch abrufbar als: Unified diff
Funktion fuer Druckvorschau und Drucken+Buchen zu Verkaufsrechnungen hinzugefuegt