USE [Database]

IF OBJECT_ID('[Procedures].[update_product_outflow_record]', 'P') IS NOT NULL
  DROP PROCEDURE [Procedures].[update_product_outflow_record];
GO
CREATE PROCEDURE [Procedures].[update_product_outflow_record]
  @product_outflow_record_id         AS INT,
  @barcode_product_value_record_id AS INT,
  @count                             AS INT,
  @datetime                          AS INT,
  @inserted_product_outflow_records  AS INT = NULL OUTPUT            
AS
  UPDATE [Tables].[product_outflow_records]
  SET
    [barcode_product_value_id] = @barcode_product_value_record_id,
	[count] = @count,                            
	[datetime] = @datetime
  WHERE [id] = @product_outflow_record_id;
GO