﻿set xact_abort on;
go

begin transaction;
go

set ANSI_NULLS on;
go

/*************************************
* STORED PROCEDURE sp_schedaIdent
*       restituisce i dati x stampare 1 scheda di identificazione
*
* modif.:       S.E.L.
* il:           2012.02.13
**************************************/
alter PROCEDURE sp_schedaIdent
(
       @IdxObj VARCHAR(50)
)
AS

SELECT	Cod AS IdxObj, CodCliente, Cliente, DDT, DataDDT AS DDT_del, DataArrivo, descrizione AS CodProdotto, DataPrevista AS ConsegnaPrevista, Peso, Qta,
		CASE CodCli WHEN 'Fosf' THEN 'X' ELSE ' ' END AS FosfManganese, CASE CodCli WHEN 'Brun' THEN 'X' ELSE ' ' END AS Brunitura, 
		CASE CodCli WHEN 'Fosf_Tefl' THEN 'X' ELSE ' ' END AS FosfTeflon, CASE CodCli WHEN 'Sabb' THEN 'X' ELSE ' ' END AS Sabbiatura, ' ' AS F1, ' ' AS F2, 
        ' ' AS FosfZinco, ' ' AS Teflon, ' ' AS FosfPreVern, ' ' AS PzRoto, ' ' AS Zinchlorex, ' ' AS PeekVicote, CodCli
FROM    v_ULP
WHERE   (Cod = @IdxObj)

RETURN
go

commit;
go



















-- registro versione...
INSERT INTO [dbo].[LogUpdateDb] ([Versione],[Data]) VALUES(151, GETDATE())
GO
