Additional date field on invoice creation

Hello,

I add additional date field on invoice view.php and add this field in database ip_invoice. The problem is that, when I select some date and press to SAVE, system clear this field and don’t allow to save in database. What I done wrong?

The field also has to be passed trough the saving process. Please take a look at the JavaScript part in zhe view.php file too.

In view.php JavaScript I remove this password field and add this new field. But without result, when I put the date in this field and press Save, system in database put in the password field - the password = 0 and my new date field are empty like this 0000-00-00.
In this case, when I open pdf invoice, system think, that it’s password protected and when I put 0, system open pdf.
I don’t need protect pdf file at all. I just want to insert new date field, which should save in database. Maybe there are some additional files, which should be corrected?