- IFNULL(abs(dt.ov_amount), IFNULL (abs(st.ov_amount), bt.amount)) settled_amount,
- IFNULL(abs(dt.ov_amount/bt.amount), IFNULL (abs(st.ov_amount/bt.amount), 1)) settle_rate,
- IFNULL(debtor.curr_code, IFNULL (supplier.curr_code, act.bank_curr_code)) settle_curr
+ IFNULL(abs(dt.ov_amount), IFNULL(ABS(st.ov_amount), bt.amount)) settled_amount,
+ IFNULL(abs(dt.ov_amount/bt.amount), IFNULL(ABS(st.ov_amount/bt.amount), 1)) settle_rate,
+ IFNULL(debtor.curr_code, IFNULL(supplier.curr_code, act.bank_curr_code)) settle_curr