-- 待入账的，已确认金额全部升级为0  (金额字段默认为0)
-- 待入账 未确认金额 = 付款金额
update t_bei_transdetail set funconfirmamount = fdebitamount where freceredtype = '0' and fdebitamount != 0 and fcreditamount = 0 and funconfirmamount = 0;

-- 待入账 未确认金额 = 收款金额
update t_bei_transdetail set funconfirmamount = fcreditamount where freceredtype = '0' and fdebitamount = 0 and fcreditamount != 0 and funconfirmamount = 0;


-- 已入账的，未已确认金额全部升级为0 (金额字段默认为0)
-- 已入账 已确认金额 = 付款金额
update t_bei_transdetail set fconfirmamount = fdebitamount where freceredtype = '3' and fdebitamount != 0 and fcreditamount = 0 and fconfirmamount = 0;

-- 已入账 已确认金额 = 收款金额
update t_bei_transdetail set fconfirmamount = fcreditamount where freceredtype = '3' and fdebitamount = 0 and fcreditamount != 0 and fconfirmamount = 0;
