dbo.gab_rpt_mutasi_aw2340

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
@jn_doc varchar 255

SQL Script

SET QUOTED_IDENTIFIER, ANSI_NULLS ON
GO


CREATE FUNCTION dbo.gab_rpt_mutasi_aw2340(
@date_start date,
@date_stop date,
@jn_doc varchar(255))

 
RETURNS TABLE  
---XencX---with encryption
AS 
RETURN (    

  select ID_HEADER
    ,isnull(upper(KODE_DOKUMEN),'-') as bc_type_name
    ,isnull(NOMOR_DAFTAR,'-') as doc_no
    ,TANGGAL_DAFTAR as doc_date
    ,isnull(receive_no,'-') as recieve_number
    ,receive_date as recieve_date
    ,isnull(NAMA_SUPPLIER,'-') as supplier_receiver_name
    ,isnull(KODE_BARANG,'-') as barang_code
    ,isnull(NAMA_BARANG,'-') as barang_name
    ,isnull(SATUAN_BARANG,'-') as doc_satuan_code
    ,isnull(cast(JUMLAH_SATUAN as decimal(24,4)),0) as doc_qty
    ,isnull(cast(AMOUNT  as decimal(24,4)),0) as total_cif
    ,null as invoice_no
    ,null as invoice_date
    ,'' as valuta_code
    ,NOMOR_AJU_6
   ,KEMASAN
   ,BRUTO,
   NETTO,
   KODE_PEL_BONGKAR, 
   BL, 
   KONTAINER ,
     NAMA_PENGANGKUT 
    from AW.DB_PASI_20201106.dbo.dv_data_pemasukan_ceisa_2340
     where  receive_date between @date_start and @date_stop
     and ((nullif(nullif(@jn_doc,''),'-')) is null or (upper(KODE_DOKUMEN)=@jn_doc and (nullif(nullif(@jn_doc,''),'-')) is not null))
)  

GO

Depends On

No items found

Used By

No items found