Overriding color indicator for Sales Order Item

Hey guys how would i go about overriding the change of color on an item in sales order items table, i know for now it displays green when item is available in stock and red when items is not in stock.

Lets say add a custom condition for when the color should be green or red. I came across the following piece of js code but i’m not sure if it’s the one responsible for the change of color

frm.set_indicator_formatter('item_code',
    function(doc) { return (doc.stock_qty<=doc.delivered_qty) ? "green" : "orange" 
})

Any help would be greatly appreciated, Thanks.

1 Like