ALTER TABLE TercCliePrestamo ADD IncRetFte BIT NOT NULL DEFAULT(0)
GO
ALTER TABLE tm_PresPagos ADD tmTarifSeguro DECIMAL(14,4) NOT NULL DEFAULT(0)
,tmVrSeguro DECIMAL(14,4) NOT NULL DEFAULT(0)
GO
ALTER TABLE Trn_FinPagos ADD TarifSeguro DECIMAL(14,4) NOT NULL DEFAULT(0)
,TotalSeguro DECIMAL(14,4) NOT NULL DEFAULT(0)
GO
ALTER TABLE Trn_FinPrestSeguro ADD CdTarSeguro VARCHAR(4)
GO
ALTER TABLE TercClieLineas ADD CdTarifSeguro VARCHAR(4)
GO
CREATE TABLE LineasCredCue ( 
IdLinea VARCHAR(4) NOT NULL,
IdTipoTerc VARCHAR(4) NOT NULL,
Concepto VARCHAR(10) NOT NULL,
IdCuentaDb VARCHAR(16) NOT NULL,
IdCuentaCr VARCHAR(16) NOT NULL
 CONSTRAINT PK_LineasCredCue PRIMARY KEY CLUSTERED (IdLinea,IdTipoTerc,Concepto),
 CONSTRAINT CK_LineasCredCueConcepto CHECK ((len([Concepto])>(0))),
 CONSTRAINT CK_LineasCredCueIdCuentaCr CHECK ((len([IdCuentaCr])>(0))),
 CONSTRAINT CK_LineasCredCueIdCuentaDb CHECK ((len([IdCuentaDb])>(0))),
 CONSTRAINT CK_LineasCredCueIdLinea CHECK ((len([IdLinea])>(0))),
 CONSTRAINT CK_LineasCredCueIdTipoTerc CHECK ((len([IdTipoTerc])>(0))))
GO
ALTER TABLE LineasCredCue ADD 
 CONSTRAINT FK_LineasCredCue_LineasCred FOREIGN KEY (IdLinea) REFERENCES [dbo].[LineasCred] (IdLinea),
 CONSTRAINT FK_LineasCredCue_TiposTerc FOREIGN KEY (IdTipoTerc) REFERENCES [dbo].[TiposTerc] (IdTipoTerc)
