drop procedure IF EXISTS register_sale_file;
DELIMITER $$
CREATE  PROCEDURE `register_sale_file`(in invoice_idP varchar(15),in file_nameP varchar(300))
begin 
insert into tec_sales_files(sale_id,file_name)values((select id from tec_sales where invoice_id=invoice_idP),file_nameP);
end$$
DELIMITER ;
