X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fis.pl;h=b1aa9f3c5dae0079987bcb3b9eb585b3a3b1ce0b;hb=d03b28772dce973bf100e338e0d09112f06eb328;hp=0567e672e34169d0a0847b0562171fe109752aeb;hpb=b2c3a161b825e08769f9ee9197ade3fea49efe93;p=kivitendo-erp.git diff --git a/bin/mozilla/is.pl b/bin/mozilla/is.pl index 0567e672e..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}; - # departments -# if ($form->{all_departments}) { -# $form->{selectdepartment} = "\n" -# } @{ $form->{all_departments} }; -# } + if ($form->{"oldcustomer"} !~ m/--\d+$/ && $form->{"customer_id"}) { + $form->{"oldcustomer"} .= qq|--$form->{"customer_id"}| + } + + +# $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 ); @@ -417,7 +404,7 @@ sub form_footer { # follow ups if ($form->{id}) { $form->{follow_ups} = FU->follow_ups('trans_id' => $form->{id}) || []; - $form->{follow_ups_unfinished} = sum map { $_->{due} * 1 } @{ $form->{follow_ups} }; + $form->{follow_ups_unfinished} = ( sum map { $_->{due} * 1 } @{ $form->{follow_ups} } ) || 0; } # payments