<?php

/**
 * 	Dear developer!
 *	Never modify events.php file, it is autogenerated.
 *  Modify PHP/EventTemplates/events.txt instead.
 *
 */

 class eventclass_derecho_propietario_2  extends eventsBase
{
	function __construct()
	{
	// fill list of events
		$this->events["BeforeAdd"]=true;


		$this->events["BeforeMoveNextList"]=true;


	}

//	handlers

		
		
		
		
		
		
		
		
		
		
		
		
		
				// Before record added
function BeforeAdd(&$values, &$sqlValues, &$message, $inline, $pageObject)
{

		


$values["total_bs"] = 100 * $values["nro_Acciones_2"];
$values["total_acumulado"] = $values["sub_total_acciones"] +  $values["nro_Acciones_2"];

require __DIR__ . '/../app/number/convert3.php';




return true;
;		
} // function BeforeAdd

		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		

		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		

		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
				// List page: After record processed
function BeforeMoveNextList(&$data, &$row, &$record, $recordId, $pageObject)
{

		// Place event code here.
// Use "Add Action" button to add code snippets.



if ($data ["estado_titulo"] == '67')
{
$pageObject->hideItem("custom_button", $recordId);
$pageObject->hideItem("custom_button1", $recordId);
$pageObject->hideItem("custom_button3", $recordId);
$pageObject->hideItem("grid_edit", $recordId);

}



if ($data ["estado_titulo"] == '64')
{

$pageObject->hideItem("custom_button4", $recordId);

$pageObject->hideItem("grid_edit", $recordId);

}



else {
$pageObject->showItem("custom_button");
}


// Place event code here.
// Use "Add Action" button to add code snippets.
;		
} // function BeforeMoveNextList

		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		



}
?>
