|  | @@ -2423,8 +2423,8 @@
 | 
	
		
			
				|  |  |              WHEN w.f_dc = 'C' THEN
 | 
	
		
			
				|  |  |              '付'
 | 
	
		
			
				|  |  |              END AS fSrcdcName,
 | 
	
		
			
				|  |  | -            ifnull( w.f_amount, 0 ) - ifnull( w.f_accamount, 0 ) AS fAmtdr,
 | 
	
		
			
				|  |  | -            ifnull( w.f_amount, 0 ) - ifnull( w.f_accamount, 0 ) AS fAmt,
 | 
	
		
			
				|  |  | +            ifnull( w.f_amount, 0 ) - ifnull( w.f_invamount, 0 ) AS fAmtdr,
 | 
	
		
			
				|  |  | +            ifnull( w.f_amount, 0 ) - ifnull( w.f_invamount, 0 ) AS fAmt,
 | 
	
		
			
				|  |  |              dict.dict_label AS fFeeunitid,
 | 
	
		
			
				|  |  |              w.f_qty AS fQty,
 | 
	
		
			
				|  |  |              w.f_unitprice AS fUnitprice,
 | 
	
	
		
			
				|  | @@ -2538,7 +2538,7 @@
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      <select id="selectFinancialLedgerList" resultMap="feeVOResult">
 | 
	
		
			
				|  |  |          SELECT
 | 
	
		
			
				|  |  | -            c.f_name AS f_fees_name, w.f_corpid, w.f_mblno, w.f_billstatus,
 | 
	
		
			
				|  |  | +            c.f_name AS f_fees_name, w.f_corpid, w.f_mblno, w.f_billstatus, w.f_review_date,
 | 
	
		
			
				|  |  |              SUM( w.f_amount ) AS f_amount, SUM( w.f_stlamount ) AS f_stlamount,
 | 
	
		
			
				|  |  |              ifnull( SUM( w.f_amount ), 0 ) - ifnull( SUM( w.f_stlamount ), 0 ) AS nnfinished
 | 
	
		
			
				|  |  |          FROM
 | 
	
	
		
			
				|  | @@ -2549,6 +2549,7 @@
 | 
	
		
			
				|  |  |              LEFT JOIN t_corps c ON c.f_id = w.f_corpid
 | 
	
		
			
				|  |  |              LEFT JOIN t_fees f ON w.f_feeid = f.f_id
 | 
	
		
			
				|  |  |          <where>
 | 
	
		
			
				|  |  | +            w.f_dc = #{fDc}
 | 
	
		
			
				|  |  |              <if test="fCorpid != null  and fCorpid != ''">and t.f_corpid = #{fCorpid}</if>
 | 
	
		
			
				|  |  |              <if test="fToCorpid != null  and fToCorpid != ''">and w.f_corpid = #{fToCorpid}</if>
 | 
	
		
			
				|  |  |              <if test="fMblno != null  and fMblno != ''">and w.f_mblno like concat('%', #{fMblno}, '%')</if>
 | 
	
	
		
			
				|  | @@ -2556,28 +2557,18 @@
 | 
	
		
			
				|  |  |              <if test="fProductName != null and fProductName != ''">and w.f_product_name like concat('%',
 | 
	
		
			
				|  |  |                  #{fProductName}, '%')
 | 
	
		
			
				|  |  |              </if>
 | 
	
		
			
				|  |  | -            <if test='fBillstatus != null and fBillstatus != "" and fBillstatus == "0" '>
 | 
	
		
			
				|  |  | +            <if test="isReviewed != null and isReviewed == 0">
 | 
	
		
			
				|  |  |                  and w.f_billstatus != 6
 | 
	
		
			
				|  |  |              </if>
 | 
	
		
			
				|  |  | -            <if test='fBillstatus != null and fBillstatus != "" and fBillstatus == "1" '>
 | 
	
		
			
				|  |  | +            <if test="isReviewed != null and isReviewed == 1">
 | 
	
		
			
				|  |  |                  and w.f_billstatus = 6
 | 
	
		
			
				|  |  |              </if>
 | 
	
		
			
				|  |  | -            <if test='fDc != null and fDc != "" and fDc == "D" '>
 | 
	
		
			
				|  |  | -                and w.f_dc = #{fDc}
 | 
	
		
			
				|  |  | -            </if>
 | 
	
		
			
				|  |  | -            <if test='fDc != null and fDc != "" and fDc == "C" '>
 | 
	
		
			
				|  |  | -                and w.f_dc = #{fDc}
 | 
	
		
			
				|  |  | -            </if>
 | 
	
		
			
				|  |  | -            <if test='timeExamine != null and timeExamine[0] != null and timeExamine[0]!= ""'>
 | 
	
		
			
				|  |  | -                and t.f_review_date >= #{timeExamine[0]}
 | 
	
		
			
				|  |  | -            </if>
 | 
	
		
			
				|  |  | -            <if test='timeExamine != null and timeExamine[1] != null and timeExamine[1]!= ""'>
 | 
	
		
			
				|  |  | -                and t.f_review_date <= #{timeExamine[1]}
 | 
	
		
			
				|  |  | -            </if>
 | 
	
		
			
				|  |  | -            <if test='fReconciliation!= null and fReconciliation != "" and fReconciliation == "0" '>
 | 
	
		
			
				|  |  | +            <if test="fReconciliation!= null and fReconciliation != '' and fReconciliation == '0'">
 | 
	
		
			
				|  |  |                  and ifnull(w.f_amount, 0) - ifnull(w.f_stlamount, 0) != 0
 | 
	
		
			
				|  |  |              </if>
 | 
	
		
			
				|  |  | -            and w.f_review_date IS NOT NULL
 | 
	
		
			
				|  |  | +            <if test="timeExamine != null and timeExamine[0] != null and timeExamine[0]!= ''">
 | 
	
		
			
				|  |  | +                and w.f_review_date between #{timeExamine[0]} and #{timeExamine[1]}
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  |              ${params.dataScope}
 | 
	
		
			
				|  |  |          </where>
 | 
	
		
			
				|  |  |          GROUP BY
 | 
	
	
		
			
				|  | @@ -2588,7 +2579,7 @@
 | 
	
		
			
				|  |  |      <select id="selectFinancialLedgerDetails" resultMap="feeVOResult">
 | 
	
		
			
				|  |  |          SELECT t.f_id AS f_srcpid, c.f_name AS f_fees_name, w.f_mblno AS f_mblno,
 | 
	
		
			
				|  |  |              w.f_product_name, w.f_marks, t.f_billtype,
 | 
	
		
			
				|  |  | -            t.f_review_date,
 | 
	
		
			
				|  |  | +            w.f_review_date,
 | 
	
		
			
				|  |  |              IF ( w.f_feeid = #{feesId}, w.f_amount, 0.00 ) storage_fee,
 | 
	
		
			
				|  |  |              IF ( w.f_feeid != #{feesId}, w.f_amount, 0.00 ) other_fee,
 | 
	
		
			
				|  |  |              w.f_amount, w.f_stlamount AS fStlamount,
 | 
	
	
		
			
				|  | @@ -2601,16 +2592,16 @@
 | 
	
		
			
				|  |  |              LEFT JOIN t_fees f ON w.f_feeid = f.f_id
 | 
	
		
			
				|  |  |          where
 | 
	
		
			
				|  |  |              w.f_dc = #{fDc}
 | 
	
		
			
				|  |  | -            <if test="fCorpId != null and fCorpId != ''">and t.f_corpid = #{fCorpId}</if>
 | 
	
		
			
				|  |  | -            <if test='fAuditList != null and fAuditList[0] != null'>
 | 
	
		
			
				|  |  | -                and t.f_review_date BETWEEN #{fAuditList[0]} and #{fAuditList[1]}
 | 
	
		
			
				|  |  | -            </if>
 | 
	
		
			
				|  |  | -            <if test='fBillstatus != null and fBillstatus != "" and fBillstatus == "0" '>
 | 
	
		
			
				|  |  | +            <if test="fCorpId != null and fCorpId != ''">and w.f_corpid = #{fCorpId}</if>
 | 
	
		
			
				|  |  | +            <if test='isReviewed != null and isReviewed == 0 '>
 | 
	
		
			
				|  |  |                  and w.f_billstatus != 6
 | 
	
		
			
				|  |  |              </if>
 | 
	
		
			
				|  |  | -            <if test='fBillstatus != null and fBillstatus != "" and fBillstatus == "1" '>
 | 
	
		
			
				|  |  | +            <if test='isReviewed != null and isReviewed == 1 '>
 | 
	
		
			
				|  |  |                  and w.f_billstatus = 6
 | 
	
		
			
				|  |  |              </if>
 | 
	
		
			
				|  |  | +            <if test='fAuditList != null and fAuditList[0] != null'>
 | 
	
		
			
				|  |  | +                and w.f_review_date BETWEEN #{fAuditList[0]} and #{fAuditList[1]}
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  |          GROUP BY
 | 
	
		
			
				|  |  |          w.f_id
 | 
	
		
			
				|  |  |      </select>
 |