Thanks for a quick reply, however frappe.get_value wouldn’t not work either.
Tracelog:
Traceback (innermost last):
File "/home/frappe/press/benches/1409261320/apps/frappe/frappe/app.py", line 49, in application
response = frappe.handler.handle()
File "/home/frappe/press/benches/1409261320/apps/frappe/frappe/handler.py", line 66, in handle
execute_cmd(cmd)
File "/home/frappe/press/benches/1409261320/apps/frappe/frappe/handler.py", line 89, in execute_cmd
ret = frappe.call(method, **frappe.form_dict)
File "/home/frappe/press/benches/1409261320/apps/frappe/frappe/__init__.py", line 531, in call
return fn(*args, **newargs)
File "/home/frappe/press/benches/1409261320/apps/frappe/frappe/templates/pages/print.py", line 86, in get_html
html = template.render(args, filters={"len": len})
File "/home/frappe/press/benches/1409261320/env/lib/python2.7/site-packages/jinja2/environment.py", line 969, in render
return self.environment.handle_exception(exc_info, True)
File "/home/frappe/press/benches/1409261320/env/lib/python2.7/site-packages/jinja2/environment.py", line 742, in handle_exception
reraise(exc_type, exc_value, tb)
File "
Dears,
I want to get item price inside item report, I wrote frappe.db.get_value(“Item Price”, {‘item_code’: doc.item_code, ‘price_list’: ‘Standard Buying’}, “rate”)
I tried frappe.get_doc(“Item Price”, {‘item_code’: doc.item_code, ‘price_list’: ‘Standard Buying’}, “rate”) but it’s not working either
@frappe.whitelist()
def get_jinja_data(doc):
return frappe.db.sql("""select outstanding_amount, datediff(CURDATE(), posting_date) as "outstanding_days" from `tabSales Invoice` a where associated_property_sales = %s and docstatus = 1 and outstanding_amount > 0""",doc.name, as_dict=True)