add discount capability to sql_external, RT10481