Delect Customer Invoice warning
Submitted by gretalloyd on Mon, 02/11/2015 - 12:14
Hi guys,
I have a request from a staff member as we have had it happen a few times now.
The warning box for deleting a whole invoice is:
Delete Invoice?
Delete Customer Invoice? This operation cannot be undone.
Which is not that much different from the warning to delete and item off an invoice:
Delete Customer Invoice Item?
Are you sure you want to delete the Customer Invoice Item?
Is there a way to make it extra obvious that you are about to delete a whole invoice? The staff member suggested it be RED or and extra pop up, or the word WARNING at the start.
If that's not possible, how do I make it that only admin can delete a whole invoice?
Thanks,
Greta
Re: Delect Customer Invoice warning
Greta - the 'don't have to change the code' option is to change the message.
In messages.properties in the folder <TOMCAT HOME>\webapps\openvpms\WEB-INF\classes\localisation you will find
The top highlighted message is used to delete the complete invoice (and credit note and ...); the bottom one is used when deleting the line item.
Hence if you modify the text for the top one to say "ARE YOU ABSOLUTELY CERTAIN THAT YOU WANT to DELETE the COMPLETE {0}? This operation cannot be undone." - or whatever you want.
[Remember for best practice to keep a copy of the modified messages.properties file somewhere so that you can re-apply your change(s) on the next upgrade. You will also need a Tomcat restart to put the updated file into service.]
Regards, Tim G
Re: Delect Customer Invoice warning
You can restrict invoice deletion by only granting the "Customer Charges Remove" authority to the administrator role. This is done via Administration - Roles.
Re: Delect Customer Invoice warning
That's awesome Tim, it works perfectly. Thanks so much.
Greta