CREATE PROCEDURE  spDataCaptureFactorItems @Autoid BIGINT, @UserId Smallint 
AS

Insert Into History_Detail_Factors (Id_Havaleh,AutoId,Sender,Reciver,Radif,K_Code,K_Qty1,
                                    K_Qty2,R_Unit1_2,Price_Kharid,Price_Forosh,Point_Flag,
                                    Serial_Flag,Hamrah_Flag,CtrMojodi,Exp_Flag,Make_Flag,Note,Status, UserIdForSelete, TransactionType)
SELECT Id_Havaleh,AutoId,Sender,Reciver,Radif,K_Code,K_Qty1,
                                    K_Qty2,R_Unit1_2,Price_Kharid,Price_Forosh,Point_Flag,
                                    Serial_Flag,Hamrah_Flag,CtrMojodi,Exp_Flag,Make_Flag,Note,Status, @UserId,1 FROM dbo.Havaleh WITH (NOLOCK)
WHERE AutoId = @AutoId

    


