Invoice Types


we have a customer with multiple departments where 1 department wants to start using "Invoice types". 

When you add an invoice type in Service it will add the tab when you go into "edit request". 

I have 2 questions regarding this: 
1. Is there a way to only enable this feature for spesific usergroups throug default functionality? This tab should only be available for 1 department/usergroup, and we cant enable it unless we can filter it out for all the others. 

I have figured out that i can edit/comment out the following in the "Edit Ticket"-Screen (in the OnLoad-script): 

if (invoiceTypesExists())
   HtmlElement invoice = addHtmlElement(-1, "invoice", 112, "", index++);

If this is commented out the tab "Invoices" do not show up in the Screen.
So, if i have my default "Edit Ticket"-screen and create a duplicate where i comment out the section above, then I can check the users group through Screen chooser, and point to the screen containing the Invoices-tab or not.

Is this the correct way of doing this or is there an easier way?
Will commenting out this section lead to any other/hidden problems with the screen?

If i add a lot of invoice types they all get listed down in one single row. Is there any way to create headings, so I can make it a little easier for them? 
E.G. if more departments want to start using Invoice then they have about 30 different options all together, and it's hard to get a proper overview when everything is in 1 long list. 

Any input is appreciated :)


RE: Invoice Types

Hello Eivind :)

Instead of having two screens, why not check the user group in the onload script and do something like this:

if(invoiceTypesExists() && mUserGroups.exists(userGroup))
  HtmlElement invoice = addHtmlElement(-1, "invoice", 112, "", index++);

Where mUserGroups is a map containing the usergroups that's allowed to see the invoice tab, and userGroup is the current user's usergroup.

There are ofcourse other ways of doing this, but this is one way which doesn't require too much programming.


And for your second point, I don't think there's a possibility to add headers, as far as I know.

Av: Simen Mostuen Iversen 16. aug 2017

RE: Invoice Types

Thank you for the quick response :)

Yes, i figured i could do as you suggested, and do a check in the screen itself istead of having 2 separate ones. 

Unfortunate that you cant make headings on the list, i will send a suggestion to SuperOffice regarding it. 


Av: Eivind Johan Fasting 17. aug 2017