Custom Stock Movement

 Hi Everyone,


Hope all you are doing good.


I'm trying to create stock movement custom script with some specific column but i get with the "sales" column, please help me out from this.


Here are the some column which i want


    'SKU',
    'ItemTitle',
    'TotalStockCost',

    'sales',

    'Closing Level',
    'Closing StockValue',
    'Date'


please find the script which i have created


SELECT
    Distinct ISNULL(si.ItemNumber, oi.ChannelSKU)  AS 'SKU',
    ISNULL(si.ItemTitle, sis.cItemName)  AS 'ItemTitle',
    oi.DispatchStockUnitCost AS 'TotalStockCost',
    sc.StockNow AS 'Closing Level',
    sc.StockValue AS 'Closing StockValue',
    sc.StockChangeDateTime AS 'Date'
        FROM
 [StockItem]  si
LEFT JOIN [StockChange] sc ON si.pkStockItemId = sc.fkStockItemId
LEFT JOIN [OrderItem] AS oi WITH (NOLOCK) ON si.pkStockItemId = oi.fkStockItemId
LEFT JOIN [StockItems] AS sis WITH (NOLOCK) ON sis.pkStockId = oi.fkStockId
where
 (sc.StockChangeDateTime BETWEEN DATEADD(y, -1, GetDate()) and GetDate())


Here in this script "sales" Column is missing, so please some inform me how could i get this.

Thanks in advance

Hi,


When you say 'sales' do you mean sale price or qty?


Hi,


Thanks for your response,


It's about sales qty


Thanks

Gaurav kakkar


Login to post a comment