dbo.gab_rpt_mutasi_wip_aw

Description

Properties

Name Value
ANSI Nulls ON

True

Quoted Identifier ON

True

Encrypted

False

Execute As
Null on Null Input

False

Schema Bound

False

Assembly

Parameters

Name Data Type Length Description
@date_start date 3
@date_stop date 3

SQL Script

SET QUOTED_IDENTIFIER, ANSI_NULLS ON
GO

CREATE FUNCTION dbo.gab_rpt_mutasi_wip_aw(
@date_start date
,@date_stop date  
)
 
RETURNS TABLE  
---XencX---with encryption
AS 
RETURN (    
     select kodebarang as barang_code,
    namabarang as barang_name, 
    cast(isnull(saldo_akhir,0) as decimal(24,4)) as qty ,
    (SELECT    top 1  satuan
     FROM            AW.DB_PASI_20201106.dbo.tbl_master_material_code as xx1
     WHERE        (xx1.kdbrg = x1.kodebarang)) as satuan_code
  from aw_fn_mutasi_wip_baru(@date_start,@date_stop) as x1
  union all
  select kodebarang as barang_code,
    namabarang as barang_name, 
    cast(isnull(saldo_akhir,0) as decimal(24,4)) as qty,
     (SELECT    top 1   satuan
     FROM            AW.DB_PASI_20201106.dbo.tbl_master_material_code as xx2
     WHERE        (xx2.kdbrg = x2.kodebarang)) as satuan_code 
  from aw_fn_mutasi_wip_baru_2(@date_start,@date_stop)  as x2
 
)  
GO

Used By

No items found