--Script utilizado para atualização dos dados solicitados<br />
DECLARE @COL INT, @MESCOMPETENCIA DATETIME<br />
<br />
SET @COL           = 1<br />
SET @MESCOMPETENCIA='01/11/2025'<br />
<br />
---------------------------------------------------<br />
UPDATE A SET A.CODCONTA='5.1.3.01.04.0007', A.RECMODIFIEDON=GETDATE(), A.RECMODIFIEDBY='SYSTEM'<br />
FROM DITEM A, DLAF B<br />
WHERE B.CODCOLIGADA=A.CODCOLIGADA <br />
AND   B.IDLAF=A.IDLAF<br />
AND   B.TIPOLF='E'<br />
AND   B.DATALF&gt;=@MESCOMPETENCIA<br />
AND   A.CODCOLIGADA=@COL<br />
---------------------------------------------------<br />
UPDATE A SET A.ALIQTRB=1.65, A.VALORTRB=A.BASETRB*1.65 / 100.00, A.SITTRIBUTARIA='50', A.RECMODIFIEDON=GETDATE(), A.RECMODIFIEDBY='SYSTEM'<br />
FROM DTRBITEM A, DLAF B<br />
WHERE B.CODCOLIGADA=A.CODCOLIGADA <br />
AND   B.IDLAF=A.IDLAF<br />
AND   B.TIPOLF='E'<br />
AND   B.DATALF&gt;=@MESCOMPETENCIA<br />
AND   A.CODCOLIGADA=@COL<br />
AND   A.CODTRB='PIS'<br />
---------------------------------------------------<br />
UPDATE A SET A.ALIQTRB=1.65, A.VALORTRB=A.BASETRB*1.65 / 100.00, A.SITTRIBUTARIA='50', A.RECMODIFIEDON=GETDATE(), A.RECMODIFIEDBY='SYSTEM'<br />
FROM DTRBLAF A, DLAF B<br />
WHERE B.CODCOLIGADA=A.CODCOLIGADA <br />
AND   B.IDLAF=A.IDLAF<br />
AND   B.TIPOLF='E'<br />
AND   B.DATALF&gt;=@MESCOMPETENCIA<br />
AND   A.CODCOLIGADA=@COL<br />
AND   A.CODTRB='PIS'<br />
---------------------------------------------------<br />
UPDATE A SET A.ALIQTRB=7.60, A.VALORTRB=A.BASETRB*7.60 / 100.00, A.SITTRIBUTARIA='50', A.RECMODIFIEDON=GETDATE(), A.RECMODIFIEDBY='SYSTEM'<br />
FROM DTRBITEM A, DLAF B<br />
WHERE B.CODCOLIGADA=A.CODCOLIGADA <br />
AND   B.IDLAF=A.IDLAF<br />
AND   B.TIPOLF='E'<br />
AND   B.DATALF&gt;=@MESCOMPETENCIA<br />
AND   A.CODCOLIGADA=@COL<br />
AND   A.CODTRB='COFINS'<br />
---------------------------------------------------<br />
UPDATE A SET A.ALIQTRB=7.60, A.VALORTRB=A.BASETRB*7.60 / 100.00, A.SITTRIBUTARIA='50', A.RECMODIFIEDON=GETDATE(), A.RECMODIFIEDBY='SYSTEM'<br />
FROM DTRBLAF A, DLAF B<br />
WHERE B.CODCOLIGADA=A.CODCOLIGADA <br />
AND   B.IDLAF=A.IDLAF<br />
AND   B.TIPOLF='E'<br />
AND   B.DATALF&gt;=@MESCOMPETENCIA<br />
AND   A.CODCOLIGADA=@COL<br />
AND   A.CODTRB='COFINS'