Customizing Sales Invoice IDs Based on Sales Order IDs

Customizing Sales Invoice IDs Based on Sales Order IDs

Introduction

In the world of business, maintaining consistency and traceability across documents is crucial for efficient operations. iVendNext, a comprehensive ERP solution, offers advanced customization options, including the ability to customize Sales Invoice IDs based on Sales Order IDs. This feature ensures that your sales invoices are easily traceable back to their corresponding sales orders, enhancing both internal processes and customer satisfaction. This article will guide you through the process of customizing Sales Invoice IDs based on Sales Order IDs in iVendNext.




Why Customize Sales Invoice IDs?

Customizing Sales Invoice IDs based on Sales Order IDs offers several benefits:


  1. Traceability: Ensures that each sales invoice can be easily traced back to its corresponding sales order, simplifying audits and reconciliations.

  2. Consistency: Maintains a consistent naming convention across documents, reducing confusion and errors.

  3. Efficiency: Streamlines the invoicing process by automating the ID generation, saving time and reducing manual entry errors.




Prerequisites for Customization

Before customizing Sales Invoice IDs based on Sales Order IDs in iVendNext, ensure that the following prerequisites are met:


  1. Sales Order: A sales order should be created and submitted in the system.

  2. Sales Invoice: Ensure that the sales invoice is created from the sales order.

  3. Scripting Knowledge: Basic knowledge of scripting is required to implement the customization.




Steps to Customize Sales Invoice IDs

The steps to customize Sales Invoice ID are as follows:


1. Accessing the Script Editor

  1. Navigate to: Home > Settings > Custom Script.

  2. Click on the Add Custom Script button to open the Script Editor.


2. Writing the Custom Script

The following script allows you to apply a naming series to a Sales Invoice that matches the corresponding Sales Order ID. For example, if the Sales Order ID is SO-12345, the corresponding Sales Invoice ID will be set as M-12345.


ivendnext.ui.form.on("Sales Invoice", "refresh", function(frm){

    var sales_order = frm.doc.items[0].sales_order.replace("M", "M-");

    if (!frm.is_new() && sales_order && frm.doc.name!==sales_order){

        ivendnext.call({

            method: 'ivendnext.model.rename_doc.rename_doc',

            args: {

                doctype: frm.doctype,

                old: frm.docname,

                "new": sales_order,

                "merge": false

            },

        });

    }

});


3. Saving and Applying the Script

  1. Copy the script into the Script Editor.

  2. Click on the Save button to save the script.

  3. The script will now automatically apply the naming convention to all new sales invoices created from sales orders.




Key Features of Customization in iVendNext

Some of the key features are:


1. Automated ID Generation

The script automates the generation of Sales Invoice IDs based on Sales Order IDs, ensuring consistency and reducing manual entry errors.


2. Traceability

By maintaining a consistent naming convention, the script enhances traceability, making it easier to track sales invoices back to their corresponding sales orders.


3. Flexibility

The script can be customized further to meet specific business needs, such as adding prefixes or suffixes to the IDs.




Managing Customized IDs

1. Tracking Sales Orders and Invoices

iVendNext automatically assigns statuses to both sales orders and sales invoices, helping you track their progress:


  • Sales Order Statuses:


  • Draft: The sales order is saved but not yet submitted.

  • Submitted: The sales order is submitted, and the items are ready for delivery.

  • Completed: All items have been delivered, and the sales order is closed.


  • Sales Invoice Statuses:


  • Draft: The invoice is saved but not yet submitted.

  • Submitted: The invoice is submitted, and the general ledger is updated.

  • Paid: The customer has made the payment.


2. Handling Returns and Credit Notes

In cases where items are returned by the customer, iVendNext allows you to create Credit Notes against the original sales invoice. This feature ensures that your accounts remain accurate and up-to-date.




Advanced Features

1. Multi-Currency Support

For businesses dealing with international clients, iVendNext offers multi-currency support. You can set the invoice currency based on the customer’s preference, and the system will handle the conversion automatically.


2. Tax and Shipping Charges

iVendNext supports the addition of taxes and shipping charges to sales invoices. This ensures that all charges are accurately reflected in the final invoice.


3. Customizable Templates

iVendNext offers extensive customization options for sales invoices. You can print invoices on your company’s letterhead, group similar items, and even customize the headings.




Conclusion

Customizing Sales Invoice IDs based on Sales Order IDs in iVendNext is a powerful feature that enhances traceability, consistency, and efficiency in your invoicing process. By automating the ID generation and maintaining a consistent naming convention, iVendNext ensures that your sales invoices are easily traceable back to their corresponding sales orders. Whether you’re a small business or a large enterprise, iVendNext provides the tools you need to manage your invoicing processes effectively.




    • Related Articles

    • Customizing Sorting Order in List Views

      Overview Customize List View sorting in iVendNext to match your workflow. Sort by Item Code, Date, or any field—ascending or descending. This guide walks you through setup for clearer, faster access to records. Why Customize Sorting Order? Before ...
    • Sales and Purchase Order Management

      Overview This article will guide you through the key features of sales and purchase order management in iVendNext. Understanding Sales and Purchase Orders Sales Orders A sales order is a document issued by a business to a customer, confirming the ...
    • Customizing and Managing Data

      Overview This article will guide you through the key features and best practices for customizing and managing data in iVendNext. 1. Introduction to Data Customization and Management in iVendNext iVendNext offers a range of tools that allow you to ...
    • Creating and Customizing Dashboards

      Overview This article gives you an overview of iVendNext dashboards, which present key business metrics in clear visuals to help you track sales, inventory, and payments for faster, data-driven decisions. This guide walks you through the step-by-step ...
    • Creating a POS Invoice

      Overview This guide walks you through creating, modifying, and finalizing invoices in iVendNext. Prerequisites Before creating an invoice: ✔ POS Profile configured (with payment methods, warehouse) ✔ Items added with selling prices ✔ Customer ...