# --
# Kernel/Config.pm - Config file for OTRS kernel
# Copyright (C) 2001-2009 OTRS AG, http://otrs.org/
# --
# $Id: Config.pm.dist,v 1.21 2009/02/16 12:01:43 tr Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --
#  Note:
#
#  -->> OTRS does have a lot of config settings. For more settings
#       (Notifications, Ticket::ViewAccelerator, Ticket::NumberGenerator,
#       LDAP, PostMaster, Session, Preferences, ...) see
#       Kernel/Config/Defaults.pm and copy your wanted lines into "this"
#       config file. This file will not be changed on update!
#
# --

package Kernel::Config;

sub Load {
    my $Self = shift;
    # ---------------------------------------------------- #
    # ---------------------------------------------------- #
    #                                                      #
    #         Start of your own config options!!!          #
    #                                                      #
    # ---------------------------------------------------- #
    # ---------------------------------------------------- #

    # ---------------------------------------------------- #
    # database settings                                    #
    # ---------------------------------------------------- #
    # DatabaseHost
    # (The database host.)
    $Self->{'DatabaseHost'} = 'localhost';
    # Database
    # (The database name.)
    $Self->{'Database'} = 'otrs';
    # DatabaseUser
    # (The database user.)
    $Self->{'DatabaseUser'} = 'otrs';
    # DatabasePw
    # (The password of database user. You also can use bin/CryptPassword.pl
    # for crypted passwords.)
    $Self->{'DatabasePw'} = 'otrsdb123';
    # DatabaseDSN
    # (The database DSN for MySQL ==> more: "man DBD::mysql")
    $Self->{DatabaseDSN} = "DBI:mysql:database=$Self->{Database};host=$Self->{DatabaseHost};";

    # (The database DSN for PostgreSQL ==> more: "man DBD::Pg")
    # if you want to use a local socket connection
#    $Self->{DatabaseDSN} = "DBI:Pg:dbname=$Self->{Database};";
    # if you want to use a tcpip connection
#    $Self->{DatabaseDSN} = "DBI:Pg:dbname=$Self->{Database};host=$Self->{DatabaseHost};";

    # ---------------------------------------------------- #
    # fs root directory
    # ---------------------------------------------------- #
    $Self->{Home} = '/opt/otrs';

    # ---------------------------------------------------- #
    # insert your own config settings "here"               #
    # config settings taken from Kernel/Config/Defaults.pm #
    # ---------------------------------------------------- #
    # $Self->{SessionUseCookie} = 0;
    # $Self->{CheckMXRecord} = 0;

    # Configuracion del ticket para los diferentes grupos #

 # ticket acl-1 - Sectores
 $Self->{TicketAcl}->{'ACL-Sectores-1'} = {
 # match properties
 Properties => {
  # current ticket match properties
  Ticket => {
   Queue => ['Soporte','Asistencia Tecnica - DBA','Asistencia Tecnica - Main','Asistencia Tecnica - Unix','Desarrollo de Internet','Desarrollo de Sistemas Abiertos','Gestion Seguridad Operativa','Ingenieria de Redes','Mesa de Requerimientos','Noc - Comunicaciones','Noc - Servicios','Operaciones','Servicio de Redes','Sistemas Mainframe','Desarrollo Otras Tecnologias','Desarrollo Java','Jefatura CAU','Gerencia Informatica','Gerencia CPD','Infraestructura','Gestion SAP'],
  }
 },

 # return possible options (white list)
 Possible => {

 # possible ticket options (white list)
 Ticket => {
  State => ['new', 'open','En tratamiento','Escalado','Resuelto (Confirmado por el cliente)','Resuelto (Sin confirmación del cliente)','Reasignado'], #'Reprogramado','Demorado'
  Priority => ['3 normal','4 urgent'],
 },

 # possible action options
 Action => {
  AgentTicketLock => 1,
  AgentTicketZoom => 1,
  AgentTicketClose => 0,
  AgentTicketPending => 1,
  AgentTicketNote => 1,
  AgentTicketHistory => 1,
  AgentTicketPriority => 1,
  AgentTicketFreeText => 1,
  AgentTicketHistory => 1,
  AgentTicketCompose => 1,
  AgentTicketBounce => 1,
  AgentTicketPrint => 1,
  AgentTicketForward => 1,
  AgentTicketPrint => 1,
  AgentTicketPhone => 1,
  AgentTicketPhoneOutbound => 1,
  AgentTicketCustomer => 1,
  AgentTicketMove => 1,
  AgentTicketOwner => 1,
  AgentTicketResponsible => 1,
  AgentTicketWatcher => 1,
  AgentLinkObject => 1,
  },
 },
 };

####################################################
######
 # ticket acl-1 - Mesa de Ayuda
 $Self->{TicketAcl}->{'Mesa de Ayuda'} = {
 # match properties
 Properties => {
  # current ticket match properties
  Ticket => {
   Queue => ['Mesa de Ayuda'],
  }
 },

 # return possible options (white list)
 Possible => {

 # possible ticket options (white list)
 Ticket => {
  State => ['new','open','Demorado','Reprogramado','En tratamiento','Escalado','Reasignado','Resuelto (Confirmado por el cliente)','Resuelto (Sin confirmación del cliente)','Cerrado - Cancelado (por el cliente)','Cerrado - No solucionado','Cerrado - Servicio no gestionado por el sector','Cerrado - Solucion temporal (workaround)','Cerrado - Solucionado (Confirmado por el cliente)','Cerrado - Solucionado (Sin confirmación del cliente)'],
  Priority => ['3 normal','4 urgent'],
 },

 # possible action options
 Action => {
  AgentTicketLock => 1,
  AgentTicketZoom => 1,
  AgentTicketClose => 1,
  AgentTicketPending => 1,
  AgentTicketNote => 1,
  AgentTicketHistory => 1,
  AgentTicketPriority => 1,
  AgentTicketFreeText => 1,
  AgentTicketHistory => 1,
  AgentTicketCompose => 1,
  AgentTicketBounce => 1,
  AgentTicketPrint => 1,
  AgentTicketForward => 1,
  AgentTicketPrint => 1,
  AgentTicketPhone => 1,
  AgentTicketPhoneOutbound => 1,
  AgentTicketCustomer => 1,
  AgentTicketMove => 1,
  AgentTicketOwner => 1,
  AgentTicketResponsible => 1,
  AgentTicketWatcher => 1,
  AgentLinkObject => 1,
  },
 },
 };
######

 # ticket acl-1 - Sectores
 $Self->{TicketAcl}->{'ACL-Sectores-2'} = {
 # match properties
 Properties => {
  # current ticket match properties
  Ticket => {
   Queue => ['Jefatura CAU','Jefatura CPD','Jefatura Coordinacion','Gerencia CPD','Gerencia Desarrollo','Gerencia Comunicaciones','Supervision Logistica','Gestion Seguridad Operativa','Supervision ASTEC','Jefatura ASTEC','Infraestructura','Jefatura Operaciones'],
  }
 },

 # return possible options (white list)
 Possible => {

 # possible ticket options (white list)
 Ticket => {
  State => ['new', 'open','En tratamiento','Escalado','Derivado','Autorizado','Cerrado - Solucionado (Confirmado por el cliente)','Cerrado - CPD','Resuelto (Confirmado por el cliente)','Resuelto (Sin confirmación del cliente)','Reasignado'], #'Reprogramado','Demorado'
  Priority => ['3 normal','4 urgent'],
 },

 # possible action options
 Action => {
  AgentTicketLock => 1,
  AgentTicketZoom => 1,
  AgentTicketClose => 1,
  AgentTicketPending => 1,
  AgentTicketNote => 1,
  AgentTicketHistory => 1,
  AgentTicketPriority => 1,
  AgentTicketFreeText => 1,
  AgentTicketHistory => 1,
  AgentTicketCompose => 1,
  AgentTicketBounce => 1,
  AgentTicketPrint => 1,
  AgentTicketForward => 1,
  AgentTicketPrint => 1,
  AgentTicketPhone => 1,
  AgentTicketPhoneOutbound => 1,
  AgentTicketCustomer => 1,
  AgentTicketMove => 1,
  AgentTicketOwner => 1,
  AgentTicketResponsible => 1,
  AgentTicketWatcher => 1,
  AgentLinkObject => 1,
  },
 },
 };

###########
 # ticket acl-1 - Gerencia Informatica
 $Self->{TicketAcl}->{'Gerencia Informatica'} = {
 # match properties
 Properties => {
  # current ticket match properties
  Ticket => {
   Queue => ['Gerencia Informatica'],
  }
 },

 # return possible options (white list)
 Possible => {

 # possible ticket options (white list)
 Ticket => {
  State => ['new', 'open','En tratamiento','Escalado','Derivado','Autorizado','Cerrado - Solucionado (Confirmado por el cliente)','Cerrado - Rechazado','Resuelto (Confirmado por el cliente)','Resuelto (Sin confirmación del cliente)','Reasignado'], #'Reprogramado','Demorado'
  Priority => ['3 normal','4 urgent'],
 },

 # possible action options
 Action => {
  AgentTicketLock => 1,
  AgentTicketZoom => 1,
  AgentTicketClose => 1,
  AgentTicketPending => 1,
  AgentTicketNote => 1,
  AgentTicketHistory => 1,
  AgentTicketPriority => 1,
  AgentTicketFreeText => 1,
  AgentTicketHistory => 1,
  AgentTicketCompose => 1,
  AgentTicketBounce => 1,
  AgentTicketPrint => 1,
  AgentTicketForward => 1,
  AgentTicketPrint => 1,
  AgentTicketPhone => 1,
  AgentTicketPhoneOutbound => 1,
  AgentTicketCustomer => 1,
  AgentTicketMove => 1,
  AgentTicketOwner => 1,
  AgentTicketResponsible => 1,
  AgentTicketWatcher => 1,
  AgentLinkObject => 1,
  },
 },
 };
###########

####################################################

 # ticket acl-2 - Logistica
 $Self->{TicketAcl}->{'ACL-Logistica-2'} = {
 # match properties
 Properties => {
  # current ticket match properties
  Ticket => {
   Queue => ['Logistica'],
  }
 },

 # return possible options (white list)
 Possible => {

 # possible ticket options (white list)
 Ticket => {
  State => ['new', 'open','En tratamiento','Escalado','Resuelto (Confirmado por el cliente)','Resuelto (Sin confirmación del cliente)','Resuelto (Asistencia Remota)','Reasignado','Reprogramado','Demorado'],
  Priority => ['3 normal','4 urgent'],
 },

 # possible action options
 Action => {
  AgentTicketLock => 1,
  AgentTicketZoom => 1,
  AgentTicketClose => 0,
  AgentTicketPending => 1,
  AgentTicketNote => 1,
  AgentTicketHistory => 1,
  AgentTicketPriority => 1,
  AgentTicketFreeText => 1,
  AgentTicketHistory => 1,
  AgentTicketCompose => 1,
  AgentTicketBounce => 1,
  AgentTicketPrint => 1,
  AgentTicketForward => 1,
  AgentTicketPrint => 1,
  AgentTicketPhone => 1,
  AgentTicketPhoneOutbound => 1,
  AgentTicketCustomer => 1,
  AgentTicketMove => 1,
  AgentTicketOwner => 1,
  AgentTicketResponsible => 1,
  AgentTicketWatcher => 1,
  AgentLinkObject => 1,
  },
 },
 };

 # ticket acl- ASTEC
 $Self->{TicketAcl}->{'ACL-ASTEC-1'} = {
 # match properties
 Properties => {
  # current ticket match properties
  Ticket => {
   Queue => ['[ ASTEC - BD ]','[ ASTEC - Monitoreo ]','[ ASTEC - SAN ]','[ ASTEC - SAP ]','[ ASTEC - SO ]'],
  }
 },

 # return possible options (white list)
 Possible => {
 
 # possible ticket options (white list)
 Ticket => {
  State => ['Asignado','Cerrado - Solucionado (Confirmado por el cliente)','Cerrado - Solucionado (Sin confirmación del cliente)','Demorado','En tratamiento','Escalado'],
  Priority => ['2 low','3 normal','4 urgent'],
   },
  },
 };

 # ticket acl- ASTEC
 $Self->{TicketAcl}->{'ACL-ASTEC-2'} = {
 # match properties
 Properties => {
  # current ticket match properties
  Ticket => {
   Queue => ['[ ASTEC - Supervision ]'],
  }
 },

 # return possible options (white list)
 Possible => {

 # possible ticket options (white list)
 Ticket => {
  State => ['Asignado','Cerrado - Solucionado (Confirmado por el cliente)','Cerrado - Solucionado (Sin confirmación del cliente)','Cerrado - No solucionado','Cerrado - Servicio no gestionado por el sector','Demorado','En tratamiento','Escalado'],
  Priority => ['2 low','3 normal','4 urgent'],
   },
  },
 };

    # --------------------------------------------------- #
    #                                                     #
    #                    CustomerUser                     #
    #                                                     #
    # --------------------------------------------------- #

    # CustomerUser
    # (customer user database backend and settings)
    $Self->{CustomerUser} = {
        Name   => 'Database Backend',
        Module => 'Kernel::System::CustomerUser::DB',
        Params => {
            # if you want to use an external database, add the
            # required settings
#            DSN => 'DBI:odbc:yourdsn',
#            DSN => 'DBI:mysql:database=customerdb;host=customerdbhost',
#            User => '',
#            Password => '',
            Table => 'customer_user',
            # CaseSensitive will control if the SQL statements need LOWER()
            #   function calls to work case insensitively. Setting this to
            #   1 will improve performance dramatically on large databases.
            CaseSensitive => 0,
        },

        # customer uniq id
        CustomerKey => 'login',

        # customer #
        CustomerID             => 'customer_id',
        CustomerValid          => 'valid_id',
        CustomerUserListFields => [ 'first_name', 'last_name', 'email' ],

#        CustomerUserListFields => ['login', 'first_name', 'last_name', 'customer_id', 'email'],
        CustomerUserSearchFields           => [ 'login', 'first_name', 'last_name', 'customer_id' ],
        CustomerUserSearchPrefix           => '*',
        CustomerUserSearchSuffix           => '*',
        CustomerUserSearchListLimit        => 250,
        CustomerUserPostMasterSearchFields => ['email'],
        CustomerUserNameFields     => [ 'title', 'first_name', 'last_name' ],
        CustomerUserEmailUniqCheck => 1,

#        # show now own tickets in customer panel, CompanyTickets
#        CustomerUserExcludePrimaryCustomerID => 0,
#        # generate auto logins
#        AutoLoginCreation => 0,
#        # generate auto login prefix
#        AutoLoginCreationPrefix => 'auto',
#        # admin can change customer preferences
#        AdminSetPreferences => 1,
#        # use customer company support (reference to company, See CustomerCompany settings)
         CustomerCompanySupport => 1,
#        # cache time to live in sec. - cache any database queries
#        CacheTTL => 0,
#        # just a read only source
#        ReadOnly => 1,
        Map => [

            # note: Login, Email and CustomerID needed!
            # var, frontend, storage, shown (1=always,2=lite), required, storage-type, http-link, readonly, http-link-target
            [ 'UserTitle',      'Title',      'title',      1, 0, 'var', '', 0 ],
            [ 'UserFirstname',  'Firstname',  'first_name', 1, 1, 'var', '', 0 ],
            [ 'UserLastname',   'Lastname',   'last_name',  1, 1, 'var', '', 0 ],
            [ 'UserLogin',      'Username',   'login',      1, 1, 'var', '', 0 ],
            [ 'UserPassword',   'Password',   'pw',         0, 0, 'var', '', 0 ],
            [ 'UserEmail',      'Email',      'email',      1, 1, 'var', '', 0 ],

#            [ 'UserEmail',      'Email', 'email',           1, 1, 'var', '$Env{"CGIHandle"}?Action=AgentTicketCompose&ResponseID=1&TicketID=$Data{"TicketID"}&ArticleID=$Data{"ArticleID"}', 0 ],
            [ 'UserCustomerID', 'CustomerID', 'customer_id', 0, 1, 'var', '', 0 ],

#            [ 'UserCustomerIDs', 'CustomerIDs', 'customer_ids', 1, 0, 'var', '', 0 ],
            [ 'UserPhone',        'Phone',       'phone',        1, 0, 'var', '', 0 ],
            [ 'UserFax',          'Fax',         'fax',          1, 0, 'var', '', 0 ],
            [ 'UserMobile',       'Mobile',      'mobile',       1, 0, 'var', '', 0 ],
            [ 'UserStreet',       'Street',      'street',       1, 0, 'var', '', 0 ],
            [ 'UserZip',          'Zip',         'zip',          1, 0, 'var', '', 0 ],
            [ 'UserCity',         'City',        'city',         1, 0, 'var', '', 0 ],
            [ 'UserCountry',      'Country',     'country',      1, 0, 'var', '', 0 ],
            [ 'UserComment',      'Comment',     'comments',     1, 0, 'var', '', 0 ],
            [ 'ValidID',          'Valid',       'valid_id',     0, 1, 'int', '', 0 ],
        ],

        # default selections
        Selections => {

#            UserTitle => {
#                'Mr.' => 'Mr.',
#                'Mrs.' => 'Mrs.',
#            },
        },
    };

    # --------------------------------------------------- #
    #               AdminCustomerUser                     #
    # --------------------------------------------------- #

    $Self->{'Frontend::Module'}->{'AdminCustomerUser'} = {
        GroupRo     => [ 'CAU - Soporte','CAU - Mesa de Ayuda','CAU - Mesa de Requerimientos' ],
        Group       => [ 'admin', 'users' ],
        Description => 'Edit Customer Users',
        Title       => 'Customer User',
        NavBarName  => '',
        NavBar      => [
            {   Description => 'Edit Customer Users',
                Name        => 'Customer',
                Image       => 'folder_yellow.png',
                Link        => 'Action=AdminCustomerUser&Nav=Agent',
                NavBar      => 'Ticket',
                Prio        => 9000,
                AccessKey   => 'c',
            }
        ],
        NavBarModule => {
            Module => 'Kernel::Output::HTML::NavBarModuleAdmin',
            Name   => 'Customer Users',
            Block  => 'Block1',
            Prio   => 300,
        },
    };

    # --------------------------------------------------- #
    #                                                     #
    #                   CustomerCompany                   #
    #                                                     #
    # --------------------------------------------------- #

     $Self->{CustomerCompany} = {
        Params => {
            # if you want to use an external database, add the
            # required settings
#            DSN => 'DBI:odbc:yourdsn',
#            DSN => 'DBI:mysql:database=customerdb;host=customerdbhost',
#            User => '',
#            Password => '',
            Table => 'customer_company',
        },

        # customer uniq id
        CustomerCompanyKey          => 'customer_id',
        CustomerCompanyValid        => 'valid_id',
        CustomerCompanyListFields   => [ 'customer_id', 'name' ],
        CustomerCompanySearchFields => ['customer_id', 'name'],
        CustomerCompanySearchPrefix => '',
        CustomerCompanySearchSuffix => '*',
        CustomerCompanySearchListLimit => 250,
        Map                       => [

# var, frontend, storage, shown (1=always,2=lite), required, storage-type, http-link, readonly
            [ 'CustomerID',             'CustomerID', 'customer_id', 0, 1, 'var', '', 0 ],
            [ 'CustomerCompanyName',    'Company',       'name',        1, 1, 'var', '', 0 ],
            [ 'CustomerCompanyCategoria',    'Categoría',       'cvcategory',        1, 1, 'var', '', 0 ],
            [ 'CustomerCompanyNrosDepositante',    'Nros Depositante', 'cvnrodepositante',  1, 0, 'var', '', 0 ],
            [ 'CustomerCompanyStreet',  'Street',     'street',      1, 0, 'var', '', 0 ],
            [ 'CustomerCompanyZIP',     'Zip',        'zip',         1, 0, 'var', '', 0 ],
            [ 'CustomerCompanyCity',    'City',       'city',        1, 0, 'var', '', 0 ],
            [ 'CustomerCompanyTelefonos', 'Teléfonos',  'cvtelefonos', 1, 0, 'var', '', 0 ],
            [ 'CustomerCompanyEmail', 'Email',  'cvemail', 1, 0, 'var', '', 0 ],
            [ 'CustomerCompanyURL', 'URL', 'url', 1, 0, 'var', '$Data{"CustomerCompanyURL"}', 0 ],
            [ 'CustomerCompanyCondicionIVA', 'Condición IVA',  'cvcondicioniva', 1, 0, 'var', '', 0 ],
            [ 'CustomerCompanyCUIT', 'CUIT',  'cvcuit', 1, 0, 'var', '', 0 ],
            [ 'CustomerCompanyComment', 'Comment', 'comments', 1, 0, 'var', '', 0 ],
            [ 'ValidID',                'Valid',   'valid_id', 0, 1, 'int', '', 0 ],
        ],

        # default selections
        Selections => {
            CustomerCompanyCategoria => {
                'Agencias noticiosas'                 	=> 'Agencias noticiosas',
                'Agentes y Sociedades de Bolsa'      	=> 'Agentes y Sociedades de Bolsa',
		'Bursatiles' 				=> 'Bursátiles',
                'Depositantes'             		=> 'Depositantes',
		'Empresas emisoras'			=> 'Empresas emisoras',
		'Organizacion Interna'			=> 'Organización Interna',
		'Servicios'				=> 'Servicios',
		'Otros'					=> 'Otros',
	    },
            CustomerCompanyCondicionIVA => {
		'' => '',
		'Responsable Inscripto' => 'Responsable Inscripto',
		'Responsable no inscripto' => 'Responsable no inscripto',
		'Exento' => 'Exento',
		'Consumidor Final' => 'Consumidor Final',
	    },
        },
    };

    # --------------------------------------------------- #
    #                AdminCustomerCompany                 #
    # --------------------------------------------------- #

    $Self->{'Frontend::Module'}->{'AdminCustomerCompany'} = {
        GroupRo     => [ 'CAU - Soporte','CAU - Mesa de Ayuda' ],
        Group       => [ 'admin', 'users','CAU - Mesa de Requerimientos' ],
        Description => 'Edit Customer Users',
        Title       => 'Customer User',
        NavBarName  => '',
        NavBar      => [
            {   Description => 'Edit Customer Company',
                Name        => 'Company',
                Image       => 'folder_yellow.png',
                Link        => 'Action=AdminCustomerCompany&Nav=Agent',
                NavBar      => 'Ticket',
                Prio        => 9000,
                AccessKey   => 'c',
            }
        ],
        NavBarModule => {
            Module => 'Kernel::Output::HTML::NavBarModuleAdmin',
            Name   => 'Customer Company',
            Block  => 'Block1',
            Prio   => 310,
        },
    };

    # ---------------------------------------------------- #
    # ---------------------------------------------------- #
    # data inserted by installer                           #
    # ---------------------------------------------------- #
    # $DIBI$
    $Self->{'SystemID'} = 10;
    $Self->{'SecureMode'} = 1;
    $Self->{'Organization'} = 'Caja de Valores S.A.';
    $Self->{'LogModule::LogFile'} = '/var/log/otrs.log';
    $Self->{'LogModule'} = 'Kernel::System::Log::File';
    $Self->{'FQDN'} = 'otrs.sba.com.ar';
    $Self->{'DefaultLanguage'} = 'es';
    $Self->{'AdminEmail'} = 'unix@cajval.sba.com.ar';
    $Self->{'DefaultCharset'} = 'utf-8';

    # ---------------------------------------------------- #
    # ---------------------------------------------------- #
    #                                                      #
    #           End of your own config options!!!          #
    #                                                      #
    # ---------------------------------------------------- #
    # ---------------------------------------------------- #
}

# ---------------------------------------------------- #
# needed system stuff (don't edit this)                #
# ---------------------------------------------------- #
use strict;
use warnings;

use vars qw(@ISA $VERSION);
use Kernel::Config::Defaults;
push (@ISA, 'Kernel::Config::Defaults');

use vars qw(@ISA $VERSION);
$VERSION = qw($Revision: 1.21 $)[1];

# -----------------------------------------------------#

1;
