Auto Generate User Codes
YouTube: How to Auto-Generate Item User Codes in Import PUV Configuration?
How to Auto-Generate Item User Codes in Import PUV Configuration?
In this tutorial, we will learn how to use the "Auto Generate User Codes" option while importing a Purchase Voucher from an external file in Logic ERP.
This feature allows the system to automatically generate a User Code or Item Code when the corresponding code is not defined in the imported Excel file.
Access to the Import Configuration
To access the required option:
Navigate to Import Purchase Vouchers from External File.
Open the Configuration window.
Locate the option labeled as
"Auto Generate User Codes"

Before enabling this option, let's first understand the default behavior.
Import the File with User Code Disabled
Let's first import the Purchase Excel file without defining the User Code or Item Code.
Keep "Auto Generate User Codes" disabled.
Import the required Purchase Excel file.
System Behavior
As you can see, in the Header Details section, the Invalid Doc column displays Yes, indicating that the document contains invalid items.
To identify the invalid items:
Open the Invalid Item Details tab under the Item Details section.
As you can see, all the items have been identified as invalid.
The Invalid Remarks column displays the reason:
"Item Code Can't Be Blank"

This indicates that the system requires an Item Code for the imported items.
Let's Enable Auto Generate User Codes
If the Item Code is not available in the Excel file, you can configure the system to automatically generate a User Code.
To enable this feature:
Return to the Configuration window.
Enable "Auto Generate User Codes".
Define the required User Code Prefix.

Save the configuration changes.
Import the Purchase File Again
Now, let's import the same Purchase Excel file again.
System Behavior
As you can see, the Invalid Doc column now displays No, indicating that there are no invalid items and the file is ready for import.
The system has automatically generated the required User Codes based on the configured prefix.
Proceed with importing the Purchase document.

Import Result
The document has been successfully imported.
Verify the Imported Purchase Voucher
Let's verify the result in the Purchase Voucher module.
Open the imported Purchase Voucher.
Review the purchase item details.

As you can see, the purchase details have been successfully reflected in the Purchase Voucher along with the automatically generated User Code or Item Code.
Final Outcome
By enabling "Auto Generate User Codes" and defining a User Code Prefix, Logic ERP can automatically generate the required User Code or Item Code when it is not provided in the external purchase file. This helps prevent item-code-related import errors and allows the purchase document to be imported successfully.
Last updated