Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 
 

25 rader
670 B

  1. import frappe
  2. no_cache = 1
  3. def get_context(context):
  4. if frappe.session.user != "Guest":
  5. context.all_certifications = get_all_certifications_of_a_member()
  6. context.show_sidebar = True
  7. def get_all_certifications_of_a_member():
  8. """Returns all certifications"""
  9. all_certifications = []
  10. all_certifications = frappe.db.sql(
  11. """ select cc.name,cc.from_date,cc.to_date,ca.amount,ca.currency
  12. from `tabCertified Consultant` cc
  13. inner join `tabCertification Application` ca
  14. on cc.certification_application = ca.name
  15. where paid = 1 and email = %(user)s order by cc.to_date desc""",
  16. {"user": frappe.session.user},
  17. as_dict=True,
  18. )
  19. return all_certifications