How can i add custom field and show it in the print

hello everyone
i want to create two new fields : Clinet_cc_id and company_cc_id
this CC_id is unique in all country and it’s should show up in all document : Quotation, invoice …
this field is 10 numbers not more and not less than 10
so how can i create those two fields
and how can i show them in the print
thank you

You go to edit all the doctype you want these 2 new fields in.
Then make sure you create a custom app for that. Otherwise, you’ll loose it all at every update.

I don’t believe that is accurate

That’s right not totally accurate.
You will need to stash your changes first with git before you update.

My understanding is that Custom fields exist in the database only, not the code. So there is nothing to be overwritten by any update