Custom Google Apps Script for Sheets create and apply discount percentages
CALC_DIS(qty, cost, discount): This function calculates the total cost for a particular quantity of items, given their individual cost and a discount rate. It takes three parameters: qty (quantity), cost (individual cost of each item), and discount (discount rate as a decimal between 0 and 1).Inside the function, a variable named total is initialized to … Read more