X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fis.pl;h=943dede25474c79bb1b6fbccb2c7ef6ef077cc64;hb=1118dab96d2c42e872c9782b4374709d52b20653;hp=1a61ab2d4705977df67566260f190e5fba90af52;hpb=548f4467739c9fea1addee0e0717a89e7be75429;p=kivitendo-erp.git diff --git a/bin/mozilla/is.pl b/bin/mozilla/is.pl index 1a61ab2d4..943dede25 100644 --- a/bin/mozilla/is.pl +++ b/bin/mozilla/is.pl @@ -79,7 +79,7 @@ sub add { sub edit { $lxdebug->enter_sub(); - $form->{"Watchdog::paidaccounts"} = 1; + # show history button $form->{javascript} = qq||; #/show hhistory button @@ -169,11 +169,6 @@ sub invoice_links { $form->{oldcustomer} = "$form->{customer}--$form->{customer_id}"; - if (@{ $form->{all_customer} }) { - $form->{customer} = "$form->{customer}--$form->{customer_id}"; - $form->{selectcustomer} = "$form->{customer}--$form->{customer_id}"; - } - # departments if ($form->{all_departments}) { $form->{selectdepartment} = "\n"; @@ -199,11 +194,6 @@ sub invoice_links { if ($key eq "AR_paid") { for $i (1 .. scalar @{ $form->{acc_trans}{$key} }) { - $lxdebug->message(0, "link " . $form->{acc_trans}->{$key}->[$i - 1]->{link}); - $lxdebug->dump(0, "...", $form->{acc_trans}->{$key}->[$i - 1]); - my $previous_links = { map { $_, 1 } split m/:/, $form->{acc_trans}->{$key}->[$i - 1]->{link} }; - next if (!$previous_links->{AR}); - $form->{"AR_paid_$i"} = "$form->{acc_trans}{$key}->[$i-1]->{accno}--$form->{acc_trans}{$key}->[$i-1]->{description}"; @@ -382,11 +372,13 @@ sub form_header { $labels{$item->{name}.qq|--|.$item->{"id"}} = $item->{"name"}; } + $form->{selectcustomer} = ($myconfig{vclimit} > scalar(@values)); + my $customers = qq| | . $locale->text('Customer') . qq| | . (($myconfig{vclimit} <= scalar(@values)) - ? qq|| + ? qq|| : (NTI($cgi->popup_menu('-name' => 'customer', '-default' => $form->{oldcustomer}, '-onChange' => 'document.getElementById(\'update_button\').click();', '-values' => \@values, '-labels' => \%labels, '-style' => 'width: 250px')))) . qq| @@ -493,12 +485,6 @@ sub form_header { s/option>\Q$form->{$item}\E/option selected>$form->{$item}/; } - #quote customer Bug 133 - $form->{selectcustomer} = $form->quote($form->{selectcustomer}); - - #substitute \n and \r to \s (bug 543) - $form->{selectcustomer} =~ s/[\n\r]/ /g; - if (($form->{creditlimit} != 0) && ($form->{creditremaining} < 0) && !$form->{update}) { $creditwarning = 1; } else { @@ -667,7 +653,7 @@ sub form_header { - + $contact $shipto @@ -1016,7 +1002,8 @@ if ($form->{type} eq "credit_note") { "; - my @triggers = (); + my @triggers = (); + my $totalpaid = 0; $form->{paidaccounts}++ if ($form->{"paid_$form->{paidaccounts}"}); for $i (1 .. $form->{paidaccounts}) { @@ -1067,6 +1054,23 @@ if ($form->{type} eq "credit_note") { push(@triggers, "datepaid_$i", "BL", "trigger_datepaid_$i"); } + my $paid_missing = $form->{oldinvtotal} - $totalpaid; + + print qq| + + + + | . $locale->text('Total') . qq| + | . H($form->format_amount(\%myconfig, $totalpaid, 2)) . qq| + + + + + | . $locale->text('Missing amount') . qq| + | . H($form->format_amount(\%myconfig, $paid_missing, 2)) . qq| + +|; + map({ print($cgi->hidden("-name" => $_, "-value" => $form->{$_})); } qw(paidaccounts selectAR_paid oldinvtotal)); print qq|