Hello everyone
I would like to customize my invoices to have the sales person name (basically the user that created the invoice) and their pre-saved signature.
So first of all I would create a new “image” field in the employee doctype to store the employee’s signature (rather than having a signature field where they have to sign on every invoice creation)
Then I would customize the SINV doctype to have a field where it stores the employee name that created the invoice and signature (both read-only)
Then I would have to modify the print view to include those fields where I would have the signature and employee name under.
My question is regarding the second point, how would I make erpnext get the employee name and their signature?
Every doctype in erpnext has the record of the owner (the user who created the document). So basically you will need a custom signature field only in the User doctype to upload the signature of the employee user.
In the print format, you can fetch the user by {{doc.owner}} and get the signature field by {{frappe.get_doc("User", doc.owner).signature}}.
Thanks!
The user doctype can’t be modified, if I added their signature field to the employee doctype I should change it to {{frappe.get_doc("Employee", doc.owner).signature}} … will this work?