dbo.fide_detail_tango_procesar

Description

Properties

Name Value
ANSI Nulls ON

True

Quoted Identifier ON

True

Encrypted

False

Execute As
Assembly

SQL Script

Copy
SET QUOTED_IDENTIFIER, ANSI_NULLS ON
GO
-- =============================================


CREATE OR ALTER PROCEDURE dbo.fide_detail_tango_procesar

AS

BEGIN
    SET NOCOUNT ON;
 select  id_pedido_fidelitas,
   item,
   cod_producto,
   texto_factura_1,
   texto_factura_2,
   unidades,
   format(importe_unidad,'###############0.00') as importe_unidad, 
   format(importe_unidades_item,'###############0.00') as importe_unidades_item,
   format(porc_dto_item,'###############0.00') as porc_dto_item,
   format(importe_dto_item,'###############0.00') as importe_dto_item,
   format(importe_iva_item,'###############0.00') as importe_iva_item,
   format(importe_neto_item,'###############0.00') as importe_neto_item,
   format(importe_con_iva_b,'###############0.00')  as importe_con_iva_b
   from fide_detail_tango  
   where procesado = 'P' 
   order by id_pedido_fidelitas, item

 update fide_detail_tango set procesado = 'T' where procesado = 'P'
 update Facturacion_det set fac_tipo_pedido = 'T' where fac_tipo_pedido = 'P' 

END

GO

Depends On

1

Used By

No items found