Child pages
  • CF_0010_CONFIGURACAO_MORA_RES_4558

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Manual de adequação do critério de Mora de acordo com Resolução 4.558/2017

Produto:

Sistema Credimaster

Versões:

Não se aplica

Ocorrência:

O Banco Central do Brasil, no dia 23 de Fevereiro de 2017, publicou a Resolução 4.558, que regulamenta a cobrança de encargos por parte das instituições financeiras e das sociedades de arrendamento mercantil nas situações de atraso de pagamentos de obrigações por clientes, entrando em vigor a partir de 1º de Setembro de 2017.

A partir dessa data a instituição poderá cobrar de seus clientes apenas a taxa de juros remuneratórios igual à taxa pactuada no contrato para o período de adimplência da respectiva operação de crédito.

Com o objetivo de adequarmos o sistema a Resolução acima, estamos disponibilizando script que deverá ser executado no banco Credimaster de produção, após término do fechamento diário do dia 31/08/2017, assim como procedimento que deverá ser realizado para adequação das configurações de Mora.

Ambiente:

Produção

Passo a passo:

Pré-requisito indispensável:

  1. Realizar o fechamento do dia 31/08/2017, utilizando o Sistema Credimaster;

  2. Executar o script enviado para fixação das configurações de mora/permanência sobre as operações emitidas com data igual ou inferior à 31/08/2017. O script deverá ser executado de acordo com o Banco de Dados utilizado por cada cliente:

Expand
titleBanco Oracle
Code Block
languagesql
/************************************************************************************/
CREATE TABLE T402TITU_PRM
AS
SELECT A.CD_EMP,
       A.CD_UND,
       A.CD_CLI,
       A.NR_CTR,
       A.NR_ADL,
       A.SG_MOD,
       A.NR_NOS_NR,
       C.ID_CRT_OPE,
       C.ID_FMA_A30,
       C.ID_DD_A30,
       C.TX_PRM_A30,
       C.SG_MON_A30,
       C.SG_MON_M30,
       C.ID_FMA_M30,
       C.ID_DD_M30,
       C.TX_PRM_M30,
       C.TX_SPR_OPE
  FROM T402TITU A, T402MODA B, T402ENTX C
 WHERE A.SG_MOD = B.SG_MOD
   AND A.SG_LIN_OPE = B.SG_LIN_OPE
   AND B.SG_ECG = C.SG_ECG
   AND A.id_sit_lqd in ('PA', 'PP')
   and A.id_crt_prm = 'C'
   AND A.DT_EMS <= to_date('31/08/2017','dd/mm/yyyy');
UPDATE T402TITU A
   SET ID_CRT_PRM = 'T',
       ID_CRT_OPE =
       (SELECT ID_CRT_OPE
          FROM T402TITU_PRM B
         WHERE A.CD_EMP = B.CD_EMP
           AND A.CD_UND = B.CD_UND
           AND A.CD_CLI = B.CD_CLI
           AND A.SG_MOD = B.SG_MOD
           AND A.NR_CTR = B.NR_CTR
           AND A.NR_ADL = B.NR_ADL
           AND A.NR_NOS_NR = B.NR_NOS_NR),
       ID_DD_A30 =
       (SELECT ID_DD_A30
          FROM T402TITU_PRM B
         WHERE A.CD_EMP = B.CD_EMP
           AND A.CD_UND = B.CD_UND
           AND A.CD_CLI = B.CD_CLI
           AND A.SG_MOD = B.SG_MOD
           AND A.NR_CTR = B.NR_CTR
           AND A.NR_ADL = B.NR_ADL
           AND A.NR_NOS_NR = B.NR_NOS_NR),
       TX_PRM_A30 =
       (SELECT TX_PRM_A30
          FROM T402TITU_PRM B
         WHERE A.CD_EMP = B.CD_EMP
           AND A.CD_UND = B.CD_UND
           AND A.CD_CLI = B.CD_CLI
           AND A.SG_MOD = B.SG_MOD
           AND A.NR_CTR = B.NR_CTR
           AND A.NR_ADL = B.NR_ADL
           AND A.NR_NOS_NR = B.NR_NOS_NR),
       SG_ID_A30 =
       (SELECT SG_ID_A30
          FROM T402TITU_PRM B
         WHERE A.CD_EMP = B.CD_EMP
           AND A.CD_UND = B.CD_UND
           AND A.CD_CLI = B.CD_CLI
           AND A.SG_MOD = B.SG_MOD
           AND A.NR_CTR = B.NR_CTR
           AND A.NR_ADL = B.NR_ADL
           AND A.NR_NOS_NR = B.NR_NOS_NR),
       ID_FMA_A30 =
       (SELECT ID_FMA_A30
          FROM T402TITU_PRM B
         WHERE A.CD_EMP = B.CD_EMP
           AND A.CD_UND = B.CD_UND
           AND A.CD_CLI = B.CD_CLI
           AND A.SG_MOD = B.SG_MOD
           AND A.NR_CTR = B.NR_CTR
           AND A.NR_ADL = B.NR_ADL
           AND A.NR_NOS_NR = B.NR_NOS_NR),
       ID_DD_M30 =
       (SELECT ID_DD_M30
          FROM T402TITU_PRM B
         WHERE A.CD_EMP = B.CD_EMP
           AND A.CD_UND = B.CD_UND
           AND A.CD_CLI = B.CD_CLI
           AND A.SG_MOD = B.SG_MOD
           AND A.NR_CTR = B.NR_CTR
           AND A.NR_ADL = B.NR_ADL
           AND A.NR_NOS_NR = B.NR_NOS_NR),
       TX_PRM_M30 =
       (SELECT TX_PRM_M30
          FROM T402TITU_PRM B
         WHERE A.CD_EMP = B.CD_EMP
           AND A.CD_UND = B.CD_UND
           AND A.CD_CLI = B.CD_CLI
           AND A.SG_MOD = B.SG_MOD
           AND A.NR_CTR = B.NR_CTR
           AND A.NR_ADL = B.NR_ADL
           AND A.NR_NOS_NR = B.NR_NOS_NR),
       SG_ID_M30 =
       (SELECT SG_ID_M30
          FROM T402TITU_PRM B
         WHERE A.CD_EMP = B.CD_EMP
           AND A.CD_UND = B.CD_UND
           AND A.CD_CLI = B.CD_CLI
           AND A.SG_MOD = B.SG_MOD
           AND A.NR_CTR = B.NR_CTR
           AND A.NR_ADL = B.NR_ADL
           AND A.NR_NOS_NR = B.NR_NOS_NR),
       ID_FMA_M30 =
       (SELECT ID_FMA_M30
          FROM T402TITU_PRM B
         WHERE A.CD_EMP = B.CD_EMP
           AND A.CD_UND = B.CD_UND
           AND A.CD_CLI = B.CD_CLI
           AND A.SG_MOD = B.SG_MOD
           AND A.NR_CTR = B.NR_CTR
           AND A.NR_ADL = B.NR_ADL
           AND A.NR_NOS_NR = B.NR_NOS_NR)
 WHERE A.id_sit_lqd in ('PA', 'PP')
   and A.id_crt_prm = 'C'
   AND EXISTS (SELECT 1
          FROM T402TITU_PRM C
         WHERE A.CD_EMP = C.CD_EMP
           AND A.CD_UND = C.CD_UND
           AND A.CD_CLI = C.CD_CLI
           AND A.SG_MOD = C.SG_MOD
           AND A.NR_CTR = C.NR_CTR
           AND A.NR_ADL = C.NR_ADL
           AND A.NR_NOS_NR = C.NR_NOS_NR);
Commit;	   
		   
UPDATE T402TIAB A
   SET A.ID_CRT_PRM = 'T'
 WHERE EXISTS (SELECT 1
          FROM T402TITU_PRM C
         WHERE A.CD_EMP = C.CD_EMP
           AND A.CD_UND = C.CD_UND
           AND A.CD_CLI = C.CD_CLI
           AND A.SG_MOD = C.SG_MOD
           AND A.NR_CTR = C.NR_CTR
           AND A.NR_ADL = C.NR_ADL
           AND A.NR_NOS_NR = C.NR_NOS_NR);
Commit;	
		   
/************************************************************************************/
CREATE TABLE T402ENTX_RES4558
AS
SELECT * FROM T402ENTX;
Expand
titleBanco SQLServer
Code Block
languagesql
/************************************************************************************/ SELECT A.CD_EMP, A.CD_UND, A.CD_CLI, A.NR_CTR, A.NR_ADL, A.SG_MOD, A.NR_NOS_NR, C.ID_CRT_OPE, C.ID_FMA_A30, C.ID_DD_A30, C.TX_PRM_A30, C.SG_MON_A30, C.SG_MON_M30, C.ID_FMA_M30, C.ID_DD_M30, C.TX_PRM_M30, C.TX_SPR_OPE INTO T402TITU_PRM FROM T402TITU A, T402MODA B, T402ENTX C WHERE A.SG_MOD = B.SG_MOD AND A.SG_LIN_OPE = B.SG_LIN_OPE AND B.SG_ECG = C.SG_ECG AND A.id_sit_lqd in ('PA', 'PP') and A.id_crt_prm = 'C' AND A.DT_EMS <= '20170831' UPDATE T402TITU SET ID_CRT_PRM = 'T', ID_CRT_OPE = (SELECT ID_CRT_OPE FROM T402TITU_PRM B WHERE T402TITU.CD_EMP =

create table t402titu_prm

as
select t.cd_emp,
t.cd_und,
t.cd_cli,
t.nr_ctr,
t.nr_adl,
t.sg_mod,
t.nr_nos_nr,
e.sg_ecg,
e.id_crt_ope,
e.id_fma_a30,
e.id_dd_a30,
e.tx_prm_a30,
e.sg_mon_a30,
e.sg_mon_m30,
e.id_fma_m30,
e.id_dd_m30,
e.tx_prm_m30,
e.tx_spr_ope,
e.id_fma_spr,
e.id_bas_spr,
e.pc_mlt,
e.qt_dd_mlt,
e.id_clc_mlt
from t402titu t, t402cofi c, t402entx e
where t.cd_und = c.cd_und
and t.cd_cli = c.cd_cli
and c.sg_ecg = e.sg_ecg
and c.sg_ecg is not null
and t.sg_lin_ope not in ('COB', 'CAU', 'VIN')
and t.id_sit_lqd in ('PA', 'PP')
and t.id_crt_prm = 'C'
and t.dt_ems <= to_date('31-08-2017', 'dd-mm-yyyy')
and e.dt_ini_vld =
(select max(dt_ini_vld) from t402entx c1 where e.sg_ecg = c1.sg_ecg)
union
select t.cd_emp,
t.cd_und,
t.cd_cli,
t.nr_ctr,
t.nr_adl,
t.sg_mod,
t.nr_nos_nr,
e.sg_ecg,
e.id_crt_ope,
e.id_fma_a30,
e.id_dd_a30,
e.tx_prm_a30,
e.sg_mon_a30,
e.sg_mon_m30,
e.id_fma_m30,
e.id_dd_m30,
e.tx_prm_m30,
e.tx_spr_ope,
e.id_fma_spr,
e.id_bas_spr,
e.pc_mlt,
e.qt_dd_mlt,
e.id_clc_mlt
from t402titu t, t402moda m, t402entx e
where t.sg_mod = m.sg_mod
and e.sg_ecg = m.sg_ecg
and m.sg_ecg is not null
and t.sg_lin_ope not in ('COB', 'CAU', 'VIN')
and t.id_sit_lqd in ('PA', 'PP')
and t.id_crt_prm = 'C'
and t.dt_ems <= to_date('31-08-2017', 'dd-mm-yyyy')
and e.dt_ini_vld =
(select max(dt_ini_vld) from t402entx c1 where e.sg_ecg = c1.sg_ecg)
and not exists (select 1
from t402cofi cofi
where cofi.cd_und = t.cd_und and
cofi.cd_cli = t.cd_cli and
cofi.sg_ecg is not null );

ALTER TABLE t402titu_prm
ADD CONSTRAINT t402titu_prm PRIMARY KEY (cd_emp,cd_und, cd_cli, sg_mod, nr_ctr, nr_adl, nr_nos_nr );

update t402titu a
set id_crt_prm = 'T',
id_crt_ope =
(select b.id_crt_ope
from t402titu_prm b
where a.cd_emp = b.cd_emp
and a.cd_und = b.cd_und
and a.cd_cli = b.cd_cli
and a.sg_mod = b.sg_mod
and a.nr_ctr = b.nr_ctr
and a.nr_adl = b.nr_adl
and a.nr_nos_nr = b.nr_nos_nr),
id_dd_a30 =
(select b.id_dd_a30
from t402titu_prm b
where a.cd_emp = b.cd_emp
and a.cd_und = b.cd_und
and a.cd_cli = b.cd_cli
and a.sg_mod = b.sg_mod
and a.nr_ctr = b.nr_ctr
and a.nr_adl = b.nr_adl
and a.nr_nos_nr = b.nr_nos_nr),
tx_prm_a30 =
(select b.tx_prm_a30
from t402titu_prm b
where a.cd_emp = b.cd_emp
and a.cd_und = b.cd_und
and a.cd_cli = b.cd_cli
and a.sg_mod = b.sg_mod
and a.nr_ctr = b.nr_ctr
and a.nr_adl = b.nr_adl
and a.nr_nos_nr = b.nr_nos_nr),
sg_id_a30 =
(select b.sg_mon_a30
from t402titu_prm b
where a.cd_emp = b.cd_emp
and a.cd_und = b.cd_und
and a.cd_cli = b.cd_cli
and a.sg_mod = b.sg_mod
and a.nr_ctr = b.nr_ctr
and a.nr_adl = b.nr_adl
and a.nr_nos_nr = b.nr_nos_nr),
id_fma_a30 =
(select b.id_fma_a30
from t402titu_prm b
where a.cd_emp = b.cd_emp
and a.cd_und = b.cd_und
and a.cd_cli = b.cd_cli
and a.sg_mod = b.sg_mod
and a.nr_ctr = b.nr_ctr
and a.nr_adl = b.nr_adl
and a.nr_nos_nr = b.nr_nos_nr),
id_dd_m30 =
(select b.id_dd_m30
from t402titu_prm b
where a.cd_emp = b.cd_emp
and a.cd_und = b.cd_und
and a.cd_cli = b.cd_cli
and a.sg_mod = b.sg_mod
and a.nr_ctr = b.nr_ctr
and a.nr_adl = b.nr_adl
and a.nr_nos_nr = b.nr_nos_nr),
tx_prm_m30 =
(select b.tx_prm_m30
from t402titu_prm b
where a.cd_emp = b.cd_emp
and a.cd_und = b.cd_und
and a.cd_cli = b.cd_cli
and a.sg_mod = b.sg_mod
and a.nr_ctr = b.nr_ctr
and a.nr_adl = b.nr_adl
and a.nr_nos_nr = b.nr_nos_nr),
sg_id_m30 =
(select b.sg_mon_m30
from t402titu_prm b
where a.cd_emp = b.cd_emp
and a.cd_und = b.cd_und
and a.cd_cli = b.cd_cli
and a.sg_mod = b.sg_mod
and a.nr_ctr = b.nr_ctr
and a.nr_adl = b.nr_adl
and a.nr_nos_nr = b.nr_nos_nr),
id_fma_m30 =
(select b.id_fma_m30
from t402titu_prm b
where a.cd_emp = b.cd_emp
and a.cd_und = b.cd_und
and a.cd_cli = b.cd_cli
and a.sg_mod = b.sg_mod
and a.nr_ctr = b.nr_ctr
and a.nr_adl = b.nr_adl
and a.nr_nos_nr = b.nr_nos_nr),
vr_tx_spr =
(select b.tx_spr_ope
from t402titu_prm b
where a.cd_emp = b.cd_emp
and a.cd_und = b.cd_und
and a.cd_cli = b.cd_cli
and a.sg_mod = b.sg_mod
and a.nr_ctr = b.nr_ctr
and a.nr_adl = b.nr_adl
and a.nr_nos_nr = b.nr_nos_nr),
id_fma_spr =
(select b.id_fma_spr
from t402titu_prm b
where a.cd_emp = b.cd_emp
and a.cd_und = b.cd_und
and a.cd_cli = b.cd_cli
and a.sg_mod = b.sg_mod
and a.nr_ctr = b.nr_ctr
and a.nr_adl = b.nr_adl
and a.nr_nos_nr = b.nr_nos_nr),
id_bas_spr =
(select b.id_bas_spr
from t402titu_prm b
where a.cd_emp = b.cd_emp
and a.cd_und = b.cd_und
and a.cd_cli = b.cd_cli
and a.sg_mod = b.sg_mod
and a.nr_ctr = b.nr_ctr
and a.nr_adl = b.nr_adl
and a.nr_nos_nr = b.nr_nos_nr),
pc_mlt =
(select b.pc_mlt
from t402titu_prm b
where a.cd_emp = b.cd_emp
and a.cd_und = b.cd_und
and a.cd_cli = b.cd_cli
and a.sg_mod = b.sg_mod
and a.nr_ctr = b.nr_ctr
and a.nr_adl = b.nr_adl
and a.nr_nos_nr = b.nr_nos_nr),
qt_dd_mlt =
(select b.qt_dd_mlt
from t402titu_prm b
where a.cd_emp = b.cd_emp
and a.cd_und = b.cd_und
and a.cd_cli = b.cd_cli
and a.sg_mod = b.sg_mod
and a.nr_ctr = b.nr_ctr
and a.nr_adl = b.nr_adl
and a.nr_nos_nr = b.nr_nos_nr
and a.pc_mlt is not null),
id_clc_mlt =
(select b.id_clc_mlt
from t402titu_prm b
where a.cd_emp = b.cd_emp
and a.cd_und = b.cd_und
and a.cd_cli = b.cd_cli
and a.sg_mod = b.sg_mod
and a.nr_ctr = b.nr_ctr
and a.nr_adl = b.nr_adl
and a.nr_nos_nr = b.nr_nos_nr),
id_crt_mlt = 'T'
where a.id_sit_lqd in ('PA', 'PP')
and a.id_crt_prm = 'C'
and exists (select 1
from t402titu_prm c
where a.cd_emp = c.cd_emp
and a.cd_und = c.cd_und
and a.cd_cli = c.cd_cli
and a.sg_mod = c.sg_mod
and a.nr_ctr = c.nr_ctr
and a.nr_adl = c.nr_adl
and a.nr_nos_nr = c.nr_nos_nr);
commit;


update t402tiab a
set id_crt_prm = 'T',
id_crt_mlt = 'T',
pc_mlt =
(select b.pc_mlt
from t402titu_prm b
where a.cd_emp = b.cd_emp
and a.cd_und = b.cd_und
and a.cd_cli = b.cd_cli
and a.sg_mod = b.sg_mod
and a.nr_ctr = b.nr_ctr
and a.nr_adl = b.nr_adl
and a.nr_nos_nr = b.nr_nos_nr),
qt_dd_mlt =
(select b.qt_dd_mlt
from t402titu_prm b
where a.cd_emp = b.cd_emp
and a.cd_und = b.cd_und
and a.cd_cli = b.cd_cli
and a.sg_mod = b.sg_mod
and a.nr_ctr = b.nr_ctr
and a.nr_adl = b.nr_adl
and a.nr_nos_nr = b.nr_nos_nr)
where exists (select 1
from t402titu_prm c
where a.cd_emp = c.cd_emp
and a.cd_und = c.cd_und
and a.cd_cli = c.cd_cli
and a.sg_mod = c.sg_mod
and a.nr_ctr = c.nr_ctr
and a.nr_adl = c.nr_adl
and a.nr_nos_nr = c.nr_nos_nr);

commit;

/************************************************************************************/

create table t402entx_res4558
as
select * from t402entx;


Expand
titleBanco SQLServer
Code Block
languagesql
/*Create table temporária*/
CREATE TABLE t402titu_prm (
  cd_emp                 int                   not null,
  cd_und                 int                   not null,
  cd_cli                 int                   not null,
  nr_ctr                 numeric(10)           not null,
  nr_adl                 int                   not null,
  sg_mod                 char(8)               not null,
  nr_nos_nr              numeric(12)           not null,
  sg_ecg                 char(10)              not null,
  id_crt_ope             char(1)               null    ,
  id_fma_a30             char(1)               null    ,
  id_dd_a30              char(1)               null    ,
  tx_prm_a30             numeric(14,7)         null    ,
  sg_mon_a30             char(10)              null    ,
  sg_mon_m30             char(10)              null    ,
  id_fma_m30             char(1)               null    ,
  id_dd_m30              char(1)               null    ,
  tx_prm_m30             numeric(14,7)         null    ,
  tx_spr_ope             numeric(14,7)         null    ,
  id_fma_spr         char(1)           null    ,
  id_bas_spr         char(1)           null    ,
  pc_mlt                 numeric(5,2)          null    ,
  qt_dd_mlt              int                   null    ,
  id_clc_mlt             char(1)               null  )
GO
/*Insere dados na temporário*/
INSERT INTO t402titu_prm
  select t.cd_emp,
       t.cd_und,
       t.cd_cli,
       t.nr_ctr,
       t.nr_adl,
       t.sg_mod,
       t.nr_nos_nr,           
       e.sg_ecg,
       e.id_crt_ope,
       e.id_fma_a30,
       e.id_dd_a30,
       e.tx_prm_a30,
       e.sg_mon_a30,
       e.sg_mon_m30,
       e.id_fma_m30,
       e.id_dd_m30,
       e.tx_prm_m30,
       e.tx_spr_ope,
       e.id_fma_spr,
       e.id_bas_spr,
       e.pc_mlt,
       e.qt_dd_mlt,
       e.id_clc_mlt
  from t402titu t, t402cofi c, t402entx e
 where t.cd_und = c.cd_und
   and t.cd_cli = c.cd_cli
   and c.sg_ecg = e.sg_ecg
   and c.sg_ecg is not null
   and t.sg_lin_ope  not in ('COB', 'CAU', 'VIN')
   and t.id_sit_lqd in ('PA', 'PP')
   and t.id_crt_prm = 'C'
   and t.dt_ems <= '20170831'
   and e.dt_ini_vld =
       (select max(dt_ini_vld) from t402entx c1 where e.sg_ecg = c1.sg_ecg)
union
select t.cd_emp,
       t.cd_und,
       t.cd_cli,
       t.nr_ctr,
       t.nr_adl,
       t.sg_mod,
       t.nr_nos_nr,
       e.sg_ecg,
       e.id_crt_ope,
       e.id_fma_a30,
       e.id_dd_a30,
       e.tx_prm_a30,
       e.sg_mon_a30,
       e.sg_mon_m30,
       e.id_fma_m30,
       e.id_dd_m30,
       e.tx_prm_m30,
       e.tx_spr_ope,
       e.id_fma_spr,
       e.id_bas_spr,
       e.pc_mlt,
       e.qt_dd_mlt,
       e.id_clc_mlt
  from t402titu t, t402moda m, t402entx e
 where t.sg_mod = m.sg_mod
   and e.sg_ecg = m.sg_ecg
   and m.sg_ecg is not null
   and t.sg_lin_ope  not in ('COB', 'CAU', 'VIN')
   and t.id_sit_lqd in ('PA', 'PP')
   and t.id_crt_prm = 'C'
   and t.dt_ems <= '20170831'
   and e.dt_ini_vld =
       (select max(dt_ini_vld) from t402entx c1 where e.sg_ecg = c1.sg_ecg)
   and not exists (select 1
                   from t402cofi cofi
                   where cofi.cd_und = t.cd_und and
                         cofi.cd_cli = t.cd_cli and
                         cofi.sg_ecg is not null )
/*Ajusta registro nos títulos */
update t402titu
   set id_crt_prm = 'T',
       id_crt_ope =
       (select b.id_crt_ope
          from t402titu_prm b
         where t402titu.cd_emp = b.cd_emp
           and t402titu.cd_und = b.cd_und
           and t402titu.cd_cli = b.cd_cli
           and t402titu.sg_mod = b.sg_mod
           and t402titu.nr_ctr = b.nr_ctr
           and t402titu.nr_adl = b.nr_adl
           and t402titu.nr_nos_nr = b.nr_nos_nr),
       id_dd_a30 =
       (select b.id_dd_a30
          from t402titu_prm b
         where t402titu.cd_emp = b.cd_emp
           and t402titu.cd_und = b.cd_und
           and t402titu.cd_cli = b.cd_cli
           and t402titu.sg_mod = b.sg_mod
           and t402titu.nr_ctr = b.nr_ctr
           and t402titu.nr_adl = b.nr_adl
           and t402titu.nr_nos_nr = b.nr_nos_nr),
       tx_prm_a30 =
       (select b.tx_prm_a30
          from t402titu_prm b
         where t402titu.cd_emp = b.cd_emp
           and t402titu.cd_und = b.cd_und
           and t402titu.cd_cli = b.cd_cli
           and t402titu.sg_mod = b.sg_mod
           and t402titu.nr_ctr = b.nr_ctr
           and t402titu.nr_adl = b.nr_adl
           and t402titu.nr_nos_nr = b.nr_nos_nr),
       sg_id_a30 =
       (select b.sg_mon_a30
          from t402titu_prm b
         where t402titu.cd_emp = b.cd_emp
           and t402titu.cd_und = b.cd_und
           and t402titu.cd_cli = b.cd_cli
           and t402titu.sg_mod = b.sg_mod
           and t402titu.nr_ctr = b.nr_ctr
           and t402titu.nr_adl = b.nr_adl
           and t402titu.nr_nos_nr = b.nr_nos_nr),
       id_fma_a30 =
       (select b.id_fma_a30
          from t402titu_prm b
         where t402titu.cd_emp = b.cd_emp
           and t402titu.cd_und = b.cd_und
           and t402titu.cd_cli = b.cd_cli
           and t402titu.sg_mod = b.sg_mod
           and t402titu.nr_ctr = b.nr_ctr
           and t402titu.nr_adl = b.nr_adl
           and t402titu.nr_nos_nr = b.nr_nos_nr),
       id_dd_m30 =
       (select b.id_dd_m30
          from t402titu_prm b
         where t402titu.cd_emp = b.cd_emp
           and t402titu.cd_und = b.cd_und
           and t402titu.cd_cli = b.cd_cli
           and t402titu.sg_mod = b.sg_mod
           and t402titu.nr_ctr = b.nr_ctr
           and t402titu.nr_adl = b.nr_adl
           and t402titu.nr_nos_nr = b.nr_nos_nr),
       tx_prm_m30 =
       (select b.tx_prm_m30
          from t402titu_prm b
         where t402titu.cd_emp = b.cd_emp
           and t402titu.cd_und = b.cd_und
           and t402titu.cd_cli = b.cd_cli
           and t402titu.sg_mod = b.sg_mod
           and t402titu.nr_ctr = b.nr_ctr
           and t402titu.nr_adl = b.nr_adl
           and t402titu.nr_nos_nr = b.nr_nos_nr),
       sg_id_m30 =
       (select b.sg_mon_m30
          from t402titu_prm b
         where t402titu.cd_emp = b.cd_emp
           and t402titu.cd_und = b.cd_und
           and t402titu.cd_cli = b.cd_cli
           and t402titu.sg_mod = b.sg_mod
           and t402titu.nr_ctr = b.nr_ctr
           and t402titu.nr_adl = b.nr_adl
           and t402titu.nr_nos_nr = b.nr_nos_nr),
       id_fma_m30 =
       (select b.id_fma_m30
          from t402titu_prm b
         where t402titu.cd_emp = b.cd_emp
B.CD_EMP

           
AND
and 
T402TITU
t402titu.
CD
cd_
UND
und = 
B
b.
CD
cd_
UND
und
           
AND
and 
T402TITU
t402titu.
CD
cd_
CLI
cli = 
B
b.
CD
cd_
CLI
cli
           
AND
and 
T402TITU
t402titu.
SG
sg_
MOD
mod = 
B
b.
SG
sg_
MOD
mod
           
AND
and 
T402TITU
t402titu.
NR
nr_
CTR
ctr = 
B
b.
NR
nr_
CTR
ctr
           
AND
and 
T402TITU
t402titu.
NR
nr_
ADL
adl = 
B
b.
NR
nr_
ADL
adl
           
AND
and 
T402TITU
t402titu.
NR
nr_
NOS
nos_
NR
nr = 
B
b.
NR
nr_
NOS
nos_
NR
nr),
       
ID
vr_
DD
tx_
A30
spr =
       (
SELECT
select 
ID
b.tx_
DD
spr_
A30
ope
          
FROM
from 
T402TITU
t402titu_
PRM
prm 
B
b
         
WHERE
where 
T402TITU
t402titu.
CD
cd_
EMP
emp = 
B
b.
CD
cd_
EMP
emp
           
AND
and 
T402TITU
t402titu.
CD
cd_
UND
und = 
B
b.
CD
cd_
UND
und
           
AND
and 
T402TITU
t402titu.
CD
cd_
CLI
cli = 
B
b.
CD
cd_
CLI
cli
           
AND
and 
T402TITU
t402titu.
SG
sg_
MOD
mod = 
B
b.
SG
sg_
MOD
mod
           
AND
and 
T402TITU
t402titu.
NR
nr_
CTR
ctr = 
B
b.
NR
nr_
CTR
ctr
           
AND
and 
T402TITU
t402titu.
NR
nr_
ADL
adl = 
B
b.
NR
nr_
ADL
adl
           
AND
and 
T402TITU
t402titu.
NR
nr_
NOS
nos_
NR
nr = 
B
b.
NR
nr_
NOS
nos_
NR
nr),
       
TX
id_
PRM
fma_
A30
spr =
       (
SELECT
select 
TX
b.id_
PRM
fma_
A30
spr
          
FROM
from 
T402TITU
t402titu_
PRM
prm 
B
b
         
WHERE
where 
T402TITU
t402titu.
CD
cd_
EMP
emp = 
B
b.
CD
cd_
EMP
emp
           
AND
and 
T402TITU
t402titu.
CD
cd_
UND
und = 
B
b.
CD
cd_
UND
und
           
AND
and 
T402TITU
t402titu.
CD
cd_
CLI
cli = 
B
b.
CD
cd_
CLI
cli
           
AND
and 
T402TITU
t402titu.
SG
sg_
MOD
mod = 
B
b.
SG
sg_
MOD
mod
           
AND
and 
T402TITU
t402titu.
NR
nr_
CTR
ctr = 
B
b.
NR
nr_
CTR
ctr
           
AND
and 
T402TITU
t402titu.
NR
nr_
ADL
adl = 
B
b.
NR
nr_
ADL
adl
           
AND
and 
T402TITU
t402titu.
NR
nr_
NOS
nos_
NR
nr = 
B
b.
NR
nr_
NOS
nos_
NR
nr),
       
SG
id_
ID
bas_
A30
spr =
       (
SELECT
select 
SG
b.id_
ID
bas_
A30
spr
          
FROM
from 
T402TITU
t402titu_
PRM
prm 
B
b
         
WHERE
where 
T402TITU
t402titu.
CD
cd_
EMP
emp = 
B
b.
CD
cd_
EMP
emp
           
AND
and 
T402TITU
t402titu.
CD
cd_
UND
und = 
B
b.
CD
cd_
UND
und
           
AND
and 
T402TITU
t402titu.
CD
cd_
CLI
cli = 
B
b.
CD
cd_
CLI
cli
           
AND
and 
T402TITU
t402titu.
SG
sg_
MOD
mod = 
B
b.
SG
sg_
MOD
mod
           
AND
and 
T402TITU
t402titu.
NR
nr_
CTR
ctr = 
B
b.
NR
nr_
CTR
ctr
           
AND
and 
T402TITU
t402titu.
NR
nr_
ADL
adl = 
B
b.
NR
nr_
ADL
adl
           
AND
and 
T402TITU
t402titu.
NR
nr_
NOS
nos_
NR
nr = 
B
b.
NR
nr_
NOS
nos_
NR
nr),
       
ID_FMA_A30
pc_mlt    =
       (
SELECT
select 
ID_FMA_A30
b.pc_mlt
          
FROM
from 
T402TITU
t402titu_
PRM
prm 
B
b
         
WHERE
where 
T402TITU
t402titu.
CD
cd_
EMP
emp = 
B
b.
CD
cd_
EMP
emp
           
AND
and 
T402TITU
t402titu.
CD
cd_
UND
und = 
B
b.
CD
cd_
UND
und
           
AND
and 
T402TITU
t402titu.
CD
cd_
CLI
cli = 
B
b.
CD
cd_
CLI
cli
           
AND
and 
T402TITU
t402titu.
SG
sg_
MOD
mod = 
B
b.
SG
sg_
MOD
mod
           
AND
and 
T402TITU
t402titu.
NR
nr_
CTR
ctr = 
B
b.
NR
nr_
CTR
ctr
           
AND
and 
T402TITU
t402titu.
NR
nr_
ADL
adl = 
B
b.
NR
nr_
ADL
adl
           
AND
and 
T402TITU
t402titu.
NR
nr_
NOS
nos_
NR
nr = 
B
b.
NR
nr_
NOS
nos_
NR
nr),
       
ID
qt_
DD
dd_
M30
mlt =
       (
SELECT
select 
ID
b.qt_
DD
dd_
M30
mlt
          
FROM
from 
T402TITU
t402titu_
PRM
prm 
B
b
         
WHERE
where 
T402TITU
t402titu.
CD
cd_
EMP
emp = 
B
b.
CD
cd_
EMP
emp
           
AND
and 
T402TITU
t402titu.
CD
cd_
UND
und = 
B
b.
CD
cd_
UND
und
           
AND
and 
T402TITU
t402titu.
CD
cd_
CLI
cli = 
B
b.
CD
cd_
CLI
cli
           
AND
and 
T402TITU
t402titu.
SG
sg_
MOD
mod = 
B
b.
SG
sg_
MOD
mod
           
AND
and 
T402TITU
t402titu.
NR
nr_
CTR
ctr = 
B
b.
NR
nr_
CTR
ctr
           
AND
and 
T402TITU
t402titu.
NR
nr_
ADL
adl = 
B
b.
NR
nr_
ADL
adl
           
AND
and 
T402TITU
t402titu.
NR
nr_
NOS
nos_
NR
nr = 
B
b.
NR
nr_
NOS
nos_
NR
nr),
       
TX
id_
PRM
clc_
M30
mlt =
       (
SELECT TX_PRM_M30
select b.id_clc_mlt
          from t402titu_prm b
         where t402titu.cd_emp 
FROM
= 
T402TITU_PRM B
b.cd_emp
           
WHERE
and 
T402TITU
t402titu.
CD
cd_
EMP
und = 
B
b.
CD
cd_
EMP
und
           
AND
and 
T402TITU
t402titu.
CD
cd_
UND
cli = 
B
b.
CD
cd_
UND
cli
           
AND
and 
T402TITU
t402titu.
CD
sg_
CLI
mod = 
B
b.
CD
sg_
CLI
mod
           
AND
and 
T402TITU
t402titu.
SG
nr_
MOD
ctr = 
B
b.
SG
nr_
MOD
ctr
           
AND
and 
T402TITU
t402titu.
NR
nr_
CTR
adl = 
B
b.
NR
nr_
CTR
adl
           
AND
and 
T402TITU
t402titu.
NR
nr_nos_
ADL
nr = 
B
b.
NR_ADL
nr_nos_nr),
       id_crt_mlt = 'T'
 where 
AND T402TITU
t402titu.
NR
id_
NOS_NR = B.NR_NOS_NR),
sit_lqd in ('PA', 'PP')
   and t402titu.id_crt_prm = 'C'
   and exists (select 
SG_ID_M30 =
1
          
(SELECT
from 
SG_ID_M30
t402titu_prm c
         where t402titu.cd_emp 
FROM
= 
T402TITU_PRM B
c.cd_emp
           
WHERE
and 
T402TITU
t402titu.
CD
cd_
EMP
und = 
B
c.
CD
cd_
EMP
und
           
AND
and 
T402TITU
t402titu.
CD
cd_
UND
cli = 
B
c.
CD
cd_
UND
cli
           
AND
and 
T402TITU
t402titu.
CD
sg_
CLI
mod = 
B
c.
CD
sg_
CLI
mod
           
AND
and 
T402TITU
t402titu.
SG
nr_
MOD
ctr = 
B
c.
SG
nr_
MOD
ctr
           
AND
and 
T402TITU
t402titu.
NR
nr_
CTR
adl = 
B
c.
NR
nr_
CTR
adl
           
AND
and 
T402TITU
t402titu.
NR
nr_nos_
ADL
nr = 
B
c.
NR_ADL
nr_nos_nr)
             
update t402tiab
   
AND
set 
T402TITU.NR
id_
NOS
crt_
NR
prm = 
B.NR_NOS_NR)
'T',
       
ID
id_
FMA
crt_
M30
mlt = 'T',
       pc_mlt  =
   (
SELECT
select 
ID_FMA_M30
b.pc_mlt
          
FROM
from 
T402TITU
t402titu_
PRM
prm 
B
b
         
WHERE
where 
T402TITU
t402tiab.
CD
cd_
EMP
emp = 
B
b.
CD
cd_
EMP
emp
           
AND
and 
T402TITU
t402tiab.
CD
cd_
UND
und = 
B
b.
CD
cd_
UND
und
           
AND
and 
T402TITU
t402tiab.
CD
cd_
CLI
cli = 
B
b.
CD
cd_
CLI
cli
           
AND
and 
T402TITU
t402tiab.
SG
sg_
MOD
mod = 
B
b.
SG
sg_
MOD
mod
           
AND
and 
T402TITU
t402tiab.
NR
nr_
CTR
ctr = 
B
b.
NR
nr_
CTR
ctr
           
AND
and 
T402TITU
t402tiab.
NR
nr_
ADL
adl = 
B
b.
NR
nr_
ADL
adl
           
AND
and 
T402TITU
t402tiab.
NR
nr_
NOS
nos_
NR
nr = 
B
b.
NR
nr_
NOS
nos_
NR
nr),
        
WHERE
 
T402TITU.id
qt_
sit_lqd in ('PA', 'PP')
dd_mlt =
   (select b.qt_dd_mlt
   
and
 
T402TITU.id_crt_prm
 
=
 
'C'
   
AND
 
EXISTS (SELECT 1
from t402titu_prm b
         where t402tiab.cd_emp 
FROM
= 
T402TITU_PRM C
b.cd_emp
           
WHERE
and 
T402TITU
t402tiab.
CD
cd_
EMP
und = 
C
b.
CD
cd_
EMP
und
           
AND
and 
T402TITU
t402tiab.
CD
cd_
UND
cli = 
C
b.
CD
cd_
UND
cli
           
AND
and 
T402TITU
t402tiab.
CD
sg_
CLI
mod = 
C
b.
CD
sg_
CLI
mod
           
AND
and 
T402TITU
t402tiab.
SG
nr_
MOD
ctr = 
C
b.
SG
nr_
MOD
ctr
           
AND
and 
T402TITU
t402tiab.
NR
nr_
CTR
adl = 
C
b.
NR
nr_
CTR
adl
           
AND
and 
T402TITU
t402tiab.
NR
nr_nos_
ADL
nr = 
C
b.
NR_ADL
nr_nos_nr)
 where exists (select 1
       
AND T402TITU.NR_NOS_NR = C.NR_NOS_NR) UPDATE T402TIAB SET ID_CRT_PRM = 'T' WHERE EXISTS (SELECT 1
   from t402titu_prm c
         where t402tiab.cd_emp = c.cd_emp
           and t402tiab.cd_und 
FROM T402TITU_PRM C
= c.cd_und
           
WHERE
and 
T402TIAB
t402tiab.
CD
cd_
EMP
cli = 
C
c.
CD
cd_
EMP
cli
           
AND
and 
T402TIAB
t402tiab.
CD
sg_
UND
mod = 
C
c.
CD
sg_
UND
mod
           
AND
and 
T402TIAB
t402tiab.
CD
nr_
CLI
ctr = 
C
c.
CD
nr_
CLI
ctr
           
AND
and 
T402TIAB
t402tiab.
SG
nr_
MOD
adl = 
C
c.
SG
nr_
MOD
adl
           
AND
and 
T402TIAB
t402tiab.
NR
nr_nos_
CTR
nr = 
C
c.
NR_CTR
nr_nos_nr);
              
AND
  
T402TIAB.NR_ADL
 
=
 
C.NR_ADL

          
AND
 
T402TIAB.NR_NOS_NR
 
=
 
C.NR_NOS_NR)

/************************************************************************************/
SELECT
select * 
INTO
into 
T402TITU_PRM FROM T402ENTX
t402entx_res4558 from t402entx

Configuração do Critério de Mora:

  1. Acesse o sistema Credimaster, utilizando usuário com privilégios suficientes para execução das alterações nas configurações de Mora:
    Image Modified
  2. Defina a abrangência desejada.
    Image Modified
  3. Acesse a barra de ferramentas Documentos, selecionando a opção Operacionais ou, se preferir, clique sobre o botão  Image Modified localizado no canto direito da tela inicial do sistema Credimaster.
    Image Modified
  4. Clique sobre a aba Mora.
    Image Modified
  5. Localize o critério de mora desejado.
    Image Modified
  6. Clique sobre o botão alterar.
    Image Modified
  7. Altere a forma de cobrança dos encargos de mora “Até 30 dias” e “Mais de 30 dias”, conforme figura abaixo.
    Image Modified

8. Clique sobre o botão Salvar.

Warning

Caso a configuração de mora, apresente opção de Spread contendo a variável Segundo Critério, o usuário deverá alterá-la para variável Critério Único, redefinindo a Taxa Spread conforme as políticas da instituição de Crédito.

Image Modified

Observações: