Untitled
unknown
plain_text
a year ago
431 B
8
Indexable
function calculateTotal(kgFatSum, kgSnfSum, commission, headLoad) {
// Calculate the base value
const baseValue = ((kgFatSum + kgSnfSum) / 12) * 100;
// Calculate the commission and headLoad components
const commissionValue = parseInt(baseValue * commission.toFixed(2));
const headLoadValue = parseInt(baseValue * headLoad.toFixed(2));
// Return the total
return commissionValue + headLoadValue;
}
Editor is loading...
Leave a Comment