X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fis.pl;h=b1aa9f3c5dae0079987bcb3b9eb585b3a3b1ce0b;hb=d03b28772dce973bf100e338e0d09112f06eb328;hp=258e620489720dfb3664e55517e7539ba4e14aa8;hpb=9d7c784cbec4b2d0281148376f8c287c3cd58d61;p=kivitendo-erp.git
diff --git a/bin/mozilla/is.pl b/bin/mozilla/is.pl
index 258e62048..b1aa9f3c5 100644
--- a/bin/mozilla/is.pl
+++ b/bin/mozilla/is.pl
@@ -45,7 +45,6 @@ require "bin/mozilla/drafts.pl";
use strict;
my $edit;
-my $payment;
my $print_post;
1;
@@ -169,18 +168,15 @@ sub invoice_links {
$form->{customer} = qq|$form->{customer}--$form->{"customer_id"}|;
}
- $form->{oldcustomer} = "$form->{customer}--$form->{customer_id}";
- $form->{selectcustomer} = 1;
+ $form->{"oldcustomer"} = $form->{customer};
+
+ if ($form->{"oldcustomer"} !~ m/--\d+$/ && $form->{"customer_id"}) {
+ $form->{"oldcustomer"} .= qq|--$form->{"customer_id"}|
+ }
- # departments
-# if ($form->{all_departments}) {
-# $form->{selectdepartment} = "\n"
-# } @{ $form->{all_departments} };
-# }
+
+# $form->{oldcustomer} = "$form->{customer}--$form->{customer_id}";
+# $form->{selectcustomer} = 1;
$form->{employee} = "$form->{employee}--$form->{employee_id}";
@@ -289,15 +285,6 @@ sub form_header {
$form->{defaultcurrency} = $form->get_default_currency(\%myconfig);
$form->{radier} = ($form->current_date(\%myconfig) eq $form->{gldate}) ? 1 : 0;
- $payment = qq||;
- foreach my $item (@{ $form->{payment_terms} }) {
- if ($form->{payment_id} eq $item->{id}) {
- $payment .= qq||;
- } else {
- $payment .= qq||;
- }
- }
-
my $set_duedate_url = "$form->{script}?action=set_duedate";
push @ { $form->{AJAX} }, new CGI::Ajax( 'set_duedate' => $set_duedate_url );
@@ -414,14 +401,10 @@ sub form_footer {
}
}
- # unfortunately locales doesn't support extended syntax
+ # follow ups
if ($form->{id}) {
- my $follow_ups = FU->follow_ups('trans_id' => $form->{id});
- if (@{ $follow_ups} ) {
- $form->{follow_up_text} = $locale->text("There are #1 unfinished follow-ups of which #2 are due.",
- scalar(@{ $follow_ups }),
- sum map { $_->{due} * 1 } @{ $follow_ups });
- }
+ $form->{follow_ups} = FU->follow_ups('trans_id' => $form->{id}) || [];
+ $form->{follow_ups_unfinished} = ( sum map { $_->{due} * 1 } @{ $form->{follow_ups} } ) || 0;
}
# payments