ALTER PROCEDURE OP_GrabarTmp_Op_BonusProc    
(@CORRNBR   int,    
 @custidss  UD_CODCLIENT,    
 @NBRBONUS  numeric(10),    
 @DOCTYPEID  char(10),     
 @DOCUMENTO  numeric(10),    
 @MONTOVALE  decimal(10,2),
 @PLACA		char(10),	    
 @NOMCONDUCTOR  char(80))     
as    
BEGIN    
    
   DECLARE @SITEID UD_IDSITE       
    
   SELECT @SITEID=SOURCESITE FROM SETUP       
    
   BEGIN TRAN    
        
   INSERT INTO TMP_OP_BONUS(CORRNBR,custidss,SITEID,NBRBONUS,MONTOBONUS,stkmodify,stknew,stksend,stkdelete,stkreceive,PLACA,NOMCONDUCTOR)              
               VALUES (@CORRNBR,@custidss,@SITEID,@NBRBONUS,@MONTOVALE,0,0,0,0,0,@PLACA,@NOMCONDUCTOR)     
        
   IF (@@error!=0 or @@rowcount=0)                    
      BEGIN    
         RAISERROR  20000 'No se pudo registrar Vale'     
         ROLLBACK TRAN    
         RETURN(1)        
      END      
   COMMIT TRAN              

END 