function buscarcliedni() { $dni = $_REQUEST['dni']; $personal = new Personal(); $data = $personal->buscarcliordenventadni($dni); echo '{ "nombres":"' . $data[0]['nombres'] . ' ' . $data[0]['apaterno'] . ' ' . $data[0]['amaterno'] . '", "codigo":"' . $data[0]['codigo'] . '", "telefono":"' . $data[0]['telefono'] . '", "direccion":"' . $data[0]['direccion'] . '", "celular":"' . $data[0]['celular'] . '", "email":"' . $data[0]['email'] . '", "nombre":"' . $data[0]['nombres'] . '", "apaterno":"' . $data[0]['apellidopaterno'] . '", "amaterno":"' . $data[0]['apellidomaterno'] . '", "ruc":"' . $data[0]['ruc'] . '", "dni":"' . $data[0]['dni'] . '", "estadocivil":"' . $data[0]['estadocivil'] . '", "razonsocial":"' . $data[0]['razonsocial'] . '", "fechanac":"' . $data[0]['fechanacimiento'] . '", "genero":"' . $data[0]['genero'] . '", "provincia":"' . $data[0]['idprovincia'] . '", "departamento":"' . $data[0]['iddepartamento'] . '", "distrito":"' . $data[0]['iddistrito'] . '", "nomdis":"' . $data[0]['nomdis'] . '", "pais":"' . $data[0]['idpais'] . '" }'; }
public function listaProfesores() { $q = isset($_POST['q']) ? strval($_POST['q']) : ''; $personal = new Personal(); $row = $personal->find('all', array('conditions' => array('Personal.nombres like' => "%{$q}%"), 'fields' => array('Personal.id, Personal.cedula, Personal.nombres, Personal.apellidos, Personal.telefono'))); $this->set('result', $row); $this->render('listaProfesores', 'ajax'); }
/** * Show the form for creating a new resource. * * @return Response */ public function create() { $personal = new Personal(); $personal->nombre = Input::get('nombre'); $personal->noServicio = Input::get('noServicio'); $personal->password = Input::get('password'); $personal->rango = Input::get('rango'); $personal->placebirth = Input::get('placebirth'); $personal->affiliation = Input::get('affiliation'); $personal->save(); }
public function index() { App::import('Model', 'Horario'); App::import('Model', 'Personal'); App::import('Model', 'Materia'); App::import('Model', 'Seccion'); $this->set('horarios', $this->Asistencia->Horario->find('list', array('order' => 'Horario.personal_id ASC'))); $horario = new Horario(); $this->set('lista_horarios', $horario->find('all', array('recursive' => -1))); $personal = new Personal(); $this->set('docentes', $personal->find('all', array('recursive' => -1))); $materia = new Materia(); $this->set('materias', $materia->find('all', array('recursive' => -1))); $seccion = new Seccion(); $this->set('secciones', $seccion->find('all', array('recursive' => -1))); //$this->set('horarios',$this->Asistencia->Horario->find('list', array('order' => 'Horario.personal_id ASC'))); }
public function edit($id) { $this->data['donacion'] = Donacion::find($id); $this->data['addDonacionesActive'] = 'active'; $this->data['personales'] = Personal::selectRaw('CONCAT(nombres, " (ID:", personalID,")") as nombres, personalID')->where('tipoPersonal', '=', 'aportante')->lists('nombres', 'personalID'); $this->data['beneficiarios'] = Beneficiario::selectRaw('CONCAT(apellidos, " (ID:", beneficiarioID,")") as apellidos, beneficiarioID')->where('status', '=', 'activo')->lists('apellidos', 'beneficiarioID'); return View::make('admin.donaciones.edit', $this->data); }
public function edit($id) { $this->data['ayuda'] = Ayuda::find($id); $this->data['addAyudasActive'] = 'active'; $this->data['beneficiarios'] = Beneficiario::lists('apellidos', 'beneficiarioID'); $this->data['personales'] = Personal::selectRaw('CONCAT(nombres, " (ID:", personalID,")") as nombres, personalID')->where('tipoPersonal', '=', 'aportante')->lists('nombres', 'personalID'); return View::make('admin.ayudas.edit', $this->data); }
/** * Remove the specified personal from storage. * * @param int $id * @return Response */ public function destroy($id) { if (Auth::user()->residencia->id == Personal::find($id)->residencia_id) { Personal::destroy($id); return "TRUE"; } else { return "ERROR"; } }
public function login() { $email = null; if (is_null($email)) { return View::make('login'); } else { $personal = Personal::where('email', '=', $email)->first(); // Activar sessión return Redirect::to('personal/profile/' . $personal->codPersonal); } }
public function run() { $trabajos = array("Limpieza", "albañil", "plomero", "constructor", "Domestico", "Electricidad", "Niñero", "Seguridad"); DB::table('personal')->delete(); $faker = Faker\Factory::create('es_VE'); for ($i = 0; $i < 70; $i++) { $personal[] = array('nombre' => $faker->name, 'cedula' => $faker->numberBetween(10000000, 20000000), 'email' => $faker->email, 'cargo' => $trabajos[rand(0, 7)], 'telefono' => $faker->phoneNumber, 'residencia_id' => rand(1, 101)); } Personal::insert($personal); $this->command->info('Personal Table Seed!'); }
public function actionACPersona() { if (isset($_GET['term'])) { $searchTerm = $_GET['term']; $result = array(); $personal = Personal::model()->findAll('nombre LIKE :nombre OR apellido_pat LIKE :apell', array(':nombre' => '%' . $searchTerm . '%', ':apell' => '%' . $searchTerm . '%')); foreach ($personal as $persona) { $result[] = array('label' => $persona->nombre . ' ' . $persona->apellido_pat, 'value' => $persona->nombre . ' ' . $persona->apellido_pat, 'id' => $persona->id); } echo CJSON::encode($result); } }
public static function getBy($campo, $valor) { $result = BaseDatos::getDbh()->prepare("SELECT * FROM Personal where {$campo} = :{$campo}"); $result->bindParam(":{$campo}", $valor); $result->execute(); while ($rs = $result->fetch()) { $personal = new Personal(); $personal->setIdPersonal($rs['idPersonal']); $personal->setNombres($rs['nombres']); $personal->setApellidoPaterno($rs['apellidoPaterno']); $personal->setApellidoMaterno($rs['apellidoMaterno']); $personal->setCorreo($rs['correo']); $personal->setRpm($rs['rpm']); $personal->setAnexo($rs['anexo']); $personal->setEstado($rs['estado']); $personales[] = $personal; } return isset($personales) ? $personales : false; }
public static function initialize($idUsuari, $data, $idu, $idPersonal = null, $idS) { $C = new Criteria(); $C = self::getCriteriaActiu($C, $idS); $C->add(PersonalPeer::IDUSUARI, $idu); $C->add(PersonalPeer::IDDATA, date('Y-m-d', $data)); $C->add(PersonalPeer::IDPERSONAL, $idPersonal); $OP = self::doSelectOne($C); if (!$OP instanceof Personal) { $OP = new Personal(); $OP->setDataAlta(date('Y-m-d', time())); $OP->setIddata(date('Y-m-d', $data)); $OP->setIdusuari($idu); $OP->setUsuariUpdateId($idUsuari); $OP->setSiteId($idS); $OP->setActiu(true); $OP->setDatafinalitzada(null); $OP->setDataRevisio(null); } else { $OP->setUsuariUpdateId($idUsuari); } return new PersonalForm($OP); }
public function change_password() { $validator = Validator::make($input = Input::all(), Personal::rules('password')); if ($validator->fails()) { $output['status'] = 'error'; $output['msg'] = $validator->getMessageBag()->toArray(); } else { $employee = Personal::find(Auth::personales()->get()->id); $employee->password = Hash::make($input['password']); $employee->save(); $output['status'] = 'success'; $output['msg'] = '<strong>Success ! </strong>Password changed successfully'; } return Response::json($output, 200); }
public function registrar() { // $validator = Validator::make($input = Input::all(), Voluntario::rules('create')); // // if ($validator->fails()) // { // return Redirect::back()->withErrors($validator)->withInput(); // } // // DB::beginTransaction(); // try { // $nombres = $input['nombres']; // $tipo = 'Voluntario'; // // Voluntario::create([ // 'personalID' => $input['ci'], // 'nombres' => ucwords(strtolower($input['nombres'])), // 'apellidos' => ucwords(strtolower($input['apellidos'])), // 'email' => $input['email'], // 'telefono' => $input['telefono'], // 'tipoPersonal' => $tipo // ]); // // }catch(\Exception $e) // { // DB::rollback(); // throw $e; // } // // DB::commit(); //// // return Redirect::route('front.final')->with('success',"<strong>{$nombres}</strong> exitosamente adicionado en le base de datos"); //// } $input = Input::all(); $rules = ['nombres' => 'required', 'apellidos' => 'required', 'ci' => 'required|ci|unique:personal', 'telefono' => 'required', 'email' => 'required|email']; $validator = Validator::make($input, $rules); // if($validator->fails()) // { // $output['status'] = 'error'; // $output['msg'] = $validator->getMessageBag()->toArray(); // } $tipo = 'Voluntario'; Personal::create(['nombres' => $input['nombres'], 'apellidos' => $input['apellidos'], 'personalID' => $input['ci'], 'telefono' => $input['telefono'], 'email' => $input['email'], 'tipovoluntario' => $input['tipovoluntario'], 'ocupacion' => $input['ocupacion'], 'tipoPersonal' => $tipo]); return View::make('front.final', $this->data); }
public function personal($action) { if (isset($action)) { if ($action == "create") { $data = Personal::firstOrCreate(Input::all()); return $respuesta = array('Record' => $data, 'Result' => "OK"); } if ($action == "edit") { Personal::where("id", Input::get("id"))->update(Input::except("id")); return $respuesta = array('Record' => Personal::find(Input::get('id')), 'Result' => "OK"); } if ($action == "remove") { Personal::where('id', Input::get("id"))->delete(); return '{"Result":"OK"}'; } if ($action == "list") { $Records = Personal::get(); $respuesta = array('Records' => $Records, 'Result' => "OK"); return json_encode($respuesta); } if ($action == "residencia") { $nulos = DB::table('residencias')->select(DB::raw("'NO POSEE' as DisplayText, NULL as Value")); $respuesta = DB::table('residencias')->select("nombre as DisplayText", "id as Value")->union($nulos)->orderby('value', 'asc')->distinct()->get(); return "var opciones=" . json_encode($respuesta); } } }
// //array('label'=>'Crear Ingreso', 'url'=>array('create')), // ); Yii::app()->clientScript->registerScript('search', "\n\$('.search-button').click(function(){\n\t\$('.search-form').toggle();\n\treturn false;\n});\n\$('.search-form form').submit(function(){\n\t\$('#ingresos-grid').yiiGridView('update', {\n\t\tdata: \$(this).serialize()\n\t});\n\treturn false;\n});\n"); ?> <h1>Buscar Ingresos - Transferencias a Paciente - <a href="#exportar" class="btn btn-warning" role="button" data-toggle="modal"><i class="icon-share-alt icon-white"></i> Exportar</a></h1> <div class="search-form" style="display:none"> <?php $this->renderPartial('_search', array('model' => $model)); ?> </div><!-- search-form --> <DIV style='width:150%; overflow:scroll;'> <?php $this->widget('zii.widgets.grid.CGridView', array('id' => 'ingresos-grid', 'template' => '{items}{summary}{pager}', 'dataProvider' => $model->searchTransferencias(), 'afterAjaxUpdate' => 'reinstallDatePickerIngresos', 'filter' => $model, 'columns' => array(array('header' => 'ID.', 'name' => 'id', 'value' => '$data->id', 'htmlOptions' => array('width' => '30')), array('name' => 'nombre_paciente', 'value' => '$data->paciente->nombre', 'htmlOptions' => array('width' => '100'), 'headerHtmlOptions' => array('style' => 'width:150px;text-align:center;')), array('name' => 'apellido_paciente', 'value' => '$data->paciente->apellido', 'htmlOptions' => array('width' => '100'), 'headerHtmlOptions' => array('style' => 'width:150px;text-align:center;')), 'n_identificacion', array('name' => 'valor', 'value' => 'number_format($data->valor,2)', 'htmlOptions' => array('width' => '100'), 'footer' => $model->searchSumaTransferencia()->itemCount === 0 ? '' : "<h6>\$ " . number_format($model->getTotal($model->searchSumaTransferencia()), 2) . '</h6>'), array('header' => 'Fecha', 'name' => 'fecha_sola', 'filter' => $this->widget('zii.widgets.jui.CJuiDatePicker', array('language' => 'es', 'model' => $model, 'attribute' => 'fecha_sola', 'options' => array('showAnim' => 'fold', 'language' => 'es', 'dateFormat' => 'dd-mm-yy', 'changeMonth' => true, 'changeYear' => true, 'yearRange' => '2014:2025'), 'htmlOptions' => array('id' => 'datepicker_for_fecha_sola', 'style' => 'height:20px;width:80px;'), 'defaultOptions' => array('showOn' => 'focus', 'showOtherMonths' => true, 'selectOtherMonths' => true, 'changeMonth' => true, 'changeYear' => true, 'showButtonPanel' => true)), true), 'value' => 'Yii::app()->dateformatter->format("dd-MM-yyyy",$data[\'fecha_sola\']);', 'htmlOptions' => array('width' => '80')), 'descripcion', 'forma_pago', array('header' => 'Vendido por:', 'name' => 'vendedor_id', 'filter' => CHtml::listData(Personal::model()->findAll(array('order' => 'nombres ASC', 'condition' => "activo = 'SI'")), 'id', 'nombreCompleto'), 'value' => '$data->vendedor->nombreCompleto', 'htmlOptions' => array('width' => '150')), array('header' => 'Contrato', 'name' => 'contrato_id', 'value' => '$data->contrato_id', 'htmlOptions' => array('width' => '40')), array('name' => 'estado', 'filter' => array('Activo' => 'Activo', 'Anulado' => 'Anulado'), 'value' => '$data->estado'), array('name' => 'tarjeta_tipo', 'filter' => array('American Express' => 'American Express', 'Debito Maestro' => 'Debito Maestro', 'Diners Club' => 'Diners Club', 'Mastercard' => 'Mastercard', 'VISA' => 'VISA'), 'value' => '$data->tarjeta_tipo'), array('header' => 'Número de Autorización', 'name' => 'tarjeta_aprobacion', 'value' => '$data->tarjeta_aprobacion'), array('header' => 'Cuenta de Ingreso', 'name' => 'tarjeta_banco_cuenta_id', 'filter' => CHtml::listData(BancosCuentas::model()->findAll(array('order' => 'numero ASC')), 'id', 'numero'), 'value' => '$data[\'tarjetaBancoCuenta\'][\'numero\']', 'htmlOptions' => array('width' => '150')), array('header' => 'Realizado por:', 'name' => 'personal_id', 'filter' => CHtml::listData(Personal::model()->findAll(array('order' => 'nombres ASC', 'condition' => "activo = 'SI'")), 'id', 'nombreCompleto'), 'value' => '$data->personal->nombreCompleto', 'htmlOptions' => array('width' => '150')), array('header' => 'Seguimiento:', 'name' => 'personal_seguimiento', 'filter' => CHtml::listData(Personal::model()->findAll(array('order' => 'nombres ASC', 'condition' => "activo = 'SI'")), 'id', 'nombreCompleto'), 'value' => '$data->personalSeguimiento->nombreCompleto', 'htmlOptions' => array('width' => '150')), array('class' => 'CButtonColumn', 'template' => '{view}')))); Yii::app()->clientScript->registerScript('re-install-date-picker', "\nfunction reinstallDatePickerIngresos(id, data) {\n //use the same parameters that you had set in your widget else the datepicker will be refreshed by default\n \$('#datepicker_for_fecha_sola').datepicker(jQuery.extend({showMonthAfterYear:false},jQuery.datepicker.regional['es'],{'dateFormat':'dd-mm-yy'}));\n //\$('#datepicker_for_fecha_sola').datepicker(\$.datepicker.regional[ 'es' ]);\n //\$('#datepicker_for_fecha_sola').datepicker({dateFormat: 'dd-mm-yy'});\n}\n"); // $countData = $model->search(); // $elTotal = 0; // foreach ($countData->data as $count_data) // { // $elTotal = $elTotal + $count_data->valor; // } // echo "La suma: ".$elTotal; ?> </div> <div id="exportar" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h3 id="myModalLabel">Exportar a un archivo de Excel </h3>
echo $form->labelEx($tabla_seguimiento, 'tema_id'); ?> <?php echo $form->dropDownList($tabla_seguimiento, 'tema_id', CHtml::listData(SeguimientoTema::model()->findAll("estado = 'Activo' order by 'nombre'"), 'id', 'nombre'), array('class' => 'input-xlarge')); ?> <?php echo $form->error($tabla_seguimiento, 'tema_id'); ?> </div> <div class='span7'> <?php echo $form->labelEx($tabla_seguimiento, 'responsable_id'); ?> <?php echo $form->dropDownList($tabla_seguimiento, 'responsable_id', CHtml::listData(Personal::model()->findAll("activo = 'SI'"), 'id', 'nombreCompleto'), array('class' => 'input-xxlarge', 'options' => array(Yii::app()->user->usuarioId => array('selected' => true)))); ?> <?php echo $form->error($tabla_seguimiento, 'responsable_id'); ?> </div> <div class = 'span10'> <?php echo $form->labelEx($tabla_seguimiento, 'observaciones'); ?> <?php echo $form->textArea($tabla_seguimiento, 'observaciones', array('rows' => 4, 'cols' => 50, 'class' => 'input-xxlarge')); ?> <?php echo $form->error($tabla_seguimiento, 'observaciones');
<?php //Temporal //$losProductos = ProductoInventario::model()->findAll("cantidad > 0"); $losProductos = ProductoInventarioDetalle::model()->findAll("existencia > 0"); ?> <?php echo $form->errorSummary($model); ?> <div class="row"> <?php echo $form->labelEx($model, 'personal_id'); ?> <?php echo $form->dropDownList($model, 'personal_id', CHtml::listData(Personal::model()->findAll("activo = 'SI' and NOT EXISTS(select personal_id from inventario_personal where inventario_personal.personal_id = id) ORDER BY nombres ASC"), 'id', 'nombreCompleto'), array('class' => 'input-xxlarge')); ?> <?php echo $form->error($model, 'personal_id'); ?> </div> <input id='variable' name='variable' type='hidden' /> <h5>Agregar Productos a Inventario Personal</h5> <a href='JavaScript:agregarCampo();' class="btn btn-primary"> Agregar Producto </a> <hr> <div class="row"> <div class="span12">
function sr_print_preview($employee_id = '', $report_name = '') { $a = Setting::getField('republic'); $b = Setting::getField('lgu_name'); $c = Setting::getField('lgu_office'); $d = Setting::getField('lgu_address'); // this is for heading republic $lgu_code = Setting::getField('lgu_code'); $logo = 'dtr/template/logo/logo.jpg'; // Laguna Province if ($lgu_code == 'laguna_province') { $logo = 'dtr/template/laguna_province/logo.jpg'; } $employee = new Employee_m(); $employee->get_by_id($employee_id); $personal = new Personal(); $personal->get_by_employee_id($employee_id); // Signatories $sr_prepared = Setting::getField('sr_prepared'); $sr_prepared_position = Setting::getField('sr_prepared_position'); $sr_certified = Setting::getField('sr_certified'); $sr_certified_position = Setting::getField('sr_certified_position'); $service = '<table width="100%" border="0" cellpadding="5" cellspacing="5"> <tr> <td colspan="5" align="center" style="font-size:25px"><strong>SERVICE RECORD</strong></td> </tr> <tr> <td width="24%" align="left"><strong>Employee Number :</strong></td> <td width="22%"><b>' . $employee->employee_id . '</b></td> <td width="15%"> </td> <td width="29%"> </td> <td width="10%"> </td> </tr> <tr> <td align="left"><strong>Name :</strong></td> <td colspan="3" style="font-family:\'Times New Roman\', Times, serif"><em><b>' . $employee->lname . ', ' . $employee->fname . ' ' . $employee->mname . '</b></em></td> <td> </td> </tr> <tr> <td align="left"><strong>Birthday :</strong></td> <td><em><b>' . $employee->birth_date . '</b></em></td> <td align="right"><strong>Birthplace :</strong></td> <td><em><b>' . $personal->birth_place . '</b></em></td> <td> </td> </tr> <tr> <td colspan="5" align="left" style="font-size:11px"> <em>This is to certify that the employee named herein above actually rendered services in this Office as shown by the service record below, each line of which is supported by appointment and other papers actually issued by this Office and approved by the authorities concerned.</em></td> </tr> </table> <table width="100%" border="1"> <tr> <td colspan="2" align="center" valign="middle">SERVICE<br /> (Inclusive Date)</td> <td colspan="3" align="center" valign="middle">RECORDS OF APPOINTMENT</td> <td align="center" valign="middle">OFFICE ENTITY / DIVISION</td> <td align="center" valign="middle">L/V ABS<br /> W/O PAY</td> <td colspan="2" align="center" valign="middle">SEPARATION</td> </tr> <tr> <td align="center">From</td> <td align="center">To</td> <td align="center">Designation</td> <td align="center">Status</td> <td align="center">Salary</td> <td align="center">Station/Place of Assignment/Branch</td> <td align="center"> </td> <td align="center">Date</td> <td align="center">Cause</td> </tr> '; $html = ' <!-- defines the headers/footers - this must occur before the headers/footers are set --> <!--mpdf <htmlpagefooter name="myfooter"> <table width="100%"> <tr> <td colspan="3" align="center">-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- </td> </tr> <tr> <td colspan="3"> Issued in compliance with Executive Order No. 54 Dated August 10, 1954, and in accordance with Circular No. 58, dated August 10, 1954, of the System.</td> </tr> <tr> <td width="19%"> </td> <td width="42%"> </td> <td width="39%"> </td> </tr> <tr> <td> </td> <td align="center">PREPARED BY</td> <td align="center">CERTIFIED CORRECT</td> </tr> <tr> <td align="center">' . date('F d, Y') . '</td> <td align="center"> </td> <td align="center"> </td> </tr> <tr> <td align="center">Date</td> <td align="center"> </td> <td align="center"> </td> </tr> <tr> <td align="center"> </td> <td align="center">' . $sr_prepared . '</td> <td align="center">' . $sr_certified . '</td> </tr> <tr> <td> </td> <td align="center">' . $sr_prepared_position . '</td> <td align="center">' . $sr_certified_position . '</td> </tr> </table></htmlpagefooter> mpdf--> <!-- set the headers/footers - they will occur from here on in the document --> <!--mpdf <sethtmlpagefooter name="myfooter" page="all" value="1"/> mpdf--> <table width="100%" border="0"> <tr> <td> </td> <td align="center" style="font-family:\'Times New Roman\', Times, serif"><b><em>' . $a . '</em></b></td> <td> </td> </tr> <tr> <td> </td> <td align="center" style="font-family:\'Times New Roman\', Times, serif"><b><em>' . $b . '</em></b></td> <td> </td> </tr> <tr> <td> </td> <td align="center" style="font-family:\'Times New Roman\', Times, serif"><b><em>' . $c . '</em></b></td> <td> </td> </tr> <tr> <td> </td> <td align="center" style="font-family:\'Times New Roman\', Times, serif"><b><em>' . $d . '</em></b></td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> </tr> </table> <style type="text/css"> #apDiv1 { position:absolute; width:104px; height:106px; z-index:1; left: 100px; top: 55px; } </style> <div id="apDiv1"><img src="' . base_url() . $logo . '" alt="" name="logo" width="110" height="110"/></div> ' . $service; $s = new Service_record(); //$s->order_by('date_from'); $s->select('id, employee_id, date_from, date_to, designation, status, salary, office_entity, branch, remarks, lwop, separation_date, separation_cause, STR_TO_DATE(date_from,"%m/%d/%Y") as nice_date', false); $s->order_by("nice_date"); $rows = $s->get_by_employee_id($employee_id); $i = 1; // Number of entries to display per page $first_page = Setting::getField('service_record_entries_first_page'); $second_page = Setting::getField('service_record_entries_second_page'); $third_page = Setting::getField('service_record_entries_3rd_page'); $fourth_page = Setting::getField('service_record_entries_4th_page'); //for ($i ==0; $i != 70; $i ++) foreach ($rows as $row) { $number_character = strlen($row->designation . $row->salary . $row->salary . $row->office_entity . $row->lwop . $row->separation_date . $row->separation_cause); $html .= '<tr> <td align="center">' . $row->date_from . '</td> <td align="center">' . $row->date_to . '</td> <td align="center">' . $row->designation . '</td> <td align="center">' . $row->status . '</td> <td align="right">' . $row->salary . '</td> <td align="center">' . $row->office_entity . '</td> <td align="left">' . $row->lwop . '</td> <td align="left">' . $row->separation_date . '</td> <td align="left" style="font-size:7">' . $row->separation_cause . '</td> </tr>'; // Second page if ($i == $first_page) { $html .= '</table>'; // close the table $html .= '<pagebreak />' . $service; } // If there is third page if ($i == $first_page + $second_page) { $html .= '</table>'; // close the table $html .= '<pagebreak />' . $service; } // If there is 4th page if ($i == $first_page + $second_page + $third_page) { $html .= '</table>'; // close the table $html .= '<pagebreak />' . $service; } // If there is 5th page if ($i == $first_page + $second_page + $third_page + $fourth_page) { $html .= '</table>'; // close the table $html .= '<pagebreak />' . $service; } $i++; } $html .= '</table>'; //$html.=' //<pagebreak /> //'.$service.'</table> //<pagebreak /> //'; $params = array('format' => 'Letter'); $params = array('format' => 'Legal'); $params = array('format' => Setting::getField('service_record_paper_size')); $this->load->library('mpdf', $params); //$mpdf=new mPDF('c','Letter'); //$this->mpdf->mirrorMargins = 1; // Use different Odd/Even headers and footers and mirror margins $stylesheet = file_get_contents(base_url() . 'css/mpdf/mpdfstyletables.css'); $this->mpdf->WriteHTML($stylesheet, 1); // The parameter 1 tells that this is css/style only and no $this->mpdf->SetHTMLHeader('Page {PAGENO} of {nb}', '', false); //$this->mpdf->SetHTMLFooter('{PAGENO}'); $this->mpdf->WriteHTML($html); $this->mpdf->Output(); }
<br> <P>1. DATOS EVALUADOR. </P> <?php echo $form->errorSummary($model); ?> <div class="row"> <?php echo $form->labelEx($model, 'Instructor'); ?> <?php echo $form->dropDownList($model, 'PE_ID', CHtml::listData(Personal::model()->findAll(), 'PE_ID', 'PE_NOMBRES'), array('empty' => 'Selecciona un Instructor')); ?> <?php echo $form->error($model, 'PE_ID'); ?> </div> <div class="row"> <?php echo $form->labelEx($model, 'FECHA'); ?> <?php $this->widget('zii.widgets.jui.CJuiDatePicker', array('model' => $model, 'attribute' => 'FI_FECHA', 'language' => 'es', 'options' => array('dateFormat' => 'yy-mm-dd', 'minDate' => '2015-05-22', 'maxDate' => '2015-05-22'))); ?> <?php echo $form->error($model, 'FI_FECHA');
function page1($employee_id) { $this->load->helper('settings'); $this->load->library('fpdf'); //define('FPDF_FONTPATH',$this->config->item('fonts_path')); $this->load->library('fpdi'); //$this->load->model('Personal_Info'); //Get personal info //$pi = $this->Personal_Info->get_personal_info($employee_id); $pi = new Personal(); $pi->get_by_employee_id($employee_id); //print_r($personal_info); // initiate FPDI $pdf = new FPDI('P', 'mm', 'Legal'); // add a page $pdf->AddPage(); // set the sourcefile $pdf->setSourceFile('dtr/template/pds/page1.pdf'); // import page 1 $tplIdx = $pdf->importPage(1); // use the imported page and place it at point 10,10 with a width of 100 mm $pdf->useTemplate($tplIdx, 1, 1, 210); // now write some text above the imported page $pdf->SetFont('Arial'); $pdf->SetTextColor(0, 0, 0); /******************************* *START PERSONAL INFORMATION == ******************************/ $split[0] = ''; $split[1] = ''; $split[2] = ''; $split[3] = ''; $split[4] = ''; $split[5] = ''; $split[6] = ''; $split[7] = ''; $split[8] = ''; $split[9] = ''; $split[10] = ''; $split[11] = ''; $split[12] = ''; $split[13] = ''; $split[14] = ''; $split[15] = ''; $split[16] = ''; $split[17] = ''; $split[18] = ''; $split[19] = ''; $split[20] = ''; $split[21] = ''; $split[22] = ''; $split[23] = ''; $split[24] = ''; $split[25] = ''; $split[26] = ''; $split[27] = ''; $split[28] = ''; $split[29] = ''; //$pdf->MultiCell(0,3,"hello this is a sample \nlong text with line break" ,'',1,'L',false); //$pdf->MultiCell(0,3,"hello this is a sample \nlong text with line break" ,'',1,'L',false); //$pdf->MultiCell(0,3,"hello this is a sample \nlong text with line break" ,'',1,'L',false); $this->load->helper('text'); //$pdf->MultiCell(0,3,word_wrap("hello this is a sample nlong text with line break", 15) ,'',1,'L',false); $split = str_split($pi->lname); // Write something ==LAST NAME ========= $pdf->SetXY(39, 53); $pdf->Write(0, $split[0]); $pdf->SetX(44); $pdf->Write(0, $split[1]); $pdf->SetX(49); $pdf->Write(0, $split[2]); $pdf->SetX(54); $pdf->Write(0, $split[3]); $pdf->SetX(60); $pdf->Write(0, $split[4]); $pdf->SetX(65); $pdf->Write(0, $split[5]); $pdf->SetX(70); $pdf->Write(0, $split[6]); $pdf->SetX(75); $pdf->Write(0, $split[7]); $pdf->SetX(81); $pdf->Write(0, $split[8]); $pdf->SetX(86); $pdf->Write(0, $split[9]); $pdf->SetX(91); $pdf->Write(0, $split[10]); $pdf->SetX(96); $pdf->Write(0, $split[11]); $pdf->SetX(101); $pdf->Write(0, $split[12]); $pdf->SetX(106); $pdf->Write(0, $split[13]); $pdf->SetX(111); $pdf->Write(0, $split[14]); $pdf->SetX(116); $pdf->Write(0, $split[15]); $pdf->SetX(121); $pdf->Write(0, $split[16]); $pdf->SetX(126); $pdf->Write(0, $split[17]); $pdf->SetX(131); $pdf->Write(0, $split[18]); $pdf->SetX(137); $pdf->Write(0, $split[19]); $pdf->SetX(142); $pdf->Write(0, $split[20]); $pdf->SetX(147); $pdf->Write(0, $split[21]); $pdf->SetX(152); $pdf->Write(0, $split[22]); $pdf->SetX(157); $pdf->Write(0, $split[23]); $pdf->SetX(163); $pdf->Write(0, $split[24]); $pdf->SetX(168); $pdf->Write(0, $split[25]); $pdf->SetX(173); $pdf->Write(0, $split[26]); $pdf->SetX(178); $pdf->Write(0, $split[27]); $pdf->SetX(183); $pdf->Write(0, $split[28]); $pdf->SetX(188); $pdf->Write(0, $split[29]); // line break //=========FIRST NAME==== $split = str_split($pi->fname); $pdf->Ln(6); $pdf->SetX(39); $pdf->Write(0, $split[0]); $pdf->SetX(44); $pdf->Write(0, $split[1]); $pdf->SetX(49); $pdf->Write(0, $split[2]); $pdf->SetX(54); $pdf->Write(0, $split[3]); $pdf->SetX(60); $pdf->Write(0, $split[4]); $pdf->SetX(65); $pdf->Write(0, $split[5]); $pdf->SetX(70); $pdf->Write(0, $split[6]); $pdf->SetX(75); $pdf->Write(0, $split[7]); $pdf->SetX(81); $pdf->Write(0, $split[8]); $pdf->SetX(86); $pdf->Write(0, $split[9]); $pdf->SetX(91); $pdf->Write(0, $split[10]); $pdf->SetX(96); $pdf->Write(0, $split[11]); $pdf->SetX(101); $pdf->Write(0, $split[12]); $pdf->SetX(106); $pdf->Write(0, $split[13]); $pdf->SetX(111); $pdf->Write(0, $split[14]); $pdf->SetX(116); $pdf->Write(0, $split[15]); $pdf->SetX(121); $pdf->Write(0, $split[16]); $pdf->SetX(126); $pdf->Write(0, $split[17]); $pdf->SetX(131); $pdf->Write(0, $split[18]); $pdf->SetX(137); $pdf->Write(0, $split[19]); $pdf->SetX(142); $pdf->Write(0, $split[20]); $pdf->SetX(147); $pdf->Write(0, $split[21]); $pdf->SetX(152); $pdf->Write(0, $split[22]); $pdf->SetX(157); $pdf->Write(0, $split[23]); $pdf->SetX(163); $pdf->Write(0, $split[24]); $pdf->SetX(168); $pdf->Write(0, $split[25]); $pdf->SetX(173); $pdf->Write(0, $split[26]); $pdf->SetX(178); $pdf->Write(0, $split[27]); $pdf->SetX(183); $pdf->Write(0, $split[28]); $pdf->SetX(188); $pdf->Write(0, $split[29]); //======== MNAME $split = str_split($pi->mname); // line break $pdf->Ln(6); $pdf->SetX(39); $pdf->Write(0, $split[0]); $pdf->SetX(44); $pdf->Write(0, $split[1]); $pdf->SetX(49); $pdf->Write(0, $split[2]); $pdf->SetX(54); $pdf->Write(0, $split[3]); $pdf->SetX(60); $pdf->Write(0, $split[4]); $pdf->SetX(65); $pdf->Write(0, $split[5]); $pdf->SetX(70); $pdf->Write(0, $split[6]); $pdf->SetX(75); $pdf->Write(0, $split[7]); $pdf->SetX(81); $pdf->Write(0, $split[8]); $pdf->SetX(86); $pdf->Write(0, $split[9]); $pdf->SetX(91); $pdf->Write(0, $split[10]); $pdf->SetX(96); $pdf->Write(0, $split[11]); $pdf->SetX(101); $pdf->Write(0, $split[12]); $pdf->SetX(106); $pdf->Write(0, $split[13]); $pdf->SetX(111); $pdf->Write(0, $split[14]); $pdf->SetX(116); $pdf->Write(0, $split[15]); $pdf->SetX(121); $pdf->Write(0, $split[16]); $pdf->SetX(126); $pdf->Write(0, $split[17]); $pdf->SetX(131); $pdf->Write(0, $split[18]); $pdf->SetX(137); $pdf->Write(0, $split[19]); $pdf->SetX(142); $pdf->Write(0, $split[20]); $pdf->SetX(147); $pdf->Write(0, $split[21]); $pdf->SetX(152); $pdf->Write(0, $split[22]); $pdf->SetX(157); $pdf->Write(0, $split[23]); $pdf->SetX(163); $pdf->Write(0, $split[24]); $pdf->SetX(168); $pdf->Write(0, $split[25]); $pdf->SetX(173); $pdf->Write(0, $split[26]); $pdf->SetX(178); $pdf->Write(0, $split[27]); $pdf->SetX(183); $pdf->Write(0, $split[28]); $pdf->SetX(188); $pdf->Write(0, $split[29]); $pdf->SetX(189); $pdf->Write(0, $pi->extension); $date = $pi->birth_date; list($year, $month, $day) = explode('-', $date); $pdf->Ln(6); $pdf->SetX(67); $pdf->Write(0, $month . '-' . $day . '-' . $year); $res_address = splitstroverflow($pi->res_address, 30); $pdf->SetX(126); $pdf->Write(0, $res_address[0]); $pdf->Ln(4); $pdf->SetX(39); $pdf->Write(0, $pi->birth_place); $pdf->SetX(126); $pdf->Write(0, $res_address[1]); $pdf->Ln(5); if ($pi->sex == 'M') { $setx = 41.5; } if ($pi->sex == 'F') { $setx = 58; } $pdf->SetX($setx); $pdf->Write(0, 'X'); if ($pi->civil_status == 1) { $pdf->SetXY(41.5, 85); $pdf->Write(0, 'X'); } if ($pi->civil_status == 2) { $pdf->SetXY(41.5, 89); $pdf->Write(0, 'X'); } if ($pi->civil_status == 3) { $pdf->SetXY(41.5, 94.5); $pdf->Write(0, 'X'); } if ($pi->civil_status == 4) { $pdf->SetXY(64, 85); $pdf->Write(0, 'X'); } if ($pi->civil_status == 5) { $pdf->SetXY(64, 89); $pdf->Write(0, 'X'); } if ($pi->civil_status == 6) { $pdf->SetXY(64, 94.5); $pdf->Write(0, 'X'); } //citizeship $pdf->SetXY(39, 103); $pdf->Write(0, $pi->citizenship); $pdf->Ln(5.2); $pdf->SetX(39); $pdf->Write(0, $pi->height); $pdf->Ln(5.2); $pdf->SetX(39); $pdf->Write(0, $pi->weight); $pdf->Ln(5.2); $pdf->SetX(39); $pdf->Write(0, $pi->blood_type); $pdf->Ln(4); $pdf->SetX(39); $pdf->Write(0, $pi->gsis); $pdf->Ln(5); $pdf->SetX(39); $pdf->Write(0, $pi->pagibig); $pdf->Ln(4); $pdf->SetX(39); $pdf->Write(0, $pi->philhealth); $pdf->Ln(5); $pdf->SetX(39); $pdf->Write(0, $pi->sss); $pdf->SetXY(126, 85); $pdf->Write(0, $pi->res_zip); $pdf->Ln(5); $pdf->SetX(126); $pdf->Write(0, $pi->res_tel); $pdf->Ln(5); $pdf->SetX(126); $permanent_address = splitstroverflow($pi->permanent_address, 30); $pdf->Write(0, $permanent_address[0]); $pdf->Ln(4); $pdf->SetX(126); $pdf->Write(0, $permanent_address[1]); $pdf->Ln(15); $pdf->SetX(126); $pdf->Write(0, $pi->permanent_zip); $pdf->Ln(4); $pdf->SetX(126); $pdf->Write(0, $pi->permanent_tel); $pdf->Ln(4.3); $pdf->SetX(126); $pdf->Write(0, $pi->email); $pdf->Ln(4.9); $pdf->SetX(126); $pdf->Write(0, $pi->cp); $pdf->Ln(4.3); $pdf->SetX(126); $pdf->Write(0, $pi->agency_employee_no); $pdf->Ln(4.3); $pdf->SetX(126); $pdf->Write(0, $pi->tin); /******************************* *END PERSONAL INFORMATION ===== ******************************/ //====================================================================== /******************************* *START FAMILY BACK GROUND======= ******************************/ //Get family background //$fb = $this->Family_Background->get_family_background($employee_id); $fb = new Family(); $fb->get_by_employee_id($employee_id); $pdf->SetXY(39, 146); $pdf->Write(0, $fb->spouse_lname); $pdf->Ln(4.3); $pdf->SetX(39); $pdf->Write(0, $fb->spouse_fname); $pdf->Ln(4.3); $pdf->SetX(39); $pdf->Write(0, $fb->spouse_mname); $pdf->Ln(5); $pdf->SetX(39); $pdf->Write(0, $fb->spouse_occupation); $pdf->Ln(5); $pdf->SetX(39); $pdf->Write(0, $fb->spouse_employer); $pdf->Ln(5); $pdf->SetX(39); $pdf->Write(0, $fb->spouse_biz_ad); $pdf->Ln(5); $pdf->SetX(39); $pdf->Write(0, $fb->spouse_tel); $pdf->Ln(9); $pdf->SetX(57); $pdf->Write(0, $fb->father_lname); $pdf->Ln(4.5); $pdf->SetX(57); $pdf->Write(0, $fb->father_fname); $pdf->Ln(4.5); $pdf->SetX(57); $pdf->Write(0, $fb->father_mname); $pdf->Ln(4.5); $pdf->SetX(57); $pdf->Write(0, $fb->mother_lname); $pdf->Ln(4.5); $pdf->SetX(57); $pdf->Write(0, $fb->mother_fname); $pdf->Ln(4.5); $pdf->SetX(57); $pdf->Write(0, $fb->mother_mname); /******************************* *END FAMILY BACK GROUND======= ******************************/ //============================================================================= /******************************* *START CHILDREN================ ******************************/ //$children = $this->Children->get_child($employee_id); $children = new Children(); $children->order_by('birth_date'); $children->get_by_employee_id($employee_id); $pdf->SetXY(110, 145); $i = 1; $pdf->SetFont('Arial', '', 10); foreach ($children as $child) { if ($i == 7 || $i == 9 || $i == 11) { $pdf->Ln(4.5); } else { $pdf->Ln(5); } $pdf->SetX(110); $pdf->Write(0, $child->children); $date = $child->birth_date; list($year, $month, $day) = explode('-', $date); $pdf->SetX(170); $pdf->Write(0, $month . '/' . $day . '/' . $year); $i++; } /******************************* *END CHILDREN================== ******************************/ //===================================================================== /******************************* *START EDUC================== ******************************/ $e = new Education(); //$educs = $this->Educational_Background->get_educ($employee_id, $level = 1); $educs = $e->get_single_educ($employee_id, $level = 1); $pdf->SetFont('Arial', '', 10); $pdf->SetXY(39, 233); // /******************************* *END EDUC================== ******************************/ foreach ($educs as $educ) { $sch = wordwrap(ucwords(strtolower($educ->school_name)), 23, "|"); $sch = explode("|", $sch); //$degree = wordwrap($educ->degree_course, 15, "|"); $degree = wordwrap(ucwords(strtolower($educ->degree_course)), 15, "|"); $degree = explode("|", $degree); $pdf->Write(0, $sch[0]); $pdf->SetX(78); $pdf->Write(0, $degree[0]); $pdf->SetX(107); $pdf->Write(0, $educ->year_graduated); $pdf->SetX(130); $pdf->Write(0, $educ->highest_grade); $pdf->SetX(150); $pdf->Write(0, $educ->attend_from); $pdf->SetX(163); $pdf->Write(0, $educ->attend_to); $pdf->SetX(177); $pdf->Write(0, $educ->scholarship); $pdf->Ln(3); $pdf->SetX(39); $pdf->Write(0, $sch[1]); $pdf->SetX(78); $pdf->Write(0, $degree[1]); $pdf->Ln(3); $pdf->SetX(39); $pdf->Write(0, $sch[2]); $pdf->SetX(78); $pdf->Write(0, $degree[2]); $pdf->Ln(3); $pdf->SetX(39); $pdf->Write(0, $sch[3]); $pdf->SetX(78); $pdf->Write(0, $degree[3]); } //secondary // $educs = $this->Educational_Background->get_educ($employee_id, $level = 2); $educs = $e->get_single_educ($employee_id, $level = 2); $pdf->SetXY(39, 246); foreach ($educs as $educ) { //$sch = wordwrap($educ->school_name, 23, "|"); $sch = wordwrap(ucwords(strtolower($educ->school_name)), 23, "|"); $sch = explode("|", $sch); //$degree = wordwrap($educ->degree_course, 15, "|"); $degree = wordwrap(ucwords(strtolower($educ->degree_course)), 15, "|"); $degree = explode("|", $degree); $pdf->Write(0, $sch[0]); $pdf->SetX(78); $pdf->Write(0, $degree[0]); $pdf->SetX(107); $pdf->Write(0, $educ->year_graduated); $pdf->SetX(130); $pdf->Write(0, $educ->highest_grade); $pdf->SetX(150); $pdf->Write(0, $educ->attend_from); $pdf->SetX(163); $pdf->Write(0, $educ->attend_to); $pdf->SetX(177); $pdf->Write(0, $educ->scholarship); $pdf->Ln(3); $pdf->SetX(39); $pdf->Write(0, $sch[1]); $pdf->SetX(78); $pdf->Write(0, $degree[1]); $pdf->Ln(3); $pdf->SetX(39); $pdf->Write(0, $sch[2]); $pdf->SetX(78); $pdf->Write(0, $degree[2]); $pdf->Ln(3); $pdf->SetX(39); $pdf->Write(0, $sch[3]); $pdf->SetX(78); $pdf->Write(0, $degree[3]); } //vocational // $educs = $this->Educational_Background->get_educ($employee_id, $level = 3); $educs = $e->get_single_educ($employee_id, $level = 3); $pdf->SetXY(39, 259); foreach ($educs as $educ) { //$sch = wordwrap($educ->school_name, 23, "|"); $sch = wordwrap(ucwords(strtolower($educ->school_name)), 23, "|"); $sch = explode("|", $sch); //$degree = wordwrap($educ->degree_course, 15, "|"); $degree = wordwrap(ucwords(strtolower($educ->degree_course)), 15, "|"); $degree = explode("|", $degree); $pdf->Write(0, $sch[0]); $pdf->SetX(78); $pdf->Write(0, $degree[0]); $pdf->SetX(107); $pdf->Write(0, $educ->year_graduated); $pdf->SetX(130); $pdf->Write(0, $educ->highest_grade); $pdf->SetX(150); $pdf->Write(0, $educ->attend_from); $pdf->SetX(163); $pdf->Write(0, $educ->attend_to); $pdf->SetX(177); $pdf->Write(0, $educ->scholarship); $pdf->Ln(3); $pdf->SetX(39); $pdf->Write(0, $sch[1]); $pdf->SetX(78); $pdf->Write(0, $degree[1]); $pdf->Ln(3); $pdf->SetX(39); $pdf->Write(0, $sch[2]); $pdf->SetX(78); $pdf->Write(0, $degree[2]); $pdf->Ln(3); $pdf->SetX(39); $pdf->Write(0, $sch[3]); $pdf->SetX(78); $pdf->Write(0, $degree[3]); } //college // $educs = $this->Educational_Background->get_educ($employee_id, $level = 4); $educs = $e->get_single_educ($employee_id, $level = 4); $pdf->SetXY(39, 274); foreach ($educs as $educ) { //$sch = wordwrap($educ->school_name, 23, "|"); $sch = wordwrap(ucwords(strtolower($educ->school_name)), 23, "|"); $sch = explode("|", $sch); //$degree = wordwrap($educ->degree_course, 15, "|"); $degree = wordwrap(ucwords(strtolower($educ->degree_course)), 15, "|"); $degree = explode("|", $degree); $pdf->Write(0, $sch[0]); $pdf->SetX(78); $pdf->Write(0, $degree[0]); $pdf->SetX(107); $pdf->Write(0, $educ->year_graduated); $pdf->SetX(130); $pdf->Write(0, $educ->highest_grade); $pdf->SetX(150); $pdf->Write(0, $educ->attend_from); $pdf->SetX(163); $pdf->Write(0, $educ->attend_to); $pdf->SetX(177); $pdf->Write(0, $educ->scholarship); $pdf->Ln(3); $pdf->SetX(39); $pdf->Write(0, $sch[1]); $pdf->SetX(78); $pdf->Write(0, $degree[1]); $pdf->Ln(3); $pdf->SetX(39); $pdf->Write(0, $sch[2]); $pdf->SetX(78); $pdf->Write(0, $degree[2]); $pdf->Ln(3); $pdf->SetX(39); $pdf->Write(0, $sch[3]); $pdf->SetX(78); $pdf->Write(0, $degree[3]); } //graduate studies //$educs = $this->Educational_Background->get_educ($employee_id, $level = 5); $educs = $e->get_single_educ($employee_id, $level = 5); $pdf->SetXY(39, 290); foreach ($educs as $educ) { //$sch = wordwrap($educ->school_name, 23, "|"); $sch = wordwrap(ucwords(strtolower($educ->school_name)), 23, "|"); $sch = explode("|", $sch); //$degree = wordwrap($educ->degree_course, 15, "|"); $degree = wordwrap(ucwords(strtolower($educ->degree_course)), 15, "|"); $degree = explode("|", $degree); $pdf->Write(0, $sch[0]); $pdf->SetX(78); $pdf->Write(0, $degree[0]); $pdf->SetX(107); $pdf->Write(0, $educ->year_graduated); $pdf->SetX(130); $pdf->Write(0, $educ->highest_grade); $pdf->SetX(150); $pdf->Write(0, $educ->attend_from); $pdf->SetX(163); $pdf->Write(0, $educ->attend_to); $pdf->SetX(177); $pdf->Write(0, $educ->scholarship); $pdf->Ln(3); $pdf->SetX(39); $pdf->Write(0, $sch[1]); $pdf->SetX(78); $pdf->Write(0, $degree[1]); $pdf->Ln(3); $pdf->SetX(39); $pdf->Write(0, $sch[2]); $pdf->SetX(78); $pdf->Write(0, $degree[2]); $pdf->Ln(3); $pdf->SetX(39); $pdf->Write(0, $sch[3]); $pdf->SetX(78); $pdf->Write(0, $degree[3]); } // Output //$pdf->Output('resources/pdfs/archives/page1_'.$employee_id.'.pdf', 'F'); $pdf->Output('dtr/template/pds/page1_' . $employee_id . '.pdf', 'F'); $this->pds[] = 'dtr/template/pds/page1_' . $employee_id . '.pdf'; //$this->pds[] = 'resources/pdfs/archives/page1_'.$employee_id.'.pdf'; //header("location:".base_url()."resources/pdfs/archives/page1_".$employee_id.'.pdf'); }
} else { $ruta = ""; } ?> <?php //Fecha de cita $lafecha = date("d-m-Y"); $fechaBusqueda = date("Y-m-d"); //Seleccionar todas las consultas de la fecha seleccionada //$citasProgramadas = Citas::model()->findAll("fecha_cita ='$fechaBusqueda'"); if (isset($npersonal)) { $losmedicos = Personal::model()->findAll("activo = 'si' and id_perfil= {$npersonal}"); } else { $losmedicos = Personal::model()->findAll("activo = 'si'"); } ?> <DIV style='height:650px; width:100%; overflow:scroll;'> <div style="width:300%;"><!-- Ancho de columnas de personal--> <table class="table"> <tr> <?php foreach ($losmedicos as $los_medicos) { $nombreMedico = $los_medicos->nombres . ' ' . $los_medicos->apellidos; ?> <td style="width: 300px;"> <?php $this->beginWidget('zii.widgets.CPortlet', array('title' => "<small class='ultra_mini'>" . $nombreMedico . "</small>")); ?>
} ?> <p class="note">Campos con <span class="required">*</span> son requeridos.</p> <?php echo $form->errorSummary($model); ?> <div class="row"> <div class="span6"> <?php echo $form->labelEx($model, 'personal_id'); ?> <?php echo $form->dropDownList($model, 'personal_id', CHtml::listData(Personal::model()->findAll(array('order' => 'nombres ASC', 'condition' => "activo = 'SI' and agenda= 'SI' and id != 1")), 'id', 'NombreCompleto'), array('options' => array('selected' => true), 'class' => 'input-xlarge', 'empty' => '(Seleccionar)')); ?> <?php echo $form->error($model, 'personal_id'); ?> </div> </div> <div class="row"> <div class="span6"> <label for="">Seleccione la opción de bloqueo</label> <select name="opciones" id="opciones"> <option value="Seleccione">(Seleccione)</option> <option value="Horas">Horas</option> <option value="Dias">Dias</option> </select>
/* @var $this CajaEfectivoController */ /* @var $model CajaEfectivo */ $this->menu = array(array('label' => 'Listar Saldos', 'url' => array('index'))); Yii::app()->clientScript->registerScript('search', "\n\$('.search-button').click(function(){\n\t\$('.search-form').toggle();\n\treturn false;\n});\n\$('.search-form form').submit(function(){\n\t\$('#caja-efectivo-grid').yiiGridView('update', {\n\t\tdata: \$(this).serialize()\n\t});\n\treturn false;\n});\n"); ?> <h1>Buscar Saldos</h1> <div class="search-form" style="display:none"> <?php $this->renderPartial('_search', array('model' => $model)); ?> </div><!-- search-form --> <?php $this->widget('zii.widgets.grid.CGridView', array('id' => 'caja-efectivo-grid', 'dataProvider' => $model->search(), 'filter' => $model, 'columns' => array(array('header' => 'Personal', 'name' => 'personal_id', 'filter' => CHtml::listData(Personal::model()->findAll(), 'id', 'nombreCompleto'), 'value' => '$data[\'personal\'][\'nombreCompleto\']', 'htmlOptions' => array('width' => '220')), 'total', array('class' => 'CButtonColumn', 'template' => '{view}{update}')))); ?> <script> $(document).ready(function() { $('body').on('dblclick', '#caja-efectivo-grid tbody tr', function(event) { var rowNum = $(this).index(), keys = $('#caja-efectivo-grid > div.keys > span'), rowId = keys.eq(rowNum).text(); location.href = '<?php echo Yii::app()->createUrl('CajaEfectivo/view'); ?>
} } ?> <h1><?php echo $titulo; ?> </h1> <div class="search-form" style="display:none"> <?php $this->renderPartial('_search', array('model' => $model)); ?> </div><!-- search-form --> <?php $this->widget('zii.widgets.grid.CGridView', array('id' => 'seguimiento-comercial-abiertos-grid', 'dataProvider' => $model->search(), 'afterAjaxUpdate' => 'reinstallDatePickerSeguimiento', 'filter' => $model, 'columns' => array(array('header' => 'ID.', 'name' => 'id', 'value' => '$data->id', 'htmlOptions' => array('width' => '25')), array('header' => 'Fecha de acción', 'name' => 'fecha_accion', 'filter' => $this->widget('zii.widgets.jui.CJuiDatePicker', array('language' => 'es', 'model' => $model, 'attribute' => 'fecha_accion', 'options' => array('showAnim' => 'fold', 'language' => 'es', 'dateFormat' => 'dd-mm-yy', 'changeMonth' => true, 'changeYear' => true, 'yearRange' => '2014:2025'), 'htmlOptions' => array('id' => 'datepicker_for_fecha_accion', 'style' => 'height:20px;width:80px;'), 'defaultOptions' => array('showOn' => 'focus', 'showOtherMonths' => true, 'selectOtherMonths' => true, 'changeMonth' => true, 'changeYear' => true, 'showButtonPanel' => true)), true), 'value' => 'Yii::app()->dateformatter->format("dd-MM-yyyy",$data[\'fecha_accion\']);', 'htmlOptions' => array('width' => '80')), array('header' => 'Paciente', 'name' => 'paciente_id', 'filter' => CHtml::listData(Paciente::model()->findAll(array('order' => 'nombre ASC')), 'id', 'nombreCompleto'), 'value' => '$data->paciente->nombreCompleto', 'htmlOptions' => array('width' => '220')), 'n_identificacion', array('header' => 'Tema', 'name' => 'tema_id', 'filter' => CHtml::listData(SeguimientoTema::model()->findAll(array('order' => 'nombre ASC')), 'id', 'nombre'), 'value' => '$data[\'tema\'][\'nombre\']'), array('header' => 'Observaciones', 'name' => 'observaciones', 'value' => '$data->observaciones'), array('header' => 'Ultimo Seguimiento', 'name' => 'ultimo_seguimiento', 'value' => '$data->ultimo_seguimiento'), array('header' => 'Responsable de Seguimiento', 'name' => 'responsable_id', 'filter' => CHtml::listData(Personal::model()->findAll(array('order' => 'nombres ASC', 'condition' => "activo = 'SI'")), 'id', 'nombreCompleto'), 'value' => '$data[\'responsable\'][\'nombreCompleto\']'), array('header' => 'Registrado por:', 'name' => 'id_personal', 'filter' => CHtml::listData(Personal::model()->findAll(array('order' => 'nombres ASC', 'condition' => "activo = 'SI'")), 'id', 'nombreCompleto'), 'value' => '$data[\'idPersonal\'][\'nombreCompleto\']', 'htmlOptions' => array('width' => '220'))))); ?> <?php Yii::app()->clientScript->registerScript('re-install-date-picker', "\nfunction reinstallDatePickerSeguimiento(id, data) {\n //use the same parameters that you had set in your widget else the datepicker will be refreshed by default\n \$('#datepicker_for_fecha_accion').datepicker(jQuery.extend({showMonthAfterYear:false},jQuery.datepicker.regional['es'],{'dateFormat':'dd-mm-yy'}));\n //\$('#datepicker_for_fecha_accion').datepicker(\$.datepicker.regional[ 'es' ]);\n //\$('#datepicker_for_fecha_accion').datepicker({dateFormat: 'dd-mm-yy'});\n}\n"); ?> <script> $(document).ready(function() { $('body').on('dblclick', '#seguimiento-comercial-abiertos-grid tbody tr', function(event) { var rowNum = $(this).index(), keys = $('#seguimiento-comercial-abiertos-grid > div.keys > span'),
/* @var $this PresupuestoController */ /* @var $model Presupuesto */ $this->menu = array(array('label' => 'Listar Presupuestos', 'url' => array('index')), array('label' => 'Crear Presupuesto', 'url' => array('create'))); ?> <h1>Buscar Presupuesto - <a href="#exportar" class="btn btn-warning" role="button" data-toggle="modal"><i class="icon-share-alt icon-white"></i> Exportar</a></h1> <div class="search-form" style="display:none"> <?php $this->renderPartial('_search', array('model' => $model)); ?> </div><!-- search-form --> <?php $this->widget('zii.widgets.grid.CGridView', array('id' => 'presupuesto-grid', 'dataProvider' => $model->search(), 'afterAjaxUpdate' => 'reinstallDatePickerVentas', 'filter' => $model, 'columns' => array(array('header' => 'ID.', 'name' => 'id', 'value' => '$data->id', 'htmlOptions' => array('width' => '30')), array('name' => 'nombre_paciente', 'value' => '$data->paciente->nombre', 'htmlOptions' => array('width' => '100'), 'headerHtmlOptions' => array('style' => 'width:150px;text-align:center;')), array('name' => 'apellido_paciente', 'value' => '$data->paciente->apellido', 'htmlOptions' => array('width' => '100'), 'headerHtmlOptions' => array('style' => 'width:150px;text-align:center;')), array('header' => 'Cedula', 'name' => 'n_identificacion', 'value' => '$data->paciente->n_identificacion', 'htmlOptions' => array('width' => '50'), 'headerHtmlOptions' => array('style' => 'width:150px;text-align:center;')), array('name' => 'estado', 'filter' => array('Contratado' => 'Contratado', 'Presupuestado' => 'Presupuestado'), 'value' => '$data->estado', 'htmlOptions' => array('width' => '150')), array('header' => 'Total ($)', 'name' => 'total', 'value' => 'number_format($data->total,2)'), array('header' => 'Fecha', 'name' => 'fecha', 'filter' => $this->widget('zii.widgets.jui.CJuiDatePicker', array('language' => 'es', 'model' => $model, 'attribute' => 'fecha', 'options' => array('showAnim' => 'fold', 'language' => 'es', 'dateFormat' => 'dd-mm-yy', 'changeMonth' => true, 'changeYear' => true, 'yearRange' => '2014:2025'), 'htmlOptions' => array('id' => 'datepicker_for_fecha', 'style' => 'height:20px;width:80px;'), 'defaultOptions' => array('showOn' => 'focus', 'showOtherMonths' => true, 'selectOtherMonths' => true, 'changeMonth' => true, 'changeYear' => true, 'showButtonPanel' => true)), true), 'value' => 'Yii::app()->dateformatter->format("dd-MM-yyyy",$data[\'fecha\']);', 'htmlOptions' => array('width' => '80')), array('header' => 'Elaborado Por:', 'name' => 'usuario_id', 'filter' => CHtml::listData(Personal::model()->findAll(array('order' => 'nombres ASC', 'condition' => "activo = 'SI'")), 'id', 'nombreCompleto'), 'value' => '$data[\'elusuario\'][\'nombreCompleto\']'), array('class' => 'CButtonColumn', 'template' => '{view}')))); Yii::app()->clientScript->registerScript('re-install-date-picker', "\nfunction reinstallDatePickerVentas(id, data) {\n //use the same parameters that you had set in your widget else the datepicker will be refreshed by default\n \$('#datepicker_for_fecha').datepicker(jQuery.extend({showMonthAfterYear:false},jQuery.datepicker.regional['es'],{'dateFormat':'dd-mm-yy'}));\n //\$('#datepicker_for_fecha').datepicker(\$.datepicker.regional[ 'es' ]);\n //\$('#datepicker_for_fecha').datepicker({dateFormat: 'dd-mm-yy'});\n}\n"); ?> <div id="exportar" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h3 id="myModalLabel">Exportar a un archivo de Excel </h3> </div> <div class="modal-body"> <p>Seleccione las opciones de Exportar</p> <form id="frmExportar" name="frmExportar" action="index.php?r=presupuesto/exportar&tipo=<?php $elTipo; ?> " method = "post"> <div class="span5">
<?php /* @var $this UsuariosController */ /* @var $model Usuarios */ /* @var $form CActiveForm */ ?> <div class="form"> <?php $form = $this->beginWidget('CActiveForm', array('id' => 'usuarios-form', 'enableAjaxValidation' => false)); ?> <?php $elId = $_GET['id']; $datosEmpleado = Personal::model()->findByPk("{$elId}"); ?> <div class="row"> <div class="span4"></div> <div class="span4"> <?php $this->widget('zii.widgets.CDetailView', array('data' => $datosEmpleado, 'attributes' => array('idPerfil.nombre', 'nombres', 'apellidos'))); ?> </div> <div class="span4"></div> </div> <p class="note">Campos con <span class="required">*</span> son requeridos.</p>
/** * Update the specified in storage. */ public function update($id) { //----Bank Details Update------- if (Input::get('updateType') == 'zonificacion') { $validator = Validator::make($input = Input::all(), Beneficiario::rules('zonificacion')); if ($validator->fails()) { $output['status'] = 'error'; $output['msg'] = $validator->getMessageBag()->toArray(); } else { $details = Zonificacion::firstOrNew(['beneficiarioID' => $id]); $details->departamento = Input::get('departamento'); $details->provincia = Input::get('provincia'); $details->otros = Input::get('otros'); $details->localidad = Input::get('localidad'); $details->canton = Input::get('canton'); $details->zona = Input::get('zona'); $details->save(); $output['status'] = 'success'; $output['msg'] = 'Zonificacion actualizado exitosamente'; } } else { if (Input::get('updateType') == 'donacion') { $ddetails = Beneficiario::where('beneficiarioID', '=', $id)->first(); $validator = Validator::make($input = Input::all(), Beneficiario::rules('update', $ddetails->id)); if ($validator->fails()) { $output['status'] = 'error'; $output['msg'] = $validator->getMessageBag()->toArray(); } else { $ddetails->beneficiarioID = $id; $ddetails->objetivo = Input::get('objetivo'); $ddetails->fechaing = date('Y-m-d', strtotime(Input::get('fechaing'))); $ddetails->fecha_desvinculacion = trim(Input::get('fecha_desvinculacion')) != '' ? date('Y-m-d', strtotime(Input::get('fecha_desvinculacion'))) : null; $ddetails->status = Input::get('status') != 'activo' ? 'inactivo' : 'activo'; $ddetails->save(); if (isset($input['monto'])) { foreach ($input['monto'] as $index => $value) { $salary_details = Soldonacion::find($index); $salary_details->tipo = $input['tipo'][$index]; $salary_details->monto = $value; $salary_details->save(); } } $output['status'] = 'success'; $output['msg'] = 'Donacion Actualizado Existosamente'; } } else { if (Input::get('updateType') == 'personalInfo') { $ben = Beneficiario::where('beneficiarioID', '=', $id)->get()->first(); $validator = Validator::make($data = Input::all(), Beneficiario::rules('personalInfo', $ben->id)); if ($validator->fails()) { return Redirect::back()->with(['errorPersonal' => $validator->messages()->all()])->withInput(); } $input = Input::all(); $fullname = $input['nombres'] . " " . $input['apellidos']; // $password = ($data['password']!='')?Hash::make(Input::get('password')):$data['oldpassword']; // Profile Image Upload if (Input::hasFile('foto')) { $path = public_path() . "/profileImages/"; File::makeDirectory($path, $mode = 0777, true, true); $image = Input::file('foto'); $extension = $image->getClientOriginalExtension(); $filename = "{$fullname}_{$id}." . strtolower($extension); //Image::make($image->getRealPath())->resize(872,724)->save("$path$filename"); Image::make($image->getRealPath())->fit(872, 724, function ($constraint) { $constraint->upsize(); })->save($path . $filename); } else { $filename = Input::get('hiddenImage'); } $ben->update(['nombres' => ucwords(strtolower($input['nombres'])), 'apellidos' => ucwords(strtolower($input['apellidos'])), 'genero' => $input['genero'], 'fechanac' => trim(Input::get('fechanac')) != '' ? date('Y-m-d', strtotime(Input::get('fechanac'))) : null, 'telefono' => $input['telefono'], 'direccion' => $input['direccion'], 'foto' => isset($filename) ? $filename : 'default.jpg', 'direccionperm' => $input['direccionperm'], 'iddiagnostico' => $input['iddiag'], 'diagnostico' => $input['diagnostico'], 'fechadiagnostico' => $input['fechadiag'], 'tratamiento' => $input['tratamiento'], 'razon' => $input['razon'], 'duracion' => $input['duracion'], 'referencia' => $input['referencia'], 'lugar' => $input['lugar']]); Activity::log(['contentId' => $id, 'contentType' => 'Beneficiario', 'user_id' => Auth::admin()->get()->id, 'action' => 'Update', 'description' => 'Actualizacion ' . Input::get('updateType'), 'details' => 'Usuario: ' . Auth::admin()->get()->name, 'updated' => $id ? true : false]); return Redirect::route('admin.beneficiarios.edit', $id)->with('successPersonal', "<strong>Actualizacion</strong> Existosa"); } else { if (Input::get('updateType') == 'responsable') { // dd(Input::all()); $per = Personal::where('personalID', '=', $id)->get()->first(); $validator = Validator::make($input = Input::all(), Personal::rules('personalInfo', $per->id)); if ($validator->fails()) { $output['status'] = 'error'; $output['msg'] = $validator->getMessageBag()->toArray(); } else { $responsable = Personal::firstOrNew(['personalID' => $id]); $responsable->personalID = $input['ciResponsable']; $responsable->emision = $input['ciResponsableEmision']; $responsable->nombres = ucwords(strtolower($input['nombresReponsable'])); $responsable->apellidos = ucwords(strtolower($input['apellidosResponsable'])); $responsable->ocupacion = $input['ocupacionResponsable']; $responsable->tipoPersonal = "Responsable"; $responsable->parentesco = Input::get('parentesco'); $responsable->save(); $output['status'] = 'success'; $output['msg'] = 'Persona actualizad correctamente....'; } return $responsable; return $responsable; } else { if (Input::get('updateType') == 'documents') { $input = Input::all(); $ben = Beneficiario::where('beneficiarioID', '=', $id)->get()->first(); // -------------- UPLOAD THE DOCUMENTS ----------------- $documents = ['certnac', 'CIprueba', 'solicitud', 'croquis', 'perfil']; $fullname = $ben->nombres . " " . $ben->apellidos; foreach ($documents as $document) { if (Input::hasFile($document)) { $path = public_path() . "/beneficiarios_documents/{$document}/"; File::makeDirectory($path, $mode = 0777, true, true); $file = Input::file($document); $extension = $file->getClientOriginalExtension(); $filename = "{$document}_{$id}_{$fullname}.{$extension}"; Input::file($document)->move($path, $filename); $edoc = Bendocumentos::where('beneficiarioID', '=', $id)->get()->first(); if ($edoc) { $edoc->fileName = $filename; $edoc->type = $document; $edoc->save(); } else { $edoc = new Bendocumentos(); $edoc->beneficiarioID = $id; $edoc->fileName = $filename; $edoc->type = $document; $edoc->save(); } } } Activity::log(['contentId' => $id, 'contentType' => 'Beneficiario', 'user_id' => Auth::admin()->get()->id, 'action' => 'Update', 'description' => 'Actualizacion ' . Input::get('updateType'), 'details' => 'Usuario: ' . Auth::admin()->get()->name, 'updated' => $id ? true : false]); return Redirect::route('admin.beneficiarios.edit', $id)->with('successDocuments', "<strong>Actualizacion</strong> Existosa"); // ********** END UPLOAD THE DOCUMENTS********** } } } } } Activity::log(['contentId' => $id, 'contentType' => 'Beneficiario', 'user_id' => Auth::admin()->get()->id, 'action' => 'Update', 'description' => 'Actualizacion ' . Input::get('updateType'), 'details' => 'Usuario: ' . Auth::admin()->get()->name, 'updated' => $id ? true : false]); //-------Documents info Details Update END-------- return Response::json($output, 200); }
echo $form->labelEx($tabla_seguimiento, 'tema_id'); ?> <?php echo $form->dropDownList($tabla_seguimiento, 'tema_id', CHtml::listData(SeguimientoTema::model()->findAll("estado = 'Activo' order by 'nombre'"), 'id', 'nombre'), array('class' => 'input-xlarge')); ?> <?php echo $form->error($tabla_seguimiento, 'tema_id'); ?> </div> <div class = 'span7'> <?php echo $form->labelEx($tabla_seguimiento, 'responsable_id'); ?> <?php echo $form->dropDownList($tabla_seguimiento, 'responsable_id', CHtml::listData(Personal::model()->findAll("activo = 'SI' order by 'nombreCompleto'"), 'id', 'nombreCompleto'), array('class' => 'input-xlarge')); ?> <?php echo $form->error($tabla_seguimiento, 'responsable_id'); ?> </div> <div class = 'span10'> <?php echo $form->labelEx($tabla_seguimiento, 'observaciones'); ?> <?php echo $form->textArea($tabla_seguimiento, 'observaciones', array('rows' => 4, 'cols' => 50, 'class' => 'input-xxlarge')); ?> <?php echo $form->error($tabla_seguimiento, 'observaciones');
?> <h1>Relación de Productos - <a href="#exportar" class="btn btn-warning" role="button" data-toggle="modal"><i class="icon-share-alt icon-white"></i> Exportar</a></h1> <?php //echo CHtml::link('Advanced Search','#',array('class'=>'search-button')); ?> <div class="search-form" style="display:none"> <?php $this->renderPartial('_search', array('model' => $model)); $lasVentas = Ventas::model()->findAll(); ?> </div><!-- search-form --> <?php $this->widget('zii.widgets.grid.CGridView', array('id' => 'ventas-detalle-grid', 'dataProvider' => $model->search(), 'afterAjaxUpdate' => 'reinstallDatePickerVentas', 'filter' => $model, 'columns' => array(array('header' => 'ID.', 'name' => 'id', 'value' => '$data->id', 'htmlOptions' => array('width' => '30')), array('name' => 'nombre_paciente', 'value' => '$data->paciente->nombre', 'htmlOptions' => array('width' => '100'), 'headerHtmlOptions' => array('style' => 'width:150px;text-align:center;')), array('name' => 'apellido_paciente', 'value' => '$data->paciente->apellido', 'htmlOptions' => array('width' => '100'), 'headerHtmlOptions' => array('style' => 'width:150px;text-align:center;')), array('header' => 'Producto', 'name' => 'producto_id', 'filter' => CHtml::listData(ProductoInventario::model()->findAll(array('order' => 'nombre_producto ASC')), 'id', 'nombre_producto'), 'value' => '$data[\'producto\'][\'nombre_producto\']', 'htmlOptions' => array('width' => '250')), array('header' => 'Vendedor', 'name' => 'vendedor_id', 'value' => '$data->venta->vendedor->nombreCompleto', 'filter' => CHtml::listData(Personal::model()->findAll(array('order' => 'nombres ASC')), 'id', 'nombreCompleto'), 'htmlOptions' => array('width' => '200'), 'headerHtmlOptions' => array('style' => 'width:150px;text-align:center;')), array('name' => 'cantidad', 'value' => '$data->cantidad', 'htmlOptions' => array('width' => '50'), 'footer' => "<h5>" . number_format($model->getTotal4($model->searchSuma())) . '</h5>'), array('name' => 'valor', 'value' => 'number_format($data->valor,2)', 'footer' => "<h5>\$ " . number_format($model->getTotal($model->searchSuma()), 2) . '</h5>'), array('name' => 'iva', 'value' => 'number_format($data->iva,2)', 'footer' => "<h5>\$ " . number_format($model->getTotal2($model->searchSuma()), 2) . '</h5>'), array('name' => 'total', 'value' => 'number_format($data->total,2)', 'footer' => "<h5>\$ " . number_format($model->getTotal3($model->searchSuma()), 2) . '</h5>'), array('header' => 'Fecha', 'name' => 'fecha', 'filter' => $this->widget('zii.widgets.jui.CJuiDatePicker', array('language' => 'es', 'model' => $model, 'attribute' => 'fecha', 'options' => array('showAnim' => 'fold', 'language' => 'es', 'dateFormat' => 'dd-mm-yy', 'changeMonth' => true, 'changeYear' => true, 'yearRange' => '2014:2025'), 'htmlOptions' => array('id' => 'datepicker_for_fecha', 'style' => 'height:20px;width:80px;'), 'defaultOptions' => array('showOn' => 'focus', 'showOtherMonths' => true, 'selectOtherMonths' => true, 'changeMonth' => true, 'changeYear' => true, 'showButtonPanel' => true)), true), 'value' => 'Yii::app()->dateformatter->format("dd-MM-yyyy",$data[\'fecha\']);', 'htmlOptions' => array('width' => '80')), array('class' => 'CButtonColumn', 'template' => '{view}')))); Yii::app()->clientScript->registerScript('re-install-date-picker', "\nfunction reinstallDatePickerVentas(id, data) {\n //use the same parameters that you had set in your widget else the datepicker will be refreshed by default\n \$('#datepicker_for_fecha').datepicker(jQuery.extend({showMonthAfterYear:false},jQuery.datepicker.regional['es'],{'dateFormat':'dd-mm-yy'}));\n //\$('#datepicker_for_fecha').datepicker(\$.datepicker.regional[ 'es' ]);\n //\$('#datepicker_for_fecha').datepicker({dateFormat: 'dd-mm-yy'});\n}\n"); ?> <div id="exportar" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h3 id="myModalLabel">Exportar a un archivo de Excel </h3> </div> <div class="modal-body"> <p>Seleccione las opciones de Exportar</p> <form id="frmExportar" name="frmExportar" action="index.php?r=VentasDetalle/exportar&tipo=<?php $elTipo; ?> " method = "post"> <div class="span5">