I am completely new to SuiteCRM and I am working on my initial deployment.
I would like to change the way “discount” works on quote -> product line items. Instead of discount, I want it to function as a probability. For example, if I key in 20 and percent is selected, I want it to make the total equal to 20% of the list price rather than discount the price by 20 percent. Here is what I have tried.
I copied the file line_items.js from /modules/AOS_Products_Quotes to /custom/modules/AOS_Products_Quotes/
I then edited what I think is the relevant section of code to read:
else if(dis == 'Percentage')
{
if(discount > 100)
{
document.getElementById(key + 'product_discount' + ln).value = 0;
discount = 0;
}
discount = discount/100;
discount = (1-discount) * listPrice;
productUnitPrice = listPrice - discount;
document.getElementById(key + 'product_unit_price' + ln).value = format2Number(listPrice - discount);
}
And…nothing changes. The Sales Price field still reflects the discount field acting as a percent discount. I’ve tried clearing browser cache, etc., but to no avail.
What am I doing wrong?