X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Far.pl;h=cd30053ed5bce3dad0518d7cf8e7a5b31cb087e3;hb=7b108151efc32199f7d3feb2662348b2b07e2cb2;hp=1522339b86247c909f82cd275a39b221368e7bf5;hpb=5494f687372570c9d1c5eb5c6aad73767e50820a;p=kivitendo-erp.git diff --git a/bin/mozilla/ar.pl b/bin/mozilla/ar.pl index 1522339b8..cd30053ed 100644 --- a/bin/mozilla/ar.pl +++ b/bin/mozilla/ar.pl @@ -1046,13 +1046,12 @@ sub update { $form->{invdate} = $form->{transdate}; - my %saved_variables = map +( $_ => $form->{$_} ), qw(AR AR_amount_1 taxchart_1 oldcustomer); + my %saved_variables = map +( $_ => $form->{$_} ), qw(AR AR_amount_1 taxchart_1 customer_id); &check_name("customer"); - # check_name ruft get_customer auf, oldcustomer wird überschrieben, daher wird dies vorher gemerkt - # get_customer holt Bemerkungen als intnotes, für Debitorenbuchungen gibt es aber nur das Feld notes - $form->{notes} = $form->{intnotes} if $saved_variables{oldcustomer} ne $form->{customer}; + # check_name loads customer notes into notes, but ar only knows intnotes, so copy them + $form->{notes} = $form->{intnotes} if $saved_variables{customer_id} != $form->{customer_id}; $form->{AR} = $saved_variables{AR}; if ($saved_variables{AR_amount_1} =~ m/.--./) { @@ -1347,16 +1346,13 @@ sub search { $form->get_lists("projects" => { "key" => "ALL_PROJECTS", "all" => 1 }, "departments" => "ALL_DEPARTMENTS", "customers" => "ALL_VC", - "employees" => "ALL_EMPLOYEES", - "salesmen" => "ALL_SALESMEN", "business_types" => "ALL_BUSINESS_TYPES"); + $form->{ALL_EMPLOYEES} = SL::DB::Manager::Employee->get_all(query => [ deleted => 0 ]); $form->{SHOW_BUSINESS_TYPES} = scalar @{ $form->{ALL_BUSINESS_TYPES} } > 0; # constants and subs for template $form->{jsscript} = 1; $form->{vc_keys} = sub { "$_[0]->{name}--$_[0]->{id}" }; - $form->{employee_labels} = sub { $_[0]->{"name"} || $_[0]->{"login"} }; - $form->{salesman_labels} = $form->{employee_labels}; $form->header; print $form->parse_html_template('ar/search', { %myconfig });