select t1.tcustomer_receptid as forderno,t2.fstorename,t1.fwaiter,t1.fdate,t1.createdate,
t1.fcommunity,t1.fname,t1.fphonenumber,t1.forderamount,fdepositamount,
freceivablesamount,freceivedamount,t1.fstatus,freturnamount,fchannel from tcustomer_reception t1
left join tstore t2 on t1.siteid=t2.siteid and t1.tagentsid=t2.tagentsid and t1.tstoreid=t2.tstoreid
where t1.ftype='ÏúÊÛ' and t1.siteid=$siteid$ and t1.tagentsid=$tagentsid$ and
convert(varchar(7),t1.fdate,120)>=$fbegmonth$ and convert(varchar(7),t1.fdate,120)<=$fendmonth$