Skip to content

Instantly share code, notes, and snippets.

View fayqLs's full-sized avatar

FABRICIO fayqLs

View GitHub Profile
@fayqLs
fayqLs / .php
Created October 2, 2024 17:48
SALVAR REGISTROS ITENS TDBMultiSearch
<?php
public function onSave($param = null)
{
try
{
$object->store();
PessoaGrupo::where('cliente_id', '=', $object->id)->delete();
@fayqLs
fayqLs / .php
Created September 30, 2024 23:27
APLICAR FILTRO OPERADOR IN DOS IDs NO DATAGRID
<?php
public function onReload($param = NULL)
{
$systemUser = SystemUsers::find(TSession::getValue('userid'));
if ($systemUser)
{
$arrayEmpresaID = array();
$EmpresasUuario = $systemUser->getEmpresasUuario();
if ($EmpresasUuario)
@fayqLs
fayqLs / .php
Created September 30, 2024 18:06
DEFINIR CASE SENSITIVE BANCO POSTGRESQL
<?php
return [
'host' => "localhost",
'user' => "user",
'pass' => "pass",
'type' => "pgsql",
'port' => "",
'name' => "banco",
'prep' => "1",
@fayqLs
fayqLs / .php
Created September 30, 2024 01:37
GERAR PARCELAS FORMATO 30/60/90 DIAS
<?php
public static function gerarParcelas($param = null)
{
try
{
(new TRequiredValidator)->validate('DATA INICIAL', $param['data_inicio']);
(new TRequiredValidator)->validate('DATA FINAL', $param['data_final']);
(new TRequiredValidator)->validate('VALOR TOTAL', $param['valor_total']);
@fayqLs
fayqLs / .php
Created September 26, 2024 17:19
MOSTRAR PREVIEW DO PDF NO FORMULÁRIO
<?php
$iframe = new TElement('iframe');
$iframe->src = $pdf;
$iframe->type = 'application/pdf';
$iframe->style = "width: 100%; height:700px";
$this->element_preview_pdf->add($iframe);
@fayqLs
fayqLs / .txt
Created September 25, 2024 23:04
INSTALAR APACHE LARAGON COMO SERVIÇO (WINDOWS)
C:\laragon\bin\apache\httpd-2.4.54-win64-VS16\bin\httpd.exe -k install
@fayqLs
fayqLs / .php
Created September 20, 2024 19:23
AÇÃO DE SAÍDA DO TSpinner
<?php
// CONSTRUCT
$quantidade = new TSpinner('exemplo');
$quantidade->setExitAction(new TAction([$this,'onFuncao','static'=>1]));
//<userCustomFunctions>
public static function onFuncao($param = null)
{
@fayqLs
fayqLs / .php
Created September 18, 2024 01:24
CÓDIGO SEQUENCIA PLANO DE CONTAS
<?php
TTransaction::open(self::$database);
$sequencia = '';
$PlanoConta = PlanoConta::where('pai_id', '=', $param['key'])->orderBy('sequencia', 'desc')->first();
if ($PlanoConta)
{
$partes = explode('.', $PlanoConta->sequencia);
@fayqLs
fayqLs / .css
Created September 12, 2024 06:43
ADICIONAR BORDA VERMELHA NO CAMPO OBRIGATÓRIO
border-left: 4px solid #eb4946;
@fayqLs
fayqLs / .txt
Last active September 9, 2024 19:52
DIRETÓRIO PASTA SNIPPETS VSCODE
C: > Users > PC > AppData > Roaming > Code > User > profiles > 31ff1cf3 > snippets >
— adianti.code-snippets