@ -99,6 +99,9 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Payapplication
strSql . Append ( ",cm.BS_CUSTOMERNAME,0 IsAudit,PREAMOUNTRMB,PREAMOUNTUSD,PREAMOUNTOT " ) ;
strSql . Append ( ",dbo.GetStlByPayNo(cm.BILLNO) as BALBILLNO,cm.ISPRINT,cm.PRINTCOUNT,wxpush,STLRATE,STLAMOUNT,STLCURR,ISREVINV " ) ;
strSql . Append ( ",cm.SALECORPID,(select [NAME] from [company] where GID=cm.SALECORPID) as SALECORP" ) ;
strSql . Append ( ",(select DESCRIPTION from info_client where SHORTNAME=cm.CUSTOMERNAME) as CUSTOMERFULLNAME" ) ;
strSql . Append ( " FROM ch_fee_payapplication cm where 1=1 " ) ;
if ( ! string . IsNullOrEmpty ( strCondition ) )
@ -189,6 +192,8 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Payapplication
strSql . Append ( ",i.PREAMOUNTRMB,i.PREAMOUNTUSD,i.PREAMOUNTOT " ) ;
strSql . Append ( ",dbo.GetBalNoByPayNo(i.BILLNO) as BALBILLNO,i.ISPRINT,i.PRINTCOUNT,i.wxpush,i.STLRATE,i.STLAMOUNT,i.STLCURR " ) ;
strSql . Append ( ",i.SALECORPID,(select [NAME] from [company] where GID=i.SALECORPID) as SALECORP,i.ISREVINV" ) ;
strSql . Append ( ",(select DESCRIPTION from info_client where SHORTNAME=i.CUSTOMERNAME) as CUSTOMERFULLNAME" ) ;
strSql . Append ( " FROM ch_fee_payapplication i left join workflow_using wu on wu.bsno=i.billno where 1=1 " ) ;
if ( isaudit = = "3" )
{
@ -270,6 +275,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Payapplication
strSql . Append ( ",i.PREAMOUNTRMB,i.PREAMOUNTUSD,i.PREAMOUNTOT " ) ;
strSql . Append ( ",dbo.GetBalNoByPayNo(i.BILLNO) as BALBILLNO,i.ISPRINT,i.PRINTCOUNT,i.wxpush,i.STLRATE,i.STLAMOUNT,i.STLCURR " ) ;
strSql . Append ( ",i.SALECORPID,(select [NAME] from [company] where GID=i.SALECORPID) as SALECORP,i.ISREVINV" ) ;
strSql . Append ( ",(select DESCRIPTION from info_client where SHORTNAME=i.CUSTOMERNAME) as CUSTOMERFULLNAME" ) ;
strSql . Append ( " FROM ch_fee_payapplication i left join workflow_using wu on wu.bsno=i.billno where 1=1 " ) ;
if ( ! string . IsNullOrEmpty ( strCondition ) )
@ -319,6 +325,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Payapplication
data . BILLSTATUSREF = Convert . ToString ( reader [ "BILLSTATUSREF" ] ) ;
data . PAYTYPE = Convert . ToString ( reader [ "PAYTYPE" ] ) ;
data . CUSTOMERNAME = Convert . ToString ( reader [ "CUSTOMERNAME" ] ) ;
data . CUSTOMERFULLNAME = Convert . ToString ( reader [ "CUSTOMERFULLNAME" ] ) ;
if ( reader [ "CURR" ] ! = DBNull . Value )
data . CURR = Convert . ToString ( reader [ "CURR" ] ) ;
data . CHEQUEPAYABLE = Convert . ToString ( reader [ "CHEQUEPAYABLE" ] ) ;
@ -449,6 +456,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Payapplication
strSql . Append ( ",b.PORTDISCHARGE,b.INPUTBY,b.OP,b.CUSTSERVICE,b.BSSOURCE,B.BSSOURCEDETAIL,B.OPTYPE,b.PARENTID,b.BSTYPE,b.FORWARDER" ) ;
strSql . Append ( ",b.DOC,b.SALE,(select top 1 INVNO from ch_fee_invoicehexiao where EXISTS (SELECT 1 FROM ch_fee_do_invoice WHERE ch_fee_do_invoice.BILLNO=ch_fee_invoicehexiao.BILLNO AND FEEID=c.FEEID)) INVOICENO " ) ;
strSql . Append ( ",f.Remark Remark,f.INPUTMODE,C.CREATETIME,0 TTLNODR " ) ;
strSql . Append ( ",f.UNIT UNIT " ) ;
strSql . Append ( " FROM ch_fee_do c" ) ;
strSql . Append ( " join v_op_bill b on (b.bsno=c.bsno)" ) ;
strSql . Append ( " left join ch_fee f on (f.gid=c.feeid) " ) ;
@ -476,6 +484,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Payapplication
strSql . Append ( ",b.PORTDISCHARGE,b.INPUTBY,b.OP,b.CUSTSERVICE,b.BSSOURCE,B.BSSOURCEDETAIL,B.OPTYPE,b.PARENTID,b.BSTYPE,b.FORWARDER" ) ;
strSql . Append ( ",b.DOC,b.SALE,(select top 1 INVNO from ch_fee_invoicehexiao where EXISTS (SELECT 1 FROM ch_fee_do_invoice WHERE ch_fee_do_invoice.BILLNO=ch_fee_invoicehexiao.BILLNO AND FEEID=c.FEEID)) INVOICENO " ) ;
strSql . Append ( ",f.Remark Remark,f.INPUTMODE,C.CREATETIME,0 TTLNODR " ) ;
strSql . Append ( ",f.UNIT UNIT " ) ;
strSql . Append ( " FROM ch_fee_do c" ) ;
strSql . Append ( " join v_op_bill b on (b.bsno=c.bsno)" ) ;
strSql . Append ( " left join ch_fee f on (f.gid=c.feeid) " ) ;
@ -550,6 +559,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Payapplication
strSql . Append ( ",b.PORTDISCHARGE,b.INPUTBY,b.OP,b.CUSTSERVICE,b.BSSOURCE,B.BSSOURCEDETAIL,B.OPTYPE,b.PARENTID,b.BSTYPE,b.FORWARDER" ) ;
strSql . Append ( ",b.DOC,b.SALE,(select top 1 INVNO from ch_fee_invoicehexiao where EXISTS (SELECT 1 FROM ch_fee_do_invoice WHERE ch_fee_do_invoice.BILLNO=ch_fee_invoicehexiao.BILLNO AND FEEID=c.FEEID)) INVOICENO " ) ;
strSql . Append ( ",f.Remark Remark,f.INPUTMODE,C.CREATETIME,0 TTLNODR " ) ;
strSql . Append ( ",f.UNIT UNIT " ) ;
strSql . Append ( " FROM ch_fee_do c" ) ;
strSql . Append ( " join v_op_bill b on (b.bsno=c.bsno)" ) ;
strSql . Append ( " left join ch_fee f on (f.gid=c.feeid) " ) ;
@ -783,6 +793,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Payapplication
strSql . Append ( ",b.PORTDISCHARGE,b.INPUTBY,b.OP,b.CUSTSERVICE,b.BSSOURCE,B.BSSOURCEDETAIL,B.OPTYPE,b.PARENTID,b.BSTYPE,b.FORWARDER" ) ;
strSql . Append ( ",b.DOC,b.SALE,(select top 1 INVNO from ch_fee_invoicehexiao where EXISTS (SELECT 1 FROM ch_fee_do_invoice WHERE ch_fee_do_invoice.BILLNO=ch_fee_invoicehexiao.BILLNO AND FEEID=c.FEEID)) INVOICENO " ) ;
strSql . Append ( ",f.Remark Remark,f.INPUTMODE,(g.TTLDR-g.STLTTLDR) TTLNODR " ) ;
strSql . Append ( ",f.UNIT UNIT " ) ;
strSql . Append ( " FROM ch_fee_do c" ) ;
strSql . Append ( " join v_op_bill b on (b.bsno=c.bsno)" ) ;
strSql . Append ( " join ch_fee f on (f.gid=c.feeid) " ) ;
@ -870,7 +881,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Payapplication
data . BSTYPE = Convert . ToString ( reader [ "BSTYPE" ] ) ;
data . FORWARDER = Convert . ToString ( reader [ "FORWARDER" ] ) ;
data . ORDERNO = Convert . ToString ( reader [ "ORDERNO" ] ) ;
data . UNIT = Convert . ToString ( reader [ "UNIT" ] ) ;
# endregion
headList . Add ( data ) ;
}