Client Requirement:
What I mean is:
1.- I will create a bill (total amount of the bill 1,720 usd)
2.- I entered the expense accounts as follows:
6300 – 20 usd
1261 – 500
1261 – 1,200
What I want is that before click save, on the new field created “passthrough / expense”, NS automatically shows me the total amount of JUST 1261 account (1,700 usd), because the 20 usd is an expense.
We have a range of passthrough accounts on the chart of accounts (1251 to 1271) so any of these accounts can be used creating a bill. What I need is that when we create a bill and we use any of the passthrough accounts I mentioned, on the new field created NS adds the amount showing me the total.
Proposal:
PROPOSAL FOR AUTOMATICALLY SHOWING THE AMOUNT ON PASSTHORUGH/EXPENSE FIELD
_______________________________________________________________________________
Proposal For Automatically Showing The Amount On Passthrough/Expense Field
This proposal covers showing the total amount on the custom field passthrough/expense automatically the sum of the amounts entered in the expense line on the passthrough accounts (Passthrough account number range from 1251 to 1271), when the Bill is created.
Proposal summary
This proposal describes displaying the sum of amounts (passthrough account number ranges from 1251 to 1271) entered in the expense lines of a Bill in the custom field passthrough/expense before saving the Bills record. And add the “passthrough/expense” filed to the report-“Open Bills by Vendor Category (Go Forward)”
Requirement
I will create a bill (total amount of the bill 1,720 USD)
I entered the expense accounts as follows:
6300 – 20 USD
1261 – 500 USD
1261 – 1,200 USD
What I want is that before click save, on the new field created “passthrough / expense”, NS automatically shows me the total amount of JUST 1261 account (1,700 USD), because the 20 USD is an expense.
We have a range of passthrough accounts on the chart of accounts (1251 to 1271) so any of these accounts can be used creating a bill. What I need is that when we create a bill and we use any of the passthrough accounts I mentioned, on the new field created NS adds the amount showing me the total.
Once this field is created I need it to be added to the following report- “Open Bills by Vendor Category (Go Forward)”
Our Solution
- As a solution for this requirement, we can implement a Client Script and deploy it in the Bills record .
- When the first line is added to the Expenses sublist in Bills record, the client script will validate the Account fields value and check if the Account is a passthrough account on the chart of accounts that ranging between 1251 to 1271.
- If yes only, that expense line will be considered for further script executions.
- Then, the Amount in the corresponding expense line will be set to the custom field “passthrough/expense”.
- Similarly, when the next line is added to the Expenses sublist, if the Account is a passthrough account( between 1251 and 1271) and if it’s a passthrough account, then only the lines Amount will be added to the passthrough/expense.
- The value in the “passthrough/expense” field will be equal to the sum of amounts from all the pass through accounts ( between 1251 and 1271) in the expense sublist
- The value in passthrough/expense field will update each time a new expense line is added or deleted
- Finally we will add the “passthrough/expense” filed to the report-“Open Bills by Vendor Category (Go Forward)”(ID- CUSTOMREPORT_602_4001251_396)
Assumptions
- The customization will slow down the NetSuite performance.
Risk
- There will be performance issues with client script since it takes long time to calculate the value each time a new line is added to the expense line.
- This issue can be solved if we implement a User Event script instead of client script for calculating the value for passthrough/expense field.
- when using User event script, the value for the field passthrough/expense will be calculated only after the record is saved.
- On saving the bills record, the user event script will iterate through each line in the Expense sub list and then check if the account in the line is a passthrough account between 1251 and 1271 then the amount of the line will be taken for calculating the value for passthrough/expense field.
Suggestion
The requirement can be accomplished in two ways, using the client script and the user event script. As mentioned previously the client script slows down overall performance but the value calculation will be the real time.
But when using the user event script, we can handle this performance issue effectively. When using the user event script we cannot populate value in real time. The value calculation is only possible after saving the record. Please let us know your which method you prefer?