<?php

// Turn on debugging level
$Vtiger_Utils_Log = true;

// Include necessary classes
die;
include_once('vtlib/Vtiger/Module.php');

// Define instances
$users = Vtiger_Module::getInstance('Contacts');

// Nouvelle instance pour le nouveau bloc
$block = Vtiger_Block::getInstance('LBL_CONTACT_INFORMATION', $users);


// Add field
$fieldInstance = new Vtiger_Field();
$fieldInstance->name = 'nrodocumento';			              //Usually matches column name
$fieldInstance->table = 'vtiger_contactdetails';
$fieldInstance->column = 'nrodocumento';		                     //Must be lower case
$fieldInstance->label = 'Nro de Documento';		            //Upper case preceeded by LBL_
$fieldInstance->columntype = 'TEXT';	    //
$fieldInstance->uitype = 1;			                   //Multi-Combo picklist
$fieldInstance->displaytype = 1; // 1: Editable, 2: Solo lectura, 3: Oculto
$fieldInstance->typeofdata = 'V~O';	  //V=Varchar?, M=Mandatory, O=Optional
$block->addField($fieldInstance);

// Add field
$fieldInstance = new Vtiger_Field();
$fieldInstance->name = 'tipodocumento';			              //Usually matches column name
$fieldInstance->table = 'vtiger_contactdetails';
$fieldInstance->column = 'tipodocumento';		                     //Must be lower case
$fieldInstance->label = 'Tipo de Documento';		            //Upper case preceeded by LBL_
$fieldInstance->columntype = 'TEXT';	    //
$fieldInstance->uitype = 16;			                   //Multi-Combo picklist
$fieldInstance->displaytype = 1; // 1: Editable, 2: Solo lectura, 3: Oculto
$fieldInstance->typeofdata = 'V~O';	  //V=Varchar?, M=Mandatory, O=Optional
$fieldInstance->setPicklistValues(['DOC. IDENTIDAD (EXTRANJERO)','CARNET DE IDENTIDAD','CARNET DE EXTRANJERIA','PASAPORTE','CARNET IDENTIDAD FF PP','CARNET IDENTIDAD FF AA','LIBRETA TRIBUTARIA','DOCUMENTO PROVISIONAL IDENTIDAD','CED. DIPLOMATICA DE IDENTIDAD','DOC. TRIB. NO DOM. SIN RUC','DNI','RUC']);
$block->addField($fieldInstance);

?>

