SELECT Round(IFNULL(SUM(receivedamt),0)) PaidAmount FROM invoicemaster_onaccount io WHERE io.Panel_ID=1275 and io.iscancel=0 AND io.Type='ON ACCOUNT' ;