dbo.Imperium_Racalcula_Compliance_ServicioBKP

Description

Properties

Name Value
ANSI Nulls ON

True

Quoted Identifier ON

True

Encrypted

False

Execute As
Assembly

Parameters

3
Name Data Type Length Description
@ledSeccion varchar 1
@IDContratista int 4
@periodo int 4

SQL Script

Copy
SET QUOTED_IDENTIFIER, ANSI_NULLS ON
GO

CREATE OR ALTER PROCEDURE  dbo.Imperium_Racalcula_Compliance_ServicioBKP
@ledSeccion varchar(1),
@IDContratista INT,
@periodo INT
AS

BEGIN

SET NOCOUNT ON;

DECLARE @IDCliente INT

SELECT @IDCliente = CLIENTE from led_contratistas where contratista = @IDContratista

if (@IDCliente <> 9335603)
BEGIN
 if (@ledSeccion = 'C') 
  begin
   exec Imperium_Carga_Docs_Contratista_Contratista @periodo,@IDCliente,@IDContratista
  end
 if (@ledSeccion = 'S') 
  begin
   exec Imperium_Carga_Docs_Sub_Contratista_Contratista @periodo,@IDCliente,@IDContratista
  end
 if (@ledSeccion = 'E') 
  begin
   exec Imperium_Carga_Docs_Empleados_Contratista @periodo,@IDCliente,@IDContratista,'A'
   exec Imperium_Carga_Docs_Empleados_Contratista @periodo,@IDCliente,@IDContratista,'V'
  end
 if (@ledSeccion = 'V') 
  begin
   exec Imperium_Carga_Docs_vehiculoS_Contratista @periodo,@IDCliente,@IDContratista,'A'
   exec Imperium_Carga_Docs_vehiculos_Contratista @periodo,@IDCliente,@IDContratista,'V'
  end
END


if (@IDCliente = 9335603)
BEGIN
 /*
  if (@ledSeccion = 'C') 
  begin
  exec Imperium_Carga_Docs_Contratista_Contratista @periodo,@IDCliente,@IDContratista
  end
 */

 if (@ledSeccion = 'S') 
  begin
   exec Imperium_Carga_Docs_Sub_Contratista_Contratista @periodo,@IDCliente,@IDContratista
  end
 if (@ledSeccion = 'E') 
  begin
   exec Imperium_Carga_Docs_Empleados_Contratista @periodo,@IDCliente,@IDContratista,'A'
   exec Imperium_Carga_Docs_Empleados_Contratista @periodo,@IDCliente,@IDContratista,'V'
  end
 if (@ledSeccion = 'V') 
  begin
   exec Imperium_Carga_Docs_vehiculoS_Contratista @periodo,@IDCliente,@IDContratista,'A'
   exec Imperium_Carga_Docs_vehiculos_Contratista @periodo,@IDCliente,@IDContratista,'V'
  end
END

 if (@IDCliente = 9335603) /*MASSALIN POR MULTI CATEGORIA*/
  begin
   EXEC Imperium_Multi_Compliance_Periodo_Contratista @periodo,@IDContratista,@ledSeccion
  end
 
 if (@IDCliente <> 9335603)
  BEGIN
   EXEC Imperium_Compliance_Periodo_Contratista @periodo,@IDContratista,@ledSeccion
  END

END

GO

Used By

No items found