Revision 7a7f33b5
Von Moritz Bunkus vor fast 17 Jahren hinzugefügt
bin/mozilla/is.pl | ||
---|---|---|
31 | 31 |
# |
32 | 32 |
#====================================================================== |
33 | 33 |
|
34 |
use SL::FU; |
|
34 | 35 |
use SL::IS; |
35 | 36 |
use SL::PE; |
36 | 37 |
use Data::Dumper; |
37 |
use List::Util qw(max); |
|
38 |
use List::Util qw(max sum);
|
|
38 | 39 |
|
39 | 40 |
require "bin/mozilla/io.pl"; |
40 | 41 |
require "bin/mozilla/invoice_io.pl"; |
... | ... | |
574 | 575 |
} |
575 | 576 |
|
576 | 577 |
$credittext = $locale->text('Credit Limit exceeded!!!'); |
578 |
|
|
579 |
my $follow_up_vc = $form->{customer}; |
|
580 |
$follow_up_vc =~ s/--.*?//; |
|
581 |
my $follow_up_trans_info = "$form->{invnumber} ($follow_up_vc)"; |
|
582 |
|
|
577 | 583 |
$onload = ($form->{resubmit} && ($form->{format} eq "html")) ? qq|window.open('about:blank','Beleg'); document.invoice.target = 'Beleg';document.invoice.submit()| |
578 | 584 |
: ($form->{resubmit}) ? qq|document.invoice.submit()| |
579 | 585 |
: ($creditwarning) ? qq|alert('$credittext')| |
... | ... | |
599 | 605 |
<script type="text/javascript" src="js/delivery_customer_selection.js"></script> |
600 | 606 |
<script type="text/javascript" src="js/vendor_selection.js"></script> |
601 | 607 |
<script type="text/javascript" src="js/calculate_qty.js"></script> |
608 |
<script type="text/javascript" src="js/follow_up.js"></script> |
|
602 | 609 |
|
603 | 610 |
<form method="post" name="invoice" action="$form->{script}"> |
604 | 611 |
| ; |
... | ... | |
614 | 621 |
|
615 | 622 |
print qq| |
616 | 623 |
|
624 |
<input type="hidden" name="follow_up_trans_id_1" value="| . H($form->{id}) . qq|"> |
|
625 |
<input type="hidden" name="follow_up_trans_type_1" value="sales_invoice"> |
|
626 |
<input type="hidden" name="follow_up_trans_info_1" value="| . H($follow_up_trans_info) . qq|"> |
|
627 |
<input type="hidden" name="follow_up_rowcount" value="1"> |
|
628 |
|
|
617 | 629 |
<input type="hidden" name="lizenzen" value="$lizenzen"> |
618 | 630 |
|
619 | 631 |
<div class="listtop" width="100%">$form->{title}</div> |
... | ... | |
860 | 872 |
$form->{invtotal} = |
861 | 873 |
$form->format_amount(\%myconfig, $form->{invtotal}, 2, 0); |
862 | 874 |
|
875 |
my $follow_ups_block; |
|
876 |
if ($form->{id}) { |
|
877 |
my $follow_ups = FU->follow_ups('trans_id' => $form->{id}); |
|
878 |
|
|
879 |
if (@{ $follow_ups} ) { |
|
880 |
my $num_due = sum map { $_->{due} * 1 } @{ $follow_ups }; |
|
881 |
$follow_ups_block = qq| |
|
882 |
<tr> |
|
883 |
<td colspan="2">| . $locale->text("There are #1 unfinished follow-ups of which #2 are due.", scalar @{ $follow_ups }, $num_due) . qq|</td> |
|
884 |
</tr> |
|
885 |
|; |
|
886 |
} |
|
887 |
} |
|
888 |
|
|
863 | 889 |
print qq| |
864 | 890 |
<tr> |
865 | 891 |
<td> |
... | ... | |
878 | 904 |
<td><select name="payment_id" onChange="if (this.value) set_duedate(['payment_id__' + this.value],['duedate'])">$payment |
879 | 905 |
</select></td> |
880 | 906 |
</tr> |
907 |
$follow_ups_block |
|
881 | 908 |
</table> |
882 | 909 |
</td> |
883 | 910 |
<td> |
... | ... | |
1095 | 1122 |
print qq|<input class="submit" type="submit" name="action" value="| |
1096 | 1123 |
. $locale->text('Use As Template') . qq|"> |
1097 | 1124 |
|; |
1098 |
if ($form->{id} && !($form->{type} eq "credit_note")) { |
|
1099 |
print qq| |
|
1125 |
if ($form->{id} && !($form->{type} eq "credit_note")) {
|
|
1126 |
print qq|
|
|
1100 | 1127 |
<input class="submit" type="submit" name="action" value="| |
1101 | 1128 |
. $locale->text('Credit Note') . qq|"> |
1102 | 1129 |
|; |
1103 |
} |
|
1130 |
}
|
|
1104 | 1131 |
if ($form->{radier}) { |
1105 | 1132 |
print qq| |
1106 | 1133 |
<input class="submit" type="submit" name="action" value="| |
1107 | 1134 |
. $locale->text('Delete') . qq|"> |
1108 | 1135 |
|; |
1109 |
} |
|
1136 |
}
|
|
1110 | 1137 |
|
1111 | 1138 |
|
1112 | 1139 |
if ($invdate > $closedto) { |
... | ... | |
1116 | 1143 |
|; |
1117 | 1144 |
} |
1118 | 1145 |
|
1146 |
print qq| |
|
1147 |
<input type="button" class="submit" onclick="follow_up_window()" value="| |
|
1148 |
. $locale->text('Follow-Up') |
|
1149 |
. qq|">|; |
|
1150 |
|
|
1119 | 1151 |
} else { |
1120 | 1152 |
if ($invdate > $closedto) { |
1121 | 1153 |
print qq|<input class="submit" type="submit" name="action" id="update_button" value="| |
Auch abrufbar als: Unified diff
Zwei neue Features:
1. Beliebige Notizen für Kunden und Lieferanten können angelegt werden. Solche Notizen können auf Wiedervorlage gelegt werden, was durch 2. implementiert ist.
2. Einkaufs- und Verkaufsbelege können auf Wiedervorlage gelegt werden. Wiedervorlagen können für beliebige Nutzer erstellt werden (Aufgabe an andere Nutzer deligieren). Anstehende Wiedervorlagen und abgelaufene Angebote werden auf der Startseite in einer Aufgabenliste angezeigt.