SELECT

    deptrans.DEPTRANS_ID AS deptrans_id
    ,TRIM(deptrans.NO_REKENING) AS deptrans_no_rekening
    ,deptrans.TGL_TRANS AS deptrans_tgl_trans
    ,TRIM(deptrans.MY_KODE_TRANS) AS deptrans_my_kode_trans
    ,TRIM(kodetransdeposito.KODE_TRANS) AS deptrans_kode_trans
    ,CASE
        WHEN deptrans.KUITANSI LIKE '%ARO%' THEN  deptrans.KUITANSI
        ELSE TRIM(kodetransdeposito.DESKRIPSI_TRANS)
    END AS deptrans_deskripsi_trans
    ,deptrans.SALDO_TRANS AS deptrans_saldo_trans
    ,TRIM(deptrans.KUITANSI) AS deptrans_kuitansi
    
FROM deptrans
LEFT JOIN kodetransdeposito ON deptrans.KODE_TRANS = kodetransdeposito.KODE_TRANS
WHERE deptrans.MY_KODE_TRANS NOT IN ('500')
AND (deptrans.KODE_TRANS IN ('01','08','03','09') OR deptrans.KUITANSI LIKE '%ARO%')
ORDER BY deptrans.DEPTRANS_ID
