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
#Import-Module posh-git <# You need to install https://github.com/dahlbyk/posh-git #> | |
#oh-my-posh --init --shell pwsh --config 'https://gist.githubusercontent.com/shanselman/1f69b28bfcc4f7716e49eb5bb34d7b2c/raw/8e9c9a8736ff4e9e5a863c20833d614549ccbc32/ohmyposhv3-v2.json' | Invoke-Expression | |
<# | |
# https://ohmyposh.dev/docs/migrating | |
Import-Module oh-my-posh | |
#> | |
#Set-PoshPrompt -Theme Paradox |
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
CREATE OR REPLACE FORCE EDITIONABLE VIEW "MGCLI"."CLI_VW_EST_MOVSUM_RESERVA" ("RN", "FIL_IN_CODIGO", "PRO_IN_CODIGO", "MVS_IN_RESERVA", "MVS_RE_QUANTIDADE", "RSV_CH_ORIGEM", "RSV_CH_ORIGEMDESC", "RSV_ST_DOCUMENTO", "RSV_DT_DOCUMENTO", "RSV_DT_MOVIMENTO", "RSV_ST_SITUACAO") AS | |
SELECT | |
"RN", | |
"FIL_IN_CODIGO", | |
"PRO_IN_CODIGO", | |
"MVS_IN_RESERVA", | |
"MVS_RE_QUANTIDADE", | |
"RSV_CH_ORIGEM", | |
CASE rsv_ch_origem | |
WHEN 'B' THEN |
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
create or replace TRIGGER MGCLI.T_CLI_EST_RECEBIMENTO | |
BEFORE INSERT OR UPDATE ON MGADM.EST_RECEBIMENTO | |
REFERENCING OLD AS OLD NEW AS NEW | |
FOR EACH ROW | |
BEGIN | |
/** | |
Quem: AGS([email protected]) | |
Quando: 07/07/2018 | |
Motivo: Nao permitir CTe com Entrada antes da Emissão | |
*/ |
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
create or replace TRIGGER MGCLI.T_CLI_VEN_NOTAFISCAL | |
BEFORE INSERT OR UPDATE ON MGVEN.VEN_NOTAFISCAL | |
REFERENCING OLD AS OLD NEW AS NEW | |
FOR EACH ROW | |
BEGIN | |
IF UPDATING THEN | |
BEGIN | |
/** | |
Motivo: Macar para reescriturar após alteração | |
*/ |
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
create or replace trigger MGCLI.T_CLI_FIN_MOVIMENTO | |
for insert or update on MGFIN.FIN_MOVIMENTO | |
compound trigger | |
vOwner sys.all_objects.owner%type := 'MGCLI'; | |
vObjeto sys.all_objects.object_name%type := 'T_CLI_FIN_MOVIMENTO'; | |
type typ_cli_rc_movimentos is record( | |
ORG_TAB_IN_CODIGO mgfin.fin_movimento.org_tab_in_codigo%type, | |
ORG_PAD_IN_CODIGO mgfin.fin_movimento.org_pad_in_codigo%type, |
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
create or replace PROCEDURE P_EST_RECEBNFE_AGUARDANDO AS | |
vAGN_IN_CODIGO MGADM.EST_RECEBIMENTONFE.AGN_IN_CODIGO%TYPE; | |
vHOST_NAME VARCHAR(250); | |
BEGIN | |
/** | |
AGS - 14/05/2017 - | |
Atualizar dados dos registros não baixados no Gerenciador de NFe com informações da Chave para identificar: | |
Nota Fiscal / Série / Modelo | |
Agente (CNPJ / UF) | |
*/ |
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
CREATE OR REPLACE TRIGGER "MGCLI"."T_CLI_EST_ITENSPEDPROGR" | |
FOR INSERT OR UPDATE ON MGADM.EST_ITENSPEDPROGRAMADOS | |
COMPOUND TRIGGER | |
vOrigem MGCLI.MAIL_LOG_GENERICO.BI_ST_ORIGEM%TYPE := 'MGCLI.T_CLI_EST_ITENSPEDPROGR'; | |
TYPE TYP_CLI_RC_ITNPDCPROG IS RECORD ( | |
ORG_TAB_IN_CODIGO MGADM.EST_ITENSPEDPROGRAMADOS.ORG_TAB_IN_CODIGO%TYPE, | |
ORG_PAD_IN_CODIGO MGADM.EST_ITENSPEDPROGRAMADOS.ORG_PAD_IN_CODIGO%TYPE, | |
ORG_IN_CODIGO MGADM.EST_ITENSPEDPROGRAMADOS.ORG_IN_CODIGO%TYPE, |
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
create or replace trigger T_CUS_FIN_BLOQ_MOVTO | |
for insert or update on MGFIN.FIN_MOVIMENTO | |
compound trigger | |
TYPE TYP_CUS_RC_FINMOV IS RECORD( | |
ORG_TAB_IN_CODIGO MGFIN.FIN_MOVIMENTO.ORG_TAB_IN_CODIGO%TYPE, | |
ORG_PAD_IN_CODIGO MGFIN.FIN_MOVIMENTO.ORG_PAD_IN_CODIGO%TYPE, | |
ORG_IN_CODIGO MGFIN.FIN_MOVIMENTO.ORG_IN_CODIGO%TYPE, | |
ORG_TAU_ST_CODIGO MGFIN.FIN_MOVIMENTO.ORG_TAU_ST_CODIGO%TYPE, | |
agn_tab_in_codigo MGFIN.FIN_MOVIMENTO.agn_tab_in_codigo%TYPE, |
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
CREATE OR REPLACE TRIGGER "MGCLI"."T_CLI_GLO_AGENTES_ID" | |
BEFORE UPDATE ON MGGLO.GLO_AGENTES_ID | |
REFERENCING OLD AS OLD NEW AS NEW | |
FOR EACH ROW | |
BEGIN | |
FOR cMOV IN ( | |
SELECT MOV_DT_EMISSAO, MOV_ST_TABELA FROM ( | |
SELECT FRE_DT_EMISSAO MOV_DT_EMISSAO, 'Financeiro - Contas a Receber' MOV_ST_TABELA FROM mgfin.fin_faturareceber WHERE agn_in_codigo = :NEW.AGN_IN_CODIGO and agn_tau_st_codigo = :new.agn_tau_st_codigo AND fre_dt_emissao < :NEW.AGN_DT_INICIOMOV AND fre_dt_emissao = (SELECT MIN(fre_dt_emissao) from mgfin.fin_faturareceber where agn_in_codigo = :NEW.agn_in_codigo and agn_tau_st_codigo = :NEW.agn_tau_st_codigo) and rownum <= 1 |
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
CREATE OR REPLACE PACKAGE "MGCLI"."CLI_PCK_API_RECEITAWS" AS | |
-- https://www.receitaws.com.br/v1/cnpj/[cnpj] | |
FUNCTION F_CNPJ(pCNPJ MGGLO.GLO_AGENTES.AGN_ST_CGC%TYPE) RETURN CLOB; | |
-- https://www.receitaws.com.br/v1/cnpj/[cnpj] | |
PROCEDURE P_CNPJ(pCNPJ MGGLO.GLO_AGENTES.AGN_ST_CGC%TYPE); | |
END CLI_PCK_API_RECEITAWS; |