X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fct.pl;h=e8c6efd54ed4c389876d383355a1eb7f6788bc6d;hb=bfd5682ab8cad5878260ec2cafcd630dd3c05eff;hp=555768d8472db4feeacacac3d08750e4400bad7b;hpb=564b5410a5b4913215b53e659be6ee2a9cf259be;p=kivitendo-erp.git diff --git a/bin/mozilla/ct.pl b/bin/mozilla/ct.pl index 555768d84..e8c6efd54 100644 --- a/bin/mozilla/ct.pl +++ b/bin/mozilla/ct.pl @@ -67,6 +67,13 @@ use strict; # end of main +sub _zugferd_settings { + return ([ -1, $::locale->text('Use settings from client configuration') ], + [ 0, $::locale->text('Do not create ZUGFeRD invoices') ], + [ 1, $::locale->text('Create ZUGFeRD invoices') ], + [ 2, $::locale->text('Create ZUGFeRD invoices in test mode') ]); +} + sub search { $main::lxdebug->enter_sub(); @@ -89,6 +96,8 @@ sub search { $form->{title} = $form->{IS_CUSTOMER} ? $locale->text('Customers') : $locale->text('Vendors'); + $form->{ZUGFERD_SETTINGS} = [ _zugferd_settings() ]; + setup_ct_search_action_bar(); $form->header(); @@ -141,6 +150,9 @@ sub list_names { push @options, $locale->text('Orphaned'); } + my @zugferd_settings_list = _zugferd_settings(); + my $zugferd_filter = $form->{create_zugferd_invoices} eq '' ? undef : $zugferd_settings_list[$form->{create_zugferd_invoices} + 1]->[1]; + push @options, $locale->text('Name') . " : $form->{name}" if $form->{name}; push @options, $locale->text('Contact') . " : $form->{contact}" if $form->{contact}; push @options, $locale->text('Number') . qq| : $form->{"$form->{db}number"}| if $form->{"$form->{db}number"}; @@ -152,6 +164,7 @@ sub list_names { push @options, $locale->text('Billing/shipping address (country)') . " : $form->{addr_country}" if $form->{addr_country}; push @options, $locale->text('Billing/shipping address (GLN)') . " : $form->{addr_gln}" if $form->{addr_gln}; push @options, $locale->text('Quick Search') . " : $form->{all}" if $form->{all}; + push @options, $locale->text('ZUGFeRD settings') . " : $zugferd_filter" if $zugferd_filter; if ($form->{business_id}) { my $business = SL::DB::Manager::Business->find_by(id => $form->{business_id}); @@ -179,7 +192,7 @@ sub list_names { 'fax', 'email', 'taxnumber', 'street', 'zipcode' , 'city', 'business', 'payment', 'invnumber', 'ordnumber', 'quonumber', 'salesman', 'country', 'gln', 'insertdate', 'pricegroup', 'contact_origin', 'invoice_mail', - 'creditlimit', 'ustid', 'commercial_court' + 'creditlimit', 'ustid', 'commercial_court', 'delivery_order_mail' ); my @includeable_custom_variables = grep { $_->{includeable} } @{ $cvar_configs }; @@ -214,10 +227,12 @@ sub list_names { 'insertdate' => { 'text' => $locale->text('Insert Date'), }, 'pricegroup' => { 'text' => $locale->text('Pricegroup'), }, 'invoice_mail' => { 'text' => $locale->text('Email of the invoice recipient'), }, + 'delivery_order_mail' => { 'text' => $locale->text('Email of the delivery order recipient'), }, 'contact_origin' => { 'text' => $locale->text('Origin of personal data'), }, 'creditlimit' => { 'text' => $locale->text('Credit Limit'), }, 'ustid' => { 'text' => $locale->text('VAT ID'), }, 'commercial_court' => { 'text' => $locale->text('Commercial court'), }, + create_zugferd_invoices => { text => $locale->text('ZUGFeRD settings'), }, %column_defs_cvars, ); @@ -228,6 +243,8 @@ sub list_names { addr_city addr_country addr_gln business_id salesman_id insertdateto insertdatefrom all ), "$form->{db}number", map({ "cvar_$_->{name}" } @searchable_custom_variables), + map({'cvar_'. $_->{name} .'_from'} grep({$_->{type} eq 'date'} @searchable_custom_variables)), + map({'cvar_'. $_->{name} .'_to'} grep({$_->{type} eq 'date'} @searchable_custom_variables)), map({'cvar_'. $_->{name} .'_qtyop'} grep({$_->{type} eq 'number'} @searchable_custom_variables)), map({ "l_$_" } @columns), );