From: Moritz Bunkus Date: Tue, 2 Jun 2009 08:49:27 +0000 (+0000) Subject: Revisionen und 4167 und 4192:4194 rückgängig gemacht (Kundenauswahl in Rechnungen... X-Git-Tag: release-2.6.0~7 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=6d8f12f14d85bd1a445afa13f443bace3ac9a5ff;p=kivitendo-erp.git Revisionen und 4167 und 4192:4194 rückgängig gemacht (Kundenauswahl in Rechnungen via Multibox) Grund: Hat Bug 1022 verursacht. Das ist releasekritisch; muss nach dem Release anständig gefixt werden. Fix für Bug 1022. --- diff --git a/bin/mozilla/is.pl b/bin/mozilla/is.pl index d53f69958..9bc225e88 100644 --- a/bin/mozilla/is.pl +++ b/bin/mozilla/is.pl @@ -354,24 +354,25 @@ sub form_header { |; - $form->{selectcustomer} = $myconfig{vclimit} > scalar(@{ $form->{ALL_CUSTOMERS} }); + %labels = (); + @values = (); + foreach my $item (@{ $form->{"ALL_CUSTOMERS"} }) { + push(@values, $item->{name}.qq|--|.$item->{"id"}); + $labels{$item->{name}.qq|--|.$item->{"id"}} = $item->{"name"}; + } + + $form->{selectcustomer} = ($myconfig{vclimit} > scalar(@values)); my $customers = qq| | . $locale->text('Customer') . qq| - | - . $form->parse_html_template('generic/multibox', - { 'name' => 'customer', - 'default' => $form->{oldcustomer}, - 'style' => 'width: 250px', - 'DATA' => $form->{ALL_CUSTOMERS}, - 'id_sub' => 'vc_keys', - 'vc_keys' => sub { "$_[0]->{name}--$_[0]->{id}" }, - 'label_key' => 'name', - 'select' => 'customer_or_vendor_selection_window(\'customer\', \'\', 0, 0);', - 'limit' => $myconfig{vclimit}, - 'allow_textbox' => 1, - 'onChange' => "document.getElementById('update_button').click();" }) - . qq| |; + | . + (($myconfig{vclimit} <= scalar(@values)) + ? qq|| + : (NTI($cgi->popup_menu('-name' => 'customer', '-default' => $form->{oldcustomer}, + '-onChange' => 'document.getElementById(\'update_button\').click();', + '-values' => \@values, '-labels' => \%labels, '-style' => 'width: 250px')))) . qq| + + |; %labels = (); @values = (""); @@ -556,7 +557,7 @@ sub form_header { #write Trigger $jsscript = Form->write_trigger(\%myconfig, "3", - "invdate", "BL", "trigger1", + "invdate", "BL", "trigger1", "duedate", "BL", "trigger2", "deliverydate", "BL", "trigger3"); } @@ -590,7 +591,7 @@ sub form_header { - + @@ -600,11 +601,11 @@ sub form_header { $form->hide_form(qw(id action type media format queued printed emailed title vc discount creditlimit creditremaining tradediscount business closedto locked shipped storno storno_id max_dunning_level dunning_amount - shiptoname shiptostreet shiptozipcode shiptocity shiptocountry shiptocontact shiptophone shiptofax + shiptoname shiptostreet shiptozipcode shiptocity shiptocountry shiptocontact shiptophone shiptofax shiptoemail shiptodepartment_1 shiptodepartment_2 message email subject cc bcc taxaccounts cursor_fokus convert_from_do_ids convert_from_oe_ids), map { $_.'_rate', $_.'_description', $_.'_taxnumber' } split / /, $form->{taxaccounts} ); - + print qq|

$form->{saved_message}

| if $form->{saved_message}; print qq| @@ -699,7 +700,7 @@ if ($form->{type} eq "credit_note") { print qq| | . $locale->text('Credit Note Number') . qq| |. - $cgi->textfield("-name" => "invnumber", "-size" => 11, "-value" => $form->{invnumber}) . + $cgi->textfield("-name" => "invnumber", "-size" => 11, "-value" => $form->{invnumber}) . qq| @@ -710,7 +711,7 @@ print qq| print qq| | . $locale->text('Invoice Number') . qq| |. - $cgi->textfield("-name" => "invnumber", "-size" => 11, "-value" => $form->{invnumber}) . + $cgi->textfield("-name" => "invnumber", "-size" => 11, "-value" => $form->{invnumber}) . qq| @@ -724,7 +725,7 @@ print qq| | . $locale->text('Delivery Order Number') . qq| |. - $cgi->textfield("-name" => "donumber", "-size" => 11, "-value" => $form->{donumber}) . + $cgi->textfield("-name" => "donumber", "-size" => 11, "-value" => $form->{donumber}) . qq| @@ -735,7 +736,7 @@ print qq| print qq| | . $locale->text('Order Number') . qq| |. - $cgi->textfield("-name" => "ordnumber", "-size" => 11, "-value" => $form->{ordnumber}) . + $cgi->textfield("-name" => "ordnumber", "-size" => 11, "-value" => $form->{ordnumber}) . qq| @@ -746,7 +747,7 @@ print qq| | . $locale->text('Quotation Number') . qq| |. - $cgi->textfield("-name" => "quonumber", "-size" => 11, "-value" => $form->{quonumber}) . + $cgi->textfield("-name" => "quonumber", "-size" => 11, "-value" => $form->{quonumber}) . qq| @@ -757,7 +758,7 @@ print qq| | . $locale->text('Customer Order Number') . qq| |. - $cgi->textfield("-name" => "cusordnumber", "-size" => 11, "-value" => $form->{cusordnumber}) . + $cgi->textfield("-name" => "cusordnumber", "-size" => 11, "-value" => $form->{cusordnumber}) . qq| @@ -773,7 +774,7 @@ print qq| - + $jsscript |; print qq||; @@ -1186,10 +1187,10 @@ if ($form->{type} eq "credit_note") { . qq|"> |; } # /button for saving history - - # mark_as_paid button - if($form->{id} ne "") { - print qq||; } # /mark_as_paid button @@ -1218,7 +1219,7 @@ sub mark_as_paid { $auth->assert('invoice_edit'); - &mark_as_paid_common(\%myconfig,"ar"); + &mark_as_paid_common(\%myconfig,"ar"); $lxdebug->leave_sub(); } @@ -1283,7 +1284,7 @@ sub update { map { $form->{item_list}[$i]{$_} =~ s/\"/"/g } qw(partnumber description unit); map { $form->{"${_}_$i"} = $form->{item_list}[0]{$_} } keys %{ $form->{item_list}[0] }; - + $form->{payment_id} = $form->{"part_payment_id_$i"} if $form->{"part_payment_id_$i"} ne ""; $form->{"discount_$i"} = 0 if $form->{"not_discountable_$i"};