Proposal Summary
This proposal outlines a custom script-based solution to automate the application of both flat-rate and percentage-based manual discounts at the item line level within NetSuite. The solution introduces a custom column field to capture discount amounts, and systematically generates corresponding discount lines to maintain transparency and traceability.
The estimated time for completion is 80 hours, including analysis, development, and testing.
This proposal is based on discussions and prior communications. Any additional modifications identified during development will be treated as a change request.
Requirement Overview
The system must support manual entry of discounts at the line level on Estimates, Sales Orders, Invoices, and Credit Memos. Each item line may have a different discount, either as a flat amount or a percentage. Discounts are applied only when a value greater than zero is entered. Discount values must be shown in a dedicated column labeled “Discount” on transaction PDFs. Discount behaviour must remain consistent across transaction flows such as Estimate to Sales Order, Sales Order to Invoice, and Invoice to Credit Memo. Discounts from external systems like Shopify are not required.
Deliverables
Transaction Scope
Customization will be applied to the following transaction types:
- Estimate
- Sales Order
- Invoice
- Credit Memo
As part of the proposed discount automation solution, the following deliverables will be implemented across the relevant transaction types:
- Custom Column Field
- A custom column field labeled “Discount” will be added to the item sublist in all mentioned transactions.
- The field will accept both flat amount and percentage-based discount values.
- Discount Item creation
- A dedicated non-inventory Discount item will be created exclusively for use by the automation script.
- The item will have the “Apply Before Sales Tax” option enabled to ensure discounts are applied before tax calculation.
- The item will be mapped to the 40000 – Sales GL account for accurate accounting.Custom Script
3. Custom Script Development
o When a user enters a value (either a flat amount or percentage) in the “Discount” column for an item line on an Estimate, Sales Order, Invoice, or Credit Memo, the system will automatically add a separate discount line when the transaction is saved. Users do not need to manually calculate or insert discount lines; the system handles this entirely.
- Each item line can have its own unique discount, allowing flexibility to apply different amount or percentages as needed per product or service.
- Discount is reflected in the Amount column as per standard NetSuite functionality.
- The body level discount fields will be hidden in the customised transaction forms. Checks if a body-level discount is already applied; if so, skips line-level logic.
- Applies to Sales Orders in any status, including Pending Approval and Pending Fulfillment.
- Line-level discounts are applied only if the entered value is greater than zero.
- The script identifies whether the entered discount is a percentage or a flat amount based on the presence of the “%” symbol in the input.
- It then calculates the discount accordingly and inserts a negative line item reflecting the discount for each applicable line.
- Executes on both create and edit modes, ensuring discount logic runs on saved changes.
- Since there is only 1 currency for sleekfence, no calculation of exchange rates needed.
- Discounts entered on one transaction will carry through automatically when it is converted to the next stage. Users will not need to re-enter discounts during conversion.
- From Estimate to Sales Order
- From Sales Order to Invoice
- From Invoice to Credit Memo
4. PDF Updates
o Quote PDF
§ Discount line item will not be printed in the pdf. Instead. A discount column will be added in between the price and extension Column.
§ If no more discount is added in column on all items, the value in the column will be 0.00
§ Attaching the screenshot of current estimate below:
· Sales Order PDF
§ GST, GST Amt, Gross Amt will be removed from the sales order pdf. And Amount column will be renamed to ”Extension” in the pdf.
§ A discount column will be added in between the price and extension Column.
§ If no more discount is added in column custom column “discount”, the value in the column of pdf will be 0.00.
§ The summary section at bottom will not be having discount, since we are planning to go for only the line level discount.
§ The custom form considered is “Crest Group Lim – Sales Order” and the pdf template “Crest – Sales Order PDF/HTML Template”.
§ Attaching the sample of the current Sales order pdf:
· Invoice PDF
§ The form considered for Invoice is “Crest Group Lim – Invoice” and pdf template is “Crest – Invoice PDF/HTML Template”.
§ Discount line item will not be printed in the pdf. Instead. A discount column will be added in between the price and extension Column.
§ If no more discount is added in column on all items, the value in the column will be 0.00.
§ Attaching the screenshot of current Invoice:

Notes
· User have to input either the percentage with standard symbol “%” or just the flat rate. Based on that logic will be applied in the orders.
· The Sales orders, Invoices, credit memos created from any other transactions like Estimate, sales orders, etc will be following the same item lines from the created from transactions, no validation will be done on that part even if we save.
Assumptions
· Any discounts Integration is considered from Shopify. The orders in the shopify will remain unaffected. And will ensure no impact is will be happening for the orders created from the shopify.
Risks
· As per the line level items increase the discount lines items will be added, and taking some time seconds to save the record. Script will be optimized and tested on high line-count records.