Scenario: By standard in NetSuite, the undeposited funds option is selected on the customer payments creation page. The client usually does not use the undeposited funds in customer payments. Additionally, since the default is undeposited funds, the transactions are being saved in Undeposited status and user often forgets to choose the bank account since no… Continue reading Change default option in Customer Payments from Undeposted funds to Account
Tag: assign default value
Function to assign a default value if the value argument is empty
Function to assign a default value if the value argument is empty
Assign default value
/** * @description To assign a default value if the value argument is empty * @param {String|Number|Boolean|Object|Array|null|undefined} value * @param {String|Number|Boolean|Object|Array} defaultValue * @returns {*} either value or defaultValue */ const assignDefaultValue = function assignDefaultValue(value, defaultValue) { if (checkForParameter(value)) return value; else return defaultValue; }