From: Niclas Zimmermann Date: Thu, 18 Jul 2013 07:30:28 +0000 (+0200) Subject: Merge branch 'master' of https://github.com/kivitendo/kivitendo-erp X-Git-Tag: release-3.1.0beta1~161 X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/commitdiff_plain/6ac47be4e3e318ea212ca595195b0b55a9c386a3?hp=93a41d3921432dd6700d5fb2766ce8e92fe33901 Merge branch 'master' of https://github.com/kivitendo/kivitendo-erp --- diff --git a/SL/AP.pm b/SL/AP.pm index 7a148d610..f754137ee 100644 --- a/SL/AP.pm +++ b/SL/AP.pm @@ -371,7 +371,7 @@ sub post_transaction { $query = qq|INSERT INTO acc_trans (trans_id, chart_id, amount, transdate, fx_transaction, cleared, project_id, taxkey, tax_id, chart_link) | . qq|VALUES (?, (SELECT id FROM chart WHERE accno = ?), ?, ?, 't', 'f', ?, | . - qq| (SELECT taxkey_id FROM chart WHERE accno = ?)| . + qq| (SELECT taxkey_id FROM chart WHERE accno = ?),| . qq| (SELECT tax_id| . qq| FROM taxkeys| . qq| WHERE chart_id= (SELECT id | . @@ -878,4 +878,3 @@ sub storno { } 1; - diff --git a/SL/Controller/Admin.pm b/SL/Controller/Admin.pm index bcc9436b7..698fdb126 100644 --- a/SL/Controller/Admin.pm +++ b/SL/Controller/Admin.pm @@ -378,16 +378,13 @@ sub action_delete_printer { # actions: database administration # -sub action_database_administration { +sub action_create_dataset_login { my ($self) = @_; - $::form->{dbhost} ||= $::auth->{DB_config}->{host} || 'localhost'; - $::form->{dbport} ||= $::auth->{DB_config}->{port} || 5432; - $::form->{dbuser} ||= $::auth->{DB_config}->{user} || 'kivitendo'; - $::form->{dbpasswd} ||= $::auth->{DB_config}->{password}; - $::form->{dbdefault} ||= 'template1'; - - $self->render('admin/dbadmin', title => t8('Database Administration')); + $self->database_administration_login_form( + title => t8('Create Dataset'), + next_action => 'create_dataset', + ); } sub action_create_dataset { @@ -414,6 +411,15 @@ sub action_do_create_dataset { $self->redirect_to(action => 'database_administration'); } +sub action_delete_dataset_login { + my ($self) = @_; + + $self->database_administration_login_form( + title => t8('Delete Dataset'), + next_action => 'delete_dataset', + ); +} + sub action_delete_dataset { my ($self) = @_; $self->delete_dataset_form; @@ -440,6 +446,15 @@ sub action_do_delete_dataset { # actions: locking, unlocking # +sub action_show_lock { + my ($self) = @_; + + $self->render( + "admin/show_lock", + title => "kivitendo " . t8('Administration'), + ); +} + sub action_unlock_system { my ($self) = @_; @@ -451,7 +466,7 @@ sub action_unlock_system { sub action_lock_system { my ($self) = @_; - SL::System::InstallationLock->unlock; + SL::System::InstallationLock->lock; flash_later('info', t8('Lockfile created!')); $self->redirect_to(action => 'show'); } @@ -532,7 +547,6 @@ sub setup_layout { my ($self, $action) = @_; $::request->layout(SL::Layout::Dispatcher->new(style => 'admin')); - $::request->layout->use_stylesheet("lx-office-erp.css"); $::form->{favicon} = "favicon.ico"; %::myconfig = ( countrycode => 'de', @@ -544,11 +558,10 @@ sub setup_layout { sub setup_client { my ($self) = @_; - $self->client((first { $_->is_default } @{ $self->all_clients }) || $self->all_clients->[0]) if !$self->client; + $self->client(SL::DB::Manager::AuthClient->get_default || $self->all_clients->[0]) if !$self->client; $::auth->set_client($self->client->id); } - # # displaying forms # @@ -563,6 +576,7 @@ sub use_multiselect_js { sub login_form { my ($self, %params) = @_; my $version = $::form->read_version; + $::request->layout->no_menu(1); $self->render('admin/adminlogin', title => t8('kivitendo v#1 administration', $version), %params, version => $version); } @@ -586,6 +600,20 @@ sub edit_printer_form { $self->render('admin/edit_printer', %params); } +sub database_administration_login_form { + my ($self, %params) = @_; + + $self->render( + 'admin/dbadmin', + dbhost => $::form->{dbhost} || $::auth->{DB_config}->{host} || 'localhost', + dbport => $::form->{dbport} || $::auth->{DB_config}->{port} || 5432, + dbuser => $::form->{dbuser} || $::auth->{DB_config}->{user} || 'kivitendo', + dbpasswd => $::form->{dbpasswd} || $::auth->{DB_config}->{password}, + dbdefault => $::form->{dbdefault} || 'template1', + %params, + ); +} + sub create_dataset_form { my ($self, %params) = @_; $self->render('admin/create_dataset', title => (t8('Database Administration') . " / " . t8('Create Dataset'))); diff --git a/SL/Controller/Customer.pm b/SL/Controller/Customer.pm deleted file mode 100644 index 823af2e59..000000000 --- a/SL/Controller/Customer.pm +++ /dev/null @@ -1,26 +0,0 @@ -package SL::Controller::Customer; - -use strict; -use parent qw(SL::Controller::Base); - -use SL::DB::Customer; - -# safety -__PACKAGE__->run_before(sub { $::auth->assert('customer_vendor_edit') }); - -sub action_ajax_autocomplete { - my ($self, %params) = @_; - - my $limit = $::form->{limit} || 20; - my $type = $::form->{type} || {}; - my $query = { ilike => "%$::form->{term}%" }; - my @filter; - push @filter, ($::form->{column}) - ? ($::form->{column} => $query) - : (or => [ customernumber => $query, name => $query ]); - - $self->{customers} = SL::DB::Manager::Customer->get_all(query => [ @filter ], limit => $limit); - $self->{value} = $::form->{column} || 'name'; - - $self->render('ct/ajax_autocomplete2', { layout => 0, type => 'json' }); -} diff --git a/SL/Controller/CustomerVendor.pm b/SL/Controller/CustomerVendor.pm new file mode 100644 index 000000000..cfe7accf8 --- /dev/null +++ b/SL/Controller/CustomerVendor.pm @@ -0,0 +1,777 @@ +package SL::Controller::CustomerVendor; + +use strict; +use parent qw(SL::Controller::Base); + +use SL::JSON; +use SL::DBUtils; +use SL::Helper::Flash; + +use SL::DB::Customer; +use SL::DB::Vendor; +use SL::DB::Business; +use SL::DB::Employee; +use SL::DB::Language; +use SL::DB::TaxZone; +use SL::DB::Note; +use SL::DB::PaymentTerm; +use SL::DB::Pricegroup; +use SL::DB::Contact; +use SL::DB::FollowUp; +use SL::DB::History; +use SL::DB::Currency; + +# safety +__PACKAGE__->run_before( + sub { + $::auth->assert('customer_vendor_edit'); + } +); + +__PACKAGE__->run_before( + '_instantiate_args', + only => [ + 'save', + 'save_and_ap_transaction', + 'save_and_ar_transaction', + 'save_and_close', + 'save_and_invoice', + 'save_and_order', + 'save_and_quotation', + 'save_and_rfq', + 'delete', + 'delete_contact', + 'delete_shipto', + ] +); + +__PACKAGE__->run_before( + '_load_customer_vendor', + only => [ + 'edit', + 'update', + 'ajaj_get_shipto', + 'ajaj_get_contact', + ] +); +__PACKAGE__->run_before( + '_create_customer_vendor', + only => [ + 'add', + ] +); + +sub action_add { + my ($self) = @_; + + $self->_pre_render(); + $self->render( + 'customer_vendor/form', + title => ($self->is_vendor() ? $::locale->text('Add Vendor') : $::locale->text('Add Customer')), + %{$self->{template_args}} + ); +} + +sub action_edit { + my ($self) = @_; + + $self->_pre_render(); + $self->render( + 'customer_vendor/form', + title => ($self->is_vendor() ? $::locale->text('Edit Vendor') : $::locale->text('Edit Customer')), + %{$self->{template_args}} + ); +} + +sub _save { + my ($self) = @_; + + my $db = $self->{cv}->db; + + $db->do_transaction(sub { + my $cvs_by_nr; + if ( $self->is_vendor() ) { + if ( $self->{cv}->vendornumber ) { + $cvs_by_nr = SL::DB::Manager::Vendor->get_all(query => [vendornumber => $self->{cv}->vendornumber]); + } + } else { + if ( $self->{cv}->customernumber ) { + $cvs_by_nr = SL::DB::Manager::Customer->get_all(query => [customernumber => $self->{cv}->customernumber]); + } + } + + foreach my $entry (@{$cvs_by_nr}) { + if( $entry->id != $self->{cv}->id ) { + my $msg = + $self->is_vendor() ? $::locale->text('This vendor number is already in use.') : $::locale->text('This customer number is already in use.'); + + $::form->error($msg); + } + } + + $self->{cv}->save(cascade => 1); + + $self->{contact}->cp_cv_id($self->{cv}->id); + if( $self->{contact}->cp_name ne '' || $self->{contact}->cp_givenname ne '' ) { + $self->{contact}->save(); + } + + if( $self->{note}->subject ne '' && $self->{note}->body ne '' ) { + $self->{note}->trans_id($self->{cv}->id); + $self->{note}->save(); + $self->{note_followup}->save(); + + $self->{note} = SL::DB::Note->new(); + $self->{note_followup} = SL::DB::FollowUp->new(); + } + + $self->{shipto}->trans_id($self->{cv}->id); + if( $self->{shipto}->shiptoname ne '' ) { + $self->{shipto}->save(); + } + + my $snumbers = $self->is_vendor() ? 'vendornumber_'. $self->{cv}->vendornumber : 'customernumber_'. $self->{cv}->customernumber; + SL::DB::History->new( + trans_id => $self->{cv}->id, + snumbers => $snumbers, + employee_id => SL::DB::Manager::Employee->current->id, + addition => 'SAVED', + )->save(); + }) || die($db->error); + +} + +sub action_save { + my ($self) = @_; + + $self->_save(); + + $self->redirect_to(action => 'edit', id => $self->{cv}->id, db => $self->is_vendor() ? 'vendor' : 'customer'); +} + +sub action_save_and_close { + my ($self) = @_; + + $self->_save(); + + my $msg = $self->is_vendor() ? $::locale->text('Vendor saved') : $::locale->text('Customer saved'); + $::form->redirect($msg); +} + +sub _transaction { + my ($self, $script) = @_; + + $::auth->assert('general_ledger | invoice_edit | vendor_invoice_edit | ' . + ' request_quotation_edit | sales_quotation_edit | sales_order_edit | purchase_order_edit'); + + $self->_save(); + + my $callback = $::form->escape($::form->{callback}, 1); + my $name = $::form->escape($self->{cv}->name, 1); + my $db = $self->is_vendor() ? 'vendor' : 'customer'; + + my $url = $self->url_for( + controller => $script, + action => 'add', + vc => $db, + $db .'_id' => $self->{cv}->id, + $db => $name, + type => $::form->{type}, + callback => $callback, + ); + + print $::form->redirect_header($url); +} + +sub action_save_and_ar_transaction { + my ($self) = @_; + + $main::auth->assert('general_ledger'); + + $self->_transaction('ar.pl'); +} + +sub action_save_and_ap_transaction { + my ($self) = @_; + + $main::auth->assert('general_ledger'); + + $self->_transaction('ap.pl'); +} + +sub action_save_and_invoice { + my ($self) = @_; + + if ( $self->is_vendor() ) { + $::auth->assert('vendor_invoice_edit'); + } else { + $::auth->assert('invoice_edit'); + } + + $::form->{type} = 'invoice'; + $self->_transaction($self->is_vendor() ? 'ir.pl' : 'is.pl'); +} + +sub action_save_and_order { + my ($self) = @_; + + if ( $self->is_vendor() ) { + $::auth->assert('purchase_order_edit'); + } else { + $::auth->assert('sales_order_edit'); + } + + $::form->{type} = $self->is_vendor() ? 'purchase_order' : 'sales_order'; + $self->_transaction('oe.pl'); +} + +sub action_save_and_rfq { + my ($self) = @_; + + $::auth->assert('request_quotation_edit'); + + $::form->{type} = 'request_quotation'; + $self->_transaction('oe.pl'); +} + +sub action_save_and_quotation { + my ($self) = @_; + + $::auth->assert('sales_quotation_edit'); + + $::form->{type} = 'sales_quotation'; + $self->_transaction('oe.pl'); +} + +sub action_delete { + my ($self) = @_; + + my $db = $self->{cv}->db; + + if( !$self->is_orphaned() ) { + $self->action_edit(); + } else { + + $db->do_transaction(sub { + $self->{cv}->delete(cascade => 1); + + my $snumbers = $self->is_vendor() ? 'vendornumber_'. $self->{cv}->vendornumber : 'customernumber_'. $self->{cv}->customernumber; + SL::DB::History->new( + trans_id => $self->{cv}->id, + snumbers => $snumbers, + employee_id => SL::DB::Manager::Employee->current->id, + addition => 'DELETED', + )->save(); + }) || die($db->error); + + my $msg = $self->is_vendor() ? $::locale->text('Vendor deleted!') : $::locale->text('Customer deleted!'); + $::form->redirect($msg); + } + +} + + +sub action_delete_contact { + my ($self) = @_; + + my $db = $self->{contact}->db; + + if ( !$self->{contact}->cp_id ) { + SL::Helper::Flash::flash('error', $::locale->text('No contact selected to delete')); + } else { + + $db->do_transaction(sub { + if ( $self->{contact}->used ) { + $self->{contact}->detach(); + $self->{contact}->save(); + SL::Helper::Flash::flash('info', $::locale->text('Contact is in use and was flagged invalid.')); + } else { + $self->{contact}->delete(cascade => 1); + SL::Helper::Flash::flash('info', $::locale->text('Contact deleted.')); + } + }) || die($db->error); + + $self->{contact} = SL::DB::Contact->new(); + } + + $self->action_edit(); +} + +sub action_delete_shipto { + my ($self) = @_; + + my $db = $self->{shipto}->db; + + if ( !$self->{shipto}->shipto_id ) { + SL::Helper::Flash::flash('error', $::locale->text('No shipto selected to delete')); + } else { + + $db->do_transaction(sub { + if ( $self->{shipto}->used ) { + $self->{shipto}->detach(); + $self->{shipto}->save(cascade => 1); + SL::Helper::Flash::flash('info', $::locale->text('Shipto is in use and was flagged invalid.')); + } else { + $self->{shipto}->delete(cascade => 1); + SL::Helper::Flash::flash('info', $::locale->text('Shipto deleted.')); + } + }) || die($db->error); + + $self->{shipto} = SL::DB::Shipto->new(); + } + + $self->action_edit(); +} + + +sub action_search { + my ($self) = @_; + + my $url = 'ct.pl?action=search&db='. ($self->is_vendor() ? 'vendor' : 'customer'); + + if ( $::form->{callback} ) { + $url .= '&callback='. $::from->escape($::form->{callback}); + } + + print $::form->redirect_header($url); +} + + +sub action_search_contact { + my ($self) = @_; + + my $url = 'ct.pl?action=search_contact&db=customer'; + + if ( $::form->{callback} ) { + $url .= '&callback='. $::from->escape($::form->{callback}); + } + + print $::form->redirect_header($url); +} + + +sub action_get_delivery { + my ($self) = @_; + + my $dbh = $::form->get_standard_dbh(); + + my ($arap, $db, $qty_sign); + if ( $self->is_vendor() ) { + $arap = 'ap'; + $db = 'vendor'; + $qty_sign = ' * -1 AS qty'; + } else { + $arap = 'ar'; + $db = 'customer'; + $qty_sign = ''; + } + + my $where = ' WHERE 1=1 '; + my @values; + + if ( !$self->is_vendor() && $::form->{shipto_id} && $::form->{shipto_id} ne 'all' ) { + $where .= "AND ${arap}.shipto_id = ?"; + push(@values, $::form->{shipto_id}); + } + + if ( $::form->{delivery_from} ) { + $where .= "AND ${arap}.transdate >= ?"; + push(@values, conv_date($::form->{delivery_from})); + } + + if ( $::form->{delivery_to} ) { + $where .= "AND ${arap}.transdate <= ?"; + push(@values, conv_date($::form->{delivery_to})); + } + + my $query = + "SELECT + s.shiptoname, + i.qty ${qty_sign}, + ${arap}.id, + ${arap}.transdate, + ${arap}.invnumber, + ${arap}.ordnumber, + i.description, + i.unit, + i.sellprice, + oe.id AS oe_id, + invoice + FROM ${arap} + + LEFT JOIN shipto s + ON ". ($arap eq 'ar' ? '(ar.shipto_id = s.shipto_id) ' : '(ap.id = s.trans_id) ') ." + + LEFT JOIN invoice i + ON ${arap}.id = i.trans_id + + LEFT JOIN parts p + ON p.id = i.parts_id + + LEFT JOIN oe + ON (oe.ordnumber = ${arap}.ordnumber AND NOT ${arap}.ordnumber = '') + + ${where} + ORDER BY ${arap}.transdate DESC LIMIT 15"; + + $self->{delivery} = selectall_hashref_query($::form, $dbh, $query, @values); + + $self->render('customer_vendor/get_delivery', { layout => 0 }); +} + +sub action_ajaj_get_shipto { + my ($self) = @_; + + my $data = { + map( + { + my $name = 'shipto'. $_; + $name => $self->{shipto}->$name; + } + qw(_id name department_1 department_2 street zipcode city country contact phone fax email) + ) + }; + + $self->render(\SL::JSON::to_json($data), { type => 'json', process => 0 }); +} + +sub action_ajaj_get_contact { + my ($self) = @_; + + my $data; + + $data->{contact} = { + map( + { + my $name = 'cp_'. $_; + + if ( $_ eq 'birthday' && $self->{contact}->$name ) { + $name => $self->{contact}->$name->to_lxoffice; + } else { + $name => $self->{contact}->$name; + } + } + qw( + id gender abteilung title position givenname name email phone1 phone2 fax mobile1 mobile2 + satphone satfax project street zipcode city privatphone privatemail birthday + ) + ) + }; + + $data->{contact_cvars} = { + map( + { + if ( $_->config->type eq 'number' ) { + $_->config->name => $::form->format_amount(\%::myconfig, $_->value, -2); + } else { + $_->config->name => $_->value; + } + } + grep( + { $_->is_valid; } + @{$self->{contact}->cvars_by_config} + ) + ) + }; + + $self->render(\SL::JSON::to_json($data), { type => 'json', process => 0 }); +} + +sub action_ajaj_customer_autocomplete { + my ($self, %params) = @_; + + my $limit = $::form->{limit} || 20; + my $type = $::form->{type} || {}; + my $query = { ilike => '%'. $::form->{term} .'%' }; + + my @filter; + push( + @filter, + $::form->{column} ? ($::form->{column} => $query) : (or => [ customernumber => $query, name => $query ]) + ); + + my $customers = SL::DB::Manager::Customer->get_all(query => [ @filter ], limit => $limit); + my $value_col = $::form->{column} || 'name'; + + my $data = [ + map( + { + { + value => $_->can($value_col)->($_), + label => $_->displayable_name, + id => $_->id, + customernumber => $_->customernumber, + name => $_->name, + } + } + @{$customers} + ) + ]; + + $self->render(\SL::JSON::to_json($data), { layout => 0, type => 'json' }); +} + +sub is_vendor { + return $::form->{db} eq 'vendor'; +} + +sub is_customer { + return $::form->{db} eq 'customer'; +} + +sub is_orphaned { + my ($self) = @_; + + if ( defined($self->{_is_orphaned}) ) { + return $self->{_is_orphaned}; + } + + my $arap = $self->is_vendor ? 'ap' : 'ar'; + my $num_args = 2; + + my $cv = $self->is_vendor ? 'vendor' : 'customer'; + + my $query = + 'SELECT a.id + FROM '. $arap .' AS a + JOIN '. $cv .' ct ON (a.'. $cv .'_id = ct.id) + WHERE ct.id = ? + + UNION + + SELECT a.id + FROM oe a + JOIN '. $cv .' ct ON (a.'. $cv .'_id = ct.id) + WHERE ct.id = ?'; + + + if ( $self->is_vendor ) { + $query .= + ' UNION + SELECT 1 FROM makemodel mm WHERE mm.make = ?'; + $num_args++; + } + + my ($dummy) = selectrow_query($::form, $::form->get_standard_dbh(), $query, (conv_i($self->{cv}->id)) x $num_args); + + return $self->{_is_orphaned} = !$dummy; +} + +sub _instantiate_args { + my ($self) = @_; + + my $curr_employee = SL::DB::Manager::Employee->current; + + if ( $::form->{cv}->{id} ) { + if ( $self->is_vendor() ) { + $self->{cv} = SL::DB::Vendor->new(id => $::form->{cv}->{id})->load(); + } else { + $self->{cv} = SL::DB::Customer->new(id => $::form->{cv}->{id})->load(); + } + } else { + if ( $self->is_vendor() ) { + $self->{cv} = SL::DB::Vendor->new(); + } else { + $self->{cv} = SL::DB::Customer->new(); + } + } + $self->{cv}->assign_attributes(%{$::form->{cv}}); + + foreach my $cvar (@{$self->{cv}->cvars_by_config()}) { + my $value = $::form->{cv_cvars}->{$cvar->config->name}; + + if ( $cvar->config->type eq 'number' ) { + $value = $::form->parse_amount(\%::myconfig, $value); + } + + $cvar->value($value); + } + + if ( $::form->{note}->{id} ) { + $self->{note} = SL::DB::Note->new(id => $::form->{note}->{id})->load(); + } else { + $self->{note} = SL::DB::Note->new(); + } + $self->{note}->assign_attributes(%{$::form->{note}}); + $self->{note}->created_by($curr_employee->id); + $self->{note}->trans_module('ct'); + + $self->{note_followup} = SL::DB::FollowUp->new(); + $self->{note_followup}->assign_attributes(%{$::form->{note_followup}}); + $self->{note_followup}->note($self->{note}); + $self->{note_followup}->created_by($curr_employee->id); + + if ( $::form->{shipto}->{shipto_id} ) { + $self->{shipto} = SL::DB::Shipto->new(shipto_id => $::form->{shipto}->{shipto_id})->load(); + } else { + $self->{shipto} = SL::DB::Shipto->new(); + } + $self->{shipto}->assign_attributes(%{$::form->{shipto}}); + $self->{shipto}->module('CT'); + + if ( $::form->{contact}->{cp_id} ) { + $self->{contact} = SL::DB::Contact->new(cp_id => $::form->{contact}->{cp_id})->load(); + } else { + $self->{contact} = SL::DB::Contact->new(); + } + $self->{contact}->assign_attributes(%{$::form->{contact}}); + + foreach my $cvar (@{$self->{contact}->cvars_by_config()}) { + my $value = $::form->{contact_cvars}->{$cvar->config->name}; + + if ( $cvar->config->type eq 'number' ) { + $value = $::form->parse_amount(\%::myconfig, $value); + } + + $cvar->value($value); + } +} + +sub _load_customer_vendor { + my ($self) = @_; + + if ( $self->is_vendor() ) { + $self->{cv} = SL::DB::Vendor->new(id => $::form->{id})->load(); + } else { + $self->{cv} = SL::DB::Customer->new(id => $::form->{id})->load(); + } + + $self->{note} = SL::DB::Note->new(); + $self->{note_followup} = SL::DB::FollowUp->new(); + + if ( $::form->{shipto_id} ) { + $self->{shipto} = SL::DB::Shipto->new(shipto_id => $::form->{shipto_id})->load(); + + if ( $self->{shipto}->trans_id != $self->{cv}->id ) { + die($::locale->text('Error')); + } + } else { + $self->{shipto} = SL::DB::Shipto->new(); + } + + if ( $::form->{contact_id} ) { + $self->{contact} = SL::DB::Contact->new(cp_id => $::form->{contact_id})->load(); + + if ( $self->{contact}->cp_cv_id != $self->{cv}->id ) { + die($::locale->text('Error')); + } + } else { + $self->{contact} = SL::DB::Contact->new(); + } +} + +sub _create_customer_vendor { + my ($self) = @_; + + if ( $self->is_vendor() ) { + $self->{cv} = SL::DB::Vendor->new(); + } else { + $self->{cv} = SL::DB::Customer->new(); + } + + $self->{note} = SL::DB::Note->new(); + + $self->{note_followup} = SL::DB::FollowUp->new(); + + $self->{shipto} = SL::DB::Shipto->new(); + + $self->{contact} = SL::DB::Contact->new(); +} + +sub _pre_render { + my ($self) = @_; + + $self->{template_args}->{conf_vertreter} = $::instance_conf->get_vertreter(); + + my $dbh = $::form->get_standard_dbh(); + + my $query; + + $self->{all_business} = SL::DB::Manager::Business->get_all(); + + $self->{all_employees} = SL::DB::Manager::Employee->get_all(query => [ deleted => 0 ]); + + $query = + 'SELECT DISTINCT(greeting) + FROM customer + WHERE greeting IS NOT NULL AND greeting != \'\' + UNION + SELECT DISTINCT(greeting) + FROM vendor + WHERE greeting IS NOT NULL AND greeting != \'\' + ORDER BY greeting'; + $self->{all_greetings} = [ + map( + { $_->{greeting}; } + selectall_hashref_query($::form, $dbh, $query) + ) + ]; + + $query = + 'SELECT DISTINCT(cp_title) AS title + FROM contacts + WHERE cp_title IS NOT NULL AND cp_title != \'\' + ORDER BY cp_title'; + $self->{all_titles} = [ + map( + { $_->{title}; } + selectall_hashref_query($::form, $dbh, $query) + ) + ]; + + $self->{all_currencies} = SL::DB::Manager::Currency->get_all(); + + $self->{all_languages} = SL::DB::Manager::Language->get_all(); + + $self->{all_taxzones} = SL::DB::Manager::TaxZone->get_all(); + + if ( $::instance_conf->get_vertreter() ) { + $query = + 'SELECT id + FROM business + WHERE salesman'; + my $business_ids = [ + map( + { $_->{id}; } + selectall_hashref_query($::form, $dbh, $query) + ) + ]; + + if ( $business_ids->[0] ) { + $self->{all_salesman_customers} = SL::DB::Manager::Customer->get_all(query => [business_id => $business_ids]); + } else { + $self->{all_salesman_customers} = []; + } + } else { + $self->{all_salesmen} = SL::DB::Manager::Employee->get_all(query => [ or => [ id => $self->{cv}->salesman_id, deleted => 0 ] ]); + } + + $self->{all_payment_terms} = SL::DB::Manager::PaymentTerm->get_all(); + + $self->{all_pricegroups} = SL::DB::Manager::Pricegroup->get_all(); + + $query = + 'SELECT DISTINCT(cp_abteilung) AS department + FROM contacts + WHERE cp_abteilung IS NOT NULL AND cp_abteilung != \'\' + ORDER BY cp_abteilung'; + $self->{all_departments} = [ + map( + { $_->{department}; } + selectall_hashref_query($::form, $dbh, $query) + ) + ]; + + $self->{contacts} = $self->{cv}->contacts; + $self->{contacts} ||= []; + + $self->{shiptos} = $self->{cv}->shipto; + $self->{shiptos} ||= []; + + $self->{template_args} ||= {}; + + $::request->{layout}->add_javascripts('autocomplete_customer.js'); + $::request->{layout}->add_javascripts('kivi.CustomerVendor.js'); +} + +1; diff --git a/SL/Controller/DeliveryPlan.pm b/SL/Controller/DeliveryPlan.pm index 00adfc9f5..b8ee1c41d 100644 --- a/SL/Controller/DeliveryPlan.pm +++ b/SL/Controller/DeliveryPlan.pm @@ -228,7 +228,7 @@ sub link_to { } if ($object->isa('SL::DB::Customer')) { my $id = $object->id; - return "ct.pl?action=$action&id=$id&db=customer"; + return "controller.pl?action=CustomerVendor/$action&id=$id&db=customer"; } } diff --git a/SL/Controller/Inventory.pm b/SL/Controller/Inventory.pm index ba208c437..f894e06db 100644 --- a/SL/Controller/Inventory.pm +++ b/SL/Controller/Inventory.pm @@ -28,6 +28,7 @@ __PACKAGE__->run_before('load_unit_from_form', only => [ qw(stock_in part_chan __PACKAGE__->run_before('load_wh_from_form', only => [ qw(stock_in warehouse_changed stock) ]); __PACKAGE__->run_before('load_bin_from_form', only => [ qw(stock_in stock) ]); __PACKAGE__->run_before('set_target_from_part', only => [ qw(part_changed) ]); +__PACKAGE__->run_before('mini_stock', only => [ qw(stock_in mini_stock) ]); __PACKAGE__->run_before('sanitize_target', only => [ qw(stock_in warehouse_changed part_changed) ]); __PACKAGE__->run_before('set_layout'); @@ -70,6 +71,7 @@ sub action_stock { part_id => $self->part->id, bin_id => $self->bin->id, warehouse_id => $self->warehouse->id, + unit_id => $self->unit->id, ); } @@ -104,22 +106,11 @@ sub action_warehouse_changed { sub action_mini_stock { my ($self) = @_; - my $stock = $self->part->get_simple_stock; - my $stock_by_bin = { map { $_->{bin_id} => $_ } @$stock }; - my $stock_empty = ! grep { $_->{sum} * 1 } @$stock; - $self->js - ->html('#stock', $self->render('inventory/_stock', { output => 0 }, stock => $stock_by_bin, stock_empty => $stock_empty )) + ->html('#stock', $self->render('inventory/_stock', { output => 0 })) ->render($self); } -sub action_last_journal { - my ($self) = @_; - -# my $jounal = $self->journal; - -} - #================================================================ sub _check_auth { @@ -215,7 +206,8 @@ sub mini_journal { my $query = 'SELECT trans_id, max(itime) FROM inventory GROUP BY trans_id ORDER BY max(itime) DESC LIMIT 10'; my @ids = selectall_array_query($::form, $::form->get_standard_dbh, $query); - my $objs = SL::DB::Manager::Inventory->get_all(query => [ trans_id => \@ids ]); + my $objs; + $objs = SL::DB::Manager::Inventory->get_all(query => [ trans_id => \@ids ]) if @ids; # at most 2 of them belong to a transaction and the qty determins in or out. # sort them for display @@ -230,6 +222,14 @@ sub mini_journal { return \@sorted; } +sub mini_stock { + my ($self) = @_; + + my $stock = $self->part->get_simple_stock; + $self->{stock_by_bin} = { map { $_->{bin_id} => $_ } @$stock }; + $self->{stock_empty} = ! grep { $_->{sum} * 1 } @$stock; +} + sub show_no_warehouse_error { my ($self) = @_; diff --git a/SL/Controller/LoginScreen.pm b/SL/Controller/LoginScreen.pm index ba1098439..e84a31505 100644 --- a/SL/Controller/LoginScreen.pm +++ b/SL/Controller/LoginScreen.pm @@ -129,6 +129,19 @@ sub _redirect_to_main_script_if_already_logged_in { my %user = $::auth->read_user(login => $login); return if ($user{login} || '') ne $login; + # Check if there's a client set in the session -- and whether or not + # the user still has access to the client. + my $client_id = $::auth->get_session_value('client_id'); + return if !$client_id; + + if (!$::auth->set_client($client_id)) { + $::auth->punish_wrong_login; + $::auth->destroy_session; + $::auth->create_or_refresh_session; + $self->show_login_form(error => t8('Incorrect username or password or no access to selected client!')); + return 1; + } + # Check if the session is logged in correctly. return if SL::Auth::OK() != $::auth->authenticate($login, undef); diff --git a/SL/Controller/SellPriceInformation.pm b/SL/Controller/SellPriceInformation.pm index f31f53e28..8e0c52d86 100644 --- a/SL/Controller/SellPriceInformation.pm +++ b/SL/Controller/SellPriceInformation.pm @@ -141,7 +141,7 @@ sub link_to { } if ($object->isa('SL::DB::Customer')) { my $id = $object->id; - return "ct.pl?action=$action&id=$id&db=customer"; + return "controller.pl?action=CustomerVendor/$action&id=$id&db=customer"; } } diff --git a/SL/DB/CustomVariable.pm b/SL/DB/CustomVariable.pm index 09718de65..60955e40f 100644 --- a/SL/DB/CustomVariable.pm +++ b/SL/DB/CustomVariable.pm @@ -4,7 +4,6 @@ package SL::DB::CustomVariable; use strict; - use SL::DB::MetaSetup::CustomVariable; __PACKAGE__->meta->initialize; @@ -19,7 +18,27 @@ sub value { goto &bool_value if $type eq 'boolean'; goto ×tamp_value if $type eq 'timestamp'; goto &number_value if $type eq 'number'; + if ( $type eq 'customer' ) { + if ( defined($_[1]) && $_[1] ) { + goto &number_value; + } + else { + require SL::DB::Customer; + + my $id = int($self->number_value); + return $id ? SL::DB::Customer->new(id => $id)->load() : 0; + } + } goto &text_value; # text and select } +sub is_valid { + my ($self) = @_; + + require SL::DB::CustomVariableValidity; + + my $query = [config_id => $self->config_id, trans_id => $self->trans_id]; + return SL::DB::Manager::CustomVariableValidity->get_all_count(query => $query) == 0; +} + 1; diff --git a/SL/DB/CustomVariableConfig.pm b/SL/DB/CustomVariableConfig.pm index fd247d827..203f83a90 100644 --- a/SL/DB/CustomVariableConfig.pm +++ b/SL/DB/CustomVariableConfig.pm @@ -25,4 +25,66 @@ sub validate { return @errors; } +use constant OPTION_DEFAULTS => + { + MAXLENGTH => 75, + WIDTH => 30, + HEIGHT => 5, + }; + +sub processed_options { + my ($self) = @_; + + if( exists($self->{processed_options_cache}) ) { + return $self->{processed_options_cache}; + } + + my $ops = $self->options; + my $ret; + + if ( $self->type eq 'select' ) { + my @op_array = split('##', $ops); + $ret = \@op_array; + } + else { + $ret = {%{$self->OPTION_DEFAULTS}}; + while ( $ops =~ /\s*([^=\s]+)\s*=\s*([^\s]*)(?:\s*|$)/g ) { + $ret->{$1} = $2; + } + } + + $self->{processed_options_cache} = $ret; + + return $ret; +} + +sub processed_flags { + my ($self) = @_; + + if( exists($self->{processed_flags_cache}) ) { + return $self->{processed_flags_cache}; + } + + my $flags = $self->flags; + my $ret; + + foreach my $flag (split m/:/, $flags) { + if ( $flag =~ m/(.*?)=(.*)/ ) { + $ret->{$1} = $2; + } else { + $ret->{$flag} = 1; + } + } + + $self->{processed_flags_cache} = $ret; + + return $ret; +} + +sub has_flag { + my ($self, $flag) = @_; + + return $self->processed_flags()->{$flag}; +} + 1; diff --git a/SL/DB/Helper/CustomVariables.pm b/SL/DB/Helper/CustomVariables.pm index df90aa73b..3c43624db 100644 --- a/SL/DB/Helper/CustomVariables.pm +++ b/SL/DB/Helper/CustomVariables.pm @@ -78,7 +78,19 @@ sub make_cvar_by_configs { my $cvars = $self->custom_variables; my %cvars_by_config = map { $_->config_id => $_ } @$cvars; - my @return = map { $cvars_by_config{$_->id} || _new_cvar($self, %params, config => $_) } @$configs; + my @return = map( + { + if ( $cvars_by_config{$_->id} ) { + $cvars_by_config{$_->id}; + } + else { + my $cvar = _new_cvar($self, %params, config => $_); + $self->add_custom_variables($cvar); + $cvar; + } + } + @$configs + ); return \@return; } diff --git a/SL/DB/Manager/AuthClient.pm b/SL/DB/Manager/AuthClient.pm index ccfb97eff..c5b45de95 100644 --- a/SL/DB/Manager/AuthClient.pm +++ b/SL/DB/Manager/AuthClient.pm @@ -17,4 +17,8 @@ sub _sort_spec { columns => { SIMPLE => 'ALL' } ); } +sub get_default { + return $_[0]->get_first(where => [ is_default => 1 ]); +} + 1; diff --git a/SL/DB/Note.pm b/SL/DB/Note.pm index 82c577602..441a2731e 100644 --- a/SL/DB/Note.pm +++ b/SL/DB/Note.pm @@ -12,4 +12,12 @@ __PACKAGE__->meta->initialize; # Creates get_all, get_all_count, get_all_iterator, delete_all and update_all. __PACKAGE__->meta->make_manager_class; +__PACKAGE__->meta->add_relationships( + followup => { + type => 'one to one', + class => 'SL::DB::FollowUp', + column_map => { id => 'id' }, + }, +); + 1; diff --git a/SL/FU.pm b/SL/FU.pm index a005c1814..8131a2cea 100644 --- a/SL/FU.pm +++ b/SL/FU.pm @@ -314,13 +314,13 @@ sub link_details { if ($params{trans_type} eq 'customer') { $link = { - 'url' => 'ct.pl?action=edit&db=customer&id=' . $form->quote($params{trans_id}) . '&edit_note_id=' . $form->quote($params{note_id}), + 'url' => 'controller.pl?action=CustomerVendor/edit&db=customer&id=' . $form->quote($params{trans_id}) . '&edit_note_id=' . $form->quote($params{note_id}), 'title' => $locale->text('Customer') . " '$params{trans_info}'", }; } elsif ($params{trans_type} eq 'vendor') { $link = { - 'url' => 'ct.pl?action=edit&type=sales_quotation&id=' . $params{trans_id} . '&edit_note_id=' . $form->quote($params{note_id}), + 'url' => 'controller.pl?action=CustomerVendor/edit&type=sales_quotation&id=' . $params{trans_id} . '&edit_note_id=' . $form->quote($params{note_id}), 'title' => $locale->text('Vendor') . " '$params{trans_info}'", }; diff --git a/SL/Form.pm b/SL/Form.pm index b18bc67b5..39bd9a578 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -465,7 +465,7 @@ sub header { # this should gradually move to the layouts that need it $layout->use_stylesheet("$_.css") for qw( main menu list_accounts jquery.autocomplete - jquery.multiselect2side frame_header/header + jquery.multiselect2side ui-lightness/jquery-ui jquery-ui.custom jqModal ); diff --git a/SL/InstanceConfiguration.pm b/SL/InstanceConfiguration.pm index 13c4d1c5e..699568993 100644 --- a/SL/InstanceConfiguration.pm +++ b/SL/InstanceConfiguration.pm @@ -4,10 +4,11 @@ use strict; use Carp; use SL::DBUtils (); +use SL::System::Process; use parent qw(Rose::Object); use Rose::Object::MakeMethods::Generic ( - 'scalar --get_set_init' => [ qw(data currencies default_currency _table_currencies_exists) ], + 'scalar --get_set_init' => [ qw(data currencies default_currency _table_currencies_exists crm_installed) ], ); sub init_data { @@ -34,6 +35,10 @@ sub init_default_currency { return (SL::DBUtils::selectfirst_array_query($::form, $::form->get_standard_dbh, qq|SELECT name FROM currencies WHERE id = ?|, $self->data->{currency_id}))[0]; } +sub crm_installed { + return -f (SL::System::Process->exe_dir . '/crm/Changelog'); +} + sub reload { my ($self) = @_; @@ -93,9 +98,9 @@ C<$::instance_conf>. Creates a new instance. Does not read the configuration. -=item C +=item C -Reads the configuration from the database. Returns C<$self>. +Returns trueish if the CRM component is installed. =item C diff --git a/SL/Layout/Admin.pm b/SL/Layout/Admin.pm index 00e312540..8b75c89ea 100644 --- a/SL/Layout/Admin.pm +++ b/SL/Layout/Admin.pm @@ -1,18 +1,32 @@ package SL::Layout::Admin; use strict; -use parent qw(SL::Layout::Base); +use parent qw(SL::Layout::V3); -sub init_sub_layouts { - [ SL::Layout::None->new ] +use SL::Menu; + +use Rose::Object::MakeMethods::Generic ( + scalar => [ qw(no_menu) ], +); + + +sub init_menu { + Menu->new('menus/admin.ini'); } sub start_content { "
\n"; } -sub end_content { - "
\n"; +sub render { + my ($self) = @_; + + $self->presenter->render( + 'menu/menuv3', + force_ul_width => 1, + skip_frame_header => 1, + menu => $self->no_menu ? '' : $self->print_menu, + ); } 1; diff --git a/SL/Layout/Base.pm b/SL/Layout/Base.pm index 2212f718e..7932aff5b 100644 --- a/SL/Layout/Base.pm +++ b/SL/Layout/Base.pm @@ -29,7 +29,9 @@ sub new { } sub init_menu { - Menu->new('menu.ini'); + my @menu_files = qw(menus/erp.ini); + unshift @menu_files, 'menus/crm.ini' if $::instance_conf->crm_installed; + Menu->new(@menu_files); } sub init_auto_reload_resources_param { @@ -327,4 +329,3 @@ None yet, if you don't count the horrible stylesheet/javascript interface. Sven Schöling Es.schoeling@linet-services.deE =cut - diff --git a/SL/Layout/Javascript.pm b/SL/Layout/Javascript.pm index b08cf6dcc..93704bee2 100644 --- a/SL/Layout/Javascript.pm +++ b/SL/Layout/Javascript.pm @@ -34,6 +34,7 @@ sub stylesheets { $_[0]->add_stylesheets(qw( dhtmlsuite/menu-item.css dhtmlsuite/menu-bar.css + frame_header/header.css menu.css )); $_[0]->SUPER::stylesheets; diff --git a/SL/Layout/V3.pm b/SL/Layout/V3.pm index ed7733cb3..f37eea49c 100644 --- a/SL/Layout/V3.pm +++ b/SL/Layout/V3.pm @@ -146,7 +146,7 @@ sub use_javascript { } sub pre_content { - &render; + $_[0]->render; } sub start_content { diff --git a/SL/Menu.pm b/SL/Menu.pm index 0fb1b1a95..06ea6ee43 100644 --- a/SL/Menu.pm +++ b/SL/Menu.pm @@ -42,14 +42,19 @@ use strict; sub new { $main::lxdebug->enter_sub(); - my ($type, $menufile) = @_; + my ($type, @menufiles) = @_; + my $self = bless {}, $type; - my $self = {}; - my $inifile = Inifile->new($menufile); + my @order; - map { $self->{$_} = $inifile->{$_} } keys %{ $inifile }; + foreach my $menufile (grep { -f } @menufiles) { + my $inifile = Inifile->new($menufile); - bless $self, $type; + push @order, @{ delete($inifile->{ORDER}) || [] }; + $self->{$_} = $inifile->{$_} for keys %{ $inifile }; + } + + $self->{ORDER} = \@order; $self->set_access(); diff --git a/SL/Presenter/CustomerVendor.pm b/SL/Presenter/CustomerVendor.pm index 077c376c8..6d24409d2 100644 --- a/SL/Presenter/CustomerVendor.pm +++ b/SL/Presenter/CustomerVendor.pm @@ -27,7 +27,7 @@ sub _customer_vendor { croak "Unknown display type '$params{display}'" unless $params{display} =~ m/^(?:inline|table-cell)$/; my $text = join '', ( - $params{no_link} ? '' : '', + $params{no_link} ? '' : '', $self->escape($cv->name), $params{no_link} ? '' : '', ); diff --git a/SL/Template/Plugin/JavaScript.pm b/SL/Template/Plugin/JavaScript.pm index 241ea0ea3..16989e9a2 100644 --- a/SL/Template/Plugin/JavaScript.pm +++ b/SL/Template/Plugin/JavaScript.pm @@ -17,13 +17,23 @@ sub new { # public interface # +# see ecmascript spec section 7.8.4 +my @escape_chars = ('\\', '\'', '"'); +my %control_chars = ( + "\n" => 'n', + "\t" => 't', + "\r" => 'r', + "\f" => 'f', + "\x08" => 'b', + "\x0B" => 'v', # noone uses vertical tab anyway... +); +my $re = join '', map { qr/($_)/s } join '|', keys(%control_chars), map { "\Q$_\E" } @escape_chars; + sub escape { my $self = shift; my $text = shift; - $text =~ s|\\|\\\\|g; - $text =~ s|\"|\\\"|g; - $text =~ s|\n|\\n|g; + $text =~ s/$re/'\\' . ($control_chars{$1} || $1)/egs; return $text; } diff --git a/bin/mozilla/ct.pl b/bin/mozilla/ct.pl index 4291871da..59e7dbb1e 100644 --- a/bin/mozilla/ct.pl +++ b/bin/mozilla/ct.pl @@ -270,7 +270,7 @@ sub list_names { $previous_id = $ref->{id}; map { $row->{$_}->{data} = $ref->{$_} } @columns; - $row->{name}->{link} = build_std_url('action=edit', 'id=' . E($ref->{id}), 'callback', @hidden_nondefault); + $row->{name}->{link} = build_std_url('script=controller.pl', 'action=CustomerVendor/edit', 'id=' . E($ref->{id}), 'callback', @hidden_nondefault); $row->{email}->{link} = 'mailto:' . E($ref->{email}); } diff --git a/bin/mozilla/wh.pl b/bin/mozilla/wh.pl index b8cda2b2c..15f58fc5d 100644 --- a/bin/mozilla/wh.pl +++ b/bin/mozilla/wh.pl @@ -829,6 +829,22 @@ sub generate_report { # filter stuff map { $filter{$_} = $form->{$_} if ($form->{$_}) } qw(warehouse_id bin_id partnumber description chargenumber bestbefore date include_invalid_warehouses); + # show filter stuff also in report + my @options; + # dispatch all options + my $dispatch_options = { + partnumber => sub { push @options, $locale->text('Partnumber') . " : $form->{partnumber}"}, + description => sub { push @options, $locale->text('Description') . " : $form->{description}"}, + chargenumber => sub { push @options, $locale->text('Charge Number') . " : $form->{chargenumber}"}, + bestbefore => sub { push @options, $locale->text('Best Before') . " : $form->{bestbefore}"}, + date => sub { push @options, $locale->text('Date') . " : $form->{date}"}, + include_invalid_warehouses => sub { push @options, $locale->text('Include invalid warehouses ')}, + }; + foreach (keys %filter) { + defined $dispatch_options->{$_} && $dispatch_options->{$_}->(); + } + # / end show filter stuff also in report + $filter{qty_op} = WH->convert_qty_op($form->{qty_op}); if ($filter{qty_op}) { $form->isblank("qty", $locale->text('Quantity missing.')); @@ -872,7 +888,8 @@ sub generate_report { $report->set_sort_indicator($sort_col, $form->{order}); - $report->set_options('output_format' => 'HTML', + $report->set_options('top_info_text' => join("\n", @options), + 'output_format' => 'HTML', 'title' => $form->{title}, 'attachment_basename' => strftime($locale->text('warehouse_report_list') . '_%Y%m%d', localtime time)); $report->set_options_from_form(); diff --git a/doc/changelog b/doc/changelog index c8ed51289..5de8b4293 100644 --- a/doc/changelog +++ b/doc/changelog @@ -61,6 +61,8 @@ Kleinere neue Features und Detailverbesserungen: - Offene Forderungen / Verbindlichkeiten Stichtagsbezogene Auswahl korrekt mit Fälligkeit verrechnet +- Lagerbestand anzeigen, zeigt auch die Filteroptionen an + - #1897 implementiert. Zukunfts-Buchungen verhindern, durch einen konfigurierbaren maximalen Zeitraum in dem in die Zukunft gebucht werden darf (default 360 Tage) diff --git a/image/icons/16x16/CRM--Add--Customer.png b/image/icons/16x16/CRM--Add--Customer.png new file mode 100644 index 000000000..09d4ec728 Binary files /dev/null and b/image/icons/16x16/CRM--Add--Customer.png differ diff --git a/image/icons/16x16/CRM--Add--Person.png b/image/icons/16x16/CRM--Add--Person.png new file mode 100644 index 000000000..4605a141e Binary files /dev/null and b/image/icons/16x16/CRM--Add--Person.png differ diff --git a/image/icons/16x16/CRM--Add--Vendor.png b/image/icons/16x16/CRM--Add--Vendor.png new file mode 100644 index 000000000..8aac5049d Binary files /dev/null and b/image/icons/16x16/CRM--Add--Vendor.png differ diff --git a/image/icons/16x16/CRM--Admin--Benutzer.png b/image/icons/16x16/CRM--Admin--Benutzer.png deleted file mode 100644 index f44429ab8..000000000 Binary files a/image/icons/16x16/CRM--Admin--Benutzer.png and /dev/null differ diff --git a/image/icons/16x16/CRM--Admin--Document Template.png b/image/icons/16x16/CRM--Admin--Document Template.png new file mode 100644 index 000000000..2d2ddc09a Binary files /dev/null and b/image/icons/16x16/CRM--Admin--Document Template.png differ diff --git a/image/icons/16x16/CRM--Admin--Dokumentvorlage.png b/image/icons/16x16/CRM--Admin--Dokumentvorlage.png deleted file mode 100644 index 2d2ddc09a..000000000 Binary files a/image/icons/16x16/CRM--Admin--Dokumentvorlage.png and /dev/null differ diff --git a/image/icons/16x16/CRM--Admin--Etiketten.png b/image/icons/16x16/CRM--Admin--Etiketten.png deleted file mode 100644 index 9f1e78454..000000000 Binary files a/image/icons/16x16/CRM--Admin--Etiketten.png and /dev/null differ diff --git a/image/icons/16x16/CRM--Admin--Gruppen.png b/image/icons/16x16/CRM--Admin--Gruppen.png deleted file mode 100644 index e7e9735b5..000000000 Binary files a/image/icons/16x16/CRM--Admin--Gruppen.png and /dev/null differ diff --git a/image/icons/16x16/CRM--Admin--Label.png b/image/icons/16x16/CRM--Admin--Label.png new file mode 100644 index 000000000..9f1e78454 Binary files /dev/null and b/image/icons/16x16/CRM--Admin--Label.png differ diff --git a/image/icons/16x16/CRM--Admin--Message.png b/image/icons/16x16/CRM--Admin--Message.png new file mode 100644 index 000000000..c26531f08 Binary files /dev/null and b/image/icons/16x16/CRM--Admin--Message.png differ diff --git a/image/icons/16x16/CRM--Admin--Mitteilungen.png b/image/icons/16x16/CRM--Admin--Mitteilungen.png deleted file mode 100644 index c26531f08..000000000 Binary files a/image/icons/16x16/CRM--Admin--Mitteilungen.png and /dev/null differ diff --git a/image/icons/16x16/CRM--Admin--User Groups.png b/image/icons/16x16/CRM--Admin--User Groups.png new file mode 100644 index 000000000..e7e9735b5 Binary files /dev/null and b/image/icons/16x16/CRM--Admin--User Groups.png differ diff --git a/image/icons/16x16/CRM--Admin--User.png b/image/icons/16x16/CRM--Admin--User.png new file mode 100644 index 000000000..f44429ab8 Binary files /dev/null and b/image/icons/16x16/CRM--Admin--User.png differ diff --git a/image/icons/16x16/CRM--Appointments.png b/image/icons/16x16/CRM--Appointments.png new file mode 100644 index 000000000..8e05dd2c4 Binary files /dev/null and b/image/icons/16x16/CRM--Appointments.png differ diff --git a/image/icons/16x16/CRM--Auftragschance.png b/image/icons/16x16/CRM--Auftragschance.png deleted file mode 100644 index 4bd6383af..000000000 Binary files a/image/icons/16x16/CRM--Auftragschance.png and /dev/null differ diff --git a/image/icons/16x16/CRM--E-mail.png b/image/icons/16x16/CRM--E-mail.png new file mode 100644 index 000000000..8bbabc03e Binary files /dev/null and b/image/icons/16x16/CRM--E-mail.png differ diff --git a/image/icons/16x16/CRM--Follow-Up.png b/image/icons/16x16/CRM--Follow-Up.png new file mode 100644 index 000000000..391b25d07 Binary files /dev/null and b/image/icons/16x16/CRM--Follow-Up.png differ diff --git a/image/icons/16x16/CRM--Help.png b/image/icons/16x16/CRM--Help.png new file mode 100644 index 000000000..3fec0b37b Binary files /dev/null and b/image/icons/16x16/CRM--Help.png differ diff --git a/image/icons/16x16/CRM--Hilfe.png b/image/icons/16x16/CRM--Hilfe.png deleted file mode 100644 index 3fec0b37b..000000000 Binary files a/image/icons/16x16/CRM--Hilfe.png and /dev/null differ diff --git a/image/icons/16x16/CRM--Knowledge.png b/image/icons/16x16/CRM--Knowledge.png new file mode 100644 index 000000000..b6a5edc22 Binary files /dev/null and b/image/icons/16x16/CRM--Knowledge.png differ diff --git a/image/icons/16x16/CRM--Kunden.png b/image/icons/16x16/CRM--Kunden.png deleted file mode 100644 index 09d4ec728..000000000 Binary files a/image/icons/16x16/CRM--Kunden.png and /dev/null differ diff --git a/image/icons/16x16/CRM--Lieferant.png b/image/icons/16x16/CRM--Lieferant.png deleted file mode 100644 index 8aac5049d..000000000 Binary files a/image/icons/16x16/CRM--Lieferant.png and /dev/null differ diff --git a/image/icons/16x16/CRM--Memo.png b/image/icons/16x16/CRM--Memo.png new file mode 100644 index 000000000..70c046f2f Binary files /dev/null and b/image/icons/16x16/CRM--Memo.png differ diff --git a/image/icons/16x16/CRM--Notizen.png b/image/icons/16x16/CRM--Notizen.png deleted file mode 100644 index 70c046f2f..000000000 Binary files a/image/icons/16x16/CRM--Notizen.png and /dev/null differ diff --git a/image/icons/16x16/CRM--Opportunity.png b/image/icons/16x16/CRM--Opportunity.png new file mode 100644 index 000000000..4bd6383af Binary files /dev/null and b/image/icons/16x16/CRM--Opportunity.png differ diff --git a/image/icons/16x16/CRM--Personen.png b/image/icons/16x16/CRM--Personen.png deleted file mode 100644 index 4605a141e..000000000 Binary files a/image/icons/16x16/CRM--Personen.png and /dev/null differ diff --git a/image/icons/16x16/CRM--Schnellsuche.png b/image/icons/16x16/CRM--Schnellsuche.png deleted file mode 100644 index cf459184f..000000000 Binary files a/image/icons/16x16/CRM--Schnellsuche.png and /dev/null differ diff --git a/image/icons/16x16/CRM--Search.png b/image/icons/16x16/CRM--Search.png new file mode 100644 index 000000000..cf459184f Binary files /dev/null and b/image/icons/16x16/CRM--Search.png differ diff --git a/image/icons/16x16/CRM--Termine.png b/image/icons/16x16/CRM--Termine.png deleted file mode 100644 index 8e05dd2c4..000000000 Binary files a/image/icons/16x16/CRM--Termine.png and /dev/null differ diff --git a/image/icons/16x16/CRM--Wiedervorlage.png b/image/icons/16x16/CRM--Wiedervorlage.png deleted file mode 100644 index 391b25d07..000000000 Binary files a/image/icons/16x16/CRM--Wiedervorlage.png and /dev/null differ diff --git a/image/icons/16x16/CRM--Wissens-DB.png b/image/icons/16x16/CRM--Wissens-DB.png deleted file mode 100644 index b6a5edc22..000000000 Binary files a/image/icons/16x16/CRM--Wissens-DB.png and /dev/null differ diff --git a/image/icons/16x16/CRM--eMail.png b/image/icons/16x16/CRM--eMail.png deleted file mode 100644 index 8bbabc03e..000000000 Binary files a/image/icons/16x16/CRM--eMail.png and /dev/null differ diff --git a/image/icons/24x24/CRM--Add--Customer.png b/image/icons/24x24/CRM--Add--Customer.png new file mode 100644 index 000000000..644a6f545 Binary files /dev/null and b/image/icons/24x24/CRM--Add--Customer.png differ diff --git a/image/icons/24x24/CRM--Add--Person.png b/image/icons/24x24/CRM--Add--Person.png new file mode 100644 index 000000000..b0a9b1968 Binary files /dev/null and b/image/icons/24x24/CRM--Add--Person.png differ diff --git a/image/icons/24x24/CRM--Add--Vendor.png b/image/icons/24x24/CRM--Add--Vendor.png new file mode 100644 index 000000000..40b1ce0fa Binary files /dev/null and b/image/icons/24x24/CRM--Add--Vendor.png differ diff --git a/image/icons/24x24/CRM--Admin--Benutzer.png b/image/icons/24x24/CRM--Admin--Benutzer.png deleted file mode 100644 index bfd6bc48f..000000000 Binary files a/image/icons/24x24/CRM--Admin--Benutzer.png and /dev/null differ diff --git a/image/icons/24x24/CRM--Admin--Document Template.png b/image/icons/24x24/CRM--Admin--Document Template.png new file mode 100644 index 000000000..a5ee5ab0e Binary files /dev/null and b/image/icons/24x24/CRM--Admin--Document Template.png differ diff --git a/image/icons/24x24/CRM--Admin--Dokumentvorlage.png b/image/icons/24x24/CRM--Admin--Dokumentvorlage.png deleted file mode 100644 index a5ee5ab0e..000000000 Binary files a/image/icons/24x24/CRM--Admin--Dokumentvorlage.png and /dev/null differ diff --git a/image/icons/24x24/CRM--Admin--Etiketten.png b/image/icons/24x24/CRM--Admin--Etiketten.png deleted file mode 100644 index 5164bba92..000000000 Binary files a/image/icons/24x24/CRM--Admin--Etiketten.png and /dev/null differ diff --git a/image/icons/24x24/CRM--Admin--Gruppen.png b/image/icons/24x24/CRM--Admin--Gruppen.png deleted file mode 100644 index b7875dc8f..000000000 Binary files a/image/icons/24x24/CRM--Admin--Gruppen.png and /dev/null differ diff --git a/image/icons/24x24/CRM--Admin--Label.png b/image/icons/24x24/CRM--Admin--Label.png new file mode 100644 index 000000000..5164bba92 Binary files /dev/null and b/image/icons/24x24/CRM--Admin--Label.png differ diff --git a/image/icons/24x24/CRM--Admin--Message.png b/image/icons/24x24/CRM--Admin--Message.png new file mode 100644 index 000000000..bb8920f73 Binary files /dev/null and b/image/icons/24x24/CRM--Admin--Message.png differ diff --git a/image/icons/24x24/CRM--Admin--Mitteilungen.png b/image/icons/24x24/CRM--Admin--Mitteilungen.png deleted file mode 100644 index bb8920f73..000000000 Binary files a/image/icons/24x24/CRM--Admin--Mitteilungen.png and /dev/null differ diff --git a/image/icons/24x24/CRM--Admin--User Groups.png b/image/icons/24x24/CRM--Admin--User Groups.png new file mode 100644 index 000000000..b7875dc8f Binary files /dev/null and b/image/icons/24x24/CRM--Admin--User Groups.png differ diff --git a/image/icons/24x24/CRM--Admin--User.png b/image/icons/24x24/CRM--Admin--User.png new file mode 100644 index 000000000..bfd6bc48f Binary files /dev/null and b/image/icons/24x24/CRM--Admin--User.png differ diff --git a/image/icons/24x24/CRM--Appointments.png b/image/icons/24x24/CRM--Appointments.png new file mode 100644 index 000000000..9d4a78a09 Binary files /dev/null and b/image/icons/24x24/CRM--Appointments.png differ diff --git a/image/icons/24x24/CRM--Auftragschance.png b/image/icons/24x24/CRM--Auftragschance.png deleted file mode 100644 index 61202dd99..000000000 Binary files a/image/icons/24x24/CRM--Auftragschance.png and /dev/null differ diff --git a/image/icons/24x24/CRM--Follow-Up.png b/image/icons/24x24/CRM--Follow-Up.png new file mode 100644 index 000000000..bab2a92a7 Binary files /dev/null and b/image/icons/24x24/CRM--Follow-Up.png differ diff --git a/image/icons/24x24/CRM--Help.png b/image/icons/24x24/CRM--Help.png new file mode 100644 index 000000000..e42ab4433 Binary files /dev/null and b/image/icons/24x24/CRM--Help.png differ diff --git a/image/icons/24x24/CRM--Hilfe.png b/image/icons/24x24/CRM--Hilfe.png deleted file mode 100644 index e42ab4433..000000000 Binary files a/image/icons/24x24/CRM--Hilfe.png and /dev/null differ diff --git a/image/icons/24x24/CRM--Knowledge.png b/image/icons/24x24/CRM--Knowledge.png new file mode 100644 index 000000000..ab43942a7 Binary files /dev/null and b/image/icons/24x24/CRM--Knowledge.png differ diff --git a/image/icons/24x24/CRM--Kunden.png b/image/icons/24x24/CRM--Kunden.png deleted file mode 100644 index 644a6f545..000000000 Binary files a/image/icons/24x24/CRM--Kunden.png and /dev/null differ diff --git a/image/icons/24x24/CRM--Lieferant.png b/image/icons/24x24/CRM--Lieferant.png deleted file mode 100644 index 40b1ce0fa..000000000 Binary files a/image/icons/24x24/CRM--Lieferant.png and /dev/null differ diff --git a/image/icons/24x24/CRM--Memo.png b/image/icons/24x24/CRM--Memo.png new file mode 100644 index 000000000..e19987aa8 Binary files /dev/null and b/image/icons/24x24/CRM--Memo.png differ diff --git a/image/icons/24x24/CRM--Notizen.png b/image/icons/24x24/CRM--Notizen.png deleted file mode 100644 index e19987aa8..000000000 Binary files a/image/icons/24x24/CRM--Notizen.png and /dev/null differ diff --git a/image/icons/24x24/CRM--Opportunity.png b/image/icons/24x24/CRM--Opportunity.png new file mode 100644 index 000000000..61202dd99 Binary files /dev/null and b/image/icons/24x24/CRM--Opportunity.png differ diff --git a/image/icons/24x24/CRM--Personen.png b/image/icons/24x24/CRM--Personen.png deleted file mode 100644 index b0a9b1968..000000000 Binary files a/image/icons/24x24/CRM--Personen.png and /dev/null differ diff --git a/image/icons/24x24/CRM--Schnellsuche.png b/image/icons/24x24/CRM--Schnellsuche.png deleted file mode 100644 index c9018317c..000000000 Binary files a/image/icons/24x24/CRM--Schnellsuche.png and /dev/null differ diff --git a/image/icons/24x24/CRM--Search.png b/image/icons/24x24/CRM--Search.png new file mode 100644 index 000000000..c9018317c Binary files /dev/null and b/image/icons/24x24/CRM--Search.png differ diff --git a/image/icons/24x24/CRM--Termine.png b/image/icons/24x24/CRM--Termine.png deleted file mode 100644 index 9d4a78a09..000000000 Binary files a/image/icons/24x24/CRM--Termine.png and /dev/null differ diff --git a/image/icons/24x24/CRM--Wiedervorlage.png b/image/icons/24x24/CRM--Wiedervorlage.png deleted file mode 100644 index bab2a92a7..000000000 Binary files a/image/icons/24x24/CRM--Wiedervorlage.png and /dev/null differ diff --git a/image/icons/24x24/CRM--Wissens-DB.png b/image/icons/24x24/CRM--Wissens-DB.png deleted file mode 100644 index ab43942a7..000000000 Binary files a/image/icons/24x24/CRM--Wissens-DB.png and /dev/null differ diff --git a/image/icons/32x32/CRM--Add--Customer.png b/image/icons/32x32/CRM--Add--Customer.png new file mode 100644 index 000000000..19b4390a0 Binary files /dev/null and b/image/icons/32x32/CRM--Add--Customer.png differ diff --git a/image/icons/32x32/CRM--Add--Person.png b/image/icons/32x32/CRM--Add--Person.png new file mode 100644 index 000000000..f197c867f Binary files /dev/null and b/image/icons/32x32/CRM--Add--Person.png differ diff --git a/image/icons/32x32/CRM--Add--Vendor.png b/image/icons/32x32/CRM--Add--Vendor.png new file mode 100644 index 000000000..70cb91085 Binary files /dev/null and b/image/icons/32x32/CRM--Add--Vendor.png differ diff --git a/image/icons/32x32/CRM--Admin--Benutzer.png b/image/icons/32x32/CRM--Admin--Benutzer.png deleted file mode 100644 index 60e6685f9..000000000 Binary files a/image/icons/32x32/CRM--Admin--Benutzer.png and /dev/null differ diff --git a/image/icons/32x32/CRM--Admin--Document Template.png b/image/icons/32x32/CRM--Admin--Document Template.png new file mode 100644 index 000000000..a38f0dce1 Binary files /dev/null and b/image/icons/32x32/CRM--Admin--Document Template.png differ diff --git a/image/icons/32x32/CRM--Admin--Dokumentvorlage.png b/image/icons/32x32/CRM--Admin--Dokumentvorlage.png deleted file mode 100644 index a38f0dce1..000000000 Binary files a/image/icons/32x32/CRM--Admin--Dokumentvorlage.png and /dev/null differ diff --git a/image/icons/32x32/CRM--Admin--Etiketten.png b/image/icons/32x32/CRM--Admin--Etiketten.png deleted file mode 100644 index 443782b83..000000000 Binary files a/image/icons/32x32/CRM--Admin--Etiketten.png and /dev/null differ diff --git a/image/icons/32x32/CRM--Admin--Gruppen.png b/image/icons/32x32/CRM--Admin--Gruppen.png deleted file mode 100644 index 0523718a7..000000000 Binary files a/image/icons/32x32/CRM--Admin--Gruppen.png and /dev/null differ diff --git a/image/icons/32x32/CRM--Admin--Label.png b/image/icons/32x32/CRM--Admin--Label.png new file mode 100644 index 000000000..443782b83 Binary files /dev/null and b/image/icons/32x32/CRM--Admin--Label.png differ diff --git a/image/icons/32x32/CRM--Admin--Message.png b/image/icons/32x32/CRM--Admin--Message.png new file mode 100644 index 000000000..f4855589a Binary files /dev/null and b/image/icons/32x32/CRM--Admin--Message.png differ diff --git a/image/icons/32x32/CRM--Admin--Mitteilungen.png b/image/icons/32x32/CRM--Admin--Mitteilungen.png deleted file mode 100644 index f4855589a..000000000 Binary files a/image/icons/32x32/CRM--Admin--Mitteilungen.png and /dev/null differ diff --git a/image/icons/32x32/CRM--Admin--User Groups.png b/image/icons/32x32/CRM--Admin--User Groups.png new file mode 100644 index 000000000..0523718a7 Binary files /dev/null and b/image/icons/32x32/CRM--Admin--User Groups.png differ diff --git a/image/icons/32x32/CRM--Admin--User.png b/image/icons/32x32/CRM--Admin--User.png new file mode 100644 index 000000000..60e6685f9 Binary files /dev/null and b/image/icons/32x32/CRM--Admin--User.png differ diff --git a/image/icons/32x32/CRM--Appointments.png b/image/icons/32x32/CRM--Appointments.png new file mode 100644 index 000000000..fb78e1e42 Binary files /dev/null and b/image/icons/32x32/CRM--Appointments.png differ diff --git a/image/icons/32x32/CRM--Auftragschance.png b/image/icons/32x32/CRM--Auftragschance.png deleted file mode 100644 index e9a45945a..000000000 Binary files a/image/icons/32x32/CRM--Auftragschance.png and /dev/null differ diff --git a/image/icons/32x32/CRM--Follow-Up.png b/image/icons/32x32/CRM--Follow-Up.png new file mode 100644 index 000000000..68ad6fbf7 Binary files /dev/null and b/image/icons/32x32/CRM--Follow-Up.png differ diff --git a/image/icons/32x32/CRM--Help.png b/image/icons/32x32/CRM--Help.png new file mode 100644 index 000000000..0b398876f Binary files /dev/null and b/image/icons/32x32/CRM--Help.png differ diff --git a/image/icons/32x32/CRM--Hilfe.png b/image/icons/32x32/CRM--Hilfe.png deleted file mode 100644 index 0b398876f..000000000 Binary files a/image/icons/32x32/CRM--Hilfe.png and /dev/null differ diff --git a/image/icons/32x32/CRM--Knowledge.png b/image/icons/32x32/CRM--Knowledge.png new file mode 100644 index 000000000..fe582b9cc Binary files /dev/null and b/image/icons/32x32/CRM--Knowledge.png differ diff --git a/image/icons/32x32/CRM--Kunden.png b/image/icons/32x32/CRM--Kunden.png deleted file mode 100644 index 19b4390a0..000000000 Binary files a/image/icons/32x32/CRM--Kunden.png and /dev/null differ diff --git a/image/icons/32x32/CRM--Lieferant.png b/image/icons/32x32/CRM--Lieferant.png deleted file mode 100644 index 70cb91085..000000000 Binary files a/image/icons/32x32/CRM--Lieferant.png and /dev/null differ diff --git a/image/icons/32x32/CRM--Memo.png b/image/icons/32x32/CRM--Memo.png new file mode 100644 index 000000000..a838a7b47 Binary files /dev/null and b/image/icons/32x32/CRM--Memo.png differ diff --git a/image/icons/32x32/CRM--Notizen.png b/image/icons/32x32/CRM--Notizen.png deleted file mode 100644 index a838a7b47..000000000 Binary files a/image/icons/32x32/CRM--Notizen.png and /dev/null differ diff --git a/image/icons/32x32/CRM--Opportunity.png b/image/icons/32x32/CRM--Opportunity.png new file mode 100644 index 000000000..e9a45945a Binary files /dev/null and b/image/icons/32x32/CRM--Opportunity.png differ diff --git a/image/icons/32x32/CRM--Personen.png b/image/icons/32x32/CRM--Personen.png deleted file mode 100644 index f197c867f..000000000 Binary files a/image/icons/32x32/CRM--Personen.png and /dev/null differ diff --git a/image/icons/32x32/CRM--Schnellsuche.png b/image/icons/32x32/CRM--Schnellsuche.png deleted file mode 100644 index 8db93f830..000000000 Binary files a/image/icons/32x32/CRM--Schnellsuche.png and /dev/null differ diff --git a/image/icons/32x32/CRM--Search.png b/image/icons/32x32/CRM--Search.png new file mode 100644 index 000000000..8db93f830 Binary files /dev/null and b/image/icons/32x32/CRM--Search.png differ diff --git a/image/icons/32x32/CRM--Termine.png b/image/icons/32x32/CRM--Termine.png deleted file mode 100644 index fb78e1e42..000000000 Binary files a/image/icons/32x32/CRM--Termine.png and /dev/null differ diff --git a/image/icons/32x32/CRM--Wiedervorlage.png b/image/icons/32x32/CRM--Wiedervorlage.png deleted file mode 100644 index 68ad6fbf7..000000000 Binary files a/image/icons/32x32/CRM--Wiedervorlage.png and /dev/null differ diff --git a/image/icons/32x32/CRM--Wissens-DB.png b/image/icons/32x32/CRM--Wissens-DB.png deleted file mode 100644 index fe582b9cc..000000000 Binary files a/image/icons/32x32/CRM--Wissens-DB.png and /dev/null differ diff --git a/js/autocomplete_customer.js b/js/autocomplete_customer.js index 64394556a..9359ee536 100644 --- a/js/autocomplete_customer.js +++ b/js/autocomplete_customer.js @@ -4,7 +4,7 @@ $(function(){ $(dummy).autocomplete({ source: function(req, rsp) { $.ajax({ - url: 'controller.pl?action=Customer/ajax_autocomplete', + url: 'controller.pl?action=CustomerVendor/ajaj_customer_autocomplete', dataType: "json", data: { term: req.term, @@ -21,5 +21,5 @@ $(function(){ $(dummy).val(ui.item.name); }, }); - }) -}) + }); +}); diff --git a/js/autocomplete_part.js b/js/autocomplete_part.js index 0a4886f17..b89751e3b 100644 --- a/js/autocomplete_part.js +++ b/js/autocomplete_part.js @@ -26,7 +26,9 @@ namespace('kivi', function(k){ var state = STATES.PICKED; var last_real = $real.val(); var last_dummy = $dummy.val(); - var open_dialog = function(){ + var timer; + + function open_dialog () { open_jqm_window({ url: 'controller.pl?action=Part/part_picker_search', data: $.extend({ @@ -34,8 +36,9 @@ namespace('kivi', function(k){ }, ajax_data($dummy.val())), id: 'part_selection', }); + window.clearTimeout(timer); return true; - }; + } function ajax_data(term) { var data = { @@ -89,6 +92,11 @@ namespace('kivi', function(k){ }); }; + function result_timer (event) { + window.clearTimeout(timer); + timer = window.setTimeout(update_results, 100); + } + function close_popup() { $('#part_selection').jqmClose() }; @@ -156,7 +164,10 @@ namespace('kivi', function(k){ } }); -// $dummy.blur(make_defined_state); // blur triggers also on open_jqm_dialog + $dummy.blur(function(){ + window.clearTimeout(timer); + timer = window.setTimeout(make_defined_state, 100); + }); // now add a picker div after the original input var pcont = $('').addClass('position-absolute'); @@ -173,6 +184,7 @@ namespace('kivi', function(k){ convertible_unit: function() { return $convertible_unit }, column: function() { return $column }, update_results: update_results, + result_timer: result_timer, set_item: set_item, reset: make_defined_state, init_results: function () { diff --git a/js/common.js b/js/common.js index 71f1d3104..904448d35 100644 --- a/js/common.js +++ b/js/common.js @@ -187,7 +187,23 @@ function open_jqm_window(params) { $(document).ready(function () { // initialize all jQuery UI tab elements: - $(".tabwidget").each(function(idx, element) { $(element).tabs(); }); + $(".tabwidget").each(function(idx, element) { + var $element = $(element); + var tabsParams = {}; + + var elementId = $element.attr('id'); + if( elementId ) { + var cookieName = 'jquery_ui_tab_'+ elementId; + + tabsParams.active = $.cookie(cookieName); + tabsParams.activate = function(event, ui) { + var i = ui.newTab.parent().children().index(ui.newTab); + $.cookie(cookieName, i); + }; + } + + $element.tabs(tabsParams); + }); $('input').focus(function(){ if (focussable(this)) window.focused_element = this; diff --git a/js/kivi.CustomerVendor.js b/js/kivi.CustomerVendor.js new file mode 100644 index 000000000..aed7081b3 --- /dev/null +++ b/js/kivi.CustomerVendor.js @@ -0,0 +1,170 @@ +namespace('kivi.CustomerVendor', function(ns) { + + this.selectShipto = function(params) { + var shiptoId = $('#shipto_shipto_id').val(); + + if( shiptoId ) { + var url = 'controller.pl?action=CustomerVendor/ajaj_get_shipto&id='+ $('#cv_id').val() +'&db='+ $('#db').val() +'&shipto_id='+ shiptoId; + + $.getJSON(url, function(data) { + for(var key in data) + $(document.getElementById('shipto_'+ key)).val(data[key]); + + $('#action_delete_shipto').show(); + + if( params.onFormSet ) + params.onFormSet(); + }); + } + else { + $('#shipto :input').not(':button, :submit, :reset, :hidden').val(''); + + $('#action_delete_shipto').hide(); + + if( params.onFormSet ) + params.onFormSet(); + } + }; + + this.selectDelivery = function(fromDate, toDate) { + var deliveryId = $('#delivery_id').val(); + + if( !deliveryId ) + $("#delivery").empty(); + else { + var url = 'controller.pl?action=CustomerVendor/get_delivery&id='+ $('#cv_id').val() +'&db='+ $('#db').val() +'&shipto_id='+ $('#delivery_id').val(); + + if( fromDate && toDate ) + url += '&delivery_from='+ fromDate +'&delivery_to='+ toDate; + + $('#delivery').load(url); + } + }; + + this.selectContact = function(params) { + var contactId = $('#contact_cp_id').val(); + + if( contactId ) { + var url = 'controller.pl?action=CustomerVendor/ajaj_get_contact&id='+ $('#cv_id').val() +'&db='+ $('#db').val() +'&contact_id='+ contactId; + + $.getJSON(url, function(data) { + var contact = data.contact; + for(var key in contact) + $(document.getElementById('contact_'+ key)).val(contact[key]) + + var cvars = data.contact_cvars; + for(var key in cvars) + $(document.getElementById('contact_cvar_'+ key)).val(cvars[key]); + + $('#action_delete_contact').show(); + + if( params.onFormSet ) + params.onFormSet(); + }); + } + else { + $('#contacts :input').not(':button, :submit, :reset, :hidden').val('').removeAttr('checked').removeAttr('selected'); + + $('#action_delete_contact').hide(); + + if( params.onFormSet ) + params.onFormSet(); + } + + $('#contact_cp_title_select, #contact_cp_abteilung_select').val(''); + }; + + var mapSearchStmts = [ + '#street', + ', ', + '#zipcode', + ' ', + '#city', + ', ', + '#country' + ]; + + this.MapWidget = function(prefix) + { + var $mapSearchElements = []; + var $widgetWrapper; + + var init = function() { + if( $mapSearchElements.length > 0 ) + return; + + for(var i in mapSearchStmts) { + var stmt = mapSearchStmts[i]; + if( stmt.charAt(0) == '#' ) { + var $elem = $('#'+ prefix + stmt.substring(1)); + if( $elem ) + $mapSearchElements.push($elem); + } + } + }; + + var isNotEmpty = function() { + for(var i in $mapSearchElements) + if( $mapSearchElements[i].val() == '' ) + return false; + return true; + }; + + var showMap = function() { + var searchString = ""; + + for(var i in mapSearchStmts) { + var stmt = mapSearchStmts[i]; + if( stmt.charAt(0) == '#' ) { + var val = $('#'+ prefix + stmt.substring(1)).val(); + if( val ) + searchString += val; + } + else + searchString += stmt; + } + + var url = 'https://maps.google.com/maps?q='+ encodeURIComponent(searchString); + + window.open(url, '_blank'); + window.focus(); + }; + + var render = function(widgetWrapper) { + init(); + + $widgetWrapper = $(widgetWrapper); + + $widgetWrapper + .html(''+ kivi.t8(') + .click(function() { + showMap(); + }); + for(var i in $mapSearchElements) + $mapSearchElements[i].keyup(function() { + testInputs(); + }); + this.testInputs(); + }; + + var testInputs = function() { + init(); + + if( isNotEmpty() ) + $widgetWrapper.show(); + else + $widgetWrapper.hide(); + }; + + this.render = render; + this.testInputs = testInputs; + }; + + this.showHistoryWindow = function(id) { + var xPos = (screen.width - 800) / 2; + var yPos = (screen.height - 500) / 2; + var parm = "left="+ xPos +",top="+ yPos +",width=800,height=500,status=yes,scrollbars=yes"; + var url = "common.pl?INPUT_ENCODING=UTF-8&action=show_history&longdescription=&input_name="+ encodeURIComponent(id); + window.open(url, "_new_generic", parm); + }; +}); diff --git a/js/locale/de.js b/js/locale/de.js index 0d45d3094..883ac6b60 100644 --- a/js/locale/de.js +++ b/js/locale/de.js @@ -1,5 +1,6 @@ namespace("kivi").setupLocale({ "Are you sure?":"Sind Sie sicher?", +"Map":"Karte", "The description is missing.":"Die Beschreibung fehlt.", "The name is missing.":"Der Name fehlt.", "The name must only consist of letters, numbers and underscores and start with a letter.":"Der Name darf nur aus Buchstaben (keine Umlaute), Ziffern und Unterstrichen bestehen und muss mit einem Buchstaben beginnen.", diff --git a/locale/de/all b/locale/de/all index 272da98e3..e922e14d3 100755 --- a/locale/de/all +++ b/locale/de/all @@ -113,7 +113,6 @@ $self->{texts} = { 'Accounting method' => 'Versteuerungsart', 'Accrual' => 'Soll-Versteuerung', 'Accrual accounting' => 'Soll-Versteuerung', - 'Actions' => 'Aktionen', 'Active' => 'Aktiv', 'Active?' => 'Aktiviert?', 'Add' => 'Erfassen', @@ -138,9 +137,11 @@ $self->{texts} = { 'Add Group' => 'Warengruppe erfassen', 'Add Language' => 'Sprache hinzufügen', 'Add Lead' => 'Kundenquelle erfassen', + 'Add Machine' => 'Maschine erfassen', 'Add Part' => 'Ware erfassen', 'Add Price Factor' => 'Preisfaktor erfassen', 'Add Pricegroup' => 'Preisgruppe erfassen', + 'Add Printer' => 'Drucker hinzufügen', 'Add Project' => 'Projekt erfassen', 'Add Purchase Delivery Order' => 'Lieferschein (Einkauf) erfassen', 'Add Purchase Order' => 'Lieferantenauftrag erfassen', @@ -151,6 +152,7 @@ $self->{texts} = { 'Add Sales Invoice' => 'Rechnung erfassen', 'Add Sales Order' => 'Auftrag erfassen', 'Add Service' => 'Dienstleistung erfassen', + 'Add Service Contract' => 'Wartungsvertrag erfassen', 'Add Storno Credit Note' => 'Gutschrift Storno hinzufügen', 'Add Transaction' => 'Dialogbuchen', 'Add User' => 'Neuer Benutzer', @@ -166,9 +168,9 @@ $self->{texts} = { 'Add new currency' => 'Neue Währung hinzufügen', 'Add new custom variable' => 'Neue benutzerdefinierte Variable erfassen', 'Add note' => 'Notiz erfassen', - 'Add printer' => 'Drucker hinzufügen', 'Add unit' => 'Einheit hinzufügen', 'Address' => 'Adresse', + 'Admin' => 'Administration', 'Administration' => 'Administration', 'Administration area' => 'Administration', 'Advance turnover tax return' => 'Umsatzsteuervoranmeldung', @@ -206,6 +208,8 @@ $self->{texts} = { 'Apply to all parts' => 'Bei allen Artikeln setzen', 'Apply to parts without buchungsgruppe' => 'Bei allen Artikeln ohne gültige Buchungsgruppe setzen', 'Applying #1:' => 'Führe #1 aus:', + 'Appointment Category' => 'Termin Kategorie', + 'Appointments' => 'Termine', 'Approximately #1 prices will be updated.' => 'Ungefähr #1 Preise werden aktualisiert.', 'Apr' => 'Apr', 'April' => 'April', @@ -335,6 +339,7 @@ $self->{texts} = { 'CB Transaction' => 'SB-Buchung', 'CB Transactions' => 'SB-Buchungen', 'CR' => 'H', + 'CRM' => 'CRM', 'CRM admin' => 'Administration', 'CRM create customers, vendors and contacts' => 'Erfassen (Kunden, Lieferanten, Personen)', 'CRM follow up' => 'Wiedervorlage', @@ -344,7 +349,7 @@ $self->{texts} = { 'CRM optional software' => 'CRM optionale Software', 'CRM other' => 'alles Andere', 'CRM search' => 'Adresssuche', - 'CRM send email' => 'eMail', + 'CRM send email' => 'E-Mail', 'CRM services' => 'Dienstleistung', 'CRM status' => 'Admin Status', 'CRM termin' => 'Termine', @@ -585,6 +590,7 @@ $self->{texts} = { 'DATEX - Export Assistent' => 'DATEV-Exportassistent', 'DELETED' => 'Gelöscht', 'DFV-Kennzeichen' => 'DFV-Kennzeichen', + 'DHL' => 'DHL', 'DR' => 'S', 'DUNNING STARTED' => 'Mahnprozess gestartet', 'DUNS number' => 'DUNS-Nummer', @@ -594,8 +600,10 @@ $self->{texts} = { 'Database Connection Test' => 'Test der Datenbankverbindung', 'Database Host' => 'Datenbankcomputer', 'Database ID' => 'Datenbank-ID', + 'Database Management' => 'Datenbankadministration', 'Database User' => 'Datenbankbenutzer', 'Database host and port' => 'Datenbankhost und -port', + 'Database login (#1)' => 'Datenbankanmeldung (#1)', 'Database name' => 'Datenbankname', 'Database settings' => 'Datenbankeinstellungen', 'Database template' => 'Datenbankvorlage', @@ -707,8 +715,10 @@ $self->{texts} = { 'Do you want to store the existing onhand values into a new warehouse?' => 'Möchten Sie die vorhandenen Mengendaten in ein Lager übertragen?', 'Document' => 'Dokument', 'Document Project Number' => 'Projektnummer des Belegs', + 'Document Template' => 'Dokumentvorlage', 'Documentation' => 'Dokumentation', 'Documentation (in German)' => 'Dokumentation', + 'Documents' => 'Dokumente', 'Documents in the WebDAV repository' => 'Dokumente im WebDAV-Repository', 'Done' => 'Fertig', 'Double partnumbers' => 'Doppelte Artikelnummern', @@ -739,8 +749,8 @@ $self->{texts} = { 'Duplicate in CSV file' => 'Duplikat in CSV-Datei', 'Duplicate in database' => 'Duplikat in Datenbank', 'During the next update a taxkey 0 with tax rate of 0 will automatically created.' => 'Beim nächsten Ausführen des Updates wird ein Steuerschlüssel 0 mit einem Steuersatz von 0% automatisch erzeugt.', - 'E-mail' => 'eMail', - 'E-mail Statement to' => 'Fälligkeitsabrechnung als eMail an', + 'E-mail' => 'E-Mail', + 'E-mail Statement to' => 'Fälligkeitsabrechnung als E-Mail an', 'E-mail address missing!' => 'E-Mail-Adresse fehlt!', 'EAN' => 'EAN', 'EAN-Code' => 'EAN-Code', @@ -860,6 +870,7 @@ $self->{texts} = { 'Ertrag' => 'Ertrag', 'Ertrag prozentual' => 'Ertrag prozentual', 'Escape character' => 'Escape-Zeichen', + 'Everyone can log in.' => 'Alle können sich anmelden.', 'Exact' => 'Genau', 'Example: http://kivitendo.de' => 'Beispiel: http://kivitendo.de', 'Excel' => 'Excel', @@ -997,6 +1008,7 @@ $self->{texts} = { 'Help Template Variables' => 'Hilfe zu Dokumenten-Variablen', 'Help on column names' => 'Hilfe zu Spaltennamen', 'Here' => 'Hier', + 'Here you only provide the credentials for logging into the database.' => 'Hier geben Sie nur die Logindaten für die Anmeldung an der Datenbank ein.', 'Here\'s an example command line:' => 'Hier ist eine Kommandozeile, die als Beispiel dient:', 'Hide Filter' => 'Filter verbergen', 'Hide by default' => 'Standardmäßig verstecken', @@ -1024,6 +1036,7 @@ $self->{texts} = { 'If the default transfer out always succeed use this bin for negative stock quantity.' => 'Standardlagerplatz für Auslagern ohne Prüfung auf Bestand', 'If you enter values for the part number and / or part description then only those bins containing parts whose part number or part description match your input will be shown.' => 'Wenn Sie für die Artikelnummer und / oder die Beschreibung etwas eingeben, so werden nur die Lagerplätze angezeigt, in denen Waren eingelagert sind, die Ihre Suchbegriffe enthalten.', 'If you have not chosen for example the category revenue for a tax and you choose an revenue account to create a transfer in the general ledger, this tax will not be displayed in the tax dropdown.' => 'Wenn Sie z.B. die Kategory Erlös für eine Steuer nicht gewählt haben und ein Erlöskonto beim Erstellen einer Dialogbuchung wählen, wird diese Steuer auch nicht im Dropdown-Menü für die Steuern angezeigt.', + 'If you lock the system normal users won\'t be able to log in.' => 'Wenn Sie das System sperren, so werden sich normale Benutzer nicht mehr anmelden können.', 'If you see this message, you most likely just setup your LX-Office and haven\'t added any entry types. If this is the case, the option is accessible for administrators in the System menu.' => 'Wenn Sie diese Meldung sehen haben Sie wahrscheinlich ein frisches LX-Office Setup und noch keine Buchungsgruppen eingerichtet. Ein Administrator kann dies im Systemmenü erledigen.', 'If you select a base unit then you also have to enter a factor.' => 'Wenn Sie eine Basiseinheit auswählen, dann müssen Sie auch einen Faktor eingeben.', 'If you want to change any of these parameters then press the "Back" button, edit the file "config/kivitendo.conf" and login into the admin module again.' => 'Wenn Sie einen der Parameter ändern wollen, so drücken Sie auf den "Zurück"-Button, bearbeiten Sie die Datei "config/kivitendo.conf", und melden Sie sich erneut im Administrationsbereich an.', @@ -1130,11 +1143,13 @@ $self->{texts} = { 'KNE-Export erfolgreich!' => 'KNE-Export erfolgreich!', 'KNr. beim Kunden' => 'KNr. beim Kunden', 'Keine Suchergebnisse gefunden!' => 'Keine Suchergebnisse gefunden!', + 'Knowledge' => 'Wissen', 'Konten' => 'Konten', 'L' => 'L', 'LIABILITIES' => 'PASSIVA', 'LP' => 'LP', 'LaTeX Templates' => 'LaTeX-Vorlagen', + 'Label' => 'Etikett', 'Landscape' => 'Querformat', 'Language' => 'Sprache', 'Language (database ID)' => 'Sprache (Datenbank-ID)', @@ -1178,7 +1193,9 @@ $self->{texts} = { 'List Accounts' => 'Konten anzeigen', 'List Languages' => 'Sprachen anzeigen', 'List Price' => 'Listenpreis', + 'List Printers' => 'Drucker anzeigen', 'List Transactions' => 'Buchungsliste', + 'List Users, Clients and User Groups' => 'Benutzer, Mandanten und Benutzergruppen anzeigen', 'List current background jobs' => 'Aktuelle Hintergrund-Jobs anzeigen', 'List export' => 'Export anzeigen', 'List of bank accounts' => 'Liste der Bankkonten', @@ -1191,6 +1208,7 @@ $self->{texts} = { 'Loading...' => 'Wird geladen...', 'Local Tax Office Preferences' => 'Angaben zum Finanzamt', 'Lock System' => 'System sperren', + 'Lock and unlock installation' => 'Installation sperren/entsperren', 'Lock file handling failed. Please verify that the directory "#1" is writeable by the webserver.' => 'Die Lockdateibehandlung schlug fehl. Bitte stellen Sie sicher, dass der Webserver das Verzeichnis "#1" beschreiben darf.', 'Lockfile created!' => 'System gesperrt!', 'Lockfile removed!' => 'System entsperrt!', @@ -1203,6 +1221,7 @@ $self->{texts} = { 'Long Description' => 'Langtext', 'MAILED' => 'Gesendet', 'MD' => 'PT', + 'Machine' => 'Maschine', 'Main Preferences' => 'Grundeinstellungen', 'Main sorting' => 'Hauptsortierung', 'Make' => 'Lieferant', @@ -1230,7 +1249,7 @@ $self->{texts} = { 'Maximum future booking interval' => 'Maximale Anzahl von Tagen an denen Buchungen in der Zukunft erlaubt sind.', 'May' => 'Mai', 'May ' => 'Mai', - 'May set the BCC field when sending emails' => 'Beim Verschicken von Emails das Feld \'BCC\' setzen', + 'May set the BCC field when sending emails' => 'Beim Verschicken von E-Mails das Feld \'BCC\' setzen', 'Meaning' => 'Bedeutung', 'Medium Number' => 'Datenträgernummer', 'Memo' => 'Memo', @@ -1331,6 +1350,7 @@ $self->{texts} = { 'No warehouse has been created yet or the quantity of the bins is not configured yet.' => 'Es wurde noch kein Lager angelegt, bzw. die dazugehörigen Lagerplätze sind noch nicht konfiguriert.', 'No.' => 'Position', 'None' => 'Kein', + 'Normal users cannot log in.' => 'Normale Benutzer können sich nicht anmelden.', 'Not Discountable' => 'Nicht rabattierfähig', 'Not delivered' => 'Nicht geliefert', 'Not done yet' => 'Noch nicht fertig', @@ -1346,6 +1366,7 @@ $self->{texts} = { 'Nothing has been selected for transfer.' => 'Es wurde nichts zum Umlagern ausgewählt.', 'Nothing selected!' => 'Es wurde nichts ausgewählt!', 'Nothing stocked yet.' => 'Noch nichts eingelagert.', + 'Nothing will be created or deleted at this stage!' => 'In diesem Schritt wird nichts angelegt oder gelöscht!', 'Nov' => 'Nov', 'November' => 'November', 'Number' => 'Nummer', @@ -1382,6 +1403,7 @@ $self->{texts} = { 'Open this Website' => 'Homepage in neuem Fenster öffnen', 'OpenDocument/OASIS' => 'OpenDocument/OASIS', 'Openings' => 'Öffnungszeiten', + 'Opportunity' => 'Auftragschance', 'Optional comment' => 'Optionaler Kommentar', 'Options' => 'Optionen', 'Or download the whole Installation Documentation as PDF (350kB) for off-line study (currently in German Language): ' => 'Oder laden Sie die komplette Installationsbeschreibung als PDF (350kB) herunter: ', @@ -1468,8 +1490,8 @@ $self->{texts} = { 'Periodic invoices inactive' => 'Wiederkehrende Rechnungen inaktiv', 'Periodicity' => 'Periodizität', 'Perpetual inventory' => 'Bestandsmethode', + 'Person' => 'Person', 'Personal settings' => 'Persönliche Einstellungen', - 'Pg Database Administration' => 'Datenbankadministration', 'Phone' => 'Telefon', 'Phone1' => 'Telefon 1 ', 'Phone2' => 'Telefon 2', @@ -1559,7 +1581,7 @@ $self->{texts} = { 'Printer Management' => 'Druckeradministration', 'Printer management' => 'Druckerverwaltung', 'Printing ... ' => 'Es wird gedruckt.', - 'Private E-mail' => 'Private eMail', + 'Private E-mail' => 'Private E-Mail', 'Private Phone' => 'Privates Tel.', 'Problem' => 'Problem', 'Produce Assembly' => 'Erzeugnis fertigen', @@ -1776,12 +1798,13 @@ $self->{texts} = { 'Serial No.' => 'Seriennummer', 'Serial Number' => 'Seriennummer', 'Service' => 'Dienstleistung', + 'Service Contract' => 'Wartungsvertrag', 'Service Items' => 'Dienstleistungen', 'Service Number missing!' => 'Dienstleistungsnummer fehlt!', 'Service, assembly or part' => 'Dienstleistung, Erzeugnis oder Ware', 'Services' => 'Dienstleistungen', 'Set Language Values' => 'Spracheinstellungen', - 'Set eMail text' => 'eMail Text eingeben', + 'Set eMail text' => 'E-Mail Text eingeben', 'Settings' => 'Einstellungen', 'Setup Menu' => 'Menü-Variante', 'Ship to' => 'Lieferadresse', @@ -1977,6 +2000,7 @@ $self->{texts} = { 'The account 3804 already exists, the update will be skipped.' => 'Das Konto 3804 existiert schon, das Update wird übersprungen.', 'The account 3804 will not be added automatically.' => 'Das Konto 3804 wird nicht automatisch hinzugefügt.', 'The action you\'ve chosen has not been executed because the document does not contain any item yet.' => 'Die von Ihnen ausgewählte Aktion wurde nicht ausgeführt, weil der Beleg noch keine Positionen enthält.', + 'The administration area is always accessible.' => 'Der Administrationsbereich ist immer zugänglich.', 'The application "#1" was not found on the system.' => 'Die Anwendung "#1" wurde auf dem System nicht gefunden.', 'The assembly has been created.' => 'Das Erzeugnis wurde hergestellt.', 'The assistant could not find anything wrong with #1. Maybe the problem has been solved in the meantime.' => 'Der Korrekturassistent konnte kein Problem bei #1 feststellen. Eventuell wurde das Problem in der Zwischenzeit bereits behoben.', @@ -2062,6 +2086,8 @@ $self->{texts} = { 'The following users will have access to this client' => 'Die folgenden Benutzer werden auf diesen Mandanten Zugriff haben', 'The formula needs the following syntax:
For regular article:
Variablename= Variable Unit;
Variablename2= Variable2 Unit2;
...
###
Variable + ( Variable2 / Variable )
Please be beware of the spaces in the formula
' => 'Die Formeln müssen in der folgenden Syntax eingegeben werden:
Bei normalen Artikeln:
Variablenname = Variable Einheit;
Variablenname2 = Variable2 Einheit2;
...
###
Variable + Variable2 * ( Variable - Variable2 )
Variablennamen und Einheiten dürfen nur aus alphanumerischen Zeichen bestehen.
Es muss jeweils die Gesamte Zeile eingegeben werden', 'The greetings have been saved.' => 'Die Anreden wurden gespeichert', + 'The installation is currently locked.' => 'Die Installation ist momentan gesperrt.', + 'The installation is currently unlocked.' => 'Die Installation ist momentan entsperrt.', 'The items are imported accoring do their number "X" regardless of the column order inside the file.' => 'Die Einträge werden in der Reihenfolge ihrer Indizes "X" unabhängig von der Spaltenreihenfolge in der Datei importiert.', 'The link target to add has been created from the existing record.' => 'Das auszuwählende Verknüpfungsziel wurde aus dem bestehenden Beleg erstellt.', 'The list has been printed.' => 'Die Liste wurde ausgedruckt.', @@ -2188,7 +2214,6 @@ $self->{texts} = { 'This group is valid for the following clients' => 'Diese Gruppe ist für die folgenden Mandanten gültig', 'This has been changed in this version, therefore please change the "old" bins to some real warehouse bins.' => 'Das wurde in dieser Version umgestellt, bitte ändern Sie die Freitext-Lagerplätze auf vorhandene Lagerplätze.', 'This has been changed in this version.' => 'Ab dieser Version ist dies nicht mehr so.', - 'This is a preliminary check for existing sources. Nothing will be created or deleted at this stage!' => 'In diesem Schritt werden bestehende Datenbanken gesucht. Es werden noch keine Änderungen vorgenommen!', 'This is a very critical problem.' => 'Dieses Problem ist sehr schwerwiegend.', 'This is the client to be selected by default on the login screen.' => 'Dies ist derjenige Mandant, der im Loginbildschirm standardmäßig ausgewählt sein wird.', 'This is the default bin for ignoring onhand' => 'Standardlagerplatz für Auslagern ohne Bestandsprüfung', @@ -2207,6 +2232,7 @@ $self->{texts} = { 'This user will have access to the following clients' => 'Dieser Benutzer wird Zugriff auf die folgenden Mandanten haben', 'This vendor number is already in use.' => 'Diese Lieferantennummer wird bereits verwendet.', 'Three Options:' => 'Drei Optionen:', + 'Time Tracking' => 'Zeiterfassung', 'Time period for the analysis:' => 'Analysezeitraum:', 'Timestamp' => 'Uhrzeit', 'Title' => 'Titel', @@ -2310,6 +2336,7 @@ $self->{texts} = { 'Use master default bin for Default Transfer, if no default bin for the part is configured' => 'Standardlagerplatz für Ein- / Auslagern über Standard-Lagerplatz, falls für die Ware kein expliziter Lagerplatz konfiguriert ist', 'User' => 'Benutzer', 'User Config' => 'Einstellungen', + 'User Groups' => 'Gruppen', 'User Preferences' => 'Benutzereinstellungen', 'User access' => 'Benutzerzugriff', 'User list' => 'Benutzerliste', @@ -2320,6 +2347,7 @@ $self->{texts} = { 'Users that have access to this client' => 'Benutzer mit Zugriff auf diesen Mandanten', 'Users with access' => 'Benutzer mit Zugriff', 'Users with access to this client' => 'Benutzer mit Zugriff auf diesen Mandanten', + 'Users, Clients and User Groups' => 'Benutzer, Mandanten und Benutzergruppen', 'VAT ID' => 'UStdID-Nr', 'Valid' => 'Gültig', 'Valid from' => 'Gültig ab', @@ -2495,8 +2523,9 @@ $self->{texts} = { 'done' => 'erledigt', 'down' => 'runter', 'dunning_list' => 'mahnungsliste', - 'eMail Send?' => 'eMail-Versand?', - 'eMail?' => 'eMail?', + 'eBayImporter' => 'eBay-Importierer', + 'eMail Send?' => 'E-Mail-Versand?', + 'eMail?' => 'E-Mail?', 'ea' => 'St.', 'emailed to' => 'gemailt an', 'empty' => 'leer', diff --git a/locale/en/all b/locale/en/all index 3424a0158..38be9b36e 100644 --- a/locale/en/all +++ b/locale/en/all @@ -130,6 +130,7 @@ $self->{texts} = { 'Add Group' => '', 'Add Language' => '', 'Add Lead' => '', + 'Add Machine' => '', 'Add Part' => '', 'Add Payment Terms' => '', 'Add Price Factor' => '', @@ -145,6 +146,7 @@ $self->{texts} = { 'Add Sales Invoice' => '', 'Add Sales Order' => '', 'Add Service' => '', + 'Add Service Contract' => '', 'Add Storno Credit Note' => '', 'Add Transaction' => '', 'Add User' => '', @@ -197,6 +199,8 @@ $self->{texts} = { 'Apply to all parts' => '', 'Apply to parts without buchungsgruppe' => '', 'Applying #1:' => '', + 'Appointment Category' => '', + 'Appointments' => '', 'Approximately #1 prices will be updated.' => '', 'Apr' => '', 'April' => '', @@ -658,6 +662,8 @@ $self->{texts} = { 'Do you want to carry this shipping address over to the new purchase order so that the vendor can deliver the goods directly to your customer?' => '', 'Do you want to store the existing onhand values into a new warehouse?' => '', 'Document' => '', + 'Document Template' => '', + 'Documents' => '', 'Document Project Number' => '', 'Documents in the WebDAV repository' => '', 'Done' => '', @@ -1061,6 +1067,7 @@ $self->{texts} = { 'L' => '', 'LIABILITIES' => '', 'LP' => '', + 'Label' => '', 'LaTeX Templates' => '', 'Landscape' => '', 'Language' => '', @@ -1130,6 +1137,7 @@ $self->{texts} = { 'Long Dates' => '', 'Long Description' => '', 'MAILED' => '', + 'Machine' => '', 'MSG_BROWSER_DOES_NOT_SUPPORT_IFRAMES' => '', 'Main Preferences' => '', 'Main sorting' => '', @@ -1306,6 +1314,7 @@ $self->{texts} = { 'OpenDocument/OASIS' => '', 'Openings' => '', 'Optional comment' => '', + 'Opportunity' => '', 'Options' => '', 'Or download the whole Installation Documentation as PDF (350kB) for off-line study (currently in German Language): ' => '', 'Order' => '', @@ -1674,6 +1683,7 @@ $self->{texts} = { 'Serial No.' => '', 'Serial Number' => '', 'Service' => '', + 'Service Contract' => '', 'Service Items' => '', 'Service Number missing!' => '', 'Service unit' => '', @@ -2028,6 +2038,7 @@ $self->{texts} = { 'This upgrade script tries to map all existing units in the database to the newly created units.' => '', 'This vendor number is already in use.' => '', 'Time period for the analysis:' => '', + 'Time Track' => '', 'Timestamp' => '', 'Title' => '', 'To' => '', @@ -2121,6 +2132,7 @@ $self->{texts} = { 'Use Templates' => '', 'User' => '', 'User Config' => '', + 'User Groups' => '', 'User Login' => '', 'User data migration' => '', 'User deleted!' => '', @@ -2325,6 +2337,7 @@ $self->{texts} = { 'kivitendo has found one or more problems in the general ledger.' => '', 'kivitendo is about to update the database [ #1 ].' => '', 'kivitendo is now able to manage warehouses instead of just tracking the amount of goods in your system.' => '', + 'Knowledge' => '', 'lead deleted!' => '', 'lead saved!' => '', 'list' => '', diff --git a/menu.ini b/menu.ini deleted file mode 100644 index 5031c98af..000000000 --- a/menu.ini +++ /dev/null @@ -1,722 +0,0 @@ -[Master Data] - -[Master Data--Add Customer] -ACCESS=customer_vendor_edit -module=ct.pl -action=add -db=customer - -[Master Data--Add Vendor] -ACCESS=customer_vendor_edit -module=ct.pl -action=add -db=vendor - -[Master Data--Add Part] -ACCESS=part_service_assembly_edit -module=ic.pl -action=add -item=part - -[Master Data--Add Service] -ACCESS=part_service_assembly_edit -module=ic.pl -action=add -item=service - -[Master Data--Add Assembly] -ACCESS=part_service_assembly_edit -module=ic.pl -action=add -item=assembly - -[Master Data--Add Project] -ACCESS=project_edit -module=controller.pl -action=Project/new - -[Master Data--Update Prices] -ACCESS=part_service_assembly_edit -module=ic.pl -action=search_update_prices - - -[Master Data--Reports] -module=menu.pl -action=acc_menu -submenu=1 - -[Master Data--Reports--Customers] -ACCESS=customer_vendor_edit -module=ct.pl -action=search -db=customer - -[Master Data--Reports--Vendors] -ACCESS=customer_vendor_edit -module=ct.pl -action=search -db=vendor - -[Master Data--Reports--Contacts] -ACCESS=customer_vendor_edit -module=ct.pl -action=search_contact - -[Master Data--Reports--Parts] -ACCESS=part_service_assembly_details -module=ic.pl -action=search -searchitems=part - -[Master Data--Reports--Services] -ACCESS=part_service_assembly_details -module=ic.pl -action=search -searchitems=service - -[Master Data--Reports--Assemblies] -ACCESS=part_service_assembly_details -module=ic.pl -action=search -searchitems=assembly - -[Master Data--Reports--Projects] -ACCESS=project_edit -module=controller.pl -action=Project/search - -[AR] - -[AR--Add Quotation] -ACCESS=sales_quotation_edit -module=oe.pl -action=add -type=sales_quotation - -[AR--Add Sales Order] -ACCESS=sales_order_edit -module=oe.pl -action=add -type=sales_order - -[AR--Add Delivery Order] -ACCESS=sales_delivery_order_edit -module=do.pl -action=add -type=sales_delivery_order - -[AR--Add Sales Invoice] -ACCESS=invoice_edit -module=is.pl -action=add -type=invoice - -[AR--Add Credit Note] -ACCESS=invoice_edit -module=is.pl -action=add -type=credit_note - -[AR--Add Dunning] -ACCESS=dunning_edit -module=dn.pl -action=add - -[AR--Reports] -module=menu.pl -action=acc_menu -submenu=1 - -[AR--Reports--Quotations] -ACCESS=sales_quotation_edit -module=oe.pl -action=search -type=sales_quotation - -[AR--Reports--Sales Orders] -ACCESS=sales_order_edit -module=oe.pl -action=search -type=sales_order - -[AR--Reports--Delivery Orders] -ACCESS=sales_delivery_order_edit -module=do.pl -action=search -type=sales_delivery_order - -[AR--Reports--Invoices, Credit Notes & AR Transactions] -ACCESS=invoice_edit -module=ar.pl -action=search -nextsub=ar_transactions - -[AR--Reports--Sales Report] -ACCESS=invoice_edit -module=vk.pl -action=search_invoice -nextsub=invoice_transactions - -[AR--Reports--Dunnings] -ACCESS=dunning_edit -module=dn.pl -action=search - -[AR--Reports--Delivery Plan] -ACCESS=sales_order_edit -module=controller.pl -action=DeliveryPlan/list - -[AP] - -[AP--Add RFQ] -ACCESS=request_quotation_edit -module=oe.pl -action=add -type=request_quotation - -[AP--Add Purchase Order] -ACCESS=purchase_order_edit -module=oe.pl -action=add -type=purchase_order - -[AP--Add Delivery Note] -ACCESS=purchase_delivery_order_edit -module=do.pl -action=add -type=purchase_delivery_order - -[AP--Add Vendor Invoice] -ACCESS=vendor_invoice_edit -module=ir.pl -action=add -type=invoice - - -[AP--Reports] -module=menu.pl -action=acc_menu -submenu=1 - -[AP--Reports--RFQs] -ACCESS=request_quotation_edit -module=oe.pl -action=search -type=request_quotation - -[AP--Reports--Purchase Orders] -ACCESS=purchase_order_edit -module=oe.pl -action=search -type=purchase_order - -[AP--Reports--Delivery Orders] -ACCESS=purchase_delivery_order_edit -module=do.pl -action=search -type=purchase_delivery_order - -[AP--Reports--Vendor Invoices & AP Transactions] -ACCESS=vendor_invoice_edit -module=ap.pl -action=search -nextsub=ap_transactions - - -[Warehouse] - -[Warehouse--Stock] -ACCESS=warehouse_management -module=controller.pl -action=Inventory/stock_in - -[Warehouse--Produce Assembly] -ACCESS=warehouse_management -module=wh.pl -action=transfer_warehouse_selection -trans_type=assembly - -[Warehouse--Transfer] -ACCESS=warehouse_management -module=wh.pl -action=transfer_warehouse_selection -trans_type=transfer - -[Warehouse--Removal] -ACCESS=warehouse_management -module=wh.pl -action=transfer_warehouse_selection -trans_type=removal - -[Warehouse--Reports] -module=menu.pl -action=acc_menu -submenu=1 - -[Warehouse--Reports--Warehouse content] -ACCESS=warehouse_contents | warehouse_management -module=wh.pl -action=report - -[Warehouse--Reports--WHJournal] -ACCESS=warehouse_management -module=wh.pl -action=journal - - -[General Ledger] - -[General Ledger--Add Transaction] -ACCESS=general_ledger -module=gl.pl -action=add - -[General Ledger--Add AR Transaction] -ACCESS=general_ledger -module=ar.pl -action=add - -[General Ledger--Add AP Transaction] -ACCESS=general_ledger -module=ap.pl -action=add - -[General Ledger--DATEV - Export Assistent] -ACCESS=datev_export -module=datev.pl -action=export - - - - -[General Ledger--Reports] -module=menu.pl -action=acc_menu -submenu=1 - - -[General Ledger--Reports--AR Aging] -ACCESS=general_ledger -module=rp.pl -action=report -report=ar_aging - - -[General Ledger--Reports--AP Aging] -ACCESS=general_ledger -module=rp.pl -action=report -report=ap_aging - -[General Ledger--Reports--Journal] -ACCESS=general_ledger -module=gl.pl -action=search - - -[Cash] -ACCESS=cash - -[Cash--Receipt] -module=cp.pl -action=payment -type=receipt -vc=customer - -[Cash--Payment] -module=cp.pl -action=payment -type=check -vc=vendor - -[Cash--Reconciliation] -ACCESS=cash -module=rc.pl -action=reconciliation - -[Cash--Bank collection via SEPA] -module=sepa.pl -action=bank_transfer_add -vc=customer - -[Cash--Bank transfer via SEPA] -module=sepa.pl -action=bank_transfer_add -vc=vendor - -[Cash--Reports] -module=menu.pl -action=acc_menu -submenu=1 - -[Cash--Reports--Receipts] -module=rp.pl -action=report -report=receipts - -[Cash--Reports--Payments] -module=rp.pl -action=report -report=payments - -[Cash--Reports--Bank collections via SEPA] -module=sepa.pl -action=bank_transfer_search -vc=customer - -[Cash--Reports--Bank transfers via SEPA] -module=sepa.pl -action=bank_transfer_search -vc=vendor - -[Reports] - -[Reports--Chart of Accounts] -ACCESS=report -module=ca.pl -action=chart_of_accounts - -[Reports--Trial Balance] -ACCESS=report -module=rp.pl -action=report -report=trial_balance - -[Reports--Income Statement] -ACCESS=report -module=rp.pl -action=report -report=income_statement - -[Reports--BWA] -ACCESS=report -module=rp.pl -action=report -report=bwa - -[Reports--Balance Sheet] -ACCESS=report -module=rp.pl -action=report -report=balance_sheet - -[Reports--UStVa] -ACCESS=advance_turnover_tax_return -module=ustva.pl -action=report - -[Reports--Projecttransactions] -ACCESS=report -module=rp.pl -action=report -report=projects - - -[Batch Printing] -ACCESS=batch_printing - -[Batch Printing--Sales Invoices] -ACCESS=invoice_edit -module=bp.pl -action=search -vc=customer -type=invoice - -[Batch Printing--Sales Orders] -ACCESS=sales_order_edit -module=bp.pl -action=search -vc=customer -type=sales_order - -[Batch Printing--Quotations] -ACCESS=sales_quotation_edit -module=bp.pl -action=search -vc=customer -type=sales_quotation - -[Batch Printing--Packing Lists] -ACCESS=invoice_edit | sales_order_edit -module=bp.pl -action=search -vc=customer -type=packing_list - -[Batch Printing--Purchase Orders] -ACCESS=purchase_order_edit -module=bp.pl -action=search -vc=vendor -type=purchase_order - -[Batch Printing--RFQs] -ACCESS=request_quotation_edit -module=bp.pl -action=search -vc=vendor -type=request_quotation - -[Batch Printing--Checks] -ACCESS=cash -module=bp.pl -action=search -vc=vendor -type=check - -[Batch Printing--Receipts] -ACCESS=cash -module=bp.pl -action=search -vc=customer -type=receipt - - -[Productivity] -ACCESS=productivity - -[Productivity--Show TODO list] -module=todo.pl -action=show_todo_list - -[Productivity--Add Follow-Up] -module=fu.pl -action=add - -[Productivity--Edit Access Rights] -module=fu.pl -action=edit_access_rights - -[Productivity--Reports] -module=menu.pl -action=acc_menu -submenu=1 - -[Productivity--Reports--Follow-Ups] -module=fu.pl -action=search - - -[System] -ACCESS=config - -[System--Client Configuration] -ACCESS=admin -module=controller.pl -action=ClientConfig/edit - -[System--UStVa Einstellungen] -module=ustva.pl -action=config_step1 - -[System--Edit Dunning] -module=dn.pl -action=edit_config - -[System--Chart of Accounts] -module=menu.pl -action=acc_menu -submenu=1 - -[System--Chart of Accounts--Add Account] -module=am.pl -action=add_account - -[System--Chart of Accounts--List Accounts] -module=am.pl -action=list_account - -[System--Buchungsgruppen] -module=am.pl -action=list_buchungsgruppe - -[System--Taxes] -module=am.pl -action=list_tax - -[System--Bank accounts] -module=bankaccounts.pl -action=bank_account_list - -[System--Groups] -module=pe.pl -action=search -type=partsgroup - -[System--Pricegroups] -module=pe.pl -action=search -type=pricegroup - -[System--Edit units] -module=am.pl -action=edit_units - -[System--Price Factors] -module=am.pl -action=list_price_factors - -[System--Departments] -module=controller.pl -action=Department/list - -[System--Types of Business] -module=controller.pl -action=Business/list - -[System--Leads] -module=am.pl -action=list_lead - -[System--Languages and translations] -module=menu.pl -action=acc_menu -submenu=1 - -[System--Languages and translations--Add Language] -module=am.pl -action=add_language - -[System--Languages and translations--List Languages] -module=am.pl -action=list_language - -[System--Languages and translations--Greetings] -module=generictranslations.pl -action=edit_greetings - -[System--Languages and translations--SEPA strings] -module=generictranslations.pl -action=edit_sepa_strings - - -[System--Payment Terms] -module=controller.pl -action=PaymentTerm/list - -[System--Manage Custom Variables] -module=controller.pl -action=CustomVariableConfig/list - -[System--Warehouses] -module=am.pl -action=list_warehouses - - -[System--Import CSV] -module=menu.pl -action=acc_menu -submenu=1 - -[System--Import CSV--Customers and vendors] -module=controller.pl -action=CsvImport/new -profile.type=customers_vendors - -[System--Import CSV--Contacts] -module=controller.pl -action=CsvImport/new -profile.type=contacts - -[System--Import CSV--Shipto] -module=controller.pl -action=CsvImport/new -profile.type=addresses - -[System--Import CSV--Parts] -module=controller.pl -action=CsvImport/new -profile.type=parts - -[System--Import CSV--Projects] -module=controller.pl -action=CsvImport/new -profile.type=projects - -[System--Templates] -ACCESS=admin -module=menu.pl -action=acc_menu -submenu=1 - -[System--Templates--HTML Templates] -module=amtemplates.pl -action=display_template_form -type=templates -format=html - -[System--Templates--LaTeX Templates] -module=amtemplates.pl -action=display_template_form -type=templates -format=tex - -[System--Templates--Stylesheet] -module=amtemplates.pl -action=display_template_form -type=stylesheet - -[System--General Ledger Corrections] -module=acctranscorrections.pl -action=analyze_filter - -[System--Background jobs and task server] -ACCESS=admin -module=menu.pl -action=acc_menu -submenu=1 - -[System--Background jobs and task server--List current background jobs] -module=controller.pl -action=BackgroundJob/list - -[System--Background jobs and task server--Background job history] -module=controller.pl -action=BackgroundJobHistory/list - -[System--Background jobs and task server--Task server control] -module=controller.pl -action=TaskServer/show - -[System--Audit Control] -module=am.pl -action=audit_control - -[System--History Search Engine] -module=am.pl -action=show_history_search - -[System--Employees] -ACCESS=admin -module=controller.pl -action=Employee/list - -[Program] - -[Program--User Preferences] -module=am.pl -action=config - -[Program--Version] -module=login.pl -action=company_logo -no_todo_list=1 - -[Program--Administration area] -ACCESS=display_admin_link -module=controller.pl -action=Admin/login - -[Program--Documentation (in German)] -href=doc/kivitendo-Dokumentation.pdf -target=_blank - -[Program--kivitendo website (external)] -href=http://www.kivitendo.de/ -target=_blank - -[Program--Logout] -module=controller.pl -action=LoginScreen/logout diff --git a/menus/admin.ini b/menus/admin.ini new file mode 100644 index 000000000..3da5752b4 --- /dev/null +++ b/menus/admin.ini @@ -0,0 +1,59 @@ +[Users, Clients and User Groups] + +[Users, Clients and User Groups--List Users, Clients and User Groups] +module=controller.pl +action=Admin/show + +[Users, Clients and User Groups--Add User] +module=controller.pl +action=Admin/new_user + +[Users, Clients and User Groups--Add Client] +module=controller.pl +action=Admin/new_client + +[Users, Clients and User Groups--Add User Group] +module=controller.pl +action=Admin/new_group + +[Database Management] + +[Database Management--Create Dataset] +module=controller.pl +action=Admin/create_dataset_login + +[Database Management--Delete Dataset] +module=controller.pl +action=Admin/delete_dataset_login + +[Printer Management] + +[Printer Management--List Printers] +module=controller.pl +action=Admin/list_printers + +[Printer Management--Add Printer] +module=controller.pl +action=Admin/new_printer + +[System] + +[System--Lock and unlock installation] +module=controller.pl +action=Admin/show_lock + +[System--Documentation (in German)] +href=doc/kivitendo-Dokumentation.pdf +target=_blank + +[System--kivitendo website (external)] +href=http://www.kivitendo.de/ +target=_blank + +[System--To user login] +module=controller.pl +action=LoginScreen/user_login + +[System--Logout] +module=controller.pl +action=Admin/logout diff --git a/menus/crm.ini b/menus/crm.ini new file mode 100644 index 000000000..fcb0acfec --- /dev/null +++ b/menus/crm.ini @@ -0,0 +1,120 @@ +[CRM] + +[CRM--Search] +ACCESS=crm_search +module=crm/getData.php + +[CRM--Add] +submenu=1 + +[CRM--Add--Customer] +ACCESS=crm_new +module=crm/firmen3.php +Q=C + +[CRM--Add--Vendor] +ACCESS=crm_new +module=crm/firmen3.php +Q=V + +[CRM--Add--Person] +ACCESS=crm_new +module=crm/personen3.php + +[CRM--Appointments] +ACCESS=crm_termin +module=crm/termin.php + +[CRM--Opportunity] +ACCESS=crm_opportunity +module=crm/opportunity.php + +[CRM--Follow-Up] +ACCESS=crm_follow +module=crm/wvl1.php + +[CRM--E-mail] +ACCESS=crm_email +module=crm/mail.php + +[CRM--Knowledge] +ACCESS=crm_knowhow +module=crm/wissen.php + +[CRM--Memo] +ACCESS=crm_notices +module=crm/postit.php + +[CRM--Documents] +ACCESS=crm_other +module=crm/dokument.php + +[CRM--Time Tracking] +ACCESS=crm_service +module=crm/timetrack.php + +[CRM--DHL] +ACCESS=crm_otje +module=crm/dhl.php + +[CRM--eBayImporter] +ACCESS=crm_other +module=crm/ebayImporter.php + +[CRM--Service] +submenu=1 + +[CRM--Service--Service Contract] +ACCESS=crm_service +module=crm/vertrag1.php + +[CRM--Service--Add Service Contract] +ACCESS=crm_service +module=crm/vertrag3.php + +[CRM--Service--Machine] +ACCESS=crm_service +module=crm/maschine1.php + +[CRM--Service--Add Machine] +ACCESS=crm_service +module=crm/maschine3.php + +[CRM--Admin] +submenu=1 + +[CRM--Admin--Document Template] +ACCESS=crm_admin +module=crm/dokument1.php + +[CRM--Admin--Label] +ACCESS=crm_admin +module=crm/aufkleber_def.php + +[CRM--Admin--Appointment Category] +ACCESS=crm_admin +module=crm/tcatedit.php + +[CRM--Admin--Message] +ACCESS=crm_admin +module=crm/user3.php + +[CRM--Admin--Client] +ACCESS=crm_adminstatus +module=crm/mandant.php + +[CRM--Admin--User Groups] +ACCESS=crm_admin +module=crm/user2.php + +[CRM--Admin--User] +ACCESS=crm_adminuser +module=crm/user1.php + +[CRM--Admin--DHL] +ACCESS=crm_admin +module=crm/dhladm.php + +[CRM--Admin--Status] +ACCESS=crm_adminstatus +module=crm/status.php diff --git a/menus/erp.ini b/menus/erp.ini new file mode 100644 index 000000000..b0bff6139 --- /dev/null +++ b/menus/erp.ini @@ -0,0 +1,723 @@ +[Master Data] + +[Master Data--Add Customer] +ACCESS=customer_vendor_edit +module=controller.pl +action=CustomerVendor/add +db=customer + +[Master Data--Add Vendor] +ACCESS=customer_vendor_edit +module=controller.pl +action=CustomerVendor/add +db=vendor + +[Master Data--Add Part] +ACCESS=part_service_assembly_edit +module=ic.pl +action=add +item=part + +[Master Data--Add Service] +ACCESS=part_service_assembly_edit +module=ic.pl +action=add +item=service + +[Master Data--Add Assembly] +ACCESS=part_service_assembly_edit +module=ic.pl +action=add +item=assembly + +[Master Data--Add Project] +ACCESS=project_edit +module=controller.pl +action=Project/new + +[Master Data--Update Prices] +ACCESS=part_service_assembly_edit +module=ic.pl +action=search_update_prices + + +[Master Data--Reports] +module=menu.pl +action=acc_menu +submenu=1 + +[Master Data--Reports--Customers] +ACCESS=customer_vendor_edit +module=controller.pl +action=CustomerVendor/search +db=customer + +[Master Data--Reports--Vendors] +ACCESS=customer_vendor_edit +module=controller.pl +action=CustomerVendor/search +db=vendor + +[Master Data--Reports--Contacts] +ACCESS=customer_vendor_edit +module=controller.pl +action=CustomerVendor/search_contact +db=customer + +[Master Data--Reports--Parts] +ACCESS=part_service_assembly_details +module=ic.pl +action=search +searchitems=part + +[Master Data--Reports--Services] +ACCESS=part_service_assembly_details +module=ic.pl +action=search +searchitems=service + +[Master Data--Reports--Assemblies] +ACCESS=part_service_assembly_details +module=ic.pl +action=search +searchitems=assembly + +[Master Data--Reports--Projects] +ACCESS=project_edit +module=controller.pl +action=Project/search + +[AR] + +[AR--Add Quotation] +ACCESS=sales_quotation_edit +module=oe.pl +action=add +type=sales_quotation + +[AR--Add Sales Order] +ACCESS=sales_order_edit +module=oe.pl +action=add +type=sales_order + +[AR--Add Delivery Order] +ACCESS=sales_delivery_order_edit +module=do.pl +action=add +type=sales_delivery_order + +[AR--Add Sales Invoice] +ACCESS=invoice_edit +module=is.pl +action=add +type=invoice + +[AR--Add Credit Note] +ACCESS=invoice_edit +module=is.pl +action=add +type=credit_note + +[AR--Add Dunning] +ACCESS=dunning_edit +module=dn.pl +action=add + +[AR--Reports] +module=menu.pl +action=acc_menu +submenu=1 + +[AR--Reports--Quotations] +ACCESS=sales_quotation_edit +module=oe.pl +action=search +type=sales_quotation + +[AR--Reports--Sales Orders] +ACCESS=sales_order_edit +module=oe.pl +action=search +type=sales_order + +[AR--Reports--Delivery Orders] +ACCESS=sales_delivery_order_edit +module=do.pl +action=search +type=sales_delivery_order + +[AR--Reports--Invoices, Credit Notes & AR Transactions] +ACCESS=invoice_edit +module=ar.pl +action=search +nextsub=ar_transactions + +[AR--Reports--Sales Report] +ACCESS=invoice_edit +module=vk.pl +action=search_invoice +nextsub=invoice_transactions + +[AR--Reports--Dunnings] +ACCESS=dunning_edit +module=dn.pl +action=search + +[AR--Reports--Delivery Plan] +ACCESS=sales_order_edit +module=controller.pl +action=DeliveryPlan/list + +[AP] + +[AP--Add RFQ] +ACCESS=request_quotation_edit +module=oe.pl +action=add +type=request_quotation + +[AP--Add Purchase Order] +ACCESS=purchase_order_edit +module=oe.pl +action=add +type=purchase_order + +[AP--Add Delivery Note] +ACCESS=purchase_delivery_order_edit +module=do.pl +action=add +type=purchase_delivery_order + +[AP--Add Vendor Invoice] +ACCESS=vendor_invoice_edit +module=ir.pl +action=add +type=invoice + + +[AP--Reports] +module=menu.pl +action=acc_menu +submenu=1 + +[AP--Reports--RFQs] +ACCESS=request_quotation_edit +module=oe.pl +action=search +type=request_quotation + +[AP--Reports--Purchase Orders] +ACCESS=purchase_order_edit +module=oe.pl +action=search +type=purchase_order + +[AP--Reports--Delivery Orders] +ACCESS=purchase_delivery_order_edit +module=do.pl +action=search +type=purchase_delivery_order + +[AP--Reports--Vendor Invoices & AP Transactions] +ACCESS=vendor_invoice_edit +module=ap.pl +action=search +nextsub=ap_transactions + + +[Warehouse] + +[Warehouse--Stock] +ACCESS=warehouse_management +module=controller.pl +action=Inventory/stock_in + +[Warehouse--Produce Assembly] +ACCESS=warehouse_management +module=wh.pl +action=transfer_warehouse_selection +trans_type=assembly + +[Warehouse--Transfer] +ACCESS=warehouse_management +module=wh.pl +action=transfer_warehouse_selection +trans_type=transfer + +[Warehouse--Removal] +ACCESS=warehouse_management +module=wh.pl +action=transfer_warehouse_selection +trans_type=removal + +[Warehouse--Reports] +module=menu.pl +action=acc_menu +submenu=1 + +[Warehouse--Reports--Warehouse content] +ACCESS=warehouse_contents | warehouse_management +module=wh.pl +action=report + +[Warehouse--Reports--WHJournal] +ACCESS=warehouse_management +module=wh.pl +action=journal + + +[General Ledger] + +[General Ledger--Add Transaction] +ACCESS=general_ledger +module=gl.pl +action=add + +[General Ledger--Add AR Transaction] +ACCESS=general_ledger +module=ar.pl +action=add + +[General Ledger--Add AP Transaction] +ACCESS=general_ledger +module=ap.pl +action=add + +[General Ledger--DATEV - Export Assistent] +ACCESS=datev_export +module=datev.pl +action=export + + + + +[General Ledger--Reports] +module=menu.pl +action=acc_menu +submenu=1 + + +[General Ledger--Reports--AR Aging] +ACCESS=general_ledger +module=rp.pl +action=report +report=ar_aging + + +[General Ledger--Reports--AP Aging] +ACCESS=general_ledger +module=rp.pl +action=report +report=ap_aging + +[General Ledger--Reports--Journal] +ACCESS=general_ledger +module=gl.pl +action=search + + +[Cash] +ACCESS=cash + +[Cash--Receipt] +module=cp.pl +action=payment +type=receipt +vc=customer + +[Cash--Payment] +module=cp.pl +action=payment +type=check +vc=vendor + +[Cash--Reconciliation] +ACCESS=cash +module=rc.pl +action=reconciliation + +[Cash--Bank collection via SEPA] +module=sepa.pl +action=bank_transfer_add +vc=customer + +[Cash--Bank transfer via SEPA] +module=sepa.pl +action=bank_transfer_add +vc=vendor + +[Cash--Reports] +module=menu.pl +action=acc_menu +submenu=1 + +[Cash--Reports--Receipts] +module=rp.pl +action=report +report=receipts + +[Cash--Reports--Payments] +module=rp.pl +action=report +report=payments + +[Cash--Reports--Bank collections via SEPA] +module=sepa.pl +action=bank_transfer_search +vc=customer + +[Cash--Reports--Bank transfers via SEPA] +module=sepa.pl +action=bank_transfer_search +vc=vendor + +[Reports] + +[Reports--Chart of Accounts] +ACCESS=report +module=ca.pl +action=chart_of_accounts + +[Reports--Trial Balance] +ACCESS=report +module=rp.pl +action=report +report=trial_balance + +[Reports--Income Statement] +ACCESS=report +module=rp.pl +action=report +report=income_statement + +[Reports--BWA] +ACCESS=report +module=rp.pl +action=report +report=bwa + +[Reports--Balance Sheet] +ACCESS=report +module=rp.pl +action=report +report=balance_sheet + +[Reports--UStVa] +ACCESS=advance_turnover_tax_return +module=ustva.pl +action=report + +[Reports--Projecttransactions] +ACCESS=report +module=rp.pl +action=report +report=projects + + +[Batch Printing] +ACCESS=batch_printing + +[Batch Printing--Sales Invoices] +ACCESS=invoice_edit +module=bp.pl +action=search +vc=customer +type=invoice + +[Batch Printing--Sales Orders] +ACCESS=sales_order_edit +module=bp.pl +action=search +vc=customer +type=sales_order + +[Batch Printing--Quotations] +ACCESS=sales_quotation_edit +module=bp.pl +action=search +vc=customer +type=sales_quotation + +[Batch Printing--Packing Lists] +ACCESS=invoice_edit | sales_order_edit +module=bp.pl +action=search +vc=customer +type=packing_list + +[Batch Printing--Purchase Orders] +ACCESS=purchase_order_edit +module=bp.pl +action=search +vc=vendor +type=purchase_order + +[Batch Printing--RFQs] +ACCESS=request_quotation_edit +module=bp.pl +action=search +vc=vendor +type=request_quotation + +[Batch Printing--Checks] +ACCESS=cash +module=bp.pl +action=search +vc=vendor +type=check + +[Batch Printing--Receipts] +ACCESS=cash +module=bp.pl +action=search +vc=customer +type=receipt + + +[Productivity] +ACCESS=productivity + +[Productivity--Show TODO list] +module=todo.pl +action=show_todo_list + +[Productivity--Add Follow-Up] +module=fu.pl +action=add + +[Productivity--Edit Access Rights] +module=fu.pl +action=edit_access_rights + +[Productivity--Reports] +module=menu.pl +action=acc_menu +submenu=1 + +[Productivity--Reports--Follow-Ups] +module=fu.pl +action=search + + +[System] +ACCESS=config + +[System--Client Configuration] +ACCESS=admin +module=controller.pl +action=ClientConfig/edit + +[System--UStVa Einstellungen] +module=ustva.pl +action=config_step1 + +[System--Edit Dunning] +module=dn.pl +action=edit_config + +[System--Chart of Accounts] +module=menu.pl +action=acc_menu +submenu=1 + +[System--Chart of Accounts--Add Account] +module=am.pl +action=add_account + +[System--Chart of Accounts--List Accounts] +module=am.pl +action=list_account + +[System--Buchungsgruppen] +module=am.pl +action=list_buchungsgruppe + +[System--Taxes] +module=am.pl +action=list_tax + +[System--Bank accounts] +module=bankaccounts.pl +action=bank_account_list + +[System--Groups] +module=pe.pl +action=search +type=partsgroup + +[System--Pricegroups] +module=pe.pl +action=search +type=pricegroup + +[System--Edit units] +module=am.pl +action=edit_units + +[System--Price Factors] +module=am.pl +action=list_price_factors + +[System--Departments] +module=controller.pl +action=Department/list + +[System--Types of Business] +module=controller.pl +action=Business/list + +[System--Leads] +module=am.pl +action=list_lead + +[System--Languages and translations] +module=menu.pl +action=acc_menu +submenu=1 + +[System--Languages and translations--Add Language] +module=am.pl +action=add_language + +[System--Languages and translations--List Languages] +module=am.pl +action=list_language + +[System--Languages and translations--Greetings] +module=generictranslations.pl +action=edit_greetings + +[System--Languages and translations--SEPA strings] +module=generictranslations.pl +action=edit_sepa_strings + + +[System--Payment Terms] +module=controller.pl +action=PaymentTerm/list + +[System--Manage Custom Variables] +module=controller.pl +action=CustomVariableConfig/list + +[System--Warehouses] +module=am.pl +action=list_warehouses + + +[System--Import CSV] +module=menu.pl +action=acc_menu +submenu=1 + +[System--Import CSV--Customers and vendors] +module=controller.pl +action=CsvImport/new +profile.type=customers_vendors + +[System--Import CSV--Contacts] +module=controller.pl +action=CsvImport/new +profile.type=contacts + +[System--Import CSV--Shipto] +module=controller.pl +action=CsvImport/new +profile.type=addresses + +[System--Import CSV--Parts] +module=controller.pl +action=CsvImport/new +profile.type=parts + +[System--Import CSV--Projects] +module=controller.pl +action=CsvImport/new +profile.type=projects + +[System--Templates] +ACCESS=admin +module=menu.pl +action=acc_menu +submenu=1 + +[System--Templates--HTML Templates] +module=amtemplates.pl +action=display_template_form +type=templates +format=html + +[System--Templates--LaTeX Templates] +module=amtemplates.pl +action=display_template_form +type=templates +format=tex + +[System--Templates--Stylesheet] +module=amtemplates.pl +action=display_template_form +type=stylesheet + +[System--General Ledger Corrections] +module=acctranscorrections.pl +action=analyze_filter + +[System--Background jobs and task server] +ACCESS=admin +module=menu.pl +action=acc_menu +submenu=1 + +[System--Background jobs and task server--List current background jobs] +module=controller.pl +action=BackgroundJob/list + +[System--Background jobs and task server--Background job history] +module=controller.pl +action=BackgroundJobHistory/list + +[System--Background jobs and task server--Task server control] +module=controller.pl +action=TaskServer/show + +[System--Audit Control] +module=am.pl +action=audit_control + +[System--History Search Engine] +module=am.pl +action=show_history_search + +[System--Employees] +ACCESS=admin +module=controller.pl +action=Employee/list + +[Program] + +[Program--User Preferences] +module=am.pl +action=config + +[Program--Version] +module=login.pl +action=company_logo +no_todo_list=1 + +[Program--Administration area] +ACCESS=display_admin_link +module=controller.pl +action=Admin/login + +[Program--Documentation (in German)] +href=doc/kivitendo-Dokumentation.pdf +target=_blank + +[Program--kivitendo website (external)] +href=http://www.kivitendo.de/ +target=_blank + +[Program--Logout] +module=controller.pl +action=LoginScreen/logout diff --git a/scripts/locales.pl b/scripts/locales.pl index 3ae38a3b1..ed085487f 100755 --- a/scripts/locales.pl +++ b/scripts/locales.pl @@ -18,7 +18,6 @@ use FileHandle; use Getopt::Long; use IO::Dir; use List::Util qw(first); -use POSIX; use Pod::Usage; $OUTPUT_AUTOFLUSH = 1; @@ -35,7 +34,7 @@ my $basedir = "../.."; my $locales_dir = "."; my $bindir = "$basedir/bin/mozilla"; my @progdirs = ( "$basedir/SL" ); -my $menufile = "menu.ini"; +my @menufiles = <${basedir}/menus/*.ini>; my @javascript_dirs = ($basedir .'/js', $basedir .'/templates/webpages'); my $javascript_output_dir = $basedir .'/js'; my $submitsearch = qr/type\s*=\s*[\"\']?submit/i; @@ -89,15 +88,13 @@ my @customfiles = grep /_custom/, @bindir_files; push @progfiles, map { m:^(.+)/([^/]+)$:; [ $2, $1 ] } grep { /\.pm$/ } map { find_files($_) } @progdirs; # put customized files into @customfiles -my (@menufiles, %dir_h); +my %dir_h; if ($opt_n) { @customfiles = (); - @menufiles = ($menufile); } else { tie %dir_h, 'IO::Dir', $basedir; - @menufiles = map { "$basedir/$_" } grep { /.*?_$menufile$/ } keys %dir_h; - unshift @menufiles, "$basedir/$menufile"; + push @menufiles, map { "$basedir/$_" } grep { /.*_menu.ini$/ } keys %dir_h; } my @dbplfiles; @@ -724,11 +721,6 @@ sub generate_file { close $fh; } -sub slurp { - my $file = shift; - do { local ( @ARGV, $/ ) = $file; <> } -} - __END__ =head1 NAME diff --git a/sql/Pg-upgrade2/SKR04-3804-addition.pl b/sql/Pg-upgrade2/SKR04-3804-addition.pl index ce8618f66..b16ef2a61 100644 --- a/sql/Pg-upgrade2/SKR04-3804-addition.pl +++ b/sql/Pg-upgrade2/SKR04-3804-addition.pl @@ -12,12 +12,10 @@ sub run { my ($self) = @_; # 1. Überprüfen ob Kontenrahmen SKR04 ist, wenn nicht alles überspringen - my ($kontenrahmen) = $self->dbh->selectrow_array("select coa from defaults"); - - unless ( $kontenrahmen eq 'Germany-DATEV-SKR04EU' ) { - print "Kontenrahmen ist nicht SKR04, überspringen
"; + if (!$self->check_coa('Germany-DATEV-SKR04EU')) { + print qq|Nichts zu tun in diesem Kontenrahmen.|; return 1; - }; + } # Mandant hat SKR04, erst prüfen wir, ob in der Vergangenheit Buchungen mit # taxkey 13 erfolgt sind (Fall "EU ohne USt. ID), diese sind wahrscheinlich diff --git a/templates/webpages/admin/create_dataset.html b/templates/webpages/admin/create_dataset.html index 8b999f039..2f90d579a 100644 --- a/templates/webpages/admin/create_dataset.html +++ b/templates/webpages/admin/create_dataset.html @@ -4,8 +4,6 @@

[% HTML.escape(title) %]

-

[% LxERP.t8('Back') %]

-

[% LxERP.t8('You can either create a new database or chose an existing database.') %] diff --git a/templates/webpages/admin/dbadmin.html b/templates/webpages/admin/dbadmin.html index dc0a2142d..ab92eb58b 100644 --- a/templates/webpages/admin/dbadmin.html +++ b/templates/webpages/admin/dbadmin.html @@ -2,37 +2,35 @@ [% INCLUDE 'common/flash.html' %] -

[% HTML.escape(title) %]

+

[% LxERP.t8("Database login (#1)", title) %]

-

[% LxERP.t8('Back') %]

+

[% LxERP.t8('Here you only provide the credentials for logging into the database.') %] [% LxERP.t8('Nothing will be created or deleted at this stage!') %]

- + - + - + - + - +
[% LxERP.t8('Host') %][% L.input_tag('dbhost', FORM.dbhost, size=30, class="initial_focus") %][% L.input_tag('dbhost', dbhost, size=30, class="initial_focus") %] [% LxERP.t8('Port') %][% L.input_tag('dbport', FORM.dbport, size=6) %][% L.input_tag('dbport', dbport, size=6) %]
[% LxERP.t8('Database User') %][% L.input_tag("dbuser", FORM.dbuser, size=30) %][% L.input_tag("dbuser", dbuser, size=30) %] [% LxERP.t8('Password') %][% L.input_tag("dbpasswd", FORM.dbpasswd, type='password', size=30) %][% L.input_tag("dbpasswd", dbpasswd, type='password', size=30) %]
[% LxERP.t8('Database template') %][% L.input_tag("dbdefault", FORM.dbdefault, size=30) %][% L.input_tag("dbdefault", dbdefault, size=30) %]
-
- [% L.hidden_tag("action", 'Admin/dispatch') %] - [% L.submit_tag('action_create_dataset', LxERP.t8('Create Dataset')) %] - [% L.submit_tag('action_delete_dataset', LxERP.t8('Delete Dataset')) %] -
-
+ [% L.hidden_tag("action", 'Admin/dispatch') %] -

[% LxERP.t8('This is a preliminary check for existing sources. Nothing will be created or deleted at this stage!') %]

+

+ [% L.submit_tag('action_' _ next_action, LxERP.t8('Login')) %] +

+ diff --git a/templates/webpages/admin/delete_dataset.html b/templates/webpages/admin/delete_dataset.html index e3b61151c..dcc3b9e65 100644 --- a/templates/webpages/admin/delete_dataset.html +++ b/templates/webpages/admin/delete_dataset.html @@ -4,8 +4,6 @@

[% HTML.escape(title) %]

-

[% LxERP.t8('Back') %]

-

[% LxERP.t8('You can only delete datasets that are not in use.') %] [% LxERP.t8('If you want to delete such a dataset you have to edit the client(s) that are using the dataset in question and have them use another dataset.') %] diff --git a/templates/webpages/admin/edit_client.html b/templates/webpages/admin/edit_client.html index dc5ca4585..cd9983fcf 100644 --- a/templates/webpages/admin/edit_client.html +++ b/templates/webpages/admin/edit_client.html @@ -5,8 +5,6 @@

[% HTML.escape(title) %]

-

[% L.link(SELF.url_for(action="show"), LxERP.t8("Back")) %]

-
[% L.hidden_tag("client.id", SELF.client.id) %] [% L.hidden_tag("action", "") %] diff --git a/templates/webpages/admin/edit_group.html b/templates/webpages/admin/edit_group.html index f9247f52e..d471e5a29 100644 --- a/templates/webpages/admin/edit_group.html +++ b/templates/webpages/admin/edit_group.html @@ -5,8 +5,6 @@

[% HTML.escape(title) %]

-

[% L.link(SELF.url_for(action="show"), LxERP.t8("Back")) %]

- [% L.hidden_tag("group.id", SELF.group.id) %] [% L.hidden_tag("action", "") %] diff --git a/templates/webpages/admin/edit_printer.html b/templates/webpages/admin/edit_printer.html index 7064416eb..8553c5328 100644 --- a/templates/webpages/admin/edit_printer.html +++ b/templates/webpages/admin/edit_printer.html @@ -2,14 +2,26 @@ [% INCLUDE 'common/flash.html' %] +[% IF !SELF.all_clients.size %] +
+ [% LxERP.t8("Error") %]: + [% LxERP.t8("No clients have been created yet.") %] +
+ +[%- ELSE %] +

[% HTML.escape(title) %]

- [% L.hidden_tag("client.id", SELF.client.id) %] [% L.hidden_tag("action", 'Admin/dispatch') %] [% L.hidden_tag("printer.id", SELF.printer.id) %] + + + + + @@ -33,3 +45,5 @@

+ +[% END %] diff --git a/templates/webpages/admin/edit_user.html b/templates/webpages/admin/edit_user.html index b8b5dc4df..ff6a188eb 100644 --- a/templates/webpages/admin/edit_user.html +++ b/templates/webpages/admin/edit_user.html @@ -5,8 +5,6 @@

[% HTML.escape(title) %]

-

[% L.link(SELF.url_for(action="show"), LxERP.t8("Back")) %]

- [% L.hidden_tag("user.id", SELF.user.id) %] [% L.hidden_tag("action", "") %] diff --git a/templates/webpages/admin/list_printers.html b/templates/webpages/admin/list_printers.html index 4da7effa8..a91fa7509 100644 --- a/templates/webpages/admin/list_printers.html +++ b/templates/webpages/admin/list_printers.html @@ -10,22 +10,8 @@ [% LxERP.t8("No clients have been created yet.") %] - - [%- ELSE %] -
- [% LxERP.t8("Actions") %]: - - [% LxERP.t8("Back") %] - | - [% LxERP.t8("Add printer") %] -
- -
-

[% LxERP.t8("Client to configure the printers for") %]: [% L.select_tag('client.id', SELF.all_clients, id='client_id', title_key='name', default=SELF.client.id) %] diff --git a/templates/webpages/admin/show.html b/templates/webpages/admin/show.html index f8bd272b9..7189665d4 100644 --- a/templates/webpages/admin/show.html +++ b/templates/webpages/admin/show.html @@ -4,32 +4,6 @@

[% HTML.escape(title) %]

-
- [% LxERP.t8("Actions") %]: - - [% L.link(SELF.url_for(action="new_user"), LxERP.t8("Add User")) %] - | - [% L.link(SELF.url_for(action="new_client"), LxERP.t8("Add Client")) %] - | - [% L.link(SELF.url_for(action="new_group"), LxERP.t8("Add User Group")) %] - | - [% L.link(SELF.url_for(action="database_administration"), LxERP.t8("Pg Database Administration")) %] - | - [% L.link(SELF.url_for(action="list_printers"), LxERP.t8("Printer Management")) %] - | - [% IF SELF.is_locked %] - [% L.link(SELF.url_for(action="unlock_system"), LxERP.t8("Unlock System")) %] - [% ELSE %] - [% L.link(SELF.url_for(action="lock_system"), LxERP.t8("Lock System")) %] - [% END %] - | - [% L.link(SELF.url_for(action="logout"), LxERP.t8("Logout")) %] - | - [% L.link(SELF.url_for(controller="LoginScreen", action="user_login"), LxERP.t8("To user login")) %] -
- -
-
  • [%- LxERP.t8("User list") %]
  • diff --git a/templates/webpages/admin/show_lock.html b/templates/webpages/admin/show_lock.html new file mode 100644 index 000000000..f9a9cddec --- /dev/null +++ b/templates/webpages/admin/show_lock.html @@ -0,0 +1,30 @@ +[%- USE HTML %][%- USE LxERP -%][%- USE L -%] + +[% INCLUDE 'common/flash.html' %] + +

    [% HTML.escape(title) %]

    + +[% IF SELF.is_locked %] +

    + [% LxERP.t8("The installation is currently locked.") %] + [% LxERP.t8("Normal users cannot log in.") %] + [% LxERP.t8("The administration area is always accessible.") %] +

    + +

    [% LxERP.t8("Unlock System") %]

    + +[% ELSE %] + +

    + [% LxERP.t8("The installation is currently unlocked.") %] + [% LxERP.t8("Everyone can log in.") %] +

    + +

    + [% LxERP.t8("If you lock the system normal users won't be able to log in.") %] + [% LxERP.t8("The administration area is always accessible.") %] +

    + +

    [% LxERP.t8("Lock System") %]

    + +[% END %] diff --git a/templates/webpages/ct/ajax_autocomplete2.json b/templates/webpages/ct/ajax_autocomplete2.json deleted file mode 100644 index f4a44e31f..000000000 --- a/templates/webpages/ct/ajax_autocomplete2.json +++ /dev/null @@ -1,11 +0,0 @@ -[%- USE HTML %][% USE JSON %][ -[%- FOREACH customer = SELF.customers %] - { - "value": [% customer.${SELF.value}.json %], - "label": [% customer.displayable_name.json %], - "id": [% customer.id.json %], - "customernumber": [% customer.customernumber.json %], - "name": [% customer.name.json %] - }[% ',' UNLESS loop.last %] -[%- END %] -] diff --git a/templates/webpages/customer_vendor/form.html b/templates/webpages/customer_vendor/form.html new file mode 100644 index 000000000..c8ec6b02e --- /dev/null +++ b/templates/webpages/customer_vendor/form.html @@ -0,0 +1,105 @@ +[%- USE T8 %] +[%- USE LxERP %] +[%- USE L %] + +[% cv_cvars = SELF.cv.cvars_by_config %] + + +
    [% FORM.title %]
    + + [% L.hidden_tag('db', FORM.db) %] + [% L.hidden_tag('callback', FORM.callback) %] + [% L.hidden_tag('cv.id', SELF.cv.id) %] + + [%- INCLUDE 'common/flash.html' %] + +
    + + + [% PROCESS "customer_vendor/tabs/billing.html" %] + [% PROCESS "customer_vendor/tabs/shipto.html" %] + [% PROCESS "customer_vendor/tabs/contacts.html" %] + [% IF ( SELF.cv.id ) %] + [% PROCESS "customer_vendor/tabs/deliveries.html" %] + [% END %] + [% PROCESS "customer_vendor/tabs/vcnotes.html" %] + [% IF ( cv_cvars.size ) %] + [% PROCESS "customer_vendor/tabs/custom_variables.html" %] + [% END %] +
    + +
    + + [% L.hidden_tag('action', 'CustomerVendor/dispatch') %] + + [% L.submit_tag('action_save', LxERP.t8('Save'), onclick = "return check_taxzone_and_ustid()", accesskey = "s") %] + [% L.submit_tag('action_save_and_close', LxERP.t8('Save and Close'), onclick = "return check_taxzone_and_ustid()") %] + + [%- IF ( SELF.is_vendor ) %] + [% L.submit_tag('action_save_and_ap_transaction', LxERP.t8('Save and AP Transaction'), onclick = "return check_taxzone_and_ustid()") %] + [%- ELSE %] + [% L.submit_tag('action_save_and_ar_transaction', LxERP.t8('Save and AR Transaction'), onclick = "return check_taxzone_and_ustid()") %] + [%- END %] + + [% L.submit_tag('action_save_and_invoice', LxERP.t8('Save and Invoice'), onclick = "return check_taxzone_and_ustid()") %] + [% L.submit_tag('action_save_and_order', LxERP.t8('Save and Order'), onclick = "return check_taxzone_and_ustid()") %] + + [%- IF ( SELF.is_vendor ) %] + [% L.submit_tag('action_save_and_rfq', LxERP.t8('Save and RFQ'), onclick = "return check_taxzone_and_ustid()") %] + [%- ELSE %] + [% L.submit_tag('action_save_and_quotation', LxERP.t8('Save and Quotation'), onclick = "return check_taxzone_and_ustid()") %] + [%- END %] + + [%- IF ( SELF.cv.id && SELF.is_orphaned ) %] + [% L.submit_tag('action_delete', LxERP.t8('Delete'), confirm => LxERP.t8('Do you really want to delete this object?')) %] + [%- END %] + + [%- IF ( SELF.cv.id ) %] + + [%- END %] + + + + + diff --git a/templates/webpages/customer_vendor/get_delivery.html b/templates/webpages/customer_vendor/get_delivery.html new file mode 100644 index 000000000..7cfc76fe7 --- /dev/null +++ b/templates/webpages/customer_vendor/get_delivery.html @@ -0,0 +1,48 @@ +[% USE T8 %] +[% USE HTML %] +[% USE LxERP %] +
    +
[% LxERP.t8('Client') %][% L.select_tag("client.id", SELF.all_clients, default=SELF.client.id, title_key='name') %]
[% LxERP.t8('Printer Description') %] [% L.input_tag("printer.printer_description", SELF.printer.printer_description, size=30, class="initial_focus") %]
+ + + +
+ + + + + + + + + + [% IF ( SELF.is_customer() ) %] + + [% ELSE %] + + [%- END %] + + + + [% FOREACH row = SELF.delivery %] + [% row.script = SELF.is_vendor() ? ( row.invoice ? 'ir' : 'ap' ) : ( row.invoice ? 'is' : 'ar' ) %] + + + + + + + + + + + [% END %] + +
[% 'Shipping Address' | $T8 %][% 'Invoice' | $T8 %][% 'Order' | $T8 %][% 'Invdate' | $T8 %][% 'Description' | $T8 %][% 'Qty' | $T8 %][% 'Unit' | $T8 %][% 'Sell Price' | $T8 %][% 'Last Cost' | $T8 %]
[% HTML.escape(row.shiptoname) UNLESS loop.prev.shiptoname == row.shiptoname %] [% IF row.id %][% END %][% HTML.escape(row.invnumber) || ' ' %][% IF row.id %][% END %][% IF row.oe_id %][% END %][% HTML.escape(row.ordnumber) || ' ' %][% IF row.oe_id %][% END %][% HTML.escape(row.transdate) || ' ' %][% HTML.escape(row.description) || ' ' %][% HTML.escape(row.qty) || ' ' %][% HTML.escape(row.unit) || ' ' %][% LxERP.format_amount(row.sellprice, 2) || ' ' %]
+ + [% IF DELIVERY.size == 15 %] +

[% 'This list is capped at 15 items to keep it fast. If you need a full list, please use reports.' | $T8 %]

+ [% END %] + +
+ diff --git a/templates/webpages/customer_vendor/render_cvar_input.html b/templates/webpages/customer_vendor/render_cvar_input.html new file mode 100644 index 000000000..c1b77203d --- /dev/null +++ b/templates/webpages/customer_vendor/render_cvar_input.html @@ -0,0 +1,34 @@ +[%- USE T8 %] +[%- USE HTML %] +[%- USE L %] +[%- USE LxERP %] + +[%- SET var_name = HTML.escape(cvar_name_prefix) _ HTML.escape(var.config.name) _ HTML.escape(cvar_name_postfix) %] + +[%- IF ( hide_non_editable && !var.config.is_flag('editable') ) %] + [% L.hidden_tag(var_name, var.value) %] +[%- ELSIF ( !var.is_valid ) %] + [%- IF ( show_disabled_message ) %] + [% 'Element disabled' | $T8 %] + [%- END %] +[%- ELSIF ( var.config .type == 'bool' ) %] + [% L.checkbox_tag(var_name, checked = var.value) %] +[%- ELSIF ( var.config .type == 'textfield' ) %] + [% L.textarea_tag(var_name, var.value, cols = var.config.processed_options.WIDTH, rows = var.config.processed_options.HEIGHT) %] +[%- ELSIF ( var.config.type == 'date' ) %] + [% L.date_tag(var_name, var.value) %] +[%- ELSIF ( var.config.type == 'timestamp' ) %] + [% L.input_tag(var_name, var.value) %] +[%- ELSIF ( var.config.type == 'customer' ) %] + [% L.customer_picker(var_name, var.value) %] +[%- ELSIF ( var.config.type == 'vendor' ) %] + [% L.vendor_selector(var_name, var.value) %] +[%- ELSIF ( var.config.type == 'part' ) %] + [% L.part_selector(var_name, var.value) %] +[%- ELSIF ( var.config.type == 'select' ) %] + [% L.select_tag(var_name, var.config.processed_options, default = var.value) %] +[%- ELSIF ( var.config.type == 'number' ) %] + [%- L.input_tag(var_name, LxERP.format_amount(var.value, -2)) %] +[%- ELSE %] + [% L.input_tag(var_name, var.value, maxlength = var.config.processed_options.MAXLENGTH) %] +[%- END %] diff --git a/templates/webpages/customer_vendor/tabs/billing.html b/templates/webpages/customer_vendor/tabs/billing.html new file mode 100644 index 000000000..b7dfe9ea2 --- /dev/null +++ b/templates/webpages/customer_vendor/tabs/billing.html @@ -0,0 +1,380 @@ +[%- USE T8 %] +[%- USE HTML %] +[%- USE LxERP %] +[%- USE L %] + +
+ + + + + [% IF ( conf_vertreter ) %] + + + + + + + + + + + + + [%- END %] + + + [% IF SELF.is_vendor() %] + + + [%- ELSE %] + + + [%- END %] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ [% IF SELF.is_vendor() %] + [% 'Type of Vendor' | $T8 %] + [% ELSE %] + [% 'Type of Customer' | $T8 %] + [% END %] + + [% L.select_tag('cv.business_id', SELF.all_business, value_key = 'id', title_key = 'description', default = SELF.cv.business_id, with_empty = 1) %] +
+ [% 'Representative' | $T8 %] + + [% L.select_tag('cv.salesman_id', SELF.all_salesman_customers, default = SELF.cv.salesman_id, value_key = 'id', title_key = 'name', with_empty = 1) %] +
[% 'Vendor Number' | $T8 %] + [% L.input_tag('cv.vendornumber', SELF.cv.vendornumber) %] + [% 'Customer Number' | $T8 %] + [% L.input_tag('cv.customernumber', SELF.cv.customernumber) %] +
[% 'Greeting' | $T8 %] + [% L.input_tag('cv.greeting', SELF.cv.greeting) %] + [% L.select_tag('cv_greeting_select', SELF.all_greetings, default = SELF.cv.greeting, with_empty = 1, onchange = '$("#cv_greeting").val(this.value);') %] +
+ [% IF SELF.is_vendor() %] + [% 'Vendor Name' | $T8 %] + [%- ELSE %] + [% 'Customer Name' | $T8 %] + [%- END %] + + [% L.input_tag('cv.name', SELF.cv.name) %] +
[% 'Department' | $T8 %] + [% L.input_tag('cv.department_1', SELF.cv.department_1, size = 16, maxlength = 75) %] + [% L.input_tag('cv.department_2', SELF.cv.department_2, size = 16, maxlength = 75) %] +
[% 'Street' | $T8 %] + [% L.input_tag('cv.street', SELF.cv.street, size = 35, maxlength = 75) %] + + +
[% 'Zipcode' | $T8 %]/[% 'City' | $T8 %] + [% L.input_tag('cv.zipcode', SELF.cv.zipcode, size = 5 maxlength = 10) %] + [% L.input_tag('cv.city', SELF.cv.city, size = 30 maxlength = 75) %] +
[% 'Country' | $T8 %] + [% L.input_tag('cv.country', SELF.cv.country, size = 30 maxlength = 75) %] +
[% 'Contact' | $T8 %] + [% L.input_tag('cv.contact', SELF.cv.contact, size = 28 maxlength = 75) %] +
[% 'Phone' | $T8 %] + [% L.input_tag('cv.phone', SELF.cv.phone, size = 30) %] +
[% 'Fax' | $T8 %] + [% L.input_tag('cv.fax', SELF.cv.fax, size = 30 maxlength = 30) %] +
[% 'E-mail' | $T8 %] + [% L.input_tag('cv.email', SELF.cv.email, size = 45) %] +
[% 'Cc E-mail' | $T8 %] + [% L.input_tag('cv.cc', SELF.cv.bcc, size = 45) %] +
[% 'Bcc E-mail' | $T8 %] + [% L.input_tag('cv.bcc', SELF.cv.bcc, size = 45) %] +
+ [% IF homepage %] + [% 'Homepage' | $T8 %] + [% ELSE %] + [% 'Homepage' | $T8 %] + [% END %] + + [% L.input_tag('cv.homepage', SELF.cv.homepage, size = 45, title = LxERP.t8('Example: http://kivitendo.de')) %] +
[% 'Username' | $T8 %] + [% L.input_tag('cv.username', SELF.cv.username, size = 45) %] +
[% 'Password' | $T8 %] + [% L.input_tag('cv.user_password', SELF.cv.user_password, size = 45) %] +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [%- IF ( SELF.is_vendor() ) %] + + + [%- ELSE %] + + + [%- END %] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [% IF ( SELF.all_currencies.size ) %] + + + + [% END %] + + + + [% IF ( !conf_vertreter ) %] + + + + [% END %] + + + + + + + [% IF ( SELF.is_customer() ) %] + + + + [% END %] + + + + + + + + + + + + + + + + + + + + [% IF ( SELF.is_customer() && !conf_vertreter ) %] + + + + [%- END %] + + + + + + +
[% 'Credit Limit' | $T8 %] + [% L.input_tag('cv.creditlimit_as_number', SELF.cv.creditlimit_as_number, size = 9) %] + [% 'Payment Terms' | $T8 %] + [% L.select_tag('cv.payment_id', SELF.all_payment_terms, value_key = 'id', title_key = 'description', default = SELF.cv.payment_id, with_empty = 1) %] + [% 'Discount' | $T8 %] + [% L.input_tag('cv.discount_as_percent', SELF.cv.discount_as_percent, size = 4) %] +
[% 'Tax Number / SSN' | $T8 %] + [% L.input_tag('cv.taxnumber', SELF.cv.taxnumber, size = 20) %] + [% 'sales tax identification number' | $T8 %] + [% L.input_tag('cv.ustid', SELF.cv.ustid, maxlength = 14 size = 20 ) %] + [% 'Customer Number' | $T8 %] + [% L.input_tag('cv.v_customer_id', SELF.cv.v_customer_id, size = 10) %] + [% 'our vendor number at customer' | $T8 %] + [% L.input_tag('cv.c_vendor_id', SELF.cv.c_vendor_id, size = 10) %] +
[% 'Account Number' | $T8 %] + [% L.input_tag('cv.account_number', SELF.cv.account_number, size = 10, maxlength = 100) %] + [% 'Bank Code Number' | $T8 %] + [% L.input_tag('cv.bank_code', SELF.cv.bank_code, size = 10, maxlength = 100) %] + [% 'Bank' | $T8 %] + [% L.input_tag('cv.bank', SELF.cv.bank, size = 20) %] +
[% 'IBAN' | $T8 %] + [% L.input_tag('cv.iban', SELF.cv.iban, size = 10, maxlength = 100) %] + [% 'BIC' | $T8 %] + [% L.input_tag('cv.bic', SELF.cv.bic, size = 10, maxlength = 100) %] + [% 'Currency' | $T8 %] + [% L.select_tag('cv.currency_id', SELF.all_currencies, title_key = 'name', value_key = 'id', default = SELF.cv.currency_id, with_empty = 1) %] +
+ [% IF ( SELF.is_vendor() ) %] + [% 'Type of Vendor' | $T8 %] + [% ELSE %] + [% 'Type of Customer' | $T8 %] + [% END %] + + [% L.select_tag('cv.business_id', SELF.all_business, default = SELF.cv.business_id, value_key = 'id', title_key = 'description', with_empty = 1) %] + [% 'Language' | $T8 %] + [% L.select_tag('cv.language_id', SELF.all_languages, default = SELF.cv.language_id, value_key = 'id', title_key = 'description', with_empty = 1) %] + [% 'Preisklasse' | $T8 %] + [% L.select_tag('cv.klass', SELF.all_pricegroups, default = SELF.cv.klass, value_key = 'id', title_key = 'pricegroup', with_empty = 1) %] +
+ + + [% L.checkbox_tag('cv.obsolete', checked = SELF.cv.obsolete) %] + + + + [% L.checkbox_tag('cv.direct_debit', checked = SELF.cv.direct_debit) %] +
[% 'Steuersatz' | $T8 %] + [% L.select_tag('cv.taxzone_id', SELF.all_taxzones, default = SELF.cv.taxzone_id, value_key = 'id', title_key = 'description') %] + [% 'Salesman' | $T8 %] + [% L.select_tag('cv.salesman_id', SELF.all_salesmen, default = SELF.cv.salesman_id, value_key = 'id', title_key = 'safe_name', with_empty = 1) %] + [% 'taxincluded checked' | $T8 %] + [% L.select_tag('cv.taxincluded_checked', [[undef, LxERP.t8('use user config')], ['1', LxERP.t8('Yes')], ['0', LxERP.t8('No')]], default = SELF.cv.taxincluded_checked) %] +
+ + + + + + + + + +
[% 'Internal Notes' | $T8 %]
+ [% L.textarea_tag('cv.notes', SELF.cv.notes, rows = 3 cols = 60 wrap = soft) %] +
+
diff --git a/templates/webpages/customer_vendor/tabs/contacts.html b/templates/webpages/customer_vendor/tabs/contacts.html new file mode 100644 index 000000000..6420cbe7e --- /dev/null +++ b/templates/webpages/customer_vendor/tabs/contacts.html @@ -0,0 +1,233 @@ +[%- USE T8 %] +[%- USE HTML %] +[%- USE LxERP %] +[%- USE L %] + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [% contact_cvars = SELF.contact.cvars_by_config %] + + [% IF ( contact_cvars.size ) %] + + + + + [% FOREACH var = contact_cvars %] + + + + + + [% END %] + [% END %] + +
[% 'Contacts' | $T8 %] + [% + L.select_tag( + 'contact.cp_id', + SELF.contacts, + default = SELF.contact.cp_id, + with_empty = 1, + empty_title = LxERP.t8('New contact'), + value_key = 'cp_id', + title_key = 'full_name', + onchange = "kivi.CustomerVendor.selectContact({onFormSet: function(){contactsMapWidget.testInputs();}});", + ) + %] +
[% 'Gender' | $T8 %] + [% + L.select_tag( + 'contact.cp_gender', + [['m', LxERP.t8('male')], ['f', LxERP.t8('female')]], + default = SELF.contact.cp_gender + ) + %] +
[% 'Title' | $T8 %] + [% L.input_tag('contact.cp_title', SELF.contact.cp_title, size = 40 maxlength = 75) %] + [% L.select_tag('contact_cp_title_select', SELF.all_titles, with_empty = 1, onchange = '$("#contact_cp_title").val(this.value);') %] +
[% 'Department' | $T8 %] + [% L.input_tag('contact.cp_abteilung', SELF.contact.cp_abteilung, size = 40) %] + [% L.select_tag('contact_cp_abteilung_select', SELF.all_departments, default = SELF.contact.cp_abteilung, with_empty = 1, onchange = '$("#contact_cp_abteilung").val(this.value);') %] +
[% 'Function/position' | $T8 %] + [% L.input_tag('contact.cp_position', SELF.contact.cp_position, size = 40, maxlength = 75) %] +
[% 'Given Name' | $T8 %] + [% L.input_tag('contact.cp_givenname', SELF.contact.cp_givenname, size = 40, maxlength = 75) %] +
[% 'Name' | $T8 %] + [% L.input_tag('contact.cp_name', SELF.contact.cp_name, size = 40, maxlength = 75) %] +
[% 'E-mail' | $T8 %] + [% L.input_tag('contact.cp_email', SELF.contact.cp_email, size = 40) %] +
[% 'Phone1' | $T8 %] + [% L.input_tag('contact.cp_phone1', SELF.contact.cp_phone1, size = 40, maxlength = 75) %] +
[% 'Phone2' | $T8 %] + [% L.input_tag('contact.cp_phone2', SELF.contact.cp_phone2, size = 40, maxlength = 75) %] +
[% 'Fax' | $T8 %] + [% L.input_tag('contact.cp_fax', SELF.contact.cp_fax, size = 40) %] +
[% 'Mobile1' | $T8 %] + [% L.input_tag('contact.cp_mobile1', SELF.contact.cp_mobile1, size = 40) %] +
[% 'Mobile2' | $T8 %] + [% L.input_tag('contact.cp_mobile2', SELF.contact.cp_mobile2, size = 40) %] +
[% 'Sat. Phone' | $T8 %] + [% L.input_tag('contact.cp_satphone', SELF.contact.cp_satphone, size = 40) %] +
[% 'Sat. Fax' | $T8 %] + [% L.input_tag('contact.cp_satfax', SELF.contact.cp_satfax, size = 40) %] +
[% 'Project' | $T8 %] + [% L.input_tag('contact.cp_project', SELF.contact.cp_project, size = 40) %] +
[% 'Street' | $T8 %] + [% L.input_tag('contact.cp_street', SELF.contact.cp_street, size = 40, maxlength = 75) %] + + +
[% 'Zip, City' | $T8 %] + [% L.input_tag('contact.cp_zipcode', SELF.contact.cp_zipcode, size = 5, maxlength = 10) %] + [% L.input_tag('contact.cp_city', SELF.contact.cp_city, size = 25, maxlength = 75) %] +
[% 'Private Phone' | $T8 %] + [% L.input_tag('contact.cp_privatphone', SELF.contact.cp_privatphone, size = 40) %] +
[% 'Private E-mail' | $T8 %] + [% L.input_tag('contact.cp_privatemail', SELF.contact.cp_privatemail, size = 40) %] +
[% 'Birthday' | $T8 %] + [% L.date_tag('contact.cp_birthday', SELF.contact.cp_birthday) %] +
+
+
[% var.config.description | html %] + [% PROCESS 'customer_vendor/render_cvar_input.html' + cvar_name_prefix = 'contact_cvars.' + %] +
+ + [% L.button_tag('submitInputButton(this);', LxERP.t8('Delete Contact'), name = 'action_delete_contact', class = 'submit') %] + [% IF ( !SELF.contact.cp_id ) %] + + [% END %] +
diff --git a/templates/webpages/customer_vendor/tabs/custom_variables.html b/templates/webpages/customer_vendor/tabs/custom_variables.html new file mode 100644 index 000000000..a0a90f9e5 --- /dev/null +++ b/templates/webpages/customer_vendor/tabs/custom_variables.html @@ -0,0 +1,19 @@ +[%- USE HTML %] + +
+

+ + [% FOREACH var = cv_cvars %] + + + + + + [% END %] +
[% var.config.description | html %] + [% PROCESS 'customer_vendor/render_cvar_input.html' + cvar_name_prefix = 'cv_cvars.' + %] +
+

+
diff --git a/templates/webpages/customer_vendor/tabs/deliveries.html b/templates/webpages/customer_vendor/tabs/deliveries.html new file mode 100644 index 000000000..8cf755fae --- /dev/null +++ b/templates/webpages/customer_vendor/tabs/deliveries.html @@ -0,0 +1,58 @@ +[%- USE T8 %] +[%- USE LxERP %] +[%- USE L %] + +
+ + + + + + + + + + + + + + + + + + + + +
[% 'Shipping Address' | $T8 %] + [% temp = [{shipto_id = 'all', displayable_id = LxERP.t8('All')}] %] + [% temp = temp.merge(SELF.shiptos) %] + [% + L.select_tag( + 'delivery_id', + temp, + value_key = 'shipto_id', + title_key = 'displayable_id', + with_empty = 1, + onchange = "kivi.CustomerVendor.selectDelivery();" + ) + %] +
[% 'From' | $T8 %] + [% + L.date_tag( + 'delivery_from', + FORM.delivery_from, + onchange => "kivi.CustomerVendor.selectDelivery(this.form.delivery_from.value, this.form.delivery_to.value);" + ) + %] + [% 'To (time)' | $T8 %] + [% + L.date_tag( + 'delivery_to', + FORM.delivery_to, + onchange => "kivi.CustomerVendor.selectDelivery(this.form.delivery_from.value, this.form.delivery_to.value);" + ) + %] +
+
+
+
diff --git a/templates/webpages/customer_vendor/tabs/shipto.html b/templates/webpages/customer_vendor/tabs/shipto.html new file mode 100644 index 000000000..0b238c34b --- /dev/null +++ b/templates/webpages/customer_vendor/tabs/shipto.html @@ -0,0 +1,114 @@ +[%- USE T8 %] +[%- USE LxERP %] +[%- USE L %] + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
[% 'Shipping Address' | $T8 %] + [% L.select_tag( + 'shipto.shipto_id', + SELF.shiptos, + default = SELF.shipto.shipto_id, + value_key = 'shipto_id', + title_key = 'displayable_id', + with_empty = 1, + empty_title = LxERP.t8('New shipto'), + onchange = "kivi.CustomerVendor.selectShipto({onFormSet: function(){shiptoMapWidget.testInputs();}});", + ) + %] +
[% 'Name' | $T8 %] + [% L.input_tag('shipto.shiptoname', SELF.shipto.shiptoname, size = 35, maxlength = 75) %] +
[% 'Abteilung' | $T8 %] + [% L.input_tag('shipto.shiptodepartment_1', SELF.shipto.shiptodepartment_1, size = 16, maxlength = 75) %] + [% L.input_tag('shipto.shiptodepartment_2', SELF.shipto.shiptodepartment_2, size = 16, maxlength = 75) %] +
[% 'Street' | $T8 %] + [% L.input_tag('shipto.shiptostreet', SELF.shipto.shiptostreet, size = 35, maxlength = 75) %] + + + +
[% 'Zipcode' | $T8 %]/[% 'City' | $T8 %] + [% L.input_tag('shipto.shiptozipcode', SELF.shipto.shiptostreet, size = 5, maxlength = 75) %] + [% L.input_tag('shipto.shiptocity', SELF.shipto.shiptocity, size = 30, maxlength = 75) %] +
[% 'Country' | $T8 %] + [% L.input_tag('shipto.shiptocountry', SELF.shipto.shiptocountry, size = 35, maxlength = 75) %] +
[% 'Contact' | $T8 %] + [% L.input_tag('shipto.shiptocontact', SELF.shipto.shiptocontact, size = 30, maxlength = 75) %] +
[% 'Phone' | $T8 %] + [% L.input_tag('shipto.shiptophone', SELF.shipto.shiptophone, size = 30, maxlength = 30) %] +
[% 'Fax' | $T8 %] + [% L.input_tag('shipto.shiptofax', SELF.shipto.shiptofax, size = 30, maxlength = 30) %] +
[% 'E-mail' | $T8 %] + [% L.input_tag('shipto.shiptoemail', SELF.shipto.shiptoemail, size = 45) %] +
+ + [% L.button_tag('submitInputButton(this);', LxERP.t8('Delete Shipto'), name = 'action_delete_shipto', class = 'submit') %] + [% IF ( !SELF.shipto.shipto_id ) %] + + [% END %] +
diff --git a/templates/webpages/customer_vendor/tabs/vcnotes.html b/templates/webpages/customer_vendor/tabs/vcnotes.html new file mode 100644 index 000000000..04bf9516d --- /dev/null +++ b/templates/webpages/customer_vendor/tabs/vcnotes.html @@ -0,0 +1,126 @@ +[%- USE T8 %] +[%- USE HTML %] +[%- USE L %] + +
+ [% IF ( NOTES && NOTES.size ) %] +

+ + + + + + + + + + + + [%- FOREACH row = SELF.notes %] + + + + + + + + + + + + + + + + [% END %] +
[% 'Delete' | $T8 %][% 'Subject' | $T8 %][% 'Created on' | $T8 %][% 'Created by' | $T8 %][% 'Follow-Up Date' | $T8 %][% 'Follow-Up for' | $T8 %][% 'Follow-Up done' | $T8 %]
+ [% L.hidden_tag('notes[+].id', row.id) %] + [% IF ( !NOTE_id || (NOTE_id != row.id) ) %] + [% L.checkbox_tag('notes[].delete', 0) %] + [% END %] + + [% HTML.escape(row.subject) %] + + [% HTML.escape(row.created_on) %] + + [% IF ( row.created_by_name ) %] + [% HTML.escape(row.created_by_name) %] + [% ELSE %] + [% HTML.escape(row.created_by_login) %] + [% END %] + + [% HTML.escape(row.follow_up_date) %] + + [% IF ( row.created_for_name ) %] + [% HTML.escape(row.created_for_name) %] + [% ELSE %] + [% HTML.escape(row.created_for_login) %] + [% END %] + + [% IF ( row.follow_up_date ) %] + [% IF ( row.follow_up_done ) %] + [% 'Yes' | $T8 %] + [% ELSE %] + [% 'No' | $T8 %] + [% END %] + [% END %] +
+

+ [% END %] + +
+ [% IF ( NOTE_id ) %] + [% 'Edit note' | $T8 %] + [% ELSE %] + [% 'Add note' | $T8 %] + [% END %] +
+ + [% L.hidden_tag('note.id', SELF.note.id) %] + +

+ + + + + + + + + + + + + + + + + + + + + + + + + +
[% 'Subject' | $T8 %] + [% L.input_tag('note.subject', SELF.note.subject, size = 50) %] +
[% 'Body' | $T8 %] + [% L.textarea_tag('note.body', SELF.note.body, cols = 50 rows = 10) %] +
[% 'Follow-Up On' | $T8 %] + [% L.date_tag('note_followup.follow_up_date', SELF.note_followup.follow_up_date) %] + [% 'for' | $T8 %] + [% L.select_tag( + 'note_followup.created_for_user', + SELF.all_employees, + default = SELF.note_followup.created_for_user, + title_key = 'safe_name' + ) + %] +
  + [% L.checkbox_tag('note_followup.done', checked = SELF.note_followup.done) %] + +
+

+
diff --git a/templates/webpages/inventory/_stock.html b/templates/webpages/inventory/_stock.html index 4bd57ebd4..3b018b41f 100644 --- a/templates/webpages/inventory/_stock.html +++ b/templates/webpages/inventory/_stock.html @@ -5,7 +5,7 @@ [%- IF SELF.part.id %]

[% LxERP.t8('Stock for part #1', SELF.part.long_description) %]

-[%- IF stock_empty && !SELF.part.bin_id %] +[%- IF SELF.stock_empty && !SELF.part.bin_id %]

[% 'Nothing stocked yet.' | $T8 %]

[%- ELSE %] @@ -17,7 +17,7 @@ [%- FOREACH wh = SELF.warehouses -%] [%- FOREACH bin = wh.bins -%] [%#- display any bins with stock and default bin -%] - [%- SET stock__set = stock.${bin.id} -%] + [%- SET stock__set = SELF.stock_by_bin.${bin.id} -%] [%- IF stock__set.sum > 0 || SELF.part.bin_id == bin.id -%] diff --git a/templates/webpages/menu/menuv3.html b/templates/webpages/menu/menuv3.html index a89b268b9..cb7231c1f 100644 --- a/templates/webpages/menu/menuv3.html +++ b/templates/webpages/menu/menuv3.html @@ -1,5 +1,6 @@ [%- USE T8 %] [% USE HTML %][%- USE LxERP -%] +[% UNLESS skip_frame_header %]
[% bin.warehouse.description %]