RF
Gravar valor numérico na Grid - comportamento "estranho"
Boa tarde...
Tenho um formulário de digitação de solicitações, esse foi criado com o formulário mestre detalhe, do Studio.
Com base no micro erp, fiz algumas adaptações para que ao digitar nos campos: volumes, peso e valor, tivesse a formatação com ponto e virgula.
O comportamento estranho está acontecendo na grid, onde ao salvar pela primeira vez ele grava o número "com a formatação" (aparece com xx,xx - mas até esse momento tudo bem, no exemplo do cicro erp isso também acontece, dá pra conviver, rsss).
Ao clicar na grid e trazer para os TEntry, os valores, a coisa fica estranha, ele perde a formatação e ao salvar novamente para a Grid, o sistema "elimina" o ponto e grava um número maior.
Em anexo há um exemplo passo-a-passo desse comportamento.
Nesse exemplo o campo peso informado (45,55), quando vai para a grid passa para 4555, e esse ciclo se repete para os demais campos.
Onde deve ser corrigido esse problema?
Segue abaixo o código completo do formulário:
Tenho um formulário de digitação de solicitações, esse foi criado com o formulário mestre detalhe, do Studio.
Com base no micro erp, fiz algumas adaptações para que ao digitar nos campos: volumes, peso e valor, tivesse a formatação com ponto e virgula.
O comportamento estranho está acontecendo na grid, onde ao salvar pela primeira vez ele grava o número "com a formatação" (aparece com xx,xx - mas até esse momento tudo bem, no exemplo do cicro erp isso também acontece, dá pra conviver, rsss).
Ao clicar na grid e trazer para os TEntry, os valores, a coisa fica estranha, ele perde a formatação e ao salvar novamente para a Grid, o sistema "elimina" o ponto e grava um número maior.
Em anexo há um exemplo passo-a-passo desse comportamento.
Nesse exemplo o campo peso informado (45,55), quando vai para a grid passa para 4555, e esse ciclo se repete para os demais campos.
Onde deve ser corrigido esse problema?
Segue abaixo o código completo do formulário:
- <?php
- /**
- * solicitacao_de_carga_form Master/Detail
- * @author <your name here>
- */
- class solicitacao_de_carga_form extends TPage
- {
- protected $form; // form
- protected $detail_list;
- /**
- * Page constructor
- */
- public function __construct()
- {
- parent::__construct();
- // creates the form
- $this->form = new BootstrapFormBuilder('form_solicitacao_de_carga');
- $this->form->setFormTitle('solicitacao_de_carga');
- // master fields
- $id = new TEntry('id');
- $status_carga = new TEntry('status_carga');
- $data_cadastro = new TEntry('data_cadastro');
- $unidade_id = new TEntry('unidade_id');
- $cliente_id = new TEntry('cliente_id');
- $servico = new TEntry('servico');
- $loja_id = new TEntry('loja_id');
- $remetente_cnpj = new TEntry('remetente_cnpj');
- $remetente_ie = new TEntry('remetente_ie');
- $remetente_rz_social = new TEntry('remetente_rz_social');
- $remetente_nome_fantasia = new TEntry('remetente_nome_fantasia');
- $remetente_cep = new TEntry('remetente_cep');
- $remetente_uf = new TEntry('remetente_uf');
- $remetente_cidade = new TEntry('remetente_cidade');
- $remetente_endereco = new TEntry('remetente_endereco');
- $remetente_numero = new TEntry('remetente_numero');
- $remetente_bairro = new TEntry('remetente_bairro');
- $remetente_complemento = new TEntry('remetente_complemento');
- $remetente_telefone = new TEntry('remetente_telefone');
- $remetente_email = new TEntry('remetente_email');
- $destinatario_cnpj = new TEntry('destinatario_cnpj');
- $destinatario_ie = new TEntry('destinatario_ie');
- $destinatario_rz_social = new TEntry('destinatario_rz_social');
- $destinatario_cep = new TEntry('destinatario_cep');
- $destinatario_uf = new TEntry('destinatario_uf');
- $destinatario_cidade = new TEntry('destinatario_cidade');
- $destinatario_endereco = new TEntry('destinatario_endereco');
- $destinatario_numero = new TEntry('destinatario_numero');
- $destinatario_id = new TEntry('destinatario_id');
- $destinatario_bairro = new TEntry('destinatario_bairro');
- $destinatario_completo = new TEntry('destinatario_completo');
- $destinatario_telefone = new TEntry('destinatario_telefone');
- $valor_rs_total = new TEntry('valor_rs_total');
- $volume_total = new TEntry('volume_total');
- $peso_total = new TEntry('peso_total');
- $cubagem_total = new TEntry('cubagem_total');
- $peso_cubado_total = new TEntry('peso_cubado_total');
- $tipo_de_documento = new TEntry('tipo_de_documento');
- // detail fields
- $detail_id = new THidden('detail_id');
- $detail_nota_fiscal = new TEntry('detail_nota_fiscal');
- $detail_serie_nota_fiscal = new TEntry('detail_serie_nota_fiscal');
- $detail_danfe = new TEntry('detail_danfe');
- $detail_emissao = new TDate('detail_emissao');
- $detail_valor = new TNumeric('detail_valor', '2', ',', '.' );//new TEntry('detail_valor');
- $detail_pedido = new TEntry('detail_pedido');
- $detail_entrega = new TEntry('detail_entrega');
- $detail_carga = new TEntry('detail_carga');
- $detail_volumes = new TNumeric('detail_volumes', '0', ',', '.' ); //new TEntry('detail_volumes');
- $detail_peso_informado = new TNumeric('detail_peso_informado', '2', ',', '.' );// new TEntry('detail_peso_informado');
- $detail_peso_medido = new TNumeric('detail_peso_medido', '2', ',', '.' );//TEntry('detail_peso_medido');
- $detail_comprimento = new TNumeric('detail_comprimento', '2', ',', '.' );//TEntry('detail_comprimento');
- $detail_largura = new TNumeric('detail_largura', '2', ',', '.' );//TEntry('detail_largura');
- $detail_altura = new TNumeric('detail_altura', '2', ',', '.' );//TEntry('detail_altura');
- $detail_cubagem = new TNumeric('detail_cubagem', '2', ',', '.' );//TEntry('detail_cubagem');
- if (!empty($id))
- {
- $id->setEditable(FALSE);
- }
- // master fields
- $this->form->addFields( [new TLabel('Número')], [$id] );
- $this->form->addFields( [new TLabel('Status')], [$status_carga] );
- $this->form->addFields( [new TLabel('Data Cadastro')], [$data_cadastro] );
- $this->form->addFields( [new TLabel('Unidade atual')], [$unidade_id] );
- $this->form->addFields( [new TLabel('Cliente')], [$cliente_id] );
- $this->form->addFields( [new TLabel('Tipo de serviço')], [$servico] );
- $this->form->addFields( [new TLabel('Cliente embarcador')], [$loja_id] );
- $this->form->addFields( [new TLabel('Remetente Cnpj')], [$remetente_cnpj] );
- $this->form->addFields( [new TLabel('Remetente Ie')], [$remetente_ie] );
- $this->form->addFields( [new TLabel('Remetente Rz Social')], [$remetente_rz_social] );
- $this->form->addFields( [new TLabel('Remetente Nome Fantasia')], [$remetente_nome_fantasia] );
- $this->form->addFields( [new TLabel('Remetente Cep')], [$remetente_cep] );
- $this->form->addFields( [new TLabel('Remetente Uf')], [$remetente_uf] );
- $this->form->addFields( [new TLabel('Remetente Cidade')], [$remetente_cidade] );
- $this->form->addFields( [new TLabel('Remetente Endereco')], [$remetente_endereco] );
- $this->form->addFields( [new TLabel('Remetente Numero')], [$remetente_numero] );
- $this->form->addFields( [new TLabel('Remetente Bairro')], [$remetente_bairro] );
- $this->form->addFields( [new TLabel('Remetente Complemento')], [$remetente_complemento] );
- $this->form->addFields( [new TLabel('Remetente Telefone')], [$remetente_telefone] );
- $this->form->addFields( [new TLabel('Remetente Email')], [$remetente_email] );
- $this->form->addFields( [new TLabel('Destinatario Cnpj')], [$destinatario_cnpj] );
- $this->form->addFields( [new TLabel('Destinatario Ie')], [$destinatario_ie] );
- $this->form->addFields( [new TLabel('Destinatario Rz Social')], [$destinatario_rz_social] );
- $this->form->addFields( [new TLabel('Destinatario Cep')], [$destinatario_cep] );
- $this->form->addFields( [new TLabel('Destinatario Uf')], [$destinatario_uf] );
- $this->form->addFields( [new TLabel('Destinatario Cidade')], [$destinatario_cidade] );
- $this->form->addFields( [new TLabel('Destinatario Endereco')], [$destinatario_endereco] );
- $this->form->addFields( [new TLabel('Destinatario Numero')], [$destinatario_numero] );
- $this->form->addFields( [new TLabel('Destinatario Id')], [$destinatario_id] );
- $this->form->addFields( [new TLabel('Destinatario Bairro')], [$destinatario_bairro] );
- $this->form->addFields( [new TLabel('Destinatario Completo')], [$destinatario_completo] );
- $this->form->addFields( [new TLabel('Destinatario Telefone')], [$destinatario_telefone] );
- $this->form->addFields( [new TLabel('Valor Rs Total')], [$valor_rs_total] );
- $this->form->addFields( [new TLabel('Volume Total')], [$volume_total] );
- $this->form->addFields( [new TLabel('Peso Total')], [$peso_total] );
- $this->form->addFields( [new TLabel('Cubagem Total')], [$cubagem_total] );
- $this->form->addFields( [new TLabel('Peso Cubado Total')], [$peso_cubado_total] );
- $this->form->addFields( [new TLabel('Tipo De Documento')], [$tipo_de_documento] );
- // detail fields
- $this->form->addContent( ['<h4>Details</h4><hr>'] );
- $this->form->addFields( [$detail_id] );
- $this->form->addFields( [new TLabel('Nota Fiscal')], [$detail_nota_fiscal] );
- $this->form->addFields( [new TLabel('Serie Nota Fiscal')], [$detail_serie_nota_fiscal] );
- $this->form->addFields( [new TLabel('Danfe')], [$detail_danfe] );
- $this->form->addFields( [new TLabel('Emissao')], [$detail_emissao] );
- $this->form->addFields( [new TLabel('Valor')], [$detail_valor] );
- $this->form->addFields( [new TLabel('Pedido')], [$detail_pedido] );
- $this->form->addFields( [new TLabel('Entrega')], [$detail_entrega] );
- $this->form->addFields( [new TLabel('Carga')], [$detail_carga] );
- $this->form->addFields( [new TLabel('Volumes')], [$detail_volumes] );
- $this->form->addFields( [new TLabel('Peso Informado')], [$detail_peso_informado] );
- $this->form->addFields( [new TLabel('Peso Medido')], [$detail_peso_medido] );
- $this->form->addFields( [new TLabel('Comprimento')], [$detail_comprimento] );
- $this->form->addFields( [new TLabel('Largura')], [$detail_largura] );
- $this->form->addFields( [new TLabel('Altura')], [$detail_altura] );
- $this->form->addFields( [new TLabel('Cubagem')], [$detail_cubagem] );
- $add = TButton::create('add', [$this, 'onSaveDetail'], 'Register', 'fa:save');
- $this->form->addFields( [], [$add] )->style = 'background: whitesmoke; padding: 5px; margin: 1px;';
- $this->detail_list = new BootstrapDatagridWrapper(new TQuickGrid);
- $this->detail_list->style = "min-width: 700px; width:100%;margin-bottom: 10px";
- $this->detail_list->setId('solicitacao_de_carga_list');
- // items
- $col_nota_fiscal = $this->detail_list->addQuickColumn('Documento', 'nota_fiscal', 'left', 100);
- $col_serie_nota_fiscal = $this->detail_list->addQuickColumn('Serie', 'serie_nota_fiscal', 'left', 100);
- //$col_danfe = $this->detail_list->addQuickColumn('Danfe', 'danfe', 'left', 100);
- //$col_emissao = $this->detail_list->addQuickColumn('Emissão', 'emissao', 'left', 100);
- $col_volumes = $this->detail_list->addQuickColumn('Volumes', 'volumes', 'left', 100);
- $col_peso_informado = $this->detail_list->addQuickColumn('Peso Inf.', 'peso_informado', 'left', 100);
- $col_peso_medido = $this->detail_list->addQuickColumn('Peso Med.', 'peso_medido', 'left', 100);
- $col_valor = $this->detail_list->addQuickColumn('Valor', 'valor', 'left', 100);
- //$col_pedido = $this->detail_list->addQuickColumn('Pedido', 'pedido', 'left', 100);
- //$col_entrega = $this->detail_list->addQuickColumn('Entrega', 'entrega', 'left', 100);
- //$col_carga = $this->detail_list->addQuickColumn('Carga', 'carga', 'left', 100);
- //$col_comprimento = $this->detail_list->addQuickColumn('Comprimento', 'comprimento', 'left', 100);
- //$col_largura = $this->detail_list->addQuickColumn('Largura', 'largura', 'left', 100);
- //$col_altura = $this->detail_list->addQuickColumn('Altura', 'altura', 'left', 100);
- //$col_cubagem = $this->detail_list->addQuickColumn('Cubagem', 'cubagem', 'left', 100);
- $col_volumes->setTotalFunction( function($values) {
- return array_sum((array) $values);
- });
- $col_peso_informado->setTotalFunction( function($values) {
- return array_sum((array) $values);
- });
- $col_peso_medido->setTotalFunction( function($values) {
- return array_sum((array) $values);
- });
- $col_valor->setTotalFunction( function($values) {
- return array_sum((array) $values);
- });
- //$this->item_pedido_list->createModel();
- $col_valor->setTransformer(function($value, $object, $row) {
- if (!$value)
- {
- $value = 0;
- }
- return number_format($value, 2, ",", ".");
- });
- // detail actions
- $this->detail_list->addQuickAction( 'Edit', new TDataGridAction([$this, 'onEditDetail']), 'id', 'fa:edit blue');
- $this->detail_list->addQuickAction( 'Delete', new TDataGridAction([$this, 'onDeleteDetail']), 'id', 'fa:trash red');
- $this->detail_list->createModel();
- $panel = new TPanelGroup;
- $panel->add($this->detail_list);
- $panel->getBody()->style = 'overflow-x:auto';
- $this->form->addContent( [$panel] );
- $btn = $this->form->addAction( _t('Save'), new TAction([$this, 'onSave']), 'fa:save');
- $btn->class = 'btn btn-sm btn-primary';
- $this->form->addAction( _t('Clear'), new TAction([$this, 'onClear']), 'fa:eraser red');
- // create the page container
- $container = new TVBox;
- $container->style = 'width: 90%';
- $container->add(new TXMLBreadCrumb('menu.xml','lista_de_solicitacoes'));
- $container->add($this->form);
- parent::add($container);
- }
- /**
- * Clear form
- * @param $param URL parameters
- */
- public function onClear($param)
- {
- $this->form->clear(TRUE);
- TSession::setValue(__CLASS__.'_items', array());
- $this->onReload( $param );
- }
- /**
- * Save an item from form to session list
- * @param $param URL parameters
- */
- public function onSaveDetail( $param )
- {
- try
- {
- TTransaction::open('banco');
- $data = $this->form->getData();
- /** validation sample
- if (empty($data->fieldX))
- {
- throw new Exception('The field fieldX is required');
- }
- **/
- $items = TSession::getValue(__CLASS__.'_items');
- $key = empty($data->detail_id) ? 'X'.mt_rand(1000000000, 1999999999) : $data->detail_id;
- $items[ $key ] = array();
- $items[ $key ]['id'] = $key;
- $items[ $key ]['nota_fiscal'] = $data->detail_nota_fiscal;
- $items[ $key ]['serie_nota_fiscal'] = $data->detail_serie_nota_fiscal;
- $items[ $key ]['danfe'] = $data->detail_danfe;
- $items[ $key ]['emissao'] = $data->detail_emissao;
- $items[ $key ]['valor'] = $data->detail_valor;
- $items[ $key ]['pedido'] = $data->detail_pedido;
- $items[ $key ]['entrega'] = $data->detail_entrega;
- $items[ $key ]['carga'] = $data->detail_carga;
- $items[ $key ]['volumes'] = $data->detail_volumes;
- $items[ $key ]['peso_informado'] = $data->detail_peso_informado;
- $items[ $key ]['peso_medido'] = $data->detail_peso_medido;
- $items[ $key ]['comprimento'] = $data->detail_comprimento;
- $items[ $key ]['largura'] = $data->detail_largura;
- $items[ $key ]['altura'] = $data->detail_altura;
- $items[ $key ]['cubagem'] = $data->detail_cubagem;
- TSession::setValue(__CLASS__.'_items', $items);
- // clear detail form fields
- $data->detail_id = '';
- $data->detail_nota_fiscal = '';
- $data->detail_serie_nota_fiscal = '';
- $data->detail_danfe = '';
- $data->detail_emissao = '';
- $data->detail_valor = '';
- $data->detail_pedido = '';
- $data->detail_entrega = '';
- $data->detail_carga = '';
- $data->detail_volumes = '';
- $data->detail_peso_informado = '';
- $data->detail_peso_medido = '';
- $data->detail_comprimento = '';
- $data->detail_largura = '';
- $data->detail_altura = '';
- $data->detail_cubagem = '';
- TTransaction::close();
- $this->form->setData($data);
- $this->onReload( $param ); // reload the items
- }
- catch (Exception $e)
- {
- $this->form->setData( $this->form->getData());
- new TMessage('error', $e->getMessage());
- }
- }
- /**
- * Load an item from session list to detail form
- * @param $param URL parameters
- */
- public static function onEditDetail( $param )
- {
- // read session items
- $items = TSession::getValue(__CLASS__.'_items');
- // get the session item
- $item = $items[ $param['key'] ];
- $data = new stdClass;
- $data->detail_id = $item['id'];
- $data->detail_nota_fiscal = $item['nota_fiscal'];
- $data->detail_serie_nota_fiscal = $item['serie_nota_fiscal'];
- $data->detail_danfe = $item['danfe'];
- $data->detail_emissao = $item['emissao'];
- $data->detail_valor = $item['valor'];
- $data->detail_pedido = $item['pedido'];
- $data->detail_entrega = $item['entrega'];
- $data->detail_carga = $item['carga'];
- $data->detail_volumes = $item['volumes'];
- $data->detail_peso_informado = $item['peso_informado'];
- $data->detail_peso_medido = $item['peso_medido'];
- $data->detail_comprimento = $item['comprimento'];
- $data->detail_largura = $item['largura'];
- $data->detail_altura = $item['altura'];
- $data->detail_cubagem = $item['cubagem'];
- // fill detail fields
- TForm::sendData( 'form_solicitacao_de_carga', $data );
- }
- /**
- * Delete an item from session list
- * @param $param URL parameters
- */
- public static function onDeleteDetail( $param )
- {
- // reset items
- $data = new stdClass;
- $data->detail_nota_fiscal = '';
- $data->detail_serie_nota_fiscal = '';
- $data->detail_danfe = '';
- $data->detail_emissao = '';
- $data->detail_valor = '';
- $data->detail_pedido = '';
- $data->detail_entrega = '';
- $data->detail_carga = '';
- $data->detail_volumes = '';
- $data->detail_peso_informado = '';
- $data->detail_peso_medido = '';
- $data->detail_comprimento = '';
- $data->detail_largura = '';
- $data->detail_altura = '';
- $data->detail_cubagem = '';
- // clear form data
- TForm::sendData('form_solicitacao_de_carga', $data );
- // read session items
- $items = TSession::getValue(__CLASS__.'_items');
- // get detail id
- $detail_id = $param['key'];
- // delete the item from session
- unset($items[ $detail_id ] );
- // rewrite session items
- TSession::setValue(__CLASS__.'_items', $items);
- // delete item from screen
- TScript::create("ttable_remove_row_by_id('solicitacao_de_carga_list', '{$detail_id}')");
- }
- /**
- * Load the items list from session
- * @param $param URL parameters
- */
- public function onReload($param)
- {
- // read session items
- $items = TSession::getValue(__CLASS__.'_items');
- $this->detail_list->clear(); // clear detail list
- if ($items)
- {
- foreach ($items as $list_item)
- {
- $item = (object) $list_item;
- $row = $this->detail_list->addItem( $item );
- $row->id = $list_item['id'];
- }
- }
- $this->loaded = TRUE;
- }
- /**
- * Load Master/Detail data from database to form/session
- */
- public function onEdit($param)
- {
- try
- {
- TTransaction::open('banco');
- if (isset($param['key']))
- {
- $key = $param['key'];
- $object = new solicitacao_de_carga($key);
- $items = notas_fiscais_carga::where('solicitacao_de_carga_id', '=', $key)->load();
- $session_items = array();
- foreach( $items as $item )
- {
- $item_key = $item->id;
- $session_items[$item_key] = $item->toArray();
- $session_items[$item_key]['id'] = $item->id;
- $session_items[$item_key]['nota_fiscal'] = $item->nota_fiscal;
- $session_items[$item_key]['serie_nota_fiscal'] = $item->serie_nota_fiscal;
- $session_items[$item_key]['danfe'] = $item->danfe;
- $session_items[$item_key]['emissao'] = $item->emissao;
- $session_items[$item_key]['valor'] = $item->valor;
- $session_items[$item_key]['pedido'] = $item->pedido;
- $session_items[$item_key]['entrega'] = $item->entrega;
- $session_items[$item_key]['carga'] = $item->carga;
- $session_items[$item_key]['volumes'] = $item->volumes;
- $session_items[$item_key]['peso_informado'] = $item->peso_informado;
- $session_items[$item_key]['peso_medido'] = $item->peso_medido;
- $session_items[$item_key]['comprimento'] = $item->comprimento;
- $session_items[$item_key]['largura'] = $item->largura;
- $session_items[$item_key]['altura'] = $item->altura;
- $session_items[$item_key]['cubagem'] = $item->cubagem;
- }
- TSession::setValue(__CLASS__.'_items', $session_items);
- $this->form->setData($object); // fill the form with the active record data
- $this->onReload( $param ); // reload items list
- TTransaction::close(); // close transaction
- }
- else
- {
- $this->form->clear(TRUE);
- TSession::setValue(__CLASS__.'_items', null);
- $this->onReload( $param );
- }
- }
- catch (Exception $e) // in case of exception
- {
- new TMessage('error', $e->getMessage());
- TTransaction::rollback();
- }
- }
- /**
- * Save the Master/Detail data from form/session to database
- */
- public function onSave()
- {
- try
- {
- // open a transaction with database
- TTransaction::open('banco');
- $data = $this->form->getData();
- $master = new solicitacao_de_carga;
- $master->fromArray( (array) $data);
- $this->form->validate(); // form validation
- $master->store(); // save master object
- // delete details
- $old_items = notas_fiscais_carga::where('solicitacao_de_carga_id', '=', $master->id)->load();
- $keep_items = array();
- // get session items
- $items = TSession::getValue(__CLASS__.'_items');
- if( $items )
- {
- foreach( $items as $item )
- {
- if (substr($item['id'],0,1) == 'X' ) // new record
- {
- $detail = new notas_fiscais_carga;
- }
- else
- {
- $detail = notas_fiscais_carga::find($item['id']);
- }
- $detail->nota_fiscal = $item['nota_fiscal'];
- $detail->serie_nota_fiscal = $item['serie_nota_fiscal'];
- $detail->danfe = $item['danfe'];
- $detail->emissao = $item['emissao'];
- $detail->valor = $item['valor'];
- $detail->pedido = $item['pedido'];
- $detail->entrega = $item['entrega'];
- $detail->carga = $item['carga'];
- $detail->volumes = $item['volumes'];
- $detail->peso_informado = $item['peso_informado'];
- $detail->peso_medido = $item['peso_medido'];
- $detail->comprimento = $item['comprimento'];
- $detail->largura = $item['largura'];
- $detail->altura = $item['altura'];
- $detail->cubagem = $item['cubagem'];
- $detail->solicitacao_de_carga_id = $master->id;
- $detail->store();
- $keep_items[] = $detail->id;
- }
- }
- if ($old_items)
- {
- foreach ($old_items as $old_item)
- {
- if (!in_array( $old_item->id, $keep_items))
- {
- $old_item->delete();
- }
- }
- }
- TTransaction::close(); // close the transaction
- // reload form and session items
- $this->onEdit(array('key'=>$master->id));
- new TMessage('info', TAdiantiCoreTranslator::translate('Record saved'));
- }
- catch (Exception $e) // in case of exception
- {
- new TMessage('error', $e->getMessage());
- $this->form->setData( $this->form->getData() ); // keep form data
- TTransaction::rollback();
- }
- }
- /**
- * Show the page
- */
- public function show()
- {
- // check if the datagrid is already loaded
- if (!$this->loaded AND (!isset($_GET['method']) OR $_GET['method'] !== 'onReload') )
- {
- $this->onReload( func_get_arg(0) );
- }
- parent::show();
- }
- }
Como a função onEditDetail é estática a máscara do campo definida no construtor não é utilizada.
Faça o ajuste manual antes de enviar as informações:
Comigo acontece algo semelhante,
Quando insiro ítem do detalhe, os campos do mestre com formatação numérica perdem a formatação.
.
O problema com o TNumeric formatado para o padrão Brasil continua acontecendo no onDetailAdd no Adianti FrameWork 7.4.1