Post by vssoft » Tue Oct 18, 2016 11:05 pm

Hi,

How can we convert numeric amount into words which i need to print in Invoices?

Suppose Invoice Amount is Rs.1000 it will convert into words : Rupees One Thousand Only.

Thanks
Vishal

Active Member

Posts

Joined
Mon Jun 15, 2015 2:58 pm

Post by web-project » Wed Oct 19, 2016 12:38 am

you will be able to write the library for conversion of numbers into words, see example:
http://www.karlrixon.co.uk/writing/conv ... -with-php/

New member

Posts

Joined
Tue Sep 06, 2016 9:06 pm
Location - Stevenage, UK

Post by vssoft » Wed Oct 19, 2016 12:02 pm

I am a beginner and little knowledge of PHP. I don't know where to place the above code in opencart so that i am able to call this function to convert Numeric into words.

Please explain little bit more.

THanks
Vishal

Active Member

Posts

Joined
Mon Jun 15, 2015 2:58 pm

Post by fido-x » Wed Oct 19, 2016 4:54 pm

Interesting concept!

The script that web-project pointed out could be converted into a "tool" that can be used in OpenCart (done). However, there are limitations on how it could be used.

It couldn't be used to convert a "price", as this has already been formatted with currency symbol, decimal point (which may differ from currency to currency - some use a dot, others use a comma) and possibly a thousand separator (again, this may differ from currency to currency). It would only work on a "raw" number and, if that "raw" number was a decimal like 100.00, you would end up with "one hundred point zero zero" being displayed and not "one hundred".

Would it be possible to provide a "mock-up" of how you want it to look on the invoice?

Image
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool

If you're not living on the edge ... you're taking up too much space!


User avatar
Expert Member

Posts

Joined
Sat Jun 28, 2008 1:09 am
Location - Tasmania, Australia

Post by vssoft » Wed Oct 19, 2016 6:58 pm

I just want to know where i will copy the above code so that i can call and test this function from my invoice.tpl file.

I dont know how the function/procedure works in opencart , where i copy above code to use & test this function otherwise
understand what the output can get from this function.

Thanks
Vishal

Active Member

Posts

Joined
Mon Jun 15, 2015 2:58 pm

Post by fido-x » Wed Oct 19, 2016 7:23 pm

PM sent.

Image
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool

If you're not living on the edge ... you're taking up too much space!


User avatar
Expert Member

Posts

Joined
Sat Jun 28, 2008 1:09 am
Location - Tasmania, Australia
Who is online

Users browsing this forum: No registered users and 173 guests