BUTTON IN THE DATA AREA [message #5085] |
Mon, 19 October 2015 00:30 ![Go to next message Go to previous message](/theme/default/images/down.png) |
edortizq
Messages: 82 Registered: August 2008 Location: Ecuador
|
Member |
![edortizq@gmail.com](/theme/default/images/google.png)
|
|
Dear Tony
I'm trying to add a button in the data area but I can't get radicore do this.
This is my screen file:
$structure['xsl_file'] = 'std.detail1.xsl';
$structure['tables']['main'] = 'tarifa';
// identify the column specs - may use 'width' or 'class'
$structure['main']['columns'][] = array('width' => '25%');
$structure['main']['columns'][] = array('width' => '*');
$structure['main']['fields'][] = array('descripcionevento' => 'Evento');
$structure['main']['fields'][] = array('idlocalidad' => 'Id.Localidad');
$structure['main']['fields'][] = array('descripciontarifa' => 'Tarifa');
$structure['main']['fields'][] = array('idtipotarifa' => 'Id.Tipo Tarifa');
$structure['main']['fields'][] = array('idformatoimpresion' => 'Formato');
$structure['main']['fields'][] = array('tarifa' => 'Tarifa');
$structure['main']['fields'][] = array('aimprimir' => 'Cantidad a Imprimir');
$structure['main']['fields'][] = array('printbutton' => '');
$structure['main']['fields'][] = array('copiable' => 'Se copia a otros Eventos');
$structure['main']['fields'][] = array('secuenciasri' => 'Lleva secuencia SRI');
$structure['main']['fields'][] = array('maxticketstarifa' => 'Maximo de Tickets');
$structure['main']['fields'][] = array('tasaiva' => 'Tasa de IVA');
$structure['main']['fields'][] = array('tasaimpuesto1' => 'Tasa de Impuesto');
$structure['main']['fields'][] = array('descimpuesto1' => 'Descripción del Impuesto');
$structure['main']['fields'][] = array('tasaimpuesto2' => 'Tasa de Impuesto');
$structure['main']['fields'][] = array('descimpuesto2' => 'Descripcion del Impuesto');
$structure['main']['fields'][] = array('cargo1' => 'Valor por cargo');
$structure['main']['fields'][] = array('cargo2' => 'Valor por Cargo');
$structure['main']['fields'][] = array('estado' => 'Estado');
$structure['main']['fields'][] = array('fechahoracreacion' => 'Fecha de Creación');
$structure['main']['fields'][] = array('fechahoraactualizacion' => 'Fecha de Actualización');
[/quote]
And this is my _cm_changeConfig() method:
function _cm_changeConfig ($where, $fieldarray)
// $where = a string in SQL 'where' format.
// $fieldarray = the contents of $where as an array.
{
if ($GLOBALS['mode'] == 'update') {
$prev_script = getPreviousScript();
if ($prev_script == '/access/tarifa_print_ticket(list2).php') {
unset ($GLOBALS['act_buttons']['submit']);
unset ($GLOBALS['act_buttons']['submitnext']);
unset ($GLOBALS['act_buttons']['copy']);
unset ($GLOBALS['act_buttons']['paste']);
$this->fieldspec['printbutton'] = array ('type'=> 'string',
'control'=> 'input',
'subtype' => 'button',
'value' => 'IMPRIMIR',
'task_id' => 'ticket(add4)');
$this->fieldspec['idlocalidad']['noedit'] = 'y';
$this->fieldspec['descripciontarifa']['noedit'] = 'y';
$this->fieldspec['idtipotarifa']['noedit'] = 'y';
$this->fieldspec['idformatoimpresion']['noedit'] = 'y';
$this->fieldspec['tarifa']['noedit'] = 'y';
$fieldarray['aimprimir'] = 0;
$this->fieldspec['aimprimir'] = array ('type'=> 'integer',
'size'=> 5,
'minvalue' => 0,
'maxvalue' => 1000,
'default'=> 10,
'nondb'=>'y');
$this->fieldspec['copiable']['nodisplay'] = 'y';
$this->fieldspec['secuenciasri']['nodisplay'] = 'y';
$this->fieldspec['maxticketstarifa']['nodisplay'] = 'y';
$this->fieldspec['tasaiva']['nodisplay'] = 'y';
$this->fieldspec['tasaimpuesto1']['nodisplay'] = 'y';
$this->fieldspec['descimpuesto1']['nodisplay'] = 'y';
$this->fieldspec['tasaimpuesto2']['nodisplay'] = 'y';
$this->fieldspec['descimpuesto2']['nodisplay'] = 'y';
$this->fieldspec['cargo1']['nodisplay'] = 'y';
$this->fieldspec['cargo2']['nodisplay'] = 'y';
$this->fieldspec['estado']['nodisplay'] = 'y';
$this->fieldspec['fechahoracreacion']['nodisplay'] = 'y';
$this->fieldspec['fechahoraactualizacion']['nodisplay'] = 'y';
}
} // if
return $fieldarray;
} // _cm_changeConfig
And this is my entry in the language_text.inc file:
// navigation button details for subsystem XXX
$array['printbutton'] = 'IMPRIMIR';
You can find attached the screen where you can see it's only added the "aimprimir" non-db field, but not the button at all.
My Radicore version is 1.67.
Please let me know what I'm doing wrong.
Thanks for advance!!
|
|
|