Price Cost - Discount limit

Price Cost - Discount limit

Hi team, there is one issue that is: In quote products subform, it is not possible to access a custom field from Products with ClientScript. Therefore, I would like to find a workaround for this: 
- I have COST price field on each product 
- If that product is Sold , the users can add discounts
- I want to let the user add any discount but with one condition: It shouldn't be a discount less than the cost price. 

Could you help me ?