NJC__Documentation::DB

dbo.vw_ms_adjustment_item

Description

Properties

Name Value
Collation SQL_Latin1_General_CP1_CI_AS
ANSI Nulls ON

True

Quoted Identifier ON

True

Encrypted

False

Schema Bound

False

Created 9/11/2017 11:00:19
Last Modified 9/11/2017 11:00:19

Columns

Key Name Description
ms_item_id
part_no
part_name
ms_item_custom_no
ms_item_base_no
uom
quantity
is_plus
is_minus
id_source_header
r_s

SQL Script

SET QUOTED_IDENTIFIER, ANSI_NULLS ON
GO
create view dbo.vw_ms_adjustment_item
---XencX---with encryption
as  
 
SELECT        
  ms_item_id
, part_no
, part_name
, ms_item_custom_no
, ms_item_base_no
, uom
, SUM(quantity_pakai) AS quantity
, case when SUM(quantity_pakai)>0 then 1 else 0 end  is_plus
, case when SUM(quantity_pakai)<0 then 1 else 0 end   is_minus
, id_source_header
, case when SUM(quantity_pakai)<0 then 0 else 1 end as r_s
FROM            vw_ms_item_in_detail
where mode_source=3
GROUP BY ms_item_id, part_no, part_name, ms_item_custom_no, ms_item_base_no, uom, id_source_header

GO