Proposal summary
This proposal outlines a new enhancement to the Sales Order discount management process in NetSuite. The proposed solution will allow users to either input a discount percentage or a flat discount amount directly within “Discount Value” column in the item sublist. Additionally, a custom column will display the calculated discounted amount for each item. Upon saving the record, if a discount is entered for any line item, a new discount line will automatically be inserted just below the corresponding item line. This solution aims to streamline discount practices, improve the accuracy of financial data, and enhance financial reporting within NetSuite.
1.Requirement from Enduro Pet Foods
The client has requested a modification to the existing discount management process in NetSuite Sales Orders. The new requirement is to provide a solution that allows accurate calculation, aggregation, and posting of discounts, ensuring better visibility and proper financial reporting. The specific requirements include:
- Line-level Discount Input: Allow users to enter a discount as either a percentage or a flat rate in a new “Discount Value” column at the line-item level.
- Custom Column for Discounted Amount: Create a custom column that automatically displays the discounted amount based on the value entered in the “Discount Value” column.
- Dynamic Discount Line Creation: If a discount value is present for any item, automatically add a discount line item immediately below the corresponding line after the record is saved.
- Accurate GL Posting: Ensure that all discount amounts are posted accurately to a designated GL account for better visibility in financial reports and compliance with accounting standards.
2.Deliverables
- Discounted Amount Calculation: Develop logic to calculate and display the discounted amount in a custom column based on the “Discount Value” input.
- Dynamic Discount Line Creation: Implement a script that adds a new discount line item below each discounted line item upon saving the Sales Order record.
- GL Impact Verification: Ensure the discounts are posted correctly to the designated GL account using the specified Discount Item.
- Testing: Conduct comprehensive testing of various discount scenarios to validate the correct application and GL impact of discounts.
3.Proposed Solution
The proposed solution involves implementing logic to handle the discount calculations, display the discounted amounts, and dynamically create discount line items upon saving the Sales Order. The steps are as follows:
Step 1: Calculate and Display Discounted Amount
- Create a custom column named “Discounted Amount” in the item sublist of the Sales Order form.
- Develop a client script that calculates the discounted amount based on the input in the existing “Discount Value” column:
- If the value is a percentage (e.g., 10%), apply it to the item’s rate to compute the discount.
- If the value is a flat rate, use it directly as the discount amount.
- Display the calculated discounted amount in the new custom column for each line item.
Step 2: Dynamic Discount Line Creation on Save
- Implement a user-event script that triggers upon saving the Sales Order.
- The script will:
- Check each line in the item sublist for a value in the “Discount Value” column.
- For lines with a discount, add a new discount line item directly below the corresponding line.
- Set the discount amount in the new line based on the value in the “Discounted Amount” column.
- The new discount line will use a predefined Discount Item to ensure the discount is posted correctly to the specified GL account.
Step 3: Aggregate and Post Discounts to GL
- Use the predefined Discount Item to post the total discount to the designated GL account.
- Validate that the GL impact reflects the discounts accurately for better financial reporting.
Attached below is an example of the planned customization:
Before record save
After record save
Additionally, the corresponding PDF will be updated as follows –
4.Prerequisite
- Could you please confirm the account for which the discounts must be posted is ‘35-1070 E-Discounts given’?
5.Assumption
- The existing “Discount Value” column will be used for entering the discount percentage or flat rate.
- Only inventory items are considered
- Subsidiary to be considered is ‘Enduro Pet Foods’
- Form selected should be ‘Enduro Sales Order form’, ‘Enduro Pet Foods – Invoice’ or ‘Enduro Pet Foods – Credit Memo’
- Customization deployed to Sales order, Invoice and Credit Note records
- Discount Values are entered as positive values
- A custom column (“Discounted Amount”) will be created solely for display purposes
- After editing the record and then being saved, discount item inserted will be removed if discount column in above mentioned item types is empty
- Manually entering discount items in these records is not considered
- On creating a copy of line, the current value will be sourced to Rate and discount value field
- Only UI contexts are considered
- Add Multiple and Intelligence recommendations are not considered for adding items
- A Discount Item – 10% Discount Enduro will be used to capture the discount for GL posting