Function #11: Apply unused credits automatically to invoices

Function #11: Apply unused credits automatically to invoices

Today, we bring you a custom function that automatically applies unused credits from excess payments, credit notes, and retainer payments to an invoice when it is created.

 

Prerequisites:


Create a Connection named "zbooks" to successfully execute the function. You can watch the GIF attached below to know how to create the connection. 

 

 

Note: To ensure a systematic approach, the application of unused credits will follow the order of excess payments first, then credit notes, and finally retainer payments.


Custom Function:


Navigate to Settings -> Automation -> Custom Functions -> +New Custom Function > Add the function code from this GitHub link.

 

Workflow Rule: 

 

Go to Settings -> Automation -> Workflow Rules -> +New Workflow Rule and set up the workflow rule as shown below:-



 

In the final step of this workflow rule, associate the custom function you created and then hit Save.


Here's a GIF of how the unused credits will be applied, once you create and save an invoice.


 

With this function in place, you no longer need to apply the unused credits manually. Instead, the system will identify any available credits and automatically apply them after you create an invoice. 

 

If you need any assistance with setting up the function, do not hesitate to reach out to us at support[at]zohobooks[dot]com.

 

Regards,
Shireen Farhana S

Zoho Books.

    Access your files securely from anywhere

        Zoho Developer Community




                                  Zoho Desk Resources

                                  • Desk Community Learning Series


                                  • Digest


                                  • Functions


                                  • Meetups


                                  • Kbase


                                  • Resources


                                  • Glossary


                                  • Desk Marketplace


                                  • MVP Corner


                                  • Word of the Day



                                      Zoho Marketing Automation


                                              Manage your brands on social media



                                                    Zoho TeamInbox Resources

                                                      Zoho DataPrep Resources



                                                        Zoho CRM Plus Resources

                                                          Zoho Books Resources


                                                            Zoho Subscriptions Resources

                                                              Zoho Projects Resources


                                                                Zoho Sprints Resources


                                                                  Qntrl Resources


                                                                    Zoho Creator Resources



                                                                        Zoho Campaigns Resources


                                                                          Zoho CRM Resources

                                                                          • CRM Community Learning Series

                                                                            CRM Community Learning Series


                                                                          • Kaizen

                                                                            Kaizen

                                                                          • Functions

                                                                            Functions

                                                                          • Meetups

                                                                            Meetups

                                                                          • Kbase

                                                                            Kbase

                                                                          • Resources

                                                                            Resources

                                                                          • Digest

                                                                            Digest

                                                                          • CRM Marketplace

                                                                            CRM Marketplace

                                                                          • MVP Corner

                                                                            MVP Corner





                                                                              Design. Discuss. Deliver.

                                                                              Create visually engaging stories with Zoho Show.

                                                                              Get Started Now