Heray-Was-Here
Server : Apache
System : Linux mail.lomejor.cr 6.8.0-1059-azure #65~22.04.1-Ubuntu SMP Thu May 28 16:59:19 UTC 2026 x86_64
User : www-data ( 33)
PHP Version : 8.2.31
Disable Function : NONE
Directory :  /var/www/erp/htdocs/custom/sydinitprocess/core/modules/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/erp/htdocs/custom/sydinitprocess/core/modules/modSYDinitprocess.class.php
<?php

include_once DOL_DOCUMENT_ROOT . "/core/modules/DolibarrModules.class.php";


class modSYDinitprocess extends DolibarrModules
{ 
	/** @var DoliDB Database handler */
	public $db;
	public $numero = 743743;
	public $rights_class = 'sydinitprocess';
	public $family = 'SyDTech';
	public $module_position = 699;
	public $name = "Personalizacion Local";	
	public $description = "Modulo para personalizacion de la empresa";
	public $descriptionlong = "Personalizacion de procesos";
	public $editor_name = "Randall Mora";
	public $editor_url = "https://sydtech.io";
	public $version = '1.0';
	public $const_name = 'MAIN_MODULE_SYDINITPROCESS';
	public $picto = 'exchange';


	/** @var array Define module parts */
	public $module_parts = array(
		'sydinitprocess' => true,
		'triggers' => true,
		'login' => false,
		'substitutions' => false,
		'menus' => false,
		'theme' => false,
		'tpl' => false,
		'barcode' => false,
		'models' => false,
		'hooks' => array('data'=>array('invoicelist','ordercard','propalcard','commtablelist','main'),'entity'=>0),
		'dir' => array(),
		'workflow' => array(),
	);
 
	public $config_page_url = 'setup.php@sydinitprocess';
	
	public $hidden = false; /** @var bool Control module visibility */
	public $depends = array(); /** @var string[] List of class names of modules to enable when this one is enabled */
	public $requiredby = array(); /** @var string[] List of class names of modules to disable when this one is disabled */
	public $conflictwith = array(); /** @var string List of class names of modules this module conflicts with */
	public $phpmin = array(5, 6); /** @var int[] Minimum PHP version required by this module */
	public $need_dolibarr_version = array(13, 1); /** @var int[] Minimum Dolibarr version required by this module */
	public $langfiles = array();
	
	
	/** @var array Indexed list of constants options */
	public $const = array(
	);
	
	
	public $tabs = array();
	public $rights = array();
	public $menu = array();

	public $cronjobs = array();

	/** @var bool Module only enabled / disabled in main company when multi-company is in use */
	public $core_enabled = false;
	// @codingStandardsIgnoreEnd

	/**
	 * Constructor. Define names, constants, directories, boxes, permissions
	 *
	 * @param DoliDB $db Database handler
	 */
	public function __construct($db)
	{
		global $langs, $conf, $user;
		// DolibarrModules is abstract in Dolibarr < 3.8
		if (is_callable('parent::__construct')) {
			parent::__construct($db);
		} else {
			global $db;
			$this->db = $db;
		}
		
		
		// Permissions	
		$this->rights = array();		// Permission array used by this module
		$r=0;
		
		// $this->rights[$r][0] = $this->numero + $r;
		// $this->rights[$r][1] = 'Migracion de Datos';
		// $this->rights[$r][3] = 0;
		// $this->rights[$r][4] = 'execute';
		// $r++;

		// Add here list of permission defined by an id, a label, a boolean and two constant strings.
		// Example:
		$this->rights[$r][0] = $this->numero + $r;	// Permission id (must not be already used)
		$this->rights[$r][1] = 'Deshabilita Campo Impuesto en Cotizacion y Pedidos';	// Permission label
		$this->rights[$r][3] = 0; 					// Permission by default for new user (0/1)
		$this->rights[$r][4] = 'disabletva_tx';				// In php code, permission will be checked by test if ($user->rights->permkey->level1->level2)
		$r++;
		$this->rights[$r][0] = $this->numero + $r;	// Permission id (must not be already used)
		$this->rights[$r][1] = 'Filtra solo los documentos del usuario';	// Permission label
		$this->rights[$r][3] = 0; 					// Permission by default for new user (0/1)
		$this->rights[$r][4] = 'userfilter';				// In php code, permission will be checked by test if ($user->rights->permkey->level1->level2)
		$r++;
		
		// Main menu entries
		$this->menu = array();			// List of menus to add
		$r=0;
        $this->menu[$r] = array(
            'fk_menu'=>'fk_mainmenu=commercial', // Use r=value where r is index key used for the parent menu entry (higher parent must be a top menu entry)
            'type' => 'left', // This is a Left menu entry
            'titre' => 'Ventas',
            'mainmenu' => 'commercial',
            'leftmenu'=> 'ventas',
            'url' => '/sydinitprocess/commtable.php',
            'langs' => '', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
            'position' => 100,
            'enabled' => '1', // Define condition to show or hide menu entry. Use '$conf->monmodule->enabled' if entry must be visible if module is enabled.
            'perms' => $user->rights->commande->creer, // Use 'perms'=>'$user->rights->monmodule->level1->level2' if you want your menu with a permission rules
            'target' => '',
            'user' => 0
        );    // 0=Menu for internal users,1=external users, 2=both
		$r++;
        $this->menu[$r] = array(
            'fk_menu'=>'fk_mainmenu=commercial,fk_leftmenu=ventas', // Use r=value where r is index key used for the parent menu entry (higher parent must be a top menu entry)
            'type' => 'left', // This is a Left menu entry
            'titre' => 'Comisiones',
            'mainmenu' => '',
            'leftmenu'=> '',
            'url' => '/sydinitprocess/commtable.php',
            'langs' => '', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
            'position' => 100+$r,
            'enabled' => '1', // Define condition to show or hide menu entry. Use '$conf->monmodule->enabled' if entry must be visible if module is enabled.
            'perms' =>$user->rights->commande->creer, // Use 'perms'=>'$user->rights->monmodule->level1->level2' if you want your menu with a permission rules
            'target' => '',
            'user' => 0
        );    // 0=Menu for internal users,1=external users, 2=both
		$r++;
		$this->menu[$r] = array(
            'fk_menu'=>'fk_mainmenu=commercial,fk_leftmenu=ventas', // Use r=value where r is index key used for the parent menu entry (higher parent must be a top menu entry)
            'type' => 'left', // This is a Left menu entry
            'titre' => 'Control de Flujo',
            'mainmenu' => '',
            'leftmenu'=> '',
            'url' => '/sydinitprocess/flowmanage.php',
            'langs' => '', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
            'position' => 100+$r,
            'enabled' => '1', // Define condition to show or hide menu entry. Use '$conf->monmodule->enabled' if entry must be visible if module is enabled.
            'perms' =>$user->rights->commande->creer, // Use 'perms'=>'$user->rights->monmodule->level1->level2' if you want your menu with a permission rules
            'target' => '',
            'user' => 0
        );    // 0=Menu for internal users,1=external users, 2=both
		$r++;
        $this->menu[$r] = array(
            'fk_menu'=>'fk_mainmenu=commercial,fk_leftmenu=ventas', // Use r=value where r is index key used for the parent menu entry (higher parent must be a top menu entry)
            'type' => 'left', // This is a Left menu entry
            'titre' => 'Reporte SKU',
            'mainmenu' => '',
            'leftmenu'=> '',
            'url' => '/sydinitprocess/skutable.php',
            'langs' => '', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
            'position' => 100+$r,
            'enabled' => '1', // Define condition to show or hide menu entry. Use '$conf->monmodule->enabled' if entry must be visible if module is enabled.
            'perms' => $user->rights->commande->creer, // Use 'perms'=>'$user->rights->monmodule->level1->level2' if you want your menu with a permission rules
            'target' => '',
            'user' => 0
        );    // 0=Menu for internal users,1=external users, 2=both
		$r++;
/*
        $this->menu[$r] = array(
            'fk_menu'=>'fk_mainmenu=home,fk_leftmenu=setup', // Use r=value where r is index key used for the parent menu entry (higher parent must be a top menu entry)
            'type' => 'left', // This is a Left menu entry
            'titre' => 'Proceso de Migracion',
            'mainmenu' => '',
            'leftmenu'=> '',
            'url' => '/sydinitprocess/migration.php',
            'langs' => '', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
            'position' => 100,
            'enabled' => '1', // Define condition to show or hide menu entry. Use '$conf->monmodule->enabled' if entry must be visible if module is enabled.
            'perms' => '$user->rights->sydinitprocess->execute', // Use 'perms'=>'$user->rights->monmodule->level1->level2' if you want your menu with a permission rules
            'target' => '',
            'user' => 0
        );    // 0=Menu for internal users,1=external users, 2=both
		$r++;
*/
        // Exports
		// Imports
		//--------
		$r = 0;

		$r++;
		$this->import_code[$r] = $this->rights_class . '_' . $r;
		$this->import_label[$r] = "Facturas No Cargadas";    // Translation key
		$this->import_icon[$r] = $this->picto;
		$this->import_entities_array[$r] = array();        // We define here only fields that use another icon that the one defined into import_icon
		$this->import_tables_array[$r] = array('f' => MAIN_DB_PREFIX . 'facture');
		$this->import_tables_creator_array[$r] = array('f' => 'fk_user_author');    // Fields to store import user id
		$this->import_fields_array[$r] = array('f.ref' => "Ref*", 'f.fk_soc' => "IDCustomer*", 'f.datec' => "Date", 'f.date_valid' => "datevalid", 'f.date_lim_reglement' => "datevalid", 'f.total_ht' => "PriceHT", 'f.total_tva' => "totatva",  'f.total_ttc' => "PriceTTC", 'f.fk_statut' => 'status 2:Facturada', 'f.paye' => "padaga 0:Nopagada 1:Pagada", 'f.fk_mode_reglement' => 'metodopago 1:Efectivo', 'f.fk_cond_reglement' => 'cond. pago 1:Contado');
		//$this->import_fieldshidden_array[$r] = array( 'f.paye' => 1, 'f.fk_mode_reglement' => 1);
		$this->import_regex_array[$r] = array('f.ref' => '[^ ]');
		$this->import_examplevalues_array[$r] = array('f.ref' => "FA0000012345", 'f.fk_soc' => "12",  'f.datec' => "2020-01-31 00:00:00", 'f.date_valid' => "2020-01-31 00:00:00", 'f.date_lim_reglement' => "2020-01-31 00:00:00",'f.total_ht' => "100.00", 'f.total_tva' => "13", 'f.total_ttc' => "113",  'f.fk_statut' => '2', 'f.paye' => "1", 'f.fk_mode_reglement' => '1', 'f.fk_cond_reglement' => '1');
		$this->import_updatekeys_array[$r] = array('f.ref' => 'Ref');
    
    
		$r=1;
	}
	


	
	/**
	 * Function called when module is enabled.
	 * The init function add constants, boxes, permissions and menus
	 * (defined in constructor) into Dolibarr database.
	 * It also creates data directories
	 *
	 * @param string $options Options when enabling module ('', 'noboxes')
	 * @return int 1 if OK, 0 if KO
	 */
	public function init($options = '')
	{
		$sql = array();
		$result = $this->loadTables();
		return $this->_init($sql, $options);
	}
	
	
	
	
	/**
	 * Create tables, keys and data required by module
	 * Files llx_table1.sql, llx_table1.key.sql llx_data.sql with create table, create keys
	 * and create data commands must be stored in directory /mymodule/sql/
	 * This function is called by this->init
	 *
	 * @return int <=0 if KO, >0 if OK
	 */
	private function loadTables()
	{
		//return $this->_load_tables('/data/sql/');
	}
	
	
	
	
	/**
	 * Function called when module is disabled.
	 * Remove from database constants, boxes and permissions from Dolibarr database.
	 * Data directories are not deleted
	 *
	 * @param string $options Options when enabling module ('', 'noboxes')
	 * @return int 1 if OK, 0 if KO
	 */
	public function remove($options = '')
	{
		$sql = array();
		$sql[] = 'DELETE FROM '.MAIN_DB_PREFIX.'const WHERE name LIKE "MAIN_MODULE_SYDINITPROCESS%"';
		$sql[] = 'DELETE FROM '.MAIN_DB_PREFIX.'const WHERE name LIKE "SYDINITPROCESS%%"';
		return $this->_remove($sql, $options);
	}
	

}

?>

Hry