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

      Introduction In iVendNext, efficiently organizing and accessing data is crucial for smooth business operations. One way to enhance usability is by customizing the sorting order in List Views. Whether you need items sorted by Item Code, Date, or any ...
    • Customizing and Managing Data

      Introduction One of the most powerful features of iVendNext is its ability to customize and manage data to suit your specific business needs. Whether you're analyzing sales performance, tracking inventory, or monitoring customer behavior, iVendNext ...
    • Creating and Customizing Dashboards

      Overview Dashboards in iVendNext provide a centralized view of your retail business’s performance by consolidating key metrics into visual, easy-to-understand formats. Whether you need to track sales trends, monitor inventory levels, or analyze ...
    • Adding and Customizing Buttons in Forms

      Overview Buttons in iVendNext forms provide quick access to actions like submissions, approvals, or navigation. With Client Scripts, users can customize these buttons—adding new ones, renaming existing options, or hiding irrelevant actions—to better ...
    • Customizing Document Titles for Better Clarity

      Introduction In iVendNext, document titles serve as the primary identifier for transactions, making it easier to locate and manage records. However, default titles (e.g., "QUO-0001") may not always provide meaningful context. Customizing titles—such ...