strSql.Append(",(select EnumValueName from tSysEnumValue where LangId=0 and EnumTypeID=97008 and EnumValueID=ch_fee_invoicehexiao.INVOICECATEGORY) as INVOICECATEGORYREF");
strSql.Append(",ADDRTEL,BANK,OP,OPDATE,INVAMOUNT,TAXRATE,TAX,BALBILLNO,ISAPP,dbo.GetPayNoByInvHxNo(BILLNO) as PAYBILLNO,dbo.GetStlNoByInvHxNo(BILLNO) as STLBILLNO,YuanBiJinE ");
strSql.Append(",SALECORPID,(select [NAME] from [company] where GID=ch_fee_invoicehexiao.SALECORPID) as SALECORP,SUBMITOP");
strSql.Append(",AUDITUSER,AUDITTIME,(select ShowName from [user] where GID=cm.AUDITUSER) as AUDITUSERREF");
strSql.Append(",MODIFIEDUSER,MODIFIEDTIME,(select ShowName from [user] where GID=cm.MODIFIEDUSER) as MODIFIEDUSERREF");
strSql.Append(" FROM ch_fee_invoicehexiao where 1=1 ");
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.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(",MODIFIEDUSER,MODIFIEDTIME,(select ShowName from [user] where GID=cm.MODIFIEDUSER) as MODIFIEDUSERREF");
strSql.Append(" FROM ch_fee_invoicehexiao i left join workflow_using wu on wu.bsno=i.billno where 1=1 ");
cmdupdate=db.GetSqlStringCommand("update ch_fee_invoicehexiao set BILLSTATUS='审核通过',SUBMITOP='"+username+"' where BILLNO=@BILLNO");
cmdupdate=db.GetSqlStringCommand("update ch_fee_invoicehexiao set BILLSTATUS='审核通过',SUBMITOP='"+username+"',AUDITUSER='" +USERID+"',AUDITTIME=GETDATE() where BILLNO=@BILLNO");
cmdupdate=db.GetSqlStringCommand("update ch_fee_invoicehexiao set BILLSTATUS='审核通过',SUBMITOP='"+username+"' where BILLNO=@BILLNO");
cmdupdate=db.GetSqlStringCommand("update ch_fee_invoicehexiao set BILLSTATUS='审核通过',SUBMITOP='"+username+"',AUDITUSER='"+USERID+"',AUDITTIME=GETDATE() where BILLNO=@BILLNO");
varcmdupdate=db.GetSqlStringCommand("update ch_fee_invoicehexiao set BILLSTATUS='审核通过' where BILLNO=@BILLNO");
varcmdupdate=db.GetSqlStringCommand("update ch_fee_invoicehexiao set BILLSTATUS='审核通过',AUDITUSER='" +USERID+"',AUDITTIME=GETDATE() where BILLNO=@BILLNO");