Improving query to generate a million empty rows
To generate the 1 million rows for @tempT you could use a cartesian product of the master..spt_values table, like such:

declare @tempT table (number int)

declare @maxno int
select  @maxno = 1000000

insert into @tempT
select top(@maxno) row_number() over(order by v1.number)
from   master..spt_values v1,
       master..spt_values v2

select min(number),max(number),count(*) from @tempT

(No column name) (No column name) (No column name)
---------------- ---------------- ----------------
               1          1000000          1000000


Takes about 2 seconds to run this dbfiddle

NOTE: master..spt_values should have at least a few thousand records so a 2-way cartesian product should be sufficient to generate 1 million rows; if you need to go a lot higher you could provide an additional ,master..sp_values v3.

You could likely push this cartesian product into your insert receptdata / select query thus eliminating the requirement for the @tempT table variable, ymmv ...



The next (much bigger) performance issue is likely the 1 million not exists() operations.

Without knowing a bit more about the relationship between @recId and receiptdata.ffid it's kinda hard to address this query, eg, do you really need to test all 1 million @tempT rows against receiptdata?

Also, do you have an index on receiptdata the optimizer can use for the not exists() operations?