strSql.Append(",(select EnumValueName from tSysEnumValue where LangId=0 and EnumTypeID=97008 and EnumValueID=i.INVOICECATEGORY) as INVOICECATEGORYREF");
strSql.Append(",(select EnumValueName from tSysEnumValue where LangId=0 and EnumTypeID=97008 and EnumValueID=i.INVOICECATEGORY) as INVOICECATEGORYREF");
strSql.Append(",i.ADDRTEL,i.BANK,i.OP,i.OPDATE,i.INVAMOUNT,i.TAXRATE,i.TAX,i.BALBILLNO,i.YuanBiJinE,i.ISAPP,dbo.GetPayNoByInvHxNo(i.BILLNO) as PAYBILLNO,dbo.GetStlNoByInvHxNo(BILLNO) as STLBILLNO ");
strSql.Append(",i.ADDRTEL,i.BANK,i.OP,i.OPDATE,i.INVAMOUNT,i.TAXRATE,i.TAX,i.BALBILLNO,i.YuanBiJinE,i.ISAPP,dbo.GetPayNoByInvHxNo(i.BILLNO) as PAYBILLNO,dbo.GetStlNoByInvHxNo(BILLNO) as STLBILLNO ");
strSql.Append(",i.SALECORPID,(select [NAME] from [company] where GID=i.SALECORPID) as SALECORP,i.SUBMITOP");
strSql.Append(",i.SALECORPID,(select [NAME] from [company] where GID=i.SALECORPID) as SALECORP,i.SUBMITOP");
strSql.Append(",AUDITUSER,AUDITTIME,(select ShowName from [user] where GID=cm.AUDITUSER) as AUDITUSERREF");
strSql.Append(",AUDITUSER,AUDITTIME,(select ShowName from [user] where GID=i.AUDITUSER) as AUDITUSERREF");
strSql.Append(",MODIFIEDUSER,MODIFIEDTIME,(select ShowName from [user] where GID=cm.MODIFIEDUSER) as MODIFIEDUSERREF");
strSql.Append(",MODIFIEDUSER,MODIFIEDTIME,(select ShowName from [user] where GID=i.MODIFIEDUSER) as MODIFIEDUSERREF");
strSql.Append(" FROM ch_fee_invoicehexiao i left join workflow_using wu on wu.bsno=i.billno where 1=1 ");
strSql.Append(" FROM ch_fee_invoicehexiao i left join workflow_using wu on wu.bsno=i.billno where 1=1 ");