text:
// Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License.  You may obtain a copy
// of the License at
//
//   http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
// License for the specific language governing permissions and limitations under
// the License.

couchTests.users_db = function(debug) {

  // This tests the users db, especially validations
  // this should also test that you can log into the couch

  var users_db_name = '_users';
  var usersDb = new CouchDB(users_db_name, {"X-Couch-Full-Commit":"false"});
  try { usersDb.createDb(); } catch (e) { /* ignore if exists*/ }
  // have a 2nd "normal" DB 2 provoke conflicts
  var usersDbAlt = new CouchDB(get_random_db_name(), {"X-Couch-Full-Commit":"false"});
  usersDbAlt.createDb();

  // test that you can treat "_user" as a db-name
  // this can complicate people who try to secure the users db with
  // an http proxy and fail to get both the actual db and the _user path
  // maybe it's not the right approach...
  // hard to know what else to do, as we don't let non-admins inspect the config
  // to determine the actual users db name.

  function testFun() {

    // test that the validation function is installed
    // this will fail When the test is run in isolation,
    // since it doesn't wait for the ddoc to be created.
    // in a full test suite run, this is fine.
    // dev trick: run `test/javascript/run basics users_db`
    // var ddoc = usersDb.open("_design/_auth");
    // T(ddoc.validate_doc_update);

    // test that you can login as a user using basic auth
    var jchrisUserDoc = CouchDB.prepareUserDoc({
      name: "jchris@apache.org"
    }, "funnybone");
    T(usersDb.save(jchrisUserDoc).ok);

    T(CouchDB.session().userCtx.name == null);

    // test that you can use basic auth aginst the users db
    var s = CouchDB.session({
      headers : {
        //                 base64_encode("jchris@apache.org:funnybone")
        "Authorization" : "Basic amNocmlzQGFwYWNoZS5vcmc6ZnVubnlib25l"
      }
    });
    T(s.userCtx.name == "jchris@apache.org");
    T(s.info.authenticated == "default");
    T(s.info.authentication_db == "" + users_db_name + "");
    TEquals(["cookie", "default"], s.info.authentication_handlers);
    var s = CouchDB.session({
      headers : {
        "Authorization" : "Basic Xzpf" // name and pass of _:_
      }
    });
    T(s.name == null);
    T(typeof(s.info.authenticated) === 'undefined');
    CouchDB.logout();

    // ok, now create a conflicting edit on the jchris doc, and make sure there's no login.
    // (use replication to create the conflict) - need 2 be admin
    CouchDB.login("jan", "apple");
    CouchDB.replicate(usersDb.name, usersDbAlt.name);
    // save in one DB
    var jchrisUser2 = JSON.parse(JSON.stringify(jchrisUserDoc));
    jchrisUser2.foo = "bar";

    T(usersDb.save(jchrisUser2).ok);
    try {
      usersDb.save(jchrisUserDoc);
      T(false && "should be an update conflict");
    } catch(e) {
      T(true);
    }

    // then in the other
    var jchrisUser3 = JSON.parse(JSON.stringify(jchrisUserDoc));
    jchrisUser3.foo = "barrrr";
    T(usersDbAlt.save(jchrisUser3).ok);
    CouchDB.replicate(usersDbAlt.name, usersDb.name); // now we should have a conflict

    var jchrisWithConflict = usersDb.open(jchrisUserDoc._id, {conflicts : true});
    T(jchrisWithConflict._conflicts.length == 1);
    CouchDB.logout();

    wait(5000) // wait for auth_cache invalidation

    // no login with conflicted user doc
    try {
      var s = CouchDB.session({
        headers : {
          "Authorization" : "Basic amNocmlzQGFwYWNoZS5vcmc6ZnVubnlib25l"
        }
      });
      T(false && "this will throw");
    } catch(e) {
      T(e.error == "unauthorized");
      T(/conflict/.test(e.reason));
    }

    // you can delete a user doc
    // there is NO admin party here - so we have to login again
    CouchDB.login("jan", "apple");
    s = CouchDB.session().userCtx;
    //T(s.name == null);
    //console.log(JSON.stringify(usersDb.allDocs()));
    T(s.roles.indexOf("_admin") !== -1);
// TODO: fix deletion of user docs
//    T(usersDb.deleteDoc(jchrisWithConflict).ok);

    // you can't change doc from type "user"
    jchrisUserDoc = usersDb.open(jchrisUserDoc._id);
    jchrisUserDoc.type = "not user";
    try {
      usersDb.save(jchrisUserDoc);
      T(false && "should only allow us to save doc when type == 'user'");
    } catch(e) {
      T(e.reason == "doc.type must be user");
    }
    jchrisUserDoc.type = "user";

    // "roles" must be an array
    jchrisUserDoc.roles = "not an array";
    try {
      usersDb.save(jchrisUserDoc);
      T(false && "should only allow us to save doc when roles is an array");
    } catch(e) {
      T(e.reason == "doc.roles must be an array");
    }
    jchrisUserDoc.roles = [];

    // "roles" must be an array of strings
    jchrisUserDoc.roles = [12];
    try {
      usersDb.save(jchrisUserDoc);
      T(false && "should only allow us to save doc when roles is an array of strings");
    } catch(e) {
      TEquals(e.reason, "doc.roles can only contain strings");
    }
    jchrisUserDoc.roles = [];

    // "roles" must exist
    delete jchrisUserDoc.roles;
    try {
      usersDb.save(jchrisUserDoc);
      T(false && "should only allow us to save doc when roles exists");
    } catch(e) {
      T(e.reason == "doc.roles must exist");
    }
    jchrisUserDoc.roles = [];

    // character : is not allowed in usernames
    var joeUserDoc = CouchDB.prepareUserDoc({
      name: "joe:erlang"
    }, "qwerty");
    try {
      usersDb.save(joeUserDoc);
      T(false, "shouldn't allow : in usernames");
    } catch(e) {
      TEquals("Character `:` is not allowed in usernames.", e.reason);
    }

    // test that you can login as a user with a password starting with :
    var doc = CouchDB.prepareUserDoc({
      name: "foo@example.org"
    }, ":bar");
    T(usersDb.save(doc).ok);
    CouchDB.logout();

    T(CouchDB.session().userCtx.name == null);

    // test that you can use basic auth aginst the users db
    var s = CouchDB.session({
      headers : {
        //                 base64_encode("foo@example.org::bar")
        "Authorization" : "Basic Zm9vQGV4YW1wbGUub3JnOjpiYXI="
      }
    });
    T(s.userCtx.name == "foo@example.org");

  };

  run_on_modified_server(
    [{section: "couch_httpd_auth",
      key: "authentication_db", value: usersDb.name},
     {section: "chttpd_auth",
       key: "authentication_db", value: usersDb.name},
     {section: "couch_httpd_auth",
      key: "iterations", value: "1"},
     {section: "admins",
      key: "jan", value: "apple"}],
    function() {
      try {
        testFun();
      } finally {
        CouchDB.login("jan", "apple");
        usersDb.deleteDb(); // cleanup
        usersDb.createDb();
        usersDbAlt.deleteDb(); // cleanup
      }
    }
  );
  CouchDB.logout();
}


text:
// grunt-move
// https://github.com/prantlf/grunt-move
//
// Copyright (c) 2017-2022 Ferdinand Prantl
// Licensed under the MIT license.
//
// Grunt task for moving and renaming files and directories

'use strict';

var fs = require('fs'),
    path = require('path'),
    colorette = require('colorette'),
    async = require('async');

module.exports = function (grunt) {
  grunt.registerMultiTask('move', 'Moves and renames files and directories.', function () {
    var done = this.async(),
        options = this.options({
          ignoreMissing: false,
          moveAcrossVolumes: false
        }),
        files = this.files,
        moved = 0,
        failed = 0;

    if (!files.length) {
      if (!options.ignoreMissing) {
        grunt.fail.warn('No files or directories specified.');
      }
      return done();
    }

    function moveAll(file, allDone) {
      if (!file.src.length) {
        if (!options.ignoreMissing) {
          grunt.fail.warn('No files or directories found at ' +
            colorette.cyan(file.orig.src) + '.');
        }
        return allDone();
      }

      function moveOne(src, oneDone) {
        var dest = file.dest,
            trailingChar = dest[dest.length - 1],
            dir;

        if ((trailingChar === '/' || trailingChar === path.sep) &&
            !file.orig.expand) {
          dir = dest.substring(0, dest.length - 1);
          dest = path.join(dest, path.basename(src));
        } else {
          dir = path.dirname(dest);
        }

        grunt.file.mkdir(dir);

        if (dir === path.dirname(src)) {
          grunt.verbose.writeln('Renaming ' + colorette.cyan(src) + ' to ' +
            colorette.cyan(path.basename(dest)) + '.');
        } else {
          grunt.verbose.writeln('Moving ' + colorette.cyan(src) + ' to ' +
            colorette.cyan(dest) + '.');
        }

        fs.rename(src, dest, function (err) {
          /* c8 ignore next 21 */
          if (err) {
            if (err.code === 'EXDEV') {
              if (options.moveAcrossVolumes) {
                grunt.verbose.writeln('Copying ' + colorette.cyan(src) + ' across devices.');
                grunt.file.copy(src, dest);

                grunt.verbose.writeln('Deleting ' + colorette.cyan(src) + '.');
                grunt.file.delete(src);
                ++moved;
              } else {
                grunt.verbose.error();
                grunt.log.error(err);
                grunt.fail.warn('Moving files across devices has not been enabled.');
                ++failed;
              }
            } else {
              grunt.verbose.error();
              grunt.log.error(err);
              grunt.fail.warn('Moving failed.');
              ++failed;
            }
          } else {
            ++moved;
          }
          oneDone();
        });
      }

      async.eachSeries(file.src, moveOne, allDone);
    }

    async.eachSeries(files, moveAll, function (err) {
      grunt.log.ok(moved + ' ' + grunt.util.pluralize(moved, 'file/files') +
          ' or ' + grunt.util.pluralize(moved, 'directory/directories') + ' moved, ' +
          failed + ' failed.');
      done(err);
    });
  });
};

redpajama_set_name: RedPajamaGithub


text:
import * as vscode from 'vscode';

import { CANCEL } from '../../constants';
import { handleError } from '../../utils';

export default function showVersionsQuickPick({ json, selectedPackageName }: { json: any, selectedPackageName: string }): Promise<any | never> {
    // TODO: This could probably use more error handling.
    const versions = json.versions.slice().reverse().concat('Latest version (Wildcard *)');

    return new Promise((resolve, reject) => {
        vscode.window.showQuickPick(versions, {
            placeHolder: 'Select the version to add.'
        }).then((selectedVersion: string | undefined) => {
            if (!selectedVersion) {
                // User canceled.
                return reject(CANCEL);
            }
            resolve({ selectedVersion, selectedPackageName });
        });
    });
}


text:
Additional header content

\[Missing  documentation for "M:iTin.Export.ComponentModel.ModelService.TryGetUnderlyingDataAsDataTable(System.Data.DataTable@)"\]

**Namespace:** iTin.Export.ComponentModel
**Assembly:** iTin.Export.Core (in iTin.Export.Core.dll) Version: 2.0.0.0 (2.0.0.0)

## Syntax

**C#**

``` C#
public bool TryGetUnderlyingDataAsDataTable(
	out DataTable data
)
```

**VB**

``` VB
Public Function TryGetUnderlyingDataAsDataTable (
	<OutAttribute> ByRef data As DataTable
) As Boolean
```

#### Parameters

data

Type: System.Data.DataTable
\[Missing <param name="data"/> documentation for "M:iTin.Export.ComponentModel.ModelService.TryGetUnderlyingDataAsDataTable(System.Data.DataTable@)"\]

#### Return Value
Type: Boolean
\[Missing <returns> documentation for "M:iTin.Export.ComponentModel.ModelService.TryGetUnderlyingDataAsDataTable(System.Data.DataTable@)"\]

## Remarks
\[Missing <remarks> documentation for "M:iTin.Export.ComponentModel.ModelService.TryGetUnderlyingDataAsDataTable(System.Data.DataTable@)"\]

## See Also

#### Reference
ModelService Class
iTin.Export.ComponentModel Namespace


text:
#pragma once

#include <boost/program_options.hpp>
#include <boost/shared_ptr.hpp>
#include <string>

#include "WhipURI.h"

namespace aperture
{
	/**
	 * Singleton class for accessing configuration settings
	 */
	class Settings
	{
	public:
		typedef boost::shared_ptr<boost::program_options::variables_map> VariablesMapPtr;

	private:
		const static short DEFAULT_HTTP_PORT = 8000;

		static const char* const SETTINGS_FILE;
		static Settings* _instance;
		VariablesMapPtr _vm;
		std::string _configFileName;

		void verifyOptions();
		void cfConfigError() const;

	public:
		/**
		Retrieves the single instance of the settings object
		*/
		static Settings& instance() {
			if (! _instance) {
				_instance = new Settings(SETTINGS_FILE);
			}

			return *_instance;
		}

	public:
		Settings(const std::string& settingsFile);
		virtual ~Settings();

		const boost::program_options::variables_map& config() const;

		/**
		 * Reloads the settings from the config file on disk
		 */
		void reload();

		/**
		 * Returns the parsed whip url stored in the whip_url setting
		 */
		whip::WhipURI getWhipURL() const;
	};

}


text:
import React, { Component } from 'react';
import withStyles from '../../../../node_modules/isomorphic-style-loader/lib/withStyles';
import s from './Feedback.scss';

class Feedback extends Component {

  render() {
    return (

          Ask a question
          |
          Report an issue

    );
  }
}

export default withStyles(Feedback, s);


text:
import React, {Component, PropTypes } from 'react';

export default class MiniHeader extends Component {
  render() {
    return (
      <mini_header_component onClick={this.props.onClick}>
        <img src={this.props.image}/>
        <description>
          <text_description>
            <author> {this.props.author} </author>
            <title>{this.props.title}</title>
           </text_description>
        </description>
      </mini_header_component>
    );
  }
}

MiniHeader.propTypes = {
  onClick: PropTypes.func.isRequired,
  image: PropTypes.string.isRequired,
  author: PropTypes.string.isRequired,
  title: PropTypes.string.isRequired
};


text:
from __future__ import absolute_import, print_function

from functools import wraps

def singleton(cls):
    """Decorate a class as singleton.

    Inspired by: https://wiki.python.org/moin/PythonDecoratorLibrary#Singleton
    """

    cls.__new_original__ = cls.__new__

    @wraps(cls.__new__)
    def singleton_new(cls, *args, **kw):
        it = cls.__dict__.get('__it__')
        if it is not None:
            return it

        cls.__it__ = it = cls.__new_original__(cls, *args, **kw)
        it.__init_original__(*args, **kw)
        return it

    cls.__new__ = staticmethod(singleton_new)
    cls.__init_original__ = cls.__init__
    cls.__init__ = object.__init__

    return cls


text:
var fs = require('fs'),
    http = require('http'),
    url = require('url');

var server = http.createServer(function(req, res) {
  let path = url.parse(req.url, true).query.path;
	fs.readFileSync(path.substring(i, j)); // OK
	fs.readFileSync(path.substring(4)); // NOT OK
	fs.readFileSync(path.substring(0, i)); // NOT OK
	fs.readFileSync(path.substr(4)); // NOT OK
	fs.readFileSync(path.slice(4)); // NOT OK

	fs.readFileSync(path.concat(unknown)); // NOT OK
	fs.readFileSync(unknown.concat(path)); // NOT OK
	fs.readFileSync(unknown.concat(unknown, path)); // NOT OK

	fs.readFileSync(path.trim()); // NOT OK
	fs.readFileSync(path.toLowerCase()); // NOT OK

	fs.readFileSync(path.split('/')); // OK (readFile throws an exception when the filename is an array)
	fs.readFileSync(path.split('/')[0]); // OK -- for now
	fs.readFileSync(path.split('/')[i]); // NOT OK
	fs.readFileSync(path.split(/\//)[i]); // NOT OK
	fs.readFileSync(path.split("?")[0]); // NOT OK
	fs.readFileSync(path.split(unknown)[i]); // NOT OK -- but not yet flagged [INCONSISTENCY]
	fs.readFileSync(path.split(unknown).whatever); // OK -- but still flagged [INCONSISTENCY]
	fs.readFileSync(path.split(unknown)); // NOT OK
	fs.readFileSync(path.split("?")[i]); // NOT OK -- but not yet flagged [INCONSISTENCY]
});

server.listen();


text:
/*	$NetBSD: inet_netof.c,v 1.1.1.1 2009/04/12 15:33:35 christos Exp $	*/

/*
 * Copyright (c) 1983, 1993
 *	The Regents of the University of California.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 3. All advertising materials mentioning features or use of this software
 *    must display the following acknowledgement:
 *	This product includes software developed by the University of
 *	California, Berkeley and its contributors.
 * 4. Neither the name of the University nor the names of its contributors
 *    may be used to endorse or promote products derived from this software
 *    without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 */

#if defined(LIBC_SCCS) && !defined(lint)
static const char sccsid[] = "@(#)inet_netof.c	8.1 (Berkeley) 6/4/93";
#endif /* LIBC_SCCS and not lint */

#include "port_before.h"

#include <sys/param.h>
#include <netinet/in.h>
#include <arpa/inet.h>

#include "port_after.h"

/*%
 * Return the network number from an internet
 * address; handles class a/b/c network #'s.
 */
u_long
inet_netof(in)
	struct in_addr in;
{
	register u_long i = ntohl(in.s_addr);

	if (IN_CLASSA(i))
		return (((i)&IN_CLASSA_NET) >> IN_CLASSA_NSHIFT);
	else if (IN_CLASSB(i))
		return (((i)&IN_CLASSB_NET) >> IN_CLASSB_NSHIFT);
	else
		return (((i)&IN_CLASSC_NET) >> IN_CLASSC_NSHIFT);
}

/*! \file */


text:
// tslint:disable:no-implicit-dependencies
// tslint:disable:non-null-operator
import { Path, virtualFs } from '@angular-devkit/core';
import {
  FileSystemTree,
  MergeStrategy,
  partitionApplyMerge,
} from '@angular-devkit/schematics';
import { of as observableOf } from 'rxjs';
import { Rule, SchematicContext, Source } from '../engine/interface';
import { Tree } from '../tree/interface';
import { empty } from '../tree/static';
import { apply, chain } from './base';
import { callRule, callSource } from './call';

const context: SchematicContext = {
  engine: null,
  debug: false,
  strategy: MergeStrategy.Default,
} as {} as SchematicContext;

describe('chain', () => {
  it('works with simple rules', done => {
    const rulesCalled: Tree[] = [];

    const tree0 = empty();
    const tree1 = empty();
    const tree2 = empty();
    const tree3 = empty();

    const rule0: Rule = (tree: Tree) => (rulesCalled[0] = tree, tree1);
    const rule1: Rule = (tree: Tree) => (rulesCalled[1] = tree, tree2);
    const rule2: Rule = (tree: Tree) => (rulesCalled[2] = tree, tree3);

    callRule(chain([ rule0, rule1, rule2 ]), observableOf(tree0), context)
      .toPromise()
      .then(result => {
        expect(result).not.toBe(tree0);
        expect(rulesCalled[0]).toBe(tree0);
        expect(rulesCalled[1]).toBe(tree1);
        expect(rulesCalled[2]).toBe(tree2);
        expect(result).toBe(tree3);
      })
      .then(done, done.fail);
  });

  it('works with observable rules', done => {
    const rulesCalled: Tree[] = [];

    const tree0 = empty();
    const tree1 = empty();
    const tree2 = empty();
    const tree3 = empty();

    const rule0: Rule = (tree: Tree) => (rulesCalled[0] = tree, observableOf(tree1));
    const rule1: Rule = (tree: Tree) => (rulesCalled[1] = tree, observableOf(tree2));
    const rule2: Rule = (tree: Tree) => (rulesCalled[2] = tree, tree3);

    callRule(chain([ rule0, rule1, rule2 ]), observableOf(tree0), context)
      .toPromise()
      .then(result => {
        expect(result).not.toBe(tree0);
        expect(rulesCalled[0]).toBe(tree0);
        expect(rulesCalled[1]).toBe(tree1);
        expect(rulesCalled[2]).toBe(tree2);
        expect(result).toBe(tree3);
      })
      .then(done, done.fail);
  });
});

describe('apply', () => {
  it('works with simple rules', done => {
    const rulesCalled: Tree[] = [];
    let sourceCalled = false;

    const tree0 = empty();
    const tree1 = empty();
    const tree2 = empty();
    const tree3 = empty();

    const source: Source = () => (sourceCalled = true, tree0);
    const rule0: Rule = (tree: Tree) => (rulesCalled[0] = tree, tree1);
    const rule1: Rule = (tree: Tree) => (rulesCalled[1] = tree, tree2);
    const rule2: Rule = (tree: Tree) => (rulesCalled[2] = tree, tree3);

    callSource(apply(source, [ rule0, rule1, rule2 ]), context)
      .toPromise()
      .then(result => {
        expect(result).not.toBe(tree0);
        expect(rulesCalled[0]).toBe(tree0);
        expect(rulesCalled[1]).toBe(tree1);
        expect(rulesCalled[2]).toBe(tree2);
        expect(result).toBe(tree3);
      })
      .then(done, done.fail);
  });

  it('works with observable rules', done => {
    const rulesCalled: Tree[] = [];
    let sourceCalled = false;

    const tree0 = empty();
    const tree1 = empty();
    const tree2 = empty();
    const tree3 = empty();

    const source: Source = () => (sourceCalled = true, tree0);
    const rule0: Rule = (tree: Tree) => (rulesCalled[0] = tree, observableOf(tree1));
    const rule1: Rule = (tree: Tree) => (rulesCalled[1] = tree, observableOf(tree2));
    const rule2: Rule = (tree: Tree) => (rulesCalled[2] = tree, tree3);

    callSource(apply(source, [ rule0, rule1, rule2 ]), context)
      .toPromise()
      .then(result => {
        expect(result).not.toBe(tree0);
        expect(rulesCalled[0]).toBe(tree0);
        expect(rulesCalled[1]).toBe(tree1);
        expect(rulesCalled[2]).toBe(tree2);
        expect(result).toBe(tree3);
      })
      .then(done, done.fail);
  });
});

describe('partitionApplyMerge', () => {
  it('works with simple rules', done => {
    const host = new virtualFs.test.TestHost({
      '/test1': '',
      '/test2': '',
    });
    const tree = new FileSystemTree(host);
    const predicate = (path: Path) => path.indexOf('1') != -1;

    const ruleYes: Rule = (tree: Tree) => {
      expect(tree.exists('/test1')).toBe(true);
      expect(tree.exists('/test2')).toBe(false);

      return empty();
    };
    const ruleNo: Rule = (tree: Tree) => {
      expect(tree.exists('/test1')).toBe(false);
      expect(tree.exists('/test2')).toBe(true);

      return empty();
    };

    callRule(partitionApplyMerge(predicate, ruleYes, ruleNo), observableOf(tree), context)
      .toPromise()
      .then(result => {
        expect(result.exists('/test1')).toBe(false);
        expect(result.exists('/test2')).toBe(false);
      })
      .then(done, done.fail);
  });
});


text:
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * SPanelQueryIntegralEmployee.java
 *
 */

package erp.gui;

import erp.data.SDataConstants;
import erp.data.SDataConstantsSys;
import erp.data.SDataUtilities;
import erp.gui.grid.SGridFilterPanelEmployee;
import erp.lib.SLibConstants;
import erp.lib.SLibUtilities;
import erp.lib.table.STableColumnForm;
import erp.lib.table.STableConstants;
import erp.lib.table.STablePaneGrid;
import erp.lib.table.STableSetting;
import erp.lib.table.STableTabInterface;
import erp.mbps.data.SDataBizPartner;
import erp.mbps.data.SDataEmployee;
import erp.mbps.data.SRowIntegralEmployee;
import erp.mod.SModConsts;
import erp.mod.SModSysConsts;
import erp.mod.hrs.db.SDbBenefitTable;
import erp.mod.hrs.db.SDbBenefitTableRow;
import erp.mod.hrs.db.SDbConfig;
import erp.mod.hrs.db.SHrsBenefitTableAnniversary;
import erp.mod.hrs.db.SHrsConsts;
import erp.mod.hrs.db.SHrsUtils;
import java.awt.BorderLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ItemEvent;
import java.sql.ResultSet;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashSet;
import java.util.Vector;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JToggleButton;
import javax.swing.event.ListSelectionEvent;
import sa.gui.util.SUtilConsts;
import sa.lib.SLibConsts;
import sa.lib.SLibTimeUtils;
import sa.lib.SLibUtils;
import sa.lib.db.SDbRegistry;
import sa.lib.grid.SGridUtils;
import sa.lib.gui.SGuiItem;

/**
 *
 * @author Juan Barajas, Sergio Flores
 */
public class SPanelQueryIntegralEmployee extends javax.swing.JPanel implements STableTabInterface, javax.swing.event.ListSelectionListener, java.awt.event.ActionListener, java.awt.event.ItemListener {

    public static final String NO_PHOTO = "(Foto no disponible)";
    public static final String NO_SIGNATURE = "(Firma no disponible)";

    int mnPanelType;
    private erp.client.SClientInterface miClient;
    private erp.lib.table.STablePane moTablePaneEmpAvailable;
    private boolean mbHasRightEmpWage;

    private SDataBizPartner moBizPartner;
    private ArrayList<SHrsBenefitTableAnniversary> maBenefitTableVacationAnniversarys = null;
    private ArrayList<SHrsBenefitTableAnniversary> maBenefitTableVacationBonusAnniversarys = null;
    private ArrayList<SHrsBenefitTableAnniversary> maBenefitTableAnnualBonusAnniversarys = null;

    private int mnFilterPaymentTypeId;
    private int mnFilterDepartamentId;
    private int mnFilterStatusEmployee;

    /** Creates new form SPanelQueryIntegralEmployee
     * @param client
     */
    public SPanelQueryIntegralEmployee(erp.client.SClientInterface client) {
        try {
            mnPanelType = SModConsts.HRSX_EMP_INT;
            miClient = client;

            initComponents();
            initComponentsExtra();
        }
        catch (Exception ex) {
            SLibUtilities.printOutException(this, ex);
        }
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        gpbFilter = new javax.swing.ButtonGroup();
        jPanel1 = new javax.swing.JPanel();
        jPanel3 = new javax.swing.JPanel();
        jpEmployeesAvailable = new javax.swing.JPanel();
        jpFilter = new javax.swing.JPanel();
        jtbStatusEmployeeActive = new javax.swing.JToggleButton();
        jtbStatusEmployeeInactive = new javax.swing.JToggleButton();
        jtbStatusEmployeeAll = new javax.swing.JToggleButton();
        jcbFilterPaymentType = new javax.swing.JComboBox();
        jbClearFilterPaymentType = new javax.swing.JButton();
        jlTotalAvailables = new javax.swing.JLabel();
        jpInformation = new javax.swing.JPanel();
        jPanel4 = new javax.swing.JPanel();
        jPanel7 = new javax.swing.JPanel();
        jPanel13 = new javax.swing.JPanel();
        jlFirstName = new javax.swing.JLabel();
        jtfFirstName = new javax.swing.JTextField();
        jPanel21 = new javax.swing.JPanel();
        jlFiscalId = new javax.swing.JLabel();
        jtfFiscalId = new javax.swing.JTextField();
        jlAlternativeId = new javax.swing.JLabel();
        jtfAlternativeId = new javax.swing.JTextField();
        jlSocialSecurityNumber = new javax.swing.JLabel();
        jtfSocialSecurityNumber = new javax.swing.JTextField();
        jPanel22 = new javax.swing.JPanel();
        jlDateBirth = new javax.swing.JLabel();
        jftDateBirth = new javax.swing.JFormattedTextField();
        jLabel4 = new javax.swing.JLabel();
        jlDateBenefits = new javax.swing.JLabel();
        jftDateBenefits = new javax.swing.JFormattedTextField();
        jPanel15 = new javax.swing.JPanel();
        jlDateLastHire = new javax.swing.JLabel();
        jftDateLastHire = new javax.swing.JFormattedTextField();
        jLabel7 = new javax.swing.JLabel();
        jlDateLastDismissal_n = new javax.swing.JLabel();
        jftDateLastDismissal_n = new javax.swing.JFormattedTextField();
        jPanel18 = new javax.swing.JPanel();
        jlSalary = new javax.swing.JLabel();
        jtfSalary = new javax.swing.JTextField();
        jftDateChangeSalary = new javax.swing.JFormattedTextField();
        jlWage = new javax.swing.JLabel();
        jtfWage = new javax.swing.JTextField();
        jftDateChangeWage = new javax.swing.JFormattedTextField();
        jPanel20 = new javax.swing.JPanel();
        jlSalarySscBase = new javax.swing.JLabel();
        jtfSalarySscBase = new javax.swing.JTextField();
        jftDateChangeSalarySscBase = new javax.swing.JFormattedTextField();
        jPanel19 = new javax.swing.JPanel();
        jlBank = new javax.swing.JLabel();
        jtfBank = new javax.swing.JTextField();
        jlBankAccount = new javax.swing.JLabel();
        jtfBankAccount = new javax.swing.JTextField();
        jPanel16 = new javax.swing.JPanel();
        jlSex = new javax.swing.JLabel();
        jtfSex = new javax.swing.JTextField();
        jlMarital = new javax.swing.JLabel();
        jtfMarital = new javax.swing.JTextField();
        jlFkBloodType = new javax.swing.JLabel();
        jtfBloodType = new javax.swing.JTextField();
        jPanel9 = new javax.swing.JPanel();
        jlEducationType = new javax.swing.JLabel();
        jtfEducationType = new javax.swing.JTextField();
        jlMwzType = new javax.swing.JLabel();
        jtfMwzType = new javax.swing.JTextField();
        jlWorkingHoursDay = new javax.swing.JLabel();
        jtfWorkingHoursDay = new javax.swing.JTextField();
        jPanel5 = new javax.swing.JPanel();
        jPanel12 = new javax.swing.JPanel();
        jPanel10 = new javax.swing.JPanel();
        jPanel26 = new javax.swing.JPanel();
        jlSeniority = new javax.swing.JLabel();
        jtfSeniority = new javax.swing.JTextField();
        jlSeniorityYear = new javax.swing.JLabel();
        jtfSeniorityDays = new javax.swing.JTextField();
        jlSeniorityDays = new javax.swing.JLabel();
        jPanel11 = new javax.swing.JPanel();
        jlDummy = new javax.swing.JLabel();
        jlBenefit = new javax.swing.JLabel();
        jlDummy1 = new javax.swing.JLabel();
        jlBenefitProp = new javax.swing.JLabel();
        jlProportional = new javax.swing.JLabel();
        jlDummy2 = new javax.swing.JLabel();
        jlPaymentProp = new javax.swing.JLabel();
        jPanel27 = new javax.swing.JPanel();
        jlAnnualBonus = new javax.swing.JLabel();
        jtfAnnualBonusBenefit = new javax.swing.JTextField();
        jlAnnualBonusBenefit = new javax.swing.JLabel();
        jtfAnnualBonusPropPer = new javax.swing.JTextField();
        jtfAnnualBonusProp = new javax.swing.JTextField();
        jlAnnualBonusProp = new javax.swing.JLabel();
        jtfAnnualBonusPayProp = new javax.swing.JTextField();
        jlAnnualBonusPayProp = new javax.swing.JLabel();
        jPanel28 = new javax.swing.JPanel();
        jlVacations = new javax.swing.JLabel();
        jtfVacationsBenefit = new javax.swing.JTextField();
        jlVacationsBenefit = new javax.swing.JLabel();
        jtfVacationsPropPer = new javax.swing.JTextField();
        jtfVacationsProp = new javax.swing.JTextField();
        jlVacationsProp = new javax.swing.JLabel();
        jtfVacationsPayProp = new javax.swing.JTextField();
        jlVacationsPayProp = new javax.swing.JLabel();
        jPanel29 = new javax.swing.JPanel();
        jlVacationsBonus = new javax.swing.JLabel();
        jtfVacationsBonusBenefit = new javax.swing.JTextField();
        jlDummy3 = new javax.swing.JLabel();
        jtfVacationsBonusPayProp = new javax.swing.JTextField();
        jlVacationsBonusPayProp = new javax.swing.JLabel();
        jPanel31 = new javax.swing.JPanel();
        jlSettlement = new javax.swing.JLabel();
        jtfSettlement = new javax.swing.JTextField();
        jlIndemnification = new javax.swing.JLabel();
        jtfIndemnification = new javax.swing.JTextField();
        jlRJDj = new javax.swing.JLabel();
        jtfIndemnificationDisL = new javax.swing.JTextField();
        jlDisL = new javax.swing.JLabel();
        jtfIndemnificationDicL = new javax.swing.JTextField();
        jlDicL = new javax.swing.JLabel();
        jPanel6 = new javax.swing.JPanel();
        jlImgPhoto = new javax.swing.JLabel();
        jlImgSignature = new javax.swing.JLabel();

        setLayout(new java.awt.BorderLayout());

        jPanel1.setLayout(new java.awt.BorderLayout());

        jPanel3.setLayout(new java.awt.BorderLayout());
        jPanel1.add(jPanel3, java.awt.BorderLayout.NORTH);

        jpEmployeesAvailable.setBorder(javax.swing.BorderFactory.createTitledBorder("Empleados:"));
        jpEmployeesAvailable.setLayout(new java.awt.BorderLayout());

        jpFilter.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT, 5, 0));

        gpbFilter.add(jtbStatusEmployeeActive);
        jtbStatusEmployeeActive.setIcon(new javax.swing.ImageIcon(getClass().getResource("/erp/img/icon_std_po_act_off.gif"))); // NOI18N
        jtbStatusEmployeeActive.setPreferredSize(new java.awt.Dimension(23, 23));
        jpFilter.add(jtbStatusEmployeeActive);

        gpbFilter.add(jtbStatusEmployeeInactive);
        jtbStatusEmployeeInactive.setIcon(new javax.swing.ImageIcon(getClass().getResource("/erp/img/icon_std_po_ina_off.gif"))); // NOI18N
        jtbStatusEmployeeInactive.setPreferredSize(new java.awt.Dimension(23, 23));
        jpFilter.add(jtbStatusEmployeeInactive);

        gpbFilter.add(jtbStatusEmployeeAll);
        jtbStatusEmployeeAll.setIcon(new javax.swing.ImageIcon(getClass().getResource("/erp/img/switch_filter_off.gif"))); // NOI18N
        jtbStatusEmployeeAll.setPreferredSize(new java.awt.Dimension(23, 23));
        jpFilter.add(jtbStatusEmployeeAll);

        jcbFilterPaymentType.setToolTipText("Filtrar periodo pago");
        jcbFilterPaymentType.setPreferredSize(new java.awt.Dimension(125, 23));
        jpFilter.add(jcbFilterPaymentType);

        jbClearFilterPaymentType.setIcon(new javax.swing.ImageIcon(getClass().getResource("/sa/lib/img/cmd_std_delete_tmp.gif"))); // NOI18N
        jbClearFilterPaymentType.setToolTipText("Quitar filtro periodo pago");
        jbClearFilterPaymentType.setPreferredSize(new java.awt.Dimension(23, 23));
        jpFilter.add(jbClearFilterPaymentType);

        jpEmployeesAvailable.add(jpFilter, java.awt.BorderLayout.NORTH);

        jlTotalAvailables.setText("n");
        jpEmployeesAvailable.add(jlTotalAvailables, java.awt.BorderLayout.SOUTH);

        jPanel1.add(jpEmployeesAvailable, java.awt.BorderLayout.CENTER);

        jpInformation.setLayout(new java.awt.BorderLayout());

        jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder("Datos personales:"));
        jPanel4.setLayout(new java.awt.BorderLayout());

        jPanel7.setLayout(new java.awt.GridLayout(9, 0, 0, 3));

        jPanel13.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT, 5, 0));

        jlFirstName.setText("Nombre:");
        jlFirstName.setPreferredSize(new java.awt.Dimension(75, 23));
        jPanel13.add(jlFirstName);

        jtfFirstName.setEditable(false);
        jtfFirstName.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        jtfFirstName.setText("X");
        jtfFirstName.setFocusable(false);
        jtfFirstName.setPreferredSize(new java.awt.Dimension(310, 23));
        jPanel13.add(jtfFirstName);

        jPanel7.add(jPanel13);

        jPanel21.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT, 5, 0));

        jlFiscalId.setText("RFC:");
        jlFiscalId.setPreferredSize(new java.awt.Dimension(75, 23));
        jPanel21.add(jlFiscalId);

        jtfFiscalId.setEditable(false);
        jtfFiscalId.setText("X");
        jtfFiscalId.setFocusable(false);
        jtfFiscalId.setPreferredSize(new java.awt.Dimension(100, 23));
        jPanel21.add(jtfFiscalId);

        jlAlternativeId.setText("CURP:");
        jlAlternativeId.setPreferredSize(new java.awt.Dimension(50, 23));
        jPanel21.add(jlAlternativeId);

        jtfAlternativeId.setEditable(false);
        jtfAlternativeId.setText("X");
        jtfAlternativeId.setFocusable(false);
        jtfAlternativeId.setPreferredSize(new java.awt.Dimension(150, 23));
        jPanel21.add(jtfAlternativeId);

        jlSocialSecurityNumber.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        jlSocialSecurityNumber.setText("NSS:");
        jlSocialSecurityNumber.setPreferredSize(new java.awt.Dimension(50, 23));
        jPanel21.add(jlSocialSecurityNumber);

        jtfSocialSecurityNumber.setEditable(false);
        jtfSocialSecurityNumber.setText("X");
        jtfSocialSecurityNumber.setFocusable(false);
        jtfSocialSecurityNumber.setPreferredSize(new java.awt.Dimension(75, 23));
        jPanel21.add(jtfSocialSecurityNumber);

        jPanel7.add(jPanel21);

        jPanel22.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT, 5, 0));

        jlDateBirth.setText("Nacimiento:");
        jlDateBirth.setPreferredSize(new java.awt.Dimension(75, 23));
        jPanel22.add(jlDateBirth);

        jftDateBirth.setEditable(false);
        jftDateBirth.setText("yyyy/mm/dd");
        jftDateBirth.setFocusable(false);
        jftDateBirth.setPreferredSize(new java.awt.Dimension(75, 23));
        jPanel22.add(jftDateBirth);

        jLabel4.setPreferredSize(new java.awt.Dimension(20, 23));
        jPanel22.add(jLabel4);

        jlDateBenefits.setText("Inicio beneficios:");
        jlDateBenefits.setPreferredSize(new java.awt.Dimension(100, 23));
        jPanel22.add(jlDateBenefits);

        jftDateBenefits.setEditable(false);
        jftDateBenefits.setText("yyyy/mm/dd");
        jftDateBenefits.setFocusable(false);
        jftDateBenefits.setPreferredSize(new java.awt.Dimension(75, 23));
        jPanel22.add(jftDateBenefits);

        jPanel7.add(jPanel22);

        jPanel15.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT, 5, 0));

        jlDateLastHire.setText("Última alta:");
        jlDateLastHire.setPreferredSize(new java.awt.Dimension(75, 23));
        jPanel15.add(jlDateLastHire);

        jftDateLastHire.setEditable(false);
        jftDateLastHire.setText("yyyy/mm/dd");
        jftDateLastHire.setFocusable(false);
        jftDateLastHire.setPreferredSize(new java.awt.Dimension(75, 23));
        jPanel15.add(jftDateLastHire);

        jLabel7.setPreferredSize(new java.awt.Dimension(20, 23));
        jPanel15.add(jLabel7);

        jlDateLastDismissal_n.setText("Última baja:");
        jlDateLastDismissal_n.setPreferredSize(new java.awt.Dimension(100, 23));
        jPanel15.add(jlDateLastDismissal_n);

        jftDateLastDismissal_n.setEditable(false);
        jftDateLastDismissal_n.setText("yyyy/mm/dd");
        jftDateLastDismissal_n.setFocusable(false);
        jftDateLastDismissal_n.setPreferredSize(new java.awt.Dimension(75, 23));
        jPanel15.add(jftDateLastDismissal_n);

        jPanel7.add(jPanel15);

        jPanel18.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT, 5, 0));

        jlSalary.setText("Salario diario:");
        jlSalary.setPreferredSize(new java.awt.Dimension(75, 23));
        jPanel18.add(jlSalary);

        jtfSalary.setEditable(false);
        jtfSalary.setHorizontalAlignment(javax.swing.JTextField.TRAILING);
        jtfSalary.setText("0.0000");
        jtfSalary.setFocusable(false);
        jtfSalary.setPreferredSize(new java.awt.Dimension(100, 23));
        jPanel18.add(jtfSalary);

        jftDateChangeSalary.setEditable(false);
        jftDateChangeSalary.setText("yyyy/mm/dd");
        jftDateChangeSalary.setFocusable(false);
        jftDateChangeSalary.setPreferredSize(new java.awt.Dimension(75, 23));
        jPanel18.add(jftDateChangeSalary);

        jlWage.setText("Sueldo mensual:");
        jlWage.setPreferredSize(new java.awt.Dimension(100, 23));
        jPanel18.add(jlWage);

        jtfWage.setEditable(false);
        jtfWage.setHorizontalAlignment(javax.swing.JTextField.TRAILING);
        jtfWage.setText("0.0000");
        jtfWage.setFocusable(false);
        jtfWage.setPreferredSize(new java.awt.Dimension(100, 23));
        jPanel18.add(jtfWage);

        jftDateChangeWage.setEditable(false);
        jftDateChangeWage.setText("yyyy/mm/dd");
        jftDateChangeWage.setFocusable(false);
        jftDateChangeWage.setPreferredSize(new java.awt.Dimension(75, 23));
        jPanel18.add(jftDateChangeWage);

        jPanel7.add(jPanel18);

        jPanel20.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT, 5, 0));

        jlSalarySscBase.setText("SBC:");
        jlSalarySscBase.setPreferredSize(new java.awt.Dimension(75, 23));
        jPanel20.add(jlSalarySscBase);

        jtfSalarySscBase.setEditable(false);
        jtfSalarySscBase.setHorizontalAlignment(javax.swing.JTextField.TRAILING);
        jtfSalarySscBase.setText("0.0000");
        jtfSalarySscBase.setFocusable(false);
        jtfSalarySscBase.setPreferredSize(new java.awt.Dimension(100, 23));
        jPanel20.add(jtfSalarySscBase);

        jftDateChangeSalarySscBase.setEditable(false);
        jftDateChangeSalarySscBase.setText("yyyy/mm/dd");
        jftDateChangeSalarySscBase.setFocusable(false);
        jftDateChangeSalarySscBase.setPreferredSize(new java.awt.Dimension(75, 23));
        jPanel20.add(jftDateChangeSalarySscBase);

        jPanel7.add(jPanel20);

        jPanel19.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT, 5, 0));

        jlBank.setText("Banco:");
        jlBank.setPreferredSize(new java.awt.Dimension(75, 23));
        jPanel19.add(jlBank);

        jtfBank.setEditable(false);
        jtfBank.setText("X");
        jtfBank.setFocusable(false);
        jtfBank.setPreferredSize(new java.awt.Dimension(100, 23));
        jPanel19.add(jtfBank);

        jlBankAccount.setText("Cuenta bancaria:");
        jlBankAccount.setPreferredSize(new java.awt.Dimension(100, 23));
        jPanel19.add(jlBankAccount);

        jtfBankAccount.setEditable(false);
        jtfBankAccount.setText("X");
        jtfBankAccount.setFocusable(false);
        jtfBankAccount.setPreferredSize(new java.awt.Dimension(200, 23));
        jPanel19.add(jtfBankAccount);

        jPanel7.add(jPanel19);

        jPanel16.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT, 5, 0));

        jlSex.setText("Sexo:");
        jlSex.setPreferredSize(new java.awt.Dimension(75, 23));
        jPanel16.add(jlSex);

        jtfSex.setEditable(false);
        jtfSex.setText("X");
        jtfSex.setFocusable(false);
        jtfSex.setPreferredSize(new java.awt.Dimension(100, 23));
        jPanel16.add(jtfSex);

        jlMarital.setText("Estado civil:");
        jlMarital.setPreferredSize(new java.awt.Dimension(100, 23));
        jPanel16.add(jlMarital);

        jtfMarital.setEditable(false);
        jtfMarital.setText("X");
        jtfMarital.setFocusable(false);
        jtfMarital.setPreferredSize(new java.awt.Dimension(100, 23));
        jPanel16.add(jtfMarital);

        jlFkBloodType.setText("Grupo sanguíneo:");
        jlFkBloodType.setPreferredSize(new java.awt.Dimension(100, 23));
        jPanel16.add(jlFkBloodType);

        jtfBloodType.setEditable(false);
        jtfBloodType.setText("X");
        jtfBloodType.setFocusable(false);
        jtfBloodType.setPreferredSize(new java.awt.Dimension(75, 23));
        jPanel16.add(jtfBloodType);

        jPanel7.add(jPanel16);

        jPanel9.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT, 5, 0));

        jlEducationType.setText("Escolaridad:");
        jlEducationType.setPreferredSize(new java.awt.Dimension(75, 23));
        jPanel9.add(jlEducationType);

        jtfEducationType.setEditable(false);
        jtfEducationType.setText("X");
        jtfEducationType.setFocusable(false);
        jtfEducationType.setPreferredSize(new java.awt.Dimension(100, 23));
        jPanel9.add(jtfEducationType);

        jlMwzType.setText("Área geográfica:");
        jlMwzType.setPreferredSize(new java.awt.Dimension(100, 23));
        jPanel9.add(jlMwzType);

        jtfMwzType.setEditable(false);
        jtfMwzType.setText("X");
        jtfMwzType.setFocusable(false);
        jtfMwzType.setPreferredSize(new java.awt.Dimension(100, 23));
        jPanel9.add(jtfMwzType);

        jlWorkingHoursDay.setText("Horas jornada:");
        jlWorkingHoursDay.setPreferredSize(new java.awt.Dimension(100, 23));
        jPanel9.add(jlWorkingHoursDay);

        jtfWorkingHoursDay.setEditable(false);
        jtfWorkingHoursDay.setHorizontalAlignment(javax.swing.JTextField.TRAILING);
        jtfWorkingHoursDay.setText("0");
        jtfWorkingHoursDay.setFocusable(false);
        jtfWorkingHoursDay.setPreferredSize(new java.awt.Dimension(50, 23));
        jPanel9.add(jtfWorkingHoursDay);

        jPanel7.add(jPanel9);

        jPanel4.add(jPanel7, java.awt.BorderLayout.NORTH);

        jpInformation.add(jPanel4, java.awt.BorderLayout.NORTH);

        jPanel5.setLayout(new java.awt.BorderLayout());

        jPanel12.setBorder(javax.swing.BorderFactory.createTitledBorder("Prestaciones:"));
        jPanel12.setLayout(new java.awt.BorderLayout());

        jPanel10.setFocusable(false);
        jPanel10.setLayout(new java.awt.GridLayout(6, 1, 0, 3));

        jPanel26.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT, 5, 0));

        jlSeniority.setText("Antigüedad:");
        jlSeniority.setPreferredSize(new java.awt.Dimension(75, 23));
        jPanel26.add(jlSeniority);

        jtfSeniority.setEditable(false);
        jtfSeniority.setHorizontalAlignment(javax.swing.JTextField.TRAILING);
        jtfSeniority.setText("0");
        jtfSeniority.setFocusable(false);
        jtfSeniority.setPreferredSize(new java.awt.Dimension(75, 23));
        jPanel26.add(jtfSeniority);

        jlSeniorityYear.setText("años");
        jlSeniorityYear.setPreferredSize(new java.awt.Dimension(25, 23));
        jPanel26.add(jlSeniorityYear);

        jtfSeniorityDays.setEditable(false);
        jtfSeniorityDays.setHorizontalAlignment(javax.swing.JTextField.TRAILING);
        jtfSeniorityDays.setText("0");
        jtfSeniorityDays.setFocusable(false);
        jtfSeniorityDays.setPreferredSize(new java.awt.Dimension(75, 23));
        jPanel26.add(jtfSeniorityDays);

        jlSeniorityDays.setText("días");
        jlSeniorityDays.setPreferredSize(new java.awt.Dimension(60, 23));
        jPanel26.add(jlSeniorityDays);

        jPanel10.add(jPanel26);

        jPanel11.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT, 5, 0));

        jlDummy.setPreferredSize(new java.awt.Dimension(75, 23));
        jPanel11.add(jlDummy);

        jlBenefit.setText("Prestación");
        jlBenefit.setPreferredSize(new java.awt.Dimension(75, 23));
        jPanel11.add(jlBenefit);

        jlDummy1.setPreferredSize(new java.awt.Dimension(25, 23));
        jPanel11.add(jlDummy1);

        jlBenefitProp.setText("Parte prop.");
        jlBenefitProp.setPreferredSize(new java.awt.Dimension(75, 23));
        jPanel11.add(jlBenefitProp);

        jlProportional.setText("Proporcional");
        jlProportional.setPreferredSize(new java.awt.Dimension(75, 23));
        jPanel11.add(jlProportional);

        jlDummy2.setPreferredSize(new java.awt.Dimension(25, 23));
        jPanel11.add(jlDummy2);

        jlPaymentProp.setText("Pago prop.");
        jlPaymentProp.setPreferredSize(new java.awt.Dimension(75, 23));
        jPanel11.add(jlPaymentProp);

        jPanel10.add(jPanel11);

        jPanel27.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT, 5, 0));

        jlAnnualBonus.setText("Gratif. anual:");
        jlAnnualBonus.setPreferredSize(new java.awt.Dimension(75, 23));
        jPanel27.add(jlAnnualBonus);

        jtfAnnualBonusBenefit.setEditable(false);
        jtfAnnualBonusBenefit.setHorizontalAlignment(javax.swing.JTextField.TRAILING);
        jtfAnnualBonusBenefit.setText("0");
        jtfAnnualBonusBenefit.setFocusable(false);
        jtfAnnualBonusBenefit.setPreferredSize(new java.awt.Dimension(75, 23));
        jPanel27.add(jtfAnnualBonusBenefit);

        jlAnnualBonusBenefit.setText("días");
        jlAnnualBonusBenefit.setPreferredSize(new java.awt.Dimension(25, 23));
        jPanel27.add(jlAnnualBonusBenefit);

        jtfAnnualBonusPropPer.setEditable(false);
        jtfAnnualBonusPropPer.setHorizontalAlignment(javax.swing.JTextField.TRAILING);
        jtfAnnualBonusPropPer.setText("0 %");
        jtfAnnualBonusPropPer.setFocusable(false);
        jtfAnnualBonusPropPer.setPreferredSize(new java.awt.Dimension(75, 23));
        jPanel27.add(jtfAnnualBonusPropPer);

        jtfAnnualBonusProp.setEditable(false);
        jtfAnnualBonusProp.setHorizontalAlignment(javax.swing.JTextField.TRAILING);
        jtfAnnualBonusProp.setText("0");
        jtfAnnualBonusProp.setFocusable(false);
        jtfAnnualBonusProp.setPreferredSize(new java.awt.Dimension(75, 23));
        jPanel27.add(jtfAnnualBonusProp);

        jlAnnualBonusProp.setText("días");
        jlAnnualBonusProp.setPreferredSize(new java.awt.Dimension(25, 23));
        jPanel27.add(jlAnnualBonusProp);

        jtfAnnualBonusPayProp.setEditable(false);
        jtfAnnualBonusPayProp.setHorizontalAlignment(javax.swing.JTextField.TRAILING);
        jtfAnnualBonusPayProp.setText("0");
        jtfAnnualBonusPayProp.setFocusable(false);
        jtfAnnualBonusPayProp.setPreferredSize(new java.awt.Dimension(75, 23));
        jPanel27.add(jtfAnnualBonusPayProp);

        jlAnnualBonusPayProp.setText("CUR");
        jlAnnualBonusPayProp.setPreferredSize(new java.awt.Dimension(25, 23));
        jPanel27.add(jlAnnualBonusPayProp);

        jPanel10.add(jPanel27);

        jPanel28.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT, 5, 0));

        jlVacations.setText("Vacaciones:");
        jlVacations.setPreferredSize(new java.awt.Dimension(75, 23));
        jPanel28.add(jlVacations);

        jtfVacationsBenefit.setEditable(false);
        jtfVacationsBenefit.setHorizontalAlignment(javax.swing.JTextField.TRAILING);
        jtfVacationsBenefit.setText("0");
        jtfVacationsBenefit.setFocusable(false);
        jtfVacationsBenefit.setPreferredSize(new java.awt.Dimension(75, 23));
        jPanel28.add(jtfVacationsBenefit);

        jlVacationsBenefit.setText("días");
        jlVacationsBenefit.setPreferredSize(new java.awt.Dimension(25, 23));
        jPanel28.add(jlVacationsBenefit);

        jtfVacationsPropPer.setEditable(false);
        jtfVacationsPropPer.setHorizontalAlignment(javax.swing.JTextField.TRAILING);
        jtfVacationsPropPer.setText("0 %");
        jtfVacationsPropPer.setFocusable(false);
        jtfVacationsPropPer.setPreferredSize(new java.awt.Dimension(75, 23));
        jPanel28.add(jtfVacationsPropPer);

        jtfVacationsProp.setEditable(false);
        jtfVacationsProp.setHorizontalAlignment(javax.swing.JTextField.TRAILING);
        jtfVacationsProp.setText("0");
        jtfVacationsProp.setFocusable(false);
        jtfVacationsProp.setPreferredSize(new java.awt.Dimension(75, 23));
        jPanel28.add(jtfVacationsProp);

        jlVacationsProp.setText("días");
        jlVacationsProp.setPreferredSize(new java.awt.Dimension(25, 23));
        jPanel28.add(jlVacationsProp);

        jtfVacationsPayProp.setEditable(false);
        jtfVacationsPayProp.setHorizontalAlignment(javax.swing.JTextField.TRAILING);
        jtfVacationsPayProp.setText("0");
        jtfVacationsPayProp.setFocusable(false);
        jtfVacationsPayProp.setPreferredSize(new java.awt.Dimension(75, 23));
        jPanel28.add(jtfVacationsPayProp);

        jlVacationsPayProp.setText("CUR");
        jlVacationsPayProp.setPreferredSize(new java.awt.Dimension(25, 23));
        jPanel28.add(jlVacationsPayProp);

        jPanel10.add(jPanel28);

        jPanel29.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT, 5, 0));

        jlVacationsBonus.setText("Prima vac.:");
        jlVacationsBonus.setPreferredSize(new java.awt.Dimension(75, 23));
        jPanel29.add(jlVacationsBonus);

        jtfVacationsBonusBenefit.setEditable(false);
        jtfVacationsBonusBenefit.setHorizontalAlignment(javax.swing.JTextField.TRAILING);
        jtfVacationsBonusBenefit.setText("0 %");
        jtfVacationsBonusBenefit.setFocusable(false);
        jtfVacationsBonusBenefit.setPreferredSize(new java.awt.Dimension(75, 23));
        jPanel29.add(jtfVacationsBonusBenefit);

        jlDummy3.setPreferredSize(new java.awt.Dimension(215, 23));
        jPanel29.add(jlDummy3);

        jtfVacationsBonusPayProp.setEditable(false);
        jtfVacationsBonusPayProp.setHorizontalAlignment(javax.swing.JTextField.TRAILING);
        jtfVacationsBonusPayProp.setText("0");
        jtfVacationsBonusPayProp.setFocusable(false);
        jtfVacationsBonusPayProp.setPreferredSize(new java.awt.Dimension(75, 23));
        jPanel29.add(jtfVacationsBonusPayProp);

        jlVacationsBonusPayProp.setText("CUR");
        jlVacationsBonusPayProp.setPreferredSize(new java.awt.Dimension(25, 23));
        jPanel29.add(jlVacationsBonusPayProp);

        jPanel10.add(jPanel29);

        jPanel31.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT, 5, 0));

        jlSettlement.setText("Finiquito:");
        jlSettlement.setPreferredSize(new java.awt.Dimension(75, 23));
        jPanel31.add(jlSettlement);

        jtfSettlement.setEditable(false);
        jtfSettlement.setHorizontalAlignment(javax.swing.JTextField.TRAILING);
        jtfSettlement.setText("0");
        jtfSettlement.setFocusable(false);
        jtfSettlement.setPreferredSize(new java.awt.Dimension(75, 23));
        jPanel31.add(jtfSettlement);

        jlIndemnification.setText("Liquidación:");
        jlIndemnification.setPreferredSize(new java.awt.Dimension(75, 23));
        jPanel31.add(jlIndemnification);

        jtfIndemnification.setEditable(false);
        jtfIndemnification.setHorizontalAlignment(javax.swing.JTextField.TRAILING);
        jtfIndemnification.setText("0");
        jtfIndemnification.setFocusable(false);
        jtfIndemnification.setPreferredSize(new java.awt.Dimension(75, 23));
        jPanel31.add(jtfIndemnification);

        jlRJDj.setForeground(new java.awt.Color(109, 109, 109));
        jlRJDj.setText("RV");
        jlRJDj.setToolTipText("Renuncia voluntaria");
        jlRJDj.setPreferredSize(new java.awt.Dimension(25, 23));
        jPanel31.add(jlRJDj);

        jtfIndemnificationDisL.setEditable(false);
        jtfIndemnificationDisL.setHorizontalAlignment(javax.swing.JTextField.TRAILING);
        jtfIndemnificationDisL.setText("0");
        jtfIndemnificationDisL.setFocusable(false);
        jtfIndemnificationDisL.setPreferredSize(new java.awt.Dimension(75, 23));
        jPanel31.add(jtfIndemnificationDisL);

        jlDisL.setForeground(new java.awt.Color(109, 109, 109));
        jlDisL.setText("DJ");
        jlDisL.setToolTipText("Despido justificado");
        jlDisL.setPreferredSize(new java.awt.Dimension(25, 23));
        jPanel31.add(jlDisL);

        jtfIndemnificationDicL.setEditable(false);
        jtfIndemnificationDicL.setHorizontalAlignment(javax.swing.JTextField.TRAILING);
        jtfIndemnificationDicL.setText("0");
        jtfIndemnificationDicL.setFocusable(false);
        jtfIndemnificationDicL.setPreferredSize(new java.awt.Dimension(75, 23));
        jPanel31.add(jtfIndemnificationDicL);

        jlDicL.setForeground(new java.awt.Color(109, 109, 109));
        jlDicL.setText("DI");
        jlDicL.setToolTipText("Despido injustificado");
        jlDicL.setPreferredSize(new java.awt.Dimension(25, 23));
        jPanel31.add(jlDicL);

        jPanel10.add(jPanel31);

        jPanel12.add(jPanel10, java.awt.BorderLayout.NORTH);

        jPanel5.add(jPanel12, java.awt.BorderLayout.CENTER);

        jPanel6.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));

        jlImgPhoto.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jlImgPhoto.setText("Foto");
        jlImgPhoto.setToolTipText("Foto (tamaño sugerido: 100×100 px)");
        jlImgPhoto.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jlImgPhoto.setPreferredSize(new java.awt.Dimension(100, 100));
        jPanel6.add(jlImgPhoto);

        jlImgSignature.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jlImgSignature.setText("Firma");
        jlImgSignature.setToolTipText("Firma (tamaño sugerido: 250×100 px)");
        jlImgSignature.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jlImgSignature.setPreferredSize(new java.awt.Dimension(250, 100));
        jPanel6.add(jlImgSignature);

        jPanel5.add(jPanel6, java.awt.BorderLayout.SOUTH);

        jpInformation.add(jPanel5, java.awt.BorderLayout.CENTER);

        jPanel1.add(jpInformation, java.awt.BorderLayout.EAST);

        add(jPanel1, java.awt.BorderLayout.CENTER);
    }// </editor-fold>//GEN-END:initComponents

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.ButtonGroup gpbFilter;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel10;
    private javax.swing.JPanel jPanel11;
    private javax.swing.JPanel jPanel12;
    private javax.swing.JPanel jPanel13;
    private javax.swing.JPanel jPanel15;
    private javax.swing.JPanel jPanel16;
    private javax.swing.JPanel jPanel18;
    private javax.swing.JPanel jPanel19;
    private javax.swing.JPanel jPanel20;
    private javax.swing.JPanel jPanel21;
    private javax.swing.JPanel jPanel22;
    private javax.swing.JPanel jPanel26;
    private javax.swing.JPanel jPanel27;
    private javax.swing.JPanel jPanel28;
    private javax.swing.JPanel jPanel29;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel31;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JPanel jPanel7;
    private javax.swing.JPanel jPanel9;
    private javax.swing.JButton jbClearFilterPaymentType;
    private javax.swing.JComboBox jcbFilterPaymentType;
    private javax.swing.JFormattedTextField jftDateBenefits;
    private javax.swing.JFormattedTextField jftDateBirth;
    private javax.swing.JFormattedTextField jftDateChangeSalary;
    private javax.swing.JFormattedTextField jftDateChangeSalarySscBase;
    private javax.swing.JFormattedTextField jftDateChangeWage;
    private javax.swing.JFormattedTextField jftDateLastDismissal_n;
    private javax.swing.JFormattedTextField jftDateLastHire;
    private javax.swing.JLabel jlAlternativeId;
    private javax.swing.JLabel jlAnnualBonus;
    private javax.swing.JLabel jlAnnualBonusBenefit;
    private javax.swing.JLabel jlAnnualBonusPayProp;
    private javax.swing.JLabel jlAnnualBonusProp;
    private javax.swing.JLabel jlBank;
    private javax.swing.JLabel jlBankAccount;
    private javax.swing.JLabel jlBenefit;
    private javax.swing.JLabel jlBenefitProp;
    private javax.swing.JLabel jlDateBenefits;
    private javax.swing.JLabel jlDateBirth;
    private javax.swing.JLabel jlDateLastDismissal_n;
    private javax.swing.JLabel jlDateLastHire;
    private javax.swing.JLabel jlDicL;
    private javax.swing.JLabel jlDisL;
    private javax.swing.JLabel jlDummy;
    private javax.swing.JLabel jlDummy1;
    private javax.swing.JLabel jlDummy2;
    private javax.swing.JLabel jlDummy3;
    private javax.swing.JLabel jlEducationType;
    private javax.swing.JLabel jlFirstName;
    private javax.swing.JLabel jlFiscalId;
    private javax.swing.JLabel jlFkBloodType;
    private javax.swing.JLabel jlImgPhoto;
    private javax.swing.JLabel jlImgSignature;
    private javax.swing.JLabel jlIndemnification;
    private javax.swing.JLabel jlMarital;
    private javax.swing.JLabel jlMwzType;
    private javax.swing.JLabel jlPaymentProp;
    private javax.swing.JLabel jlProportional;
    private javax.swing.JLabel jlRJDj;
    private javax.swing.JLabel jlSalary;
    private javax.swing.JLabel jlSalarySscBase;
    private javax.swing.JLabel jlSeniority;
    private javax.swing.JLabel jlSeniorityDays;
    private javax.swing.JLabel jlSeniorityYear;
    private javax.swing.JLabel jlSettlement;
    private javax.swing.JLabel jlSex;
    private javax.swing.JLabel jlSocialSecurityNumber;
    private javax.swing.JLabel jlTotalAvailables;
    private javax.swing.JLabel jlVacations;
    private javax.swing.JLabel jlVacationsBenefit;
    private javax.swing.JLabel jlVacationsBonus;
    private javax.swing.JLabel jlVacationsBonusPayProp;
    private javax.swing.JLabel jlVacationsPayProp;
    private javax.swing.JLabel jlVacationsProp;
    private javax.swing.JLabel jlWage;
    private javax.swing.JLabel jlWorkingHoursDay;
    private javax.swing.JPanel jpEmployeesAvailable;
    private javax.swing.JPanel jpFilter;
    private javax.swing.JPanel jpInformation;
    private javax.swing.JToggleButton jtbStatusEmployeeActive;
    private javax.swing.JToggleButton jtbStatusEmployeeAll;
    private javax.swing.JToggleButton jtbStatusEmployeeInactive;
    private javax.swing.JTextField jtfAlternativeId;
    private javax.swing.JTextField jtfAnnualBonusBenefit;
    private javax.swing.JTextField jtfAnnualBonusPayProp;
    private javax.swing.JTextField jtfAnnualBonusProp;
    private javax.swing.JTextField jtfAnnualBonusPropPer;
    private javax.swing.JTextField jtfBank;
    private javax.swing.JTextField jtfBankAccount;
    private javax.swing.JTextField jtfBloodType;
    private javax.swing.JTextField jtfEducationType;
    private javax.swing.JTextField jtfFirstName;
    private javax.swing.JTextField jtfFiscalId;
    private javax.swing.JTextField jtfIndemnification;
    private javax.swing.JTextField jtfIndemnificationDicL;
    private javax.swing.JTextField jtfIndemnificationDisL;
    private javax.swing.JTextField jtfMarital;
    private javax.swing.JTextField jtfMwzType;
    private javax.swing.JTextField jtfSalary;
    private javax.swing.JTextField jtfSalarySscBase;
    private javax.swing.JTextField jtfSeniority;
    private javax.swing.JTextField jtfSeniorityDays;
    private javax.swing.JTextField jtfSettlement;
    private javax.swing.JTextField jtfSex;
    private javax.swing.JTextField jtfSocialSecurityNumber;
    private javax.swing.JTextField jtfVacationsBenefit;
    private javax.swing.JTextField jtfVacationsBonusBenefit;
    private javax.swing.JTextField jtfVacationsBonusPayProp;
    private javax.swing.JTextField jtfVacationsPayProp;
    private javax.swing.JTextField jtfVacationsProp;
    private javax.swing.JTextField jtfVacationsPropPer;
    private javax.swing.JTextField jtfWage;
    private javax.swing.JTextField jtfWorkingHoursDay;
    // End of variables declaration//GEN-END:variables

    /*
     * Private methods
     */

    private void initComponentsExtra() throws Exception {
        int i = 0;
        STableColumnForm[] aoTableColumns = null;
        mbHasRightEmpWage = miClient.getSessionXXX().getUser().hasRight(miClient, SDataConstantsSys.PRV_HRS_CAT_EMP_WAGE).HasRight;

        moTablePaneEmpAvailable = new STablePaneGrid(miClient);
        jpEmployeesAvailable.add(moTablePaneEmpAvailable, BorderLayout.CENTER);

        resetEmployee();
        resetBenefits();
        resetSettlement();

        i = 0;
        aoTableColumns = new STableColumnForm[17];
        aoTableColumns[i++] = new STableColumnForm(SLibConstants.DATA_TYPE_STRING, "Empleado", 250);
        aoTableColumns[i] = new STableColumnForm(SLibConstants.DATA_TYPE_STRING, "Clave", 50);
        aoTableColumns[i++].setCellRenderer(SGridUtils.CellRendererIntegerRaw);
        aoTableColumns[i++] = new STableColumnForm(SLibConstants.DATA_TYPE_BOOLEAN, "Activo", STableConstants.WIDTH_BOOLEAN_2X);
        aoTableColumns[i++] = new STableColumnForm(SLibConstants.DATA_TYPE_STRING, "Período pago", 100);
        aoTableColumns[i++] = new STableColumnForm(SLibConstants.DATA_TYPE_STRING, "Categoría", 100);
        aoTableColumns[i++] = new STableColumnForm(SLibConstants.DATA_TYPE_STRING, "Tipo empleado", 100);
        aoTableColumns[i++] = new STableColumnForm(SLibConstants.DATA_TYPE_STRING, "Departamento", 100);
        aoTableColumns[i++] = new STableColumnForm(SLibConstants.DATA_TYPE_STRING, "Calle", 150);
        aoTableColumns[i++] = new STableColumnForm(SLibConstants.DATA_TYPE_STRING, "Número ext.", 50);
        aoTableColumns[i++] = new STableColumnForm(SLibConstants.DATA_TYPE_STRING, "Número int.", 50);
        aoTableColumns[i++] = new STableColumnForm(SLibConstants.DATA_TYPE_STRING, "Colonia", 150);
        aoTableColumns[i] = new STableColumnForm(SLibConstants.DATA_TYPE_STRING, "CP", 50);
        aoTableColumns[i++].setApostropheOnCsvRequired(true);
        aoTableColumns[i++] = new STableColumnForm(SLibConstants.DATA_TYPE_STRING, "AP", 50);
        aoTableColumns[i++] = new STableColumnForm(SLibConstants.DATA_TYPE_STRING, "Localidad", 150);
        aoTableColumns[i++] = new STableColumnForm(SLibConstants.DATA_TYPE_STRING, "Municipio", 100);
        aoTableColumns[i++] = new STableColumnForm(SLibConstants.DATA_TYPE_STRING, "Estado", 100);
        aoTableColumns[i++] = new STableColumnForm(SLibConstants.DATA_TYPE_STRING, "País", 50);

        for (i = 0; i < aoTableColumns.length; i++) {
            moTablePaneEmpAvailable.addTableColumn(aoTableColumns[i]);
        }

        populateBenefits();
        populateEmployee();
        updateOptions();

        jtbStatusEmployeeActive.setSelected(true);
        actionEmpStatusStateChange();
        jbClearFilterPaymentType.addActionListener(this);
    }

    private void computeTotals() {
        int countAvailables = 0;

        for (int i = 0; i < moTablePaneEmpAvailable.getTableGuiRowCount(); i++) {
            countAvailables++;
        }

        jlTotalAvailables.setText(" " + countAvailables + " empleados disponibles.");
    }

    private void actionClearFilterPaymentType() {
        jbClearFilterPaymentType.setEnabled(false);
        jcbFilterPaymentType.setSelectedIndex(0);
        jcbFilterPaymentType.requestFocus();
        mnFilterPaymentTypeId = SLibConsts.UNDEFINED;

        try {
            populateEmployee();
        }
        catch (Exception e) {
            SLibUtils.printException(this, e);
        }
    }

    private void actionEmpStatusStateChange() {
        try {
            if (jtbStatusEmployeeActive.isSelected()) {
                mnFilterStatusEmployee = SGridFilterPanelEmployee.EMP_STATUS_ACT;
                jtbStatusEmployeeActive.setSelectedIcon(new ImageIcon(getClass().getResource("/erp/img/icon_std_po_act_on.gif")));
            }
            else if (jtbStatusEmployeeInactive.isSelected()) {
                mnFilterStatusEmployee = SGridFilterPanelEmployee.EMP_STATUS_INA;
                jtbStatusEmployeeInactive.setSelectedIcon(new ImageIcon(getClass().getResource("/erp/img/icon_std_po_ina_on.gif")));
            }
            else if (jtbStatusEmployeeAll.isSelected()) {
                mnFilterStatusEmployee = SGridFilterPanelEmployee.EMP_STATUS_ALL;
                jtbStatusEmployeeAll.setSelectedIcon(new ImageIcon(getClass().getResource("/erp/img/switch_filter_on.gif")));
            }
            populateEmployee();
        }
        catch (Exception e) {
            SLibUtils.printException(this, e);
        }
    }

    private void itemStateChangedFilterPaymentType() {
        try {
            mnFilterPaymentTypeId = (((SGuiItem) jcbFilterPaymentType.getSelectedItem()).getPrimaryKey().length == 0 ? SLibConsts.UNDEFINED : ((SGuiItem) jcbFilterPaymentType.getSelectedItem()).getPrimaryKey()[0]);
            jbClearFilterPaymentType.setEnabled(jcbFilterPaymentType.getSelectedIndex() > 0);
            populateEmployee();
        }
        catch (Exception e) {
            SLibUtils.printException(this, e);
        }
    }

    private void updateOptions() {
        jcbFilterPaymentType.removeItemListener(this);
        jtbStatusEmployeeActive.removeItemListener(this);
        jtbStatusEmployeeInactive.removeItemListener(this);
        jtbStatusEmployeeAll.removeItemListener(this);

        miClient.getSession().populateCatalogue(jcbFilterPaymentType, SModConsts.HRSS_TP_PAY, SLibConsts.UNDEFINED, null);

        actionClearFilterPaymentType();

        jcbFilterPaymentType.addItemListener(this);
        jtbStatusEmployeeActive.addItemListener(this);
        jtbStatusEmployeeInactive.addItemListener(this);
        jtbStatusEmployeeAll.addItemListener(this);
    }

    private ArrayList<SDbBenefitTable> getBenefitTable(int benefitTableType) throws Exception {
        int benefitId = 0;
        SDbBenefitTable benfitTables = null;
        ArrayList<SDbBenefitTable> aBenefitTables = new ArrayList<>();
        HashSet<Integer> requiredPaymentType = new HashSet<>();

        requiredPaymentType.add(SModSysConsts.HRSS_TP_PAY_WEE);
        requiredPaymentType.add(SModSysConsts.HRSS_TP_PAY_FOR);

        for (Integer payment : requiredPaymentType) {
            benefitId = SHrsUtils.getRecentBenefitTable(miClient.getSession(), benefitTableType, payment, miClient.getSession().getCurrentDate());

            benfitTables = new SDbBenefitTable();
            benfitTables.read(miClient.getSession(), new int[] { benefitId });
            aBenefitTables.add(benfitTables);
        }

        return aBenefitTables;
    }

    private void populateBenefits() throws Exception {
        int i = 0;

        maBenefitTableAnnualBonusAnniversarys = new ArrayList<>();
        maBenefitTableVacationAnniversarys = new ArrayList<>();
        maBenefitTableVacationBonusAnniversarys = new ArrayList<>();

        for (SDbBenefitTable table : getBenefitTable(SModSysConsts.HRSS_TP_BEN_ANN_BON)) {
            i = 1;
            for (SDbBenefitTableRow tableRow : table.getChildRows()) {
                while ( i * 12 <= tableRow.getMonths()) {
                    maBenefitTableAnnualBonusAnniversarys.add(new SHrsBenefitTableAnniversary(table.getPkBenefitId(), i, tableRow.getBenefitDays()));
                    i++;
                }
            }
        }

        for (SDbBenefitTable table : getBenefitTable(SModSysConsts.HRSS_TP_BEN_VAC)) {
            i = 1;
            for (SDbBenefitTableRow tableRow : table.getChildRows()) {
                while ( i * 12 <= tableRow.getMonths()) {
                    maBenefitTableVacationAnniversarys.add(new SHrsBenefitTableAnniversary(table.getPkBenefitId(), i, tableRow.getBenefitDays()));
                    i++;
                }
            }
        }

        for (SDbBenefitTable table : getBenefitTable(SModSysConsts.HRSS_TP_BEN_VAC_BON)) {
            i = 1;
            for (SDbBenefitTableRow tableRow : table.getChildRows()) {
                while ( i * 12 <= tableRow.getMonths()) {
                    maBenefitTableVacationBonusAnniversarys.add(new SHrsBenefitTableAnniversary(table.getPkBenefitId(), i, tableRow.getBenefitBonusPercentage()));
                    i++;
                }
            }
        }
    }

    private void populateEmployee() throws Exception {
        String sql = "";
        ResultSet resultSet = null;
        int employeeId = 0;

        moTablePaneEmpAvailable.createTable(this);
        moTablePaneEmpAvailable.clearTableRows();

        sql = "SELECT emp.*, CAST(emp.num AS UNSIGNED INTEGER) AS _emp_num, bp.bp, dep.name, ct.code, tp.code, pay.name, a.street, a.street_num_ext, a.street_num_int, a.neighborhood, a.reference, " +
                "a.locality, a.county, a.state, a.zip_code, a.po_box, IF(cty.cty IS NULL, 'MÉXICO', cty.cty) AS f_cty " +
                "FROM erp.hrsu_emp AS emp " +
                "INNER JOIN hrs_emp_member AS empm ON empm.id_emp = emp.id_emp " +
                "INNER JOIN erp.hrsu_dep AS dep ON dep.id_dep = emp.fk_dep " +
                "INNER JOIN erp.hrsu_tp_emp AS ct ON ct.id_tp_emp = emp.fk_tp_emp " +
                "INNER JOIN erp.hrsu_tp_wrk AS tp ON tp.id_tp_wrk = emp.fk_tp_wrk " +
                "INNER JOIN erp.hrss_tp_pay AS pay ON pay.id_tp_pay = emp.fk_tp_pay " +
                "INNER JOIN erp.bpsu_bp AS bp ON bp.id_bp = emp.id_emp " +
                "INNER JOIN erp.bpsu_bpb AS bpb ON bpb.fid_bp = bp.id_bp " +
                "INNER JOIN erp.bpsu_bpb_add AS a ON a.id_bpb = bpb.id_bpb " +
                "LEFT OUTER JOIN erp.locu_cty AS cty ON cty.id_cty = a.fid_cty_n " +
                "WHERE emp.b_del = 0 AND bp.b_del = 0" + (mnFilterPaymentTypeId != SLibConsts.UNDEFINED ? " AND emp.fk_tp_pay = " + mnFilterPaymentTypeId : "") + " " +
                (mnFilterDepartamentId != SLibConsts.UNDEFINED ? " AND emp.fk_dep = " + mnFilterDepartamentId : "") + " " +
                (mnFilterStatusEmployee != SLibConsts.UNDEFINED ? (mnFilterStatusEmployee == SGridFilterPanelEmployee.EMP_STATUS_ACT ? " AND emp.b_act = 1 " : (mnFilterStatusEmployee == SGridFilterPanelEmployee.EMP_STATUS_INA ? " AND emp.b_act = 0 " : "")) : "") + " " +
                "AND bp.b_att_emp = 1 " +
                "GROUP BY emp.id_emp " +
                "ORDER BY bp.bp, emp.id_emp, pay.name ";

        resultSet = miClient.getSession().getStatement().executeQuery(sql);
        while (resultSet.next()) {
            SRowIntegralEmployee row = new SRowIntegralEmployee();

            employeeId = resultSet.getInt("id_emp");
            row.setPrimaryKey(new int[] { employeeId });
            row.setPkEmployeeId(employeeId);
            row.setEmployeeNumber(resultSet.getInt("_emp_num"));
            row.setEmployeeName(resultSet.getString("bp.bp"));
            row.setActive(resultSet.getBoolean("emp.b_act"));
            row.setEmployeeCategory(resultSet.getString("ct.code"));
            row.setEmployeeType(resultSet.getString("tp.code"));
            row.setDepartament(resultSet.getString("dep.name"));
            row.setSalaryType(resultSet.getString("pay.name"));
            row.setStreet(resultSet.getString("a.street"));
            row.setStreetNumberExt(resultSet.getString("a.street_num_ext"));
            row.setStreetNumberInt(resultSet.getString("a.street_num_int"));
            row.setNeighborhood(resultSet.getString("a.neighborhood"));
            row.setLocality(resultSet.getString("a.locality"));
            row.setCounty(resultSet.getString("a.county"));
            row.setState(resultSet.getString("a.state"));
            row.setZipCode(resultSet.getString("a.zip_code"));
            row.setPoBox(resultSet.getString("a.po_box"));
            row.setCountry(resultSet.getString("f_cty"));

            row.prepareTableRow();
            moTablePaneEmpAvailable.addTableRow(row);
        }

        moTablePaneEmpAvailable.renderTableRows();
        moTablePaneEmpAvailable.setTableRowSelection(0);
        computeTotals();
    }

    public void resetEmployee() {
        jtfFirstName.setText("");
        jtfFiscalId.setText("");
        jtfAlternativeId.setText("");
        jtfSocialSecurityNumber.setText("");
        jftDateBirth.setText(" / / ");
        jftDateBenefits.setText(" / / ");
        jftDateLastHire.setText(" / / ");
        jftDateLastDismissal_n.setText(" / / ");
        jtfBank.setText("");
        jtfBankAccount.setText("");
        jtfSex.setText("");
        jtfBloodType.setText("");
        jtfEducationType.setText("");
        jtfMwzType.setText("");
        jtfWorkingHoursDay.setText("0");
        resetEmployeeWage();
        moBizPartner = null;
    }

    private void resetEmployeeWage() {
        jtfSalary.setText("0.00");
        jftDateChangeSalary.setText(" / / ");
        jtfWage.setText("0.00");
        jftDateChangeWage.setText(" / / ");
        jtfSalarySscBase.setText("0.00");
        jftDateChangeSalarySscBase.setText(" / / ");
    }

    private void resetBenefits() {
        jtfAnnualBonusBenefit.setText("0");
        jtfAnnualBonusPropPer.setText("0");
        jtfAnnualBonusProp.setText("0");
        jtfAnnualBonusPayProp.setText("0");
        jtfVacationsBenefit.setText("0");
        jtfVacationsPropPer.setText("0");
        jtfVacationsProp.setText("0");
        jtfVacationsPayProp.setText("0");
        jtfVacationsBonusBenefit.setText("0");
        jtfVacationsBonusPayProp.setText("0");
    }

    private void resetSettlement() {
        jtfSettlement.setText("0");
        jtfIndemnification.setText("0");
        jtfIndemnificationDisL.setText("0");
        jtfIndemnificationDicL.setText("0");
    }

    private void renderEmployee(int employeeId) {
        SDataEmployee employee = null;

        try {
            moBizPartner = (SDataBizPartner) SDataUtilities.readRegistry(miClient, SDataConstants.BPSU_BP, new int[] { employeeId }, SLibConstants.EXEC_MODE_SILENT);
            employee = moBizPartner.getDbmsDataEmployee();

            jtfFirstName.setText(moBizPartner.getBizPartner());
            jtfFirstName.setCaretPosition(0);
            jtfFiscalId.setText(moBizPartner.getFiscalId());
            jtfAlternativeId.setText(moBizPartner.getAlternativeId());
            jtfSocialSecurityNumber.setText(employee.getSocialSecurityNumber());
            jftDateBirth.setText(SLibUtils.DateFormatDate.format(employee.getDateBirth()));
            jftDateBenefits.setText(SLibUtils.DateFormatDate.format(employee.getDateBenefits()));
            jftDateLastHire.setText(SLibUtils.DateFormatDate.format(employee.getDateLastHire()));
            jftDateLastDismissal_n.setText(employee.getDateLastDismissal_n() == null ? " / / " : SLibUtils.DateFormatDate.format(employee.getDateLastDismissal_n()));
            jtfSalary.setText(SLibUtils.DecimalFormatValue2D.format(employee.getSalary()));
            jftDateChangeSalary.setText(SLibUtils.DateFormatDate.format(employee.getDateSalary()));
            jtfWage.setText(SLibUtils.DecimalFormatValue2D.format(employee.getWage()));
            jftDateChangeWage.setText(SLibUtils.DateFormatDate.format(employee.getDateWage()));
            jtfSalarySscBase.setText(SLibUtils.DecimalFormatValue2D.format(employee.getSalarySscBase()));
            jftDateChangeSalarySscBase.setText(SLibUtils.DateFormatDate.format(employee.getDateSalarySscBase()));
            jtfBank.setText(employee.getFkBankId_n() == SLibConsts.UNDEFINED ? "" : (String) miClient.getSession().readField(SModConsts.HRSS_BANK, new int[] { employee.getFkBankId_n() }, SDbRegistry.FIELD_NAME));
            jtfBank.setCaretPosition(0);
            jtfBankAccount.setText(employee.getBankAccount());
            jtfBankAccount.setCaretPosition(0);
            jtfSex.setText(miClient.getSession().readField(SModConsts.HRSS_TP_HRS_CAT, new int[] { employee.getFkCatalogueSexClassId(), employee.getFkCatalogueSexTypeId() }, SDbRegistry.FIELD_NAME) + "");
            jtfSex.setCaretPosition(0);
            jtfMarital.setText(miClient.getSession().readField(SModConsts.HRSS_TP_HRS_CAT, new int[] { employee.getFkCatalogueMaritalStatusClassId(), employee.getFkCatalogueMaritalStatusTypeId() }, SDbRegistry.FIELD_NAME) + "");
            jtfMarital.setCaretPosition(0);
            jtfBloodType.setText(miClient.getSession().readField(SModConsts.HRSS_TP_HRS_CAT, new int[] { employee.getFkCatalogueBloodTypeClassId(), employee.getFkCatalogueBloodTypeTypeId() }, SDbRegistry.FIELD_NAME) + "");
            jtfBloodType.setCaretPosition(0);
            jtfEducationType.setText(miClient.getSession().readField(SModConsts.HRSS_TP_HRS_CAT, new int[] { employee.getFkCatalogueEducationClassId(), employee.getFkCatalogueEducationTypeId() }, SDbRegistry.FIELD_NAME) + "");
            jtfEducationType.setCaretPosition(0);
            jtfMwzType.setText(miClient.getSession().readField(SModConsts.HRSU_TP_MWZ, new int[] { employee.getFkMwzTypeId() }, SDbRegistry.FIELD_NAME) + "");
            jtfMwzType.setCaretPosition(0);
            jtfWorkingHoursDay.setText("" + employee.getWorkingHoursDay());

            if (employee.getXtaImageIconPhoto_n() != null) {
                jlImgPhoto.setIcon(employee.getXtaImageIconPhoto_n());
                jlImgPhoto.setText("");
            }
            else {
                jlImgPhoto.setIcon(null);
                jlImgPhoto.setText(NO_PHOTO);
            }

            if (employee.getXtaImageIconSignature_n() != null) {
                jlImgSignature.setIcon(employee.getXtaImageIconSignature_n());
                jlImgSignature.setText("");
            }
            else {
                jlImgSignature.setIcon(null);
                jlImgSignature.setText(NO_SIGNATURE);
            }

            renderBenefit(employee);

            if (!mbHasRightEmpWage) {
                resetEmployeeWage();
                resetBenefits();
                resetSettlement();
            }
        }
        catch (Exception e) {
            SLibUtils.showException(this, e);
        }
    }

    private void renderBenefit(SDataEmployee employee) {
        double paymentDaily = 0;
        double paymentDailySettlement = 0;
        int benefitAnniv = 0;
        Date dateCutOff = null;
        Date dateBase = null;
        Date dateBaseAnniv = null;
        boolean leapYear = false;
        int daysElapsed = 0;
        int daysElapsedAnn = 0;
        double daysProportionalAnnualBonus = 0;
        double daysProportionalVacations = 0;
        SDbConfig config = null;
        SHrsBenefitTableAnniversary benefitTableAnniversary = null;

        try {
            jlAnnualBonusPayProp.setText(miClient.getSession().getSessionCustom().getLocalCurrencyCode());
            jlVacationsPayProp.setText(miClient.getSession().getSessionCustom().getLocalCurrencyCode());
            jlVacationsBonusPayProp.setText(miClient.getSession().getSessionCustom().getLocalCurrencyCode());

            config = (SDbConfig) miClient.getSession().readRegistry(SModConsts.HRS_CFG, new int[] { SUtilConsts.BPR_CO_ID });
            dateCutOff = miClient.getSession().getCurrentDate();
            leapYear = SLibTimeUtils.isLeapYear(SLibTimeUtils.digestYear(dateCutOff)[0]);

            benefitAnniv = SHrsUtils.getEmployeeSeniority(employee.getDateBenefits(), dateCutOff);
            paymentDaily = employee.getEffectiveSalary(config.isFortnightStandard());
            paymentDailySettlement = employee.getSettlementSalary();

            if (employee.getDateBenefits().compareTo(SLibTimeUtils.getBeginOfYear(dateCutOff)) >= 0) {
                dateBaseAnniv = employee.getDateBenefits();
            }
            else {
                dateBaseAnniv = SLibTimeUtils.getBeginOfYear(dateCutOff);
            }

            dateBase = SLibTimeUtils.addDate(employee.getDateBenefits(), benefitAnniv, 0, 0);

            jtfSeniority.setText(benefitAnniv + "");
            jtfSeniorityDays.setText(SLibUtils.DecimalFormatInteger.format(SLibTimeUtils.getDaysDiff(dateCutOff, SLibTimeUtils.addDate(employee.getDateBenefits(), benefitAnniv, 0, 0))));
            daysElapsed = SLibTimeUtils.countPeriodDays(dateBase, dateCutOff);
            daysElapsedAnn = SLibTimeUtils.countPeriodDays(dateBaseAnniv, dateCutOff);
            benefitAnniv = benefitAnniv == 0 ? 1 : benefitAnniv;

            // Calculate annual bonus:

            for (SHrsBenefitTableAnniversary anniversary : maBenefitTableAnnualBonusAnniversarys) {
                if (anniversary.getBenefitAnn() <= benefitAnniv) {
                    benefitTableAnniversary = anniversary;
                }
            }
            daysProportionalAnnualBonus = (benefitTableAnniversary == null ? 0 : (daysElapsedAnn * benefitTableAnniversary.getValue() / (leapYear ? SHrsConsts.YEAR_DAYS + 1 : SHrsConsts.YEAR_DAYS)));

            jtfAnnualBonusBenefit.setText(SLibUtils.DecimalFormatValue0D.format(benefitTableAnniversary == null ? 0 : benefitTableAnniversary.getValue()) + "");
            jtfAnnualBonusPropPer.setText(SLibUtils.DecimalFormatPercentage2D.format((benefitTableAnniversary == null ? 0 : (daysProportionalAnnualBonus / benefitTableAnniversary.getValue()))) + "");
            jtfAnnualBonusProp.setText(SLibUtils.DecimalFormatValue2D.format(daysProportionalAnnualBonus) + "");
            jtfAnnualBonusPayProp.setText(SLibUtils.DecimalFormatValue2D.format(daysProportionalAnnualBonus * paymentDaily) + "");

            // Calculate vacation:

            for (SHrsBenefitTableAnniversary anniversary : maBenefitTableVacationAnniversarys) {
                if (anniversary.getBenefitAnn() <= benefitAnniv) {
                    benefitTableAnniversary = anniversary;
                }
            }
            daysProportionalVacations = (benefitTableAnniversary == null ? 0 : (daysElapsed * benefitTableAnniversary.getValue() / (leapYear ? SHrsConsts.YEAR_DAYS + 1 : SHrsConsts.YEAR_DAYS)));

            jtfVacationsBenefit.setText(SLibUtils.DecimalFormatValue0D.format(benefitTableAnniversary == null ? 0 : benefitTableAnniversary.getValue()) + "");
            jtfVacationsPropPer.setText(SLibUtils.DecimalFormatPercentage2D.format((benefitTableAnniversary == null ? 0 : (daysProportionalVacations / benefitTableAnniversary.getValue()))) + "");
            jtfVacationsProp.setText(SLibUtils.DecimalFormatValue2D.format(daysProportionalVacations) + "");
            jtfVacationsPayProp.setText(SLibUtils.DecimalFormatValue2D.format(daysProportionalVacations * paymentDaily) + "");

            // Calculate vacation bonus:

            for (SHrsBenefitTableAnniversary anniversary : maBenefitTableVacationBonusAnniversarys) {
                if (anniversary.getBenefitAnn() <= benefitAnniv) {
                    benefitTableAnniversary = anniversary;
                }
            }

            jtfVacationsBonusBenefit.setText(SLibUtils.DecimalFormatPercentage2D.format((benefitTableAnniversary == null ? 0 : benefitTableAnniversary.getValue())) + "");
            jtfVacationsBonusPayProp.setText(SLibUtils.DecimalFormatValue2D.format((benefitTableAnniversary == null ? 0 : (daysProportionalVacations * benefitTableAnniversary.getValue() * paymentDaily))) + "");
            renderSettlement(Integer.parseInt(jtfSeniority.getText()), Integer.parseInt(jtfSeniorityDays.getText()), paymentDailySettlement, config.getFkMwzReferenceTypeId());
        }
        catch (Exception e) {
            SLibUtils.showException(this, e);
        }
    }

    /**
     * Render settlement amounts.
     * @param seniority Worked years.
     * @param seniorityDays Worked days in last year.
     * @param settlementPaymentDaily Daily payment for settlement.
     * @param mwzReferenceId ID of Reference Minimum-Wage-Zone.
     * @throws Exception
     */
    private void renderSettlement(int seniority, int seniorityDays, double settlementPaymentDaily, int mwzReferenceId) throws Exception {
        double settlement = 0;
        double rjdj = 0;
        double disl = 0;
        double dicl = 0;
        double mwzReferenceWage = SHrsUtils.getRecentMinimumWage(miClient.getSession(), mwzReferenceId, miClient.getSession().getCurrentDate());

        settlement =
                Double.parseDouble(jtfAnnualBonusPayProp.getText().replaceAll(",", "")) +
                Double.parseDouble(jtfVacationsPayProp.getText().replaceAll(",", "")) +
                Double.parseDouble(jtfVacationsBonusPayProp.getText().replaceAll(",", ""));

        rjdj = settlement;
        disl = settlement;
        dicl = settlement;

        double bonus = SHrsConsts.RET_BONUS_DAYS_PER_YEAR *
                (settlementPaymentDaily > (SHrsConsts.RET_BONUS_DMW_LIMIT * mwzReferenceWage) ? (SHrsConsts.RET_BONUS_DMW_LIMIT * mwzReferenceWage) : settlementPaymentDaily) *
                ((double) seniority + ((double) seniorityDays / SHrsConsts.YEAR_DAYS));

        if (seniority >= SHrsConsts.RET_BONUS_YEARS_MIN) {
            rjdj += bonus;
        }

        disl += bonus + ((SHrsConsts.DIS_COMP_MONTHS * SHrsConsts.MONTH_DAYS_FIXED) * settlementPaymentDaily);

        dicl += bonus + ((SHrsConsts.DIS_COMP_MONTHS * SHrsConsts.MONTH_DAYS_FIXED) * settlementPaymentDaily) +
                (SHrsConsts.DIS_COMP_DAYS_PER_YEAR * ((double) seniority + ((double) seniorityDays / SHrsConsts.YEAR_DAYS)) * settlementPaymentDaily);

        jtfSettlement.setText(SLibUtils.DecimalFormatValue2D.format(settlement) + "");
        jtfIndemnification.setText(SLibUtils.DecimalFormatValue2D.format(rjdj) + "");
        jtfIndemnificationDisL.setText(SLibUtils.DecimalFormatValue2D.format(disl) + "");
        jtfIndemnificationDicL.setText(SLibUtils.DecimalFormatValue2D.format(dicl) + "");
    }

    /*
     * Public methods
     */

    /*
     * Overriden methods
     */

    @Override
    public int getTabType() {
        return mnPanelType;
    }

    @Override
    public int getTabTypeAux01() {
        return SLibConstants.UNDEFINED;
    }

    @Override
    public int getTabTypeAux02() {
        return SLibConstants.UNDEFINED;
    }

    @Override
    public Vector<Integer> getSuscriptors() {
        return new Vector<Integer>();
    }

    @Override
    public Vector<STableSetting> getTableSettings() {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public void addSetting(STableSetting setting) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public void updateSetting(STableSetting setting) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public void actionRefresh(int mode) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public void valueChanged(ListSelectionEvent e) {
        if (!e.getValueIsAdjusting()) {
            SRowIntegralEmployee row = (SRowIntegralEmployee) moTablePaneEmpAvailable.getSelectedTableRow();

            if (row != null) {
                renderEmployee(row.getPkEmployeeId());
            }
        }
    }

    @Override
    public void actionPerformed(ActionEvent e) {
        if (e.getSource() instanceof JButton) {
            JButton button = (JButton) e.getSource();

            if (button == jbClearFilterPaymentType) {
                actionClearFilterPaymentType();
            }
        }
    }

    @Override
    public void itemStateChanged(ItemEvent e) {
        if (e.getSource() instanceof JComboBox) {
            if (e.getStateChange() == ItemEvent.SELECTED) {
                JComboBox comboBox = (JComboBox) e.getSource();

                if (comboBox == jcbFilterPaymentType) {
                    itemStateChangedFilterPaymentType();
                }
            }
        }
        else if (e.getSource() instanceof JToggleButton) {
            if (e.getStateChange() == ItemEvent.SELECTED) {
                JToggleButton toggleButton = (JToggleButton) e.getSource();

                if (toggleButton == jtbStatusEmployeeActive) {
                    actionEmpStatusStateChange();
                }
                else if (toggleButton == jtbStatusEmployeeInactive) {
                    actionEmpStatusStateChange();
                }
                else if (toggleButton == jtbStatusEmployeeAll) {
                    actionEmpStatusStateChange();
                }
            }
        }
    }
}


text:
TEST_CLASS(BedAnnotateFreq_Test)
{
Q_OBJECT
private slots:

	void test_01()
	{
		EXECUTE("BedAnnotateFreq", "-in " + TESTDATA("data_in/BedAnnotateFreq_in1.bed") + " -bam " + TESTDATA("../cppNGS-TEST/data_in/panel.bam") + " -out out/BedAnnotateFreq_test01_out.tsv");
		COMPARE_FILES("out/BedAnnotateFreq_test01_out.tsv", TESTDATA("data_out/BedAnnotateFreq_test01_out.tsv"));
	}

};


text:
using System;
using System.Diagnostics;
using System.Security.Cryptography;

namespace System.Security.Cryptography
{
    public enum KeyNumber
    {
        //These are identifiers for the private keys from the key container
        Exchange = 1,
        Signature = 2
    }
}


text:
<html>
<head>
<title>GUIFiftyThreeMain</title>
</head>
<body>
<applet code="GUIFiftyThreeMain.class" width="500" height="230">
	<param name="title0" value="Google">
	<param name="address0" value="http://www.google.com">
	<param name="title1" value="Apple">
	<param name="address1" value="http://www.apple.com">
</applet>
</body>
</html>


text:
require 'intercom/traits/api_resource'

module Intercom
  class Section
    include Traits::ApiResource
  end
end