This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$nome->forceUpperCase(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$nome->setMaxLength(50); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$nome->setEditable(false); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// COM true, IRÁ SALVAR SEM A MÁSCARA DO CAMPO | |
$telefone->setMask('(99) 9999-9999', true); | |
TEntry::changeMask(self::$formName, 'cpf', '999.999.999-99'); | |
TEntry::changeMask(self::$formName, 'cnpj', '999.999.999-99'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// DEFININDO A AÇÃO DA COMBOX TIPO PESSOA AO MUDAR DE OPÇÃO | |
$tipo_pessoa->setChangeAction(new TAction([$this,'onTipoPessoa'])); | |
// cpf_cnpj É O NOME DO CAMPO CPF / CNPJ | |
// FUNÇÃO DA COMBO TIPO PESSOA | |
public static function onTipoPessoa($param = null) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$data = $this->form->getData(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public static function buscarEmpresa($param = null) | |
{ | |
if ($param['cnpj']) | |
{ | |
$cnpj = str_replace(['.','-','/',' '],['','','',''], $param['cnpj']); | |
$content = file_get_contents("https://www.receitaws.com.br/v1/cnpj/{$cnpj}", false, stream_context_create([ | |
"ssl" => [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$column_data_venda>setTransformer(function($value, $object, $row) | |
{ | |
if(!empty(trim($value))) | |
{ | |
try | |
{ | |
$date = new DateTime($value); | |
return $date->format('d/m/Y'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$column_preco->setTransformer(function($value, $object, $row) | |
{ | |
if(!$value) | |
{ | |
$value = ''; | |
} | |
if(is_numeric($value)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
# VIA CONSTRUCT | |
$this->datagrid = new BootstrapDatagridWrapper($this->datagrid); | |
$this->filter_criteria = new TCriteria; | |
$unidade_id = TSession::getValue("userunitid"); | |
$this->filter_criteria->add(new TFilter('system_unit_id', '=', $unidade_id)); | |