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_aw2wh(
@date_start date,
@date_stop date,
@jn_doc varchar(255))
RETURNS TABLE
---XencX---with encryption
AS
RETURN (
select upper(type_bc) as bc_type_name
,no_daftar as doc_no
,cast(tgl_nodaf as date) as doc_date
,no_out as surat_jalan_no
,cast(tgl_out as date) as surat_jalan_date
,pembeli as supplier_receiver_name
,kode_brg as barang_code
,nama_brg as barang_name
,satuan as satuan_code
,jumlah as doc_qty
,nilai_barang as total
, '' valuta_code
from AW.DB_PASI_20201106.dbo.tbl_outgoing_item as x
where (upper( x.pembeli)='PT EDS MANUFACTURING INDONESIA' or upper( x.pembeli)='PEMI-WH' )
and tgl_out between @date_start and @date_stop
and ((nullif(nullif(@jn_doc,''),'-')) is null or (upper(type_bc)=@jn_doc and (nullif(nullif(@jn_doc,''),'-')) is not null))
)
GO
GO
CREATE FUNCTION dbo.gab_rpt_mutasi_aw2wh(
@date_start date,
@date_stop date,
@jn_doc varchar(255))
RETURNS TABLE
---XencX---with encryption
AS
RETURN (
select upper(type_bc) as bc_type_name
,no_daftar as doc_no
,cast(tgl_nodaf as date) as doc_date
,no_out as surat_jalan_no
,cast(tgl_out as date) as surat_jalan_date
,pembeli as supplier_receiver_name
,kode_brg as barang_code
,nama_brg as barang_name
,satuan as satuan_code
,jumlah as doc_qty
,nilai_barang as total
, '' valuta_code
from AW.DB_PASI_20201106.dbo.tbl_outgoing_item as x
where (upper( x.pembeli)='PT EDS MANUFACTURING INDONESIA' or upper( x.pembeli)='PEMI-WH' )
and tgl_out between @date_start and @date_stop
and ((nullif(nullif(@jn_doc,''),'-')) is null or (upper(type_bc)=@jn_doc and (nullif(nullif(@jn_doc,''),'-')) is not null))
)
GO
Depends On
No items found
Used By
No items found