Hello;
As frappe.msgprint does not support a lot of format, what other method to display message to the screen other than msgprint?
For example, I have to below code and I need to display the amount value on screen, it is not displaying it properly:
Income_Tax_Amount_db = frappe.db.sql(“”"
select amount
fromtabSalary Detail
where parent like ‘Sal Slip/EMP/0002/00008’ and salary_component like ‘Income Tax’
“”")
I tried:
frappe.msgprint(_(“Salary Slip Deduction Component from DB {0}”).format(Income_Tax_Amount_db[0]))
and I tried:
frappe.msgprint(_(“Salary Slip Deduction Component from DB {0}”).format(Income_Tax_Amount_db))
But display the amount in this shape:
(275392.857143,) —> In case I used format(Income_Tax_Amount_db[0]
((275392.857143,),) → In case I used format(Income_Tax_Amount_db
I need to display the amount as it should appear normally: 275392.857143, how?
By the way, why I can not use print method that is used in native python?
For example, I tried the below syntax but it did not show any output at the screen and at the same time it did not give any error.
print “Let us test %s” % Income_Tax_Amount_db
Thanks for the help in advance.
Regards
Bilal