[Solved] Hide the '0' from Currency filters

I added some currency filters to a list but because Currency field types must hold a number the filter inputs show ‘0’. This is deceiving because even though they show ‘0’ they are not filtering for 0. The filter ignores the filters with 0.

This script hides the ‘0’ for any currency data fields which looks nicer.

frappe.listview_settings['Salary Structure Assignment'].refresh = function(listview) {
    $("input[data-fieldtype='Currency']").each(function() {
        if ($(this).val()=="0") $(this).val('');


1 Like