From fb5900bf9f7e8089a402c83d365038b16da301b1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Mon, 2 Dec 2019 16:35:39 +0100 Subject: [PATCH] Massenerstellen von Rechnungen aus LS: Filtern nach Kundentyp --- SL/Controller/MassInvoiceCreatePrint.pm | 6 +++++- .../mass_invoice_create_print_from_do/_filter.html | 11 +++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) 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) %] -- 2.20.1