Changed profit to take into account the overhead along with the total labor cost

when profit is a %

* Fixed Models
* Fixed JS Calculator
* Cleaned up specs to access attributes directly

  #1349
This commit is contained in:
Eric Davis committed 2008-06-19 15:29:02 -07:00
1 parent 5431df3d8d
commit b776098c7d
7 files changed
+37 -14

No files matched your search

+2 -1
View File
@@ -150,8 +150,9 @@ Object.extend(BudgetModule.prototype, {
var materials_subtotal = Budget.toAmount($('deliverable_materials').value);
}
// Profit uses labor cost and overhead
if ($('deliverable_profit').value.match('%')) {
var profit_subtotal = (Budget.toAmount($('deliverable_profit').value) / 100) * cost;
var profit_subtotal = (Budget.toAmount($('deliverable_profit').value) / 100) * (cost + overhead_subtotal);
} else {
var profit_subtotal = Budget.toAmount($('deliverable_profit').value);
}