USE [IndInsurance]
GO
/****** Object:  StoredProcedure [dbo].[proc_text_info_saldo_web]    Script Date: 11/05/2012 23:03:02 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE procedure [dbo].[proc_text_info_saldo_web]
@pi_no_polis varchar(12),
@pi_tanggal datetime
AS
--DECLARE @Image nVarchar(4000)
DECLARE @po_tgl_nav datetime
DECLARE @po_nilai_nav float
DECLARE @out_tgl_nav datetime
DECLARE @out_nilai_nav float

EXEC proc_link_get_nilai_nav_per_polis @pi_tanggal, @pi_no_polis, @po_tgl_nav = @out_tgl_nav OUTPUT, @po_nilai_nav = @out_nilai_nav OUTPUT

SELECT    
--CONVERT(varchar(100), @out_tgl_nav, 103) AS 'tgl_transaksi',
--CONVERT(varchar(100), CAST(dbo.func_link_get_saldo_akhir(@pi_no_polis,@pi_tanggal)*@out_nilai_nav AS decimal(38,3))) AS 'nominal',
--CONVERT(varchar(100), CAST(@out_nilai_nav AS decimal(38,3))) AS 'nav',
--CONVERT(varchar(100), CAST(dbo.func_link_get_saldo_akhir(@pi_no_polis,@pi_tanggal) AS decimal(38,3)))+CHAR(13)+CHAR(10) AS 'total_unit'

@out_tgl_nav AS 'tgl_transaksi',
dbo.func_link_get_saldo_akhir(@pi_no_polis,@pi_tanggal)*@out_nilai_nav AS 'nominal',
@out_nilai_nav AS 'nav',
dbo.func_link_get_saldo_akhir(@pi_no_polis,@pi_tanggal) AS 'total_unit'