To create an E-way bill for Purchase Invoice, Please go to Purchases > Select the Invoice > More > Create E-way Bill.
Please enter the necessary fields information while creating the E-way bill and create E E-way bill.