X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Far.pl;h=0e5ab85a9b54265a2c6926236c7d35d3527ecb4a;hb=32fa27cee3f69042ee74e8efecf1f4396ea5c7bb;hp=6f0b738ac3f863627749e80a55394ef3fec35612;hpb=044d18fff505b6823db1e5093fef96577e420afa;p=kivitendo-erp.git diff --git a/bin/mozilla/ar.pl b/bin/mozilla/ar.pl index 6f0b738ac..0e5ab85a9 100644 --- a/bin/mozilla/ar.pl +++ b/bin/mozilla/ar.pl @@ -95,7 +95,7 @@ sub add { # /saving the history $form->{title} = "Add"; - $form->{callback} = "ar.pl?action=add" unless $form->{callback}; + $form->{callback} = "ar.pl?action=add&DONT_LOAD_DRAFT=1" unless $form->{callback}; AR->get_transdate(\%myconfig, $form); $form->{initial_transdate} = $form->{transdate}; @@ -982,10 +982,14 @@ sub update { $form->{invdate} = $form->{transdate}; - my %saved_variables = map +( $_ => $form->{$_} ), qw(AR AR_amount_1 taxchart_1); + my %saved_variables = map +( $_ => $form->{$_} ), qw(AR AR_amount_1 taxchart_1 oldcustomer); &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}; + $form->{AR} = $saved_variables{AR}; if ($saved_variables{AR_amount_1} =~ m/.--./) { map { $form->{$_} = $saved_variables{$_} } qw(AR_amount_1 taxchart_1); @@ -1279,12 +1283,16 @@ 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->{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 }); @@ -1436,6 +1444,7 @@ sub ar_transactions { 'attachment_basename' => $locale->text('invoice_list') . strftime('_%Y%m%d', localtime time), ); $report->set_options_from_form(); + $locale->set_numberformat_wo_thousands_separator(\%myconfig) if lc($report->{options}->{output_format}) eq 'csv'; # add sort and escape callback, this one we use for the add sub $form->{callback} = $href .= "&sort=$form->{sort}";