From: Bernd Bleßmann Date: Mon, 2 Dec 2019 15:35:39 +0000 (+0100) Subject: Massenerstellen von Rechnungen aus LS: Filtern nach Kundentyp X-Git-Tag: release-3.5.6.1~420 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=fb5900bf9f7e8089a402c83d365038b16da301b1;p=kivitendo-erp.git Massenerstellen von Rechnungen aus LS: Filtern nach Kundentyp --- diff --git a/SL/Controller/MassInvoiceCreatePrint.pm b/SL/Controller/MassInvoiceCreatePrint.pm index a3cf2a07d..78e7859c0 100644 --- a/SL/Controller/MassInvoiceCreatePrint.pm +++ b/SL/Controller/MassInvoiceCreatePrint.pm @@ -22,7 +22,7 @@ use SL::SessionFile; use SL::System::TaskServer; use Rose::Object::MakeMethods::Generic ( - 'scalar --get_set_init' => [ qw(invoice_models invoice_ids sales_delivery_order_models printers default_printer_id today) ], + 'scalar --get_set_init' => [ qw(invoice_models invoice_ids sales_delivery_order_models printers default_printer_id today all_businesses) ], ); __PACKAGE__->run_before('setup'); @@ -262,6 +262,10 @@ sub init_default_printer_id { return $pr ? $pr->id : undef; } +sub init_all_businesses { + return SL::DB::Manager::Business->get_all_sorted; +} + sub setup { my ($self) = @_; $::auth->assert('invoice_edit'); diff --git a/templates/webpages/mass_invoice_create_print_from_do/_filter.html b/templates/webpages/mass_invoice_create_print_from_do/_filter.html index 4508ba460..08caf0952 100644 --- a/templates/webpages/mass_invoice_create_print_from_do/_filter.html +++ b/templates/webpages/mass_invoice_create_print_from_do/_filter.html @@ -13,6 +13,17 @@ [% LxERP.t8('Customer') %] [% L.input_tag('filter.customer.name:substr::ilike', filter.customer.name_substr__ilike, size = 20) %] + + [% LxERP.t8('Customer type') %] + + [% L.select_tag('filter.customer.business_id', SELF.all_businesses, + default => filter.customer.business_id + title_key => 'description', + value_key => 'id', + with_empty => 1, + style => 'width: 200px') %] + + [% LxERP.t8('Delivery Order Date') %] [% LxERP.t8('From Date') %] [% L.date_tag('filter.transdate:date::ge', filter.transdate_date__ge) %]