Amount in words in Indian format

Amount in words in Indian format

Hi,

I had coded the following code to convert amount in words. But in the code in the format of US like million. But i need in Lakh and Crore. So pls suggest ideas r post corrected code

string Num2Words(int val)
{
    val_s = input.val.toString();
    th = {"", "thousand", "million", "billion", "trillion"};
    // uncomment this line for English Number System
    // th = {"","thousand","million", "milliard","billion"};
    dg = {"zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine"};
    tn = {"ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen", "seventeen", "eighteen", "nineteen"};
    tw = {"twenty", "thirty", "forty", "fifty", "sixty", "seventy", "eighty", "ninety"};
    x = val_s.length();
    if (x  >  15)
    {
        return "too big";
    }
    else
    {
        s = val_s.replaceAll("(?)",",",false).removeFirstOccurence(",").removeLastOccurence(",").toList();
        str = "";
        sk = 1;
        bypass = false;
        for each index i in s
        {
  cur = s.get(i).toLong();
            if (!bypass)
            {
                if (((x  -  i)  %  3)  ==  2)
                {
                    if (cur ==  1)
                    {
  next = s.get(i  +  1).toLong();
                        str = str + tn.get(next) + " ";
                        bypass = true;
                        sk = 1;
                    }
                    else if (cur  !=  0)
                    {
                        str = str + tw.get(cur  -  2) + " ";
                        sk = 1;
                    }
                }
                else if (cur  !=  0)
                {
                    str = str + dg.get(cur) + " ";
                    if (((x  -  i)  %  3)  ==  0)
                    {
                        str = str + "hundred ";
                        sk = 1;
                    }
                }
            }
            else
            {
                bypass = false;
            }
            if (((x  -  i)  %  3)  ==  1)
            {
                if (sk  !=  0)
                {
                    str = (str + th.get(floor(((x  -  i  -  1)  /  3)))) + " ";
                    sk = 0;
                }
            }
        }
        return str;
    }
} 



      Zoho Campaigns Resources


        • Desk Community Learning Series


        • Digest


        • Functions


        • Meetups


        • Kbase


        • Resources


        • Glossary


        • Desk Marketplace


        • MVP Corner


        • Word of the Day


        • Ask the Experts


          Zoho CRM Plus Resources

            Zoho Books Resources


              Zoho Subscriptions Resources

                Zoho Projects Resources


                  Zoho Sprints Resources


                    Zoho Orchestly Resources


                      Zoho Creator Resources


                        Zoho WorkDrive Resources



                          Zoho CRM Resources

                          • CRM Community Learning Series

                            CRM Community Learning Series


                          • Tips

                            Tips

                          • Functions

                            Functions

                          • Meetups

                            Meetups

                          • Kbase

                            Kbase

                          • Resources

                            Resources

                          • Digest

                            Digest

                          • CRM Marketplace

                            CRM Marketplace

                          • MVP Corner

                            MVP Corner




                            Zoho Writer Writer

                            Get Started. Write Away!

                            Writer is a powerful online word processor, designed for collaborative work.

                              Zoho CRM コンテンツ






                                ご検討中の方

                                  • Recent Topics

                                  • How to add to Subforms via Zapier with Zoho Writer?

                                    I have the following layout for a Zoho Writer Document. As you can see there is a repeating subform taking in "Items". I am trying to make a Zapier integration with it, and I can see there is 1 field saying: "Items", but it does not specify how I'm supposed
                                  • Zia Profile Summary now supports six languages and responds faster

                                    After numerous customer requests, we’ve expanded Zia Profile Summary to do more than just summarize resumes quickly. It can now summarize them in six different languages and deliver results even faster. What’s New 1. Extended language support Zia can
                                  • Introducing Zoho Show Android 3.0

                                    Good ideas need the right space to grow. They deserve tools that move as fast as your thoughts and make creating feel effortless. And that is why we are bringing you Zoho Show Android 3.0! From a brand-new look and smoother navigation to improved collaboration
                                  • Properly Capture Dropdowns & Hover Elements When Recording a Window/Tab

                                    Hi Zoho WorkDrive Team, Hope you are doing great. We encountered a limitation when recording a selected window or browser tab: Certain UI elements, such as dropdown lists, hover menus, and overlays, are not captured unless we record the entire screen.
                                  • Peppol integration zoho invoicefu

                                    Hi, Belgium will require Peppol invoicing as of 2026. I found that this is being prepared for Zoho books, to be released in Sep 2025. Will Zoho Invoice get this functionality too? I like the Invoice app for my part-time side business as bike mechanic
                                  • CRM x WorkDrive: File storage for new CRM signups is now powered by WorkDrive

                                    Availability Editions: All DCs: All Release plan: Released for new signups in all DCs. It will be enabled for existing users in a phased manner in the upcoming months. Help documentation: Documents in Zoho CRM Manage folders in Documents tab Manage files
                                  • Allow Recording Only a Selected Portion of the Screen

                                    Hi Zoho WorkDrive Team, Hope you are doing well. We would like to request a more flexible recording option in Zoho WorkDrive. At the moment, we can record either the entire screen or a specific window/tab — but not a custom selected portion of the screen
                                  • Restricting Calendar View to Working Hours

                                    Hi: I'm trying to implement a calendar which displays all of my customer appointments.  Currently, the calendar shows all 24 hours of the day.  Is there a way to restrict the hours to simply the times my business is open? Thanks!
                                  • Add Camera Background Blur During Recording

                                    Hi Zoho WorkDrive Team, Hope everything is well. We would like to request an enhancement to the video recording feature in Zoho WorkDrive. Currently, the camera preview displayed during a recording does not support background blur. This is an essential
                                  • Amazon FBA integration - Handle invoice reconciliation under different GSTINs,

                                    Dear Zoho Community, Thank you for the clarification regarding the Amazon FBA integration, default warehouse, and GSTIN mapping in Zoho Inventory. I understand that Zoho currently supports only one warehouse for Amazon FBA, and that all FBA orders are
                                  • Whatsapp Integration questions

                                    Hi Questions: 1. Whatsapp messages are not reaching our CRM, is there a delay? 2. Is there any way to create a whatsapp catalog on a number that is integrated with ZOHO? 3. How do I configure my profile picture on a number that is integrated with ZO
                                  • Allow Font Size 11 in Editors...

                                    That is basic functionality...
                                  • link mail.zoho.com/UnblockMe to unblock

                                    Could you please unblock my account heloisa.bomfim@expansaodenegocios.com
                                  • Unblocked me

                                    Please can you help unblocked my account thanks materiauxjcbrunet2000@zohomail.com
                                  • Archiving Contacts

                                    How do I archive a list of contacts, or individual contacts?
                                  • Integrating External Portal Tickets Into Zoho Desk

                                    A B2B travel company has a customer portal where clients can raise and submit tickets related to their bookings. These tickets need to be handled and managed in the backend through Zoho Desk. Ticket updates and replies from Zoho Desk should also be visible
                                  • Make Camera Overlay & Recording Controls Visible in All Screen-Sharing Options

                                    Hi Zoho WorkDrive Team, Hope you are doing well. We would like to request an improvement to the screen-recording experience in Zoho WorkDrive. Current Limitation: At the moment the recording controls are visible only inside the Zoho WorkDrive tab. When
                                  • Send WhatsApp voice messages from Bigin

                                    Greetings, I hope all of you are doing well. We're happy to announce this enhancement we've made to Bigin. Bigin's WhatsApp integration now supports audio messages, so you can record and send voice messages. This makes it easier to handle customer questions
                                  • CUSTOM FUNCTION GIVE ERROR #EVAL!

                                    CUSTEM FUNCTION CREATE KYA ZOHOSHEET ME US FUNCTION KO USE KIYA LEKIN DATA TO SAHI HAI LAKIN DATA SHEET ME NAHI LAG LAHA HAI KRUPYA SOLVE KARE MY CODE IS float ADDTWO_TWO(float NO1, float NO2) { ADD = NO1 + NO2; return ADD; }
                                  • Samsung Keyboard Issues with Notebook

                                    Dear Users, We're sorry to inform you that some of our users are experiencing certain issues like scrolling, delay/lag, cursor placement especially within the text notes. This occurs mainly due to Samsung Keyboard compatibility with Android 13 and some
                                  • Zoho Books | Product updates | October 2025

                                    Hello users, We’ve rolled out new features and enhancements in Zoho Books. From iOS 26 updates to viewing reports as charts, explore the updates designed to enhance your bookkeeping experience. Zoho Books Updates for Apple Devices At WWDC 2025, Apple
                                  • Zoho Developer Community Hackathon 2025 is LIVE!

                                    Hey developers! It’s that time of the year again — the Zoho Developer Community Hackathon 2025 is officially open for registrations! If you’ve been waiting for a chance to stretch your skills, try something new, or finally bring that idea to life, this
                                  • Zoho Books | Product updates | September 2025

                                    Hello users, We’ve rolled out new features and enhancements in Zoho Books. From PayNow payment method to applying journal credits to invoices and bills in other locations, explore the updates designed to enhance your bookkeeping experience. Integrate
                                  • Contact data removes Account data when creating a quote

                                    Hi, Our customer has address fields in their quote layout which should be the address of the Account. They prefill the information, adding the account name - the address data is populated as per what is in the account - great. However when they then add
                                  • filter broke my data

                                    I uploaded a file recently from Sheets and it has top 2 rows frozen, with table headers in second row and each one is filterable. somehow my first 2 columns became unfiltered and no matter what I do I cannot reapply the filter?? also didn't realize they
                                  • Zoho Workdrive for Office, "vsto runtime not found"

                                    Hi all, I have been trying to get ZohoWorkdrive_MS-addin_1.4.exe installed, but I keep getting the error "VSTO Runtime Not Found!" - even though I have installed it ... Anyone else hear had problems with the MS addin?  FYI, I am using O365 on A Dell laptop running Win 10 Home - fully patched and up-to-date.  I have tried compatibility modes and running explicitly as Administrator - the usual steps. Any advice would be appreciated.
                                  • Add "Fetch Composite Item" Action for Inventory

                                    I want to make a Flow that uses information returned in the GET call for Composite Items, and it's not currently available in Zoho Flow. Please consider adding this functionality.
                                  • Inactive Items - Make Less Prominent by Default

                                    Currently, when one marks an Item as "Inactive", it really doesn't do much of anything to hide it or get it out of the way. Search and reporting within Finance should, by default, hide inactive Items from standard reports, searches, etc. If one specifically
                                  • This domain is not allowed to add. Please contact support-as@zohocorp.com for further details

                                    I am trying to setup the free version of Zoho Mail. When I tried to add my domain, theselfreunion.com I got the error message that is the subject of this Topic. I've read your other community forum topics, and this is NOT a free domain. So what is the
                                  • Why is Zoho Meeting quality so poor?

                                    I've just moved from Office 365 to Zoho Workplace and have been generally really positive about the new platform -- nicely integrated, nice GUI, good and easy-to-understand control and customisation, and at a reasonable price. However, what is going on
                                  • Can no longer export as pdf

                                    In NOTEBOOK I am no longer able to export notes to pdfs as I used to be able to. When I hit that command it asks where I want to send it, but no matter what I chose there is no pdf attachment that shows up in order to send. Nothing happens.
                                  • Emails are going to notification folder and not in inbox

                                    emails are going to notification folder and not into inbox
                                  • Flow - Fetch info from drop down in another module

                                    I am running into a road block which I thought would be a simple task. My goal - The account is assigned to a "route" which can be selected from a drop down menu and adds a tag to the account accordingly (easy enough). Now when I create a task for this
                                  • How can I prevent the Zoho Vault extension from automatically logging me out?

                                    Hi, I want the Zoho Vault Chrome extension to never log out. How can I do this? It only allows me to log out for 1 week, and the same applies to the Android app.
                                  • Automated log-out/session end

                                    I'm concerned about security of our data. Is it possible to set an automatic time-out for user sessions on Zoho CRM, after a certain period of inactivity or when the session reaches a certain duration (12 hours perhaps)? 
                                  • Multiple currencies - doesn’t seem to work for site visitors / customers

                                    I am trying to understand how the multiple currency feature works from the perspective of the website visitor who is shopping on my Zoho Commerce site. My site’s base currency is US Dollars (USD) but my store is for customers in Costa Rica and I would
                                  • Zoho Sites - contact us form

                                    I have added a contact us form to my website. I wanted to change the layout so I deleted the section of Contact Us form. When I again try to add the section of Contact Us form, it shows error that "This form already exists on this page."  I am unable
                                  • Zoho CRM App - Links

                                    Hi  Is there are plan for making Custom Links available in the Zoho CRM Android App? I can't see them being added? Thanks Gene
                                  • Templates

                                    Trying to sort out / get rid of unwanted invoice templates, the error msgs are not at all helpful. Surely it's easy to amend the error msg by including a list of the names of the customers / vendors that use it, denying deletion or making it inactive
                                  • Contacts limit in basic vs standard - what counts? Are customers contacts?

                                    I’ve been using books for a number years for my small business. I only ever work with 20 clients at any given time. I do purchase services from a number of vendors to run my business, so there are some comtacts there too. I used to use the basic package,
                                  • Next Page