Print the words "Original" / "Copy" on PDF printing of sales invoice

Hello,

I’m encountering a really problematic situation while trying to print an Invoice. Due to the current law invoices should be printed at least twice.
When an Invoice is printed for the first time the word “Original” must be printed on the invoice. In any subsequent print it should have the phrase “Exact Copy” on it instead of “Original” so the customer can receive the Original and the accountant should file the Exact Copy for a few years.

Could you offer any suggestions on how to approach this issue?

Thanks in advance.

1 Like

@gabtzi currently we dont have it in the box!

Maybe a customization with a hook, enable “before_print” an “on_print” can be a good idea, but the couting can be a problem because it will be evaluated by the HTML and for the PDF views.

I see,

I was also thinking of a hook at the print action that would set a readonly boolean field named finalized_print to true after it’s printed once but it’s tricky because we could accidentally trigger a print with wrong data and we wouldn’t be able to scratch that.

Today I thought maybe this variable should be manually set when a separate button is clicked like a button called Print Final Invoice with red background (like a self-destruct button hehe) and a prompt to say “This action is irreversible. Do you wish to continue?”

If that is pressed then the normal print action is triggered but also the finalized_print variable is also set. So in subsequent prints the variable will be set and the word “Valid Copy” will be output.

Does this seem like a valid solution?

@gabtzi this irreversible action is the same of “Submit”

The difference is that after you submit the invoice you have the choice to not print it and preview it and adjust the template etc as many times as you want. However, If you click that button you would have no choice but to print it because it will set the flag.
That’s the way I see it at the moment at least.

As a workaround I use at the moment two different templates for Original and Copy but this could result in bad things if someone printed two originals that’s why I wanted it to be set definitely in an unchangeable manner after it’s printed.

1 Like

Im case ‘print’ means literally printing on paper which physically is send/filed a (physical) stamp would do it.

I understand what you’re saying about physically stamping the document and we’ve already thought of that. Physically stamping the invoice and filing doesn’t prevent someone from reprinting an item from the ERP and restamping it as original so we can’t prevent attempts to falsify original documents in an easy way because even an employee without any special knowledge can easily access a stamp but not many can photoshop a document if your printer adds a watermark in it.

However if something is unchangeable in the ERP the employee can’t change it. I know it may sound extreme to cover for deliberate theft however I’ve actually encountered one such case in the last 2 years where the company lost over 100.000€ because an employee falsified documents and the ERP wasn’t logging anything and the prints required manual input from the user.

Their ERP was created in 2004 in a flat database. So my point is the less the employee’s involvement in invoices the better.

@gabtzi but isn’t the Invoice # unique? How can that be “falsified” then?

My opinion is that you could use the submit state. Make the template add the word “original” if not submitted and “copy” if submitted. That way, you will print the original just before you submit and after that, you will only be able to print copies. Either that, or the solution with the two templates is the only possible solution.

@gabtzi

Why don’t you set permissions to only allow you, or whomever you trust to use the Original template, and for everyone else to only use Copy?

@liberostelios’s idea is good too. You could replace the default Draft with Original before Submit.

OK about this I don’t know how exactly it works in other countries but here keep in mind that if the invoice doesn’t have the word original/copy on it, it’s not a valid invoice and if two originals are printed and given away it’s also illegal. When an invoice is issued either via physical print of PDF print with the word original on it, it is to be given to the customer, and then subsequently you need to print 1 more copy for safekeeping. Anytime else you need to reprint it has to be a copy. If it’s printed it cannot be altered in any other way. Actually to make a PDF print you need to use a tax mechanism to timestamp it too or an advanced digital signature but it’s a different story so let’s focus on physical print.

We also have two types of invoice, for retail customers and B2B customers. The retail customer invoice can simply state the name of the customer as “Retail Client”.

Keep in mind that what I’m mentioning below is actually happening here and it’s a real life tax evasion scenario that people use. Based on the above a company which for example sells 10 similar G9 LED LAMPS to 2 different retail customers, prints an original retail customer invoice (which is a simple receipt) which of course says original on it and the name is set as “Retail Customer”. If they can print another original invoice, they can just reprint it to send to another customer. That way they send two originals with the same invoice# to 2 different customers in 2 different areas of the Country but they have to pay VAT Tax only once to the state as well as get taxed for less on their profit. The chances are minimal to get caught because the 2 customers need to be checked at the same period by the state’s tax evasion department. Due to the huge number of yearly stock movements they never get checked so that’s how they can simply do that without worrying about their inventory.

I like the idea but I saved it for proforma invoices.

I like this idea for a workaround. This could actually help a lot although I was hoping to avoid trusting people when it comes to legal documents.

2 Likes

Also thank you very much for your ideas guys I really appreciate the help