Dear Community,
In Quotation Doctype, I had one Field called custom_quotation_created_by, it fetch name who that quotation is created.Here custom_quotation_created_by is come like email id. But in Print Format i need their name not as ID also i need their Designation Rnw i had code for Full name and Designation but the issue is Designation come Constant for all employees.
My Code:
For {{doc.company}}
{% if doc.custom_quotation_created_by %} {% set user = frappe.get_doc("User", doc.custom_quotation_created_by) %} {{ user.full_name }} {% endif %}
{% if doc.custom_quotation_created_by %} {% set employee = frappe.get_doc("Employee", doc.employee) %} {{ employee.designation }} {% endif %}
Also i tried this code,but designation Not visible.
{% if doc.employee%} {% set employee = frappe.get_doc("Employee", doc.employee) %} {{ employee.designation }} {% endif %}
Print Output:
Nishad is Manager but it shows Divisional Manager as Constant in Print format.
If custom_quotation_created_by is Nishad@ABC.IN means the code give that Full Name as Nishad but facing same designation error coming for all Employee.
pls help to resolve this Issue.