How to get Total and Amount In words for custom fields

Hi Everyone,

I wanted to know how can I get the total of 5 custom fields in a form

In the offer letter document, I created 5 Fields for Salary and Allowances, I want to get the total at the bottom, and also to get the the amount in words for the currency fields and also for the total. I want to use this info in the offer letter print format as well.

What is my best way to approach this?

Thanks

@bibinqcs, In Words run in the backend side, you can give a sample of how get the value in words here

def validate(self): 
    from frappe.utils import money_in_words
    from erpnext.setup.utils import get_company_currency
    if self.company:
        company_currency = get_company_currency(self.company)
        self.total_in_word = money_in_words(self.grand_total, company_currency)
1 Like

Thank you for the responses will check it out

is it client script or server ?

Server Script