Invoices. How to hide 'add service line' button.

Hello,

When creating or modifying an invoice, I would hide the ‘add service line’ button, in order to force users to use just ‘add product line’.
Could anyone indicate what is / are the files to be changed? If possible I would not heavily change the code, because in the next future I need to show the ‘add service line’ button again.

Thank you.
Piergiorgio

Hello,

You may take a look at function insertGroup at file modules/AOS_Products_Quotes/line_items.js around line 511
comment out the line that adds the button. It shows something like this

footer_cell.innerHTML+=" <input type=‘button’ tabindex=‘116’ class=‘button’ value=’"+SUGAR.language.get(module_sugar_grp1, ‘LBL_ADD_SERVICE_LINE’)+"’ id=’"+serviceTable.id+“addServiceLine’ onclick='insertServiceLine(”"+serviceTable.id+"",""+groupn+"")’ />";

Note : it is an unupgradesafe changes.

Thank you Urdhvatech for your answer,

Before to post my question, I tried already to comment that line, but the button is still there, even after a quick repair and rebuild procedure…
I’m running the Version 7.3.2.

Piergiorgio

Thats weired, I tried and it works. May you will be missing out something ?

Sorted out… I just had to clean the browser cache!

Thank you again
Cheers.

Piergiorgio