<?php
class eventclass_gestion  extends TableEventsBase {
	
	function init() {
		$this->events = array(
			'BeforeMoveNextList' => true 
		);
		$this->fieldValues = array(
			'filterLimit' => array(
				 
			),
			'mapIcon' => array(
				 
			),
			'viewCustom' => array(
				 
			),
			'lookupWhere' => array(
				 
			),
			'viewFileText' => array(
				 
			),
			'defaultValue' => array(
				'estado_pago' => array(
					'edit' => true 
				) 
			),
			'autoUpdateValue' => array(
				 
			),
			'uploadFolder' => array(
				 
			),
			'viewPluginInit' => array(
				'estado' => array(
					'view' => true 
				),
				'estado_pago' => array(
					'view' => true 
				),
				'correlativo_pago' => array(
					'view' => true 
				) 
			),
			'editPluginInit' => array(
				'estado' => array(
					'edit' => true 
				),
				'estado_pago' => array(
					'edit' => true 
				),
				'correlativo_pago' => array(
					'edit' => true 
				) 
			) 
		);
			}
		function BeforeMoveNextList( &$data, &$row, &$record, $recordId, $pageObject ) {
			
	
	if ($data ["estado_pago"] == '1')
	{
	$pageObject->hideItem("custom_button", $recordId);
	}
	
	
	
	else {
	$pageObject->showItem("custom_button");
	}
	
	
	// Place event code here.
	// Use "Add Action" button to add code snippets.
			;
			
		}
	public function plugin_estado_vfview( $pageObject ) {
		$this->settings = array();
		$this->settings["name_enable"] = "Activo";                 // Name of Enable
		$this->settings["name_disable"] = "Cerrado";               // Name of Enable
		$this->settings["size"] = "normal";                    // Size field  values: large,normal,small,mini
		$this->settings["style"] = "primary";                  // Style field  values: default,primary,success,info,warning,danger;
		return $this->settings;
	}
	
	public function plugin_estado_efedit( $pageObject ) {
		$this->settings = array();
		$this->settings["required"] = false;                   // Wether is mandatory
		$this->settings["disabled"] = false;                   // Disable or Enable; false or true
		$this->settings["name_enable"] = "Activo";                 // Name of Enable
		$this->settings["name_disable"] = "Cerrado";               // Name of Enable
		$this->settings["size"] = "normal";                    // Size field  values: large,normal,small,mini
		$this->settings["style"] = "primary";                  // Style field  values: default,primary,success,info,warning,danger;
		return $this->settings;
	}
	
	public function plugin_estado_pago_vfview( $pageObject ) {
		$this->settings = array();
		$this->settings["name_enable"] = "Si";                 // Name of Enable
		$this->settings["name_disable"] = "No";               // Name of Enable
		$this->settings["size"] = "normal";                    // Size field  values: large,normal,small,mini
		$this->settings["style"] = "info";                  // Style field  values: default,primary,success,info,warning,danger;
		return $this->settings;
	}
	
	public function default_estado_pago_efedit(  ) {
		$defaultValue = 0;
		return $defaultValue;
	}
	
	public function plugin_estado_pago_efedit( $pageObject ) {
		$this->settings = array();
		$this->settings["required"] = false;                   // Wether is mandatory
		$this->settings["disabled"] = false;                   // Disable or Enable; false or true
		$this->settings["name_enable"] = "Si";                 // Name of Enable
		$this->settings["name_disable"] = "No";               // Name of Enable
		$this->settings["size"] = "normal";                    // Size field  values: large,normal,small,mini
		$this->settings["style"] = "primary";                  // Style field  values: default,primary,success,info,warning,danger;
		return $this->settings;
	}
	
	public function plugin_correlativo_pago_vfview( $pageObject ) {
		$this->settings = array();
		$this->settings["name_enable"] = "On";                 // Name of Enable
		$this->settings["name_disable"] = "Off";               // Name of Enable
		$this->settings["size"] = "normal";                    // Size field  values: large,normal,small,mini
		$this->settings["style"] = "primary";                  // Style field  values: default,primary,success,info,warning,danger;
		return $this->settings;
	}
	
	public function plugin_correlativo_pago_efedit( $pageObject ) {
		$this->settings = array();
		$this->settings["required"] = false;                   // Wether is mandatory
		$this->settings["disabled"] = false;                   // Disable or Enable; false or true
		$this->settings["name_enable"] = "On";                 // Name of Enable
		$this->settings["name_disable"] = "Off";               // Name of Enable
		$this->settings["size"] = "normal";                    // Size field  values: large,normal,small,mini
		$this->settings["style"] = "primary";                  // Style field  values: default,primary,success,info,warning,danger;
		return $this->settings;
	}	

}


?>