i wounder how can i use PHP in docs?
i have one snippet that i will need to use in most if not all docs which is the numbers to words
i have one snippet that will use the total in different languages as the one in erp next is not being translated…
This is sample code to generate amount in words in python.
For this you need to write server side code.
from frappe.utils import money_in_words
company_currency = get_company_currency(self.company)
self.total_in_words = money_in_words(self.rounded_total, company_currency)
@kolate_sambhaji i was hoping to use php because actually am working on studying python right now because i dont know anything about it…
and the second reason about php is that i will use the numbers to words in thai language which is missed up language with missed up logic (reversed words when comparing to english)…
is there any way to use php on server side?
@ramielian If you want to use php, you need to create php app and then, you can call php app method using API or from php app you can call Frappe method using frappe api.
Have a look at https://frappe.github.io/frappe/user/guides/integration/rest_api.html
@kolate_sambhaji how i would use API for this?
i want to just use a snippet of code to change the money in words of ERP next because its not suitable for our company…
@ramielian did you solve this?, because I’m stuck in the same issue
Dear Sam i can right algorithm for you to how to change money in words
@random.1 I found the answer: You cannot without backend (server side) and bench modifications.
Alternatively, use node.js or Python, everything I needed was resolved with python anyway.