Created
September 3, 2015 19:42
-
-
Save NateJLewis/b8dcdd87efcbc162494b to your computer and use it in GitHub Desktop.
Classic Tee Goals
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(".ct_est.est_sales").change(function(){ | |
var findBaseCost = $(".profit_label.base_label").find(".base_cost_value"); | |
var baseCost = $(".profit_label.base_label").find(".base_cost_value").val(); | |
var findSellingPrice = $(".find_selling_price").find(".ct_sp.selling_price"); | |
var sellingPriceVal = $(".find_selling_price").find(".ct_sp.selling_price").val(); | |
var estSalesVal = $(".find_est_sales").find(".ct_est.est_sales").val(); | |
var shirtNumTxt = $(".profit_label.base_label").find("span.num_shirts"); | |
var numColor = $(".profit_label.base_label").find("span.num_colors"); | |
var baseTxt = $(".profit_label.base_label").find("span.bs_txt"); | |
var perProfitTxt = $(".profit_label.profit_sale").find("span.profit_per_sale"); | |
var thisValue = $(this).val(); | |
var designColorValue = $(".design_colors").val(); | |
if(thisValue < 10) { | |
var baseCostValue = findBaseCost.attr("value", "14.25"); | |
var setSellingPriceMin = findSellingPrice.attr("value", "14.25"); | |
var perSaleProfit = sellingPriceVal - baseCost; | |
var formatperSaleProfit = perSaleProfit.toFixed(2); | |
shirtNumTxt.html("less than 10"); | |
numColor.html("1 - 6"); | |
baseTxt.html("14.25"); | |
perProfitTxt.html(formatperSaleProfit); | |
} else if(thisValue >= 10) { | |
// 10 - 300 shirts 0 color | |
if ( designColorValue == 0) { | |
var baseCostValue = findBaseCost.attr("value", "5.25"); | |
var setSellingPriceMin = findSellingPrice.attr("value", "5.25"); | |
var perSaleProfit = sellingPriceVal - baseCost; | |
var formatperSaleProfit = perSaleProfit.toFixed(2); | |
shirtNumTxt.html("10 - 300"); | |
numColor.html("0"); | |
baseTxt.html("5.25"); | |
perProfitTxt.html(formatperSaleProfit); | |
} | |
// 10-25 shirts 1 - 6 color | |
else if(thisValue > 10 && thisValue < 25) { | |
// 1 color | |
if (designColorValue == 1) { | |
var baseCostValue = findBaseCost.attr("value", "9.00"); | |
var setSellingPriceMin = findSellingPrice.attr("value", "9.00"); | |
var perSaleProfit = sellingPriceVal - baseCost; | |
var formatperSaleProfit = perSaleProfit.toFixed(2); | |
shirtNumTxt.html("10 - 25"); | |
numColor.html("1"); | |
baseTxt.html("9.00"); | |
perProfitTxt.html(formatperSaleProfit); | |
} | |
// 2 colors | |
else if (designColorValue == 2) { | |
var baseCostValue = findBaseCost.attr("value", "11.50"); | |
var setSellingPriceMin = findSellingPrice.attr("value", "11.50"); | |
var perSaleProfit = sellingPriceVal - baseCost; | |
var formatperSaleProfit = perSaleProfit.toFixed(2); | |
shirtNumTxt.html("10 - 25"); | |
numColor.html("2"); | |
baseTxt.html("11.50"); | |
perProfitTxt.html(formatperSaleProfit); | |
} | |
// 3 colors | |
else if (designColorValue == 3) { | |
var baseCostValue = findBaseCost.attr("value", "14.00"); | |
var setSellingPriceMin = findSellingPrice.attr("value", "14.00"); | |
var perSaleProfit = sellingPriceVal - baseCost; | |
var formatperSaleProfit = perSaleProfit.toFixed(2); | |
shirtNumTxt.html("10 - 25"); | |
numColor.html("3"); | |
baseTxt.html("14.00"); | |
perProfitTxt.html(formatperSaleProfit); | |
} | |
// 4 colors | |
else if (designColorValue == 4) { | |
var baseCostValue = findBaseCost.attr("value", "14.25"); | |
var setSellingPriceMin = findSellingPrice.attr("value", "14.25"); | |
var perSaleProfit = sellingPriceVal - baseCost; | |
var formatperSaleProfit = perSaleProfit.toFixed(2); | |
shirtNumTxt.html("10 - 25"); | |
numColor.html("4"); | |
baseTxt.html("14.25"); | |
perProfitTxt.html(formatperSaleProfit); | |
} | |
// 5 colors | |
else if (designColorValue == 5) { | |
var baseCostValue = findBaseCost.attr("value", "14.25"); | |
var setSellingPriceMin = findSellingPrice.attr("value", "14.25"); | |
var perSaleProfit = sellingPriceVal - baseCost; | |
var formatperSaleProfit = perSaleProfit.toFixed(2); | |
shirtNumTxt.html("10 - 25"); | |
numColor.html("5"); | |
baseTxt.html("14.25"); | |
perProfitTxt.html(formatperSaleProfit); | |
} | |
// 6 colors | |
else if (designColorValue == 6) { | |
var baseCostValue = findBaseCost.attr("value", "14.25"); | |
var setSellingPriceMin = findSellingPrice.attr("value", "14.25"); | |
var perSaleProfit = sellingPriceVal - baseCost; | |
var formatperSaleProfit = perSaleProfit.toFixed(2); | |
shirtNumTxt.html("10 - 25"); | |
numColor.html("6"); | |
baseTxt.html("14.25"); | |
perProfitTxt.html(formatperSaleProfit); | |
} | |
} | |
// 25 - 50 shirts 1 - 6 colors | |
else if(thisValue > 25 && thisValue < 50) { | |
// 1 color | |
if (designColorValue == 1) { | |
var baseCostValue = findBaseCost.attr("value", "7.81"); | |
var setSellingPriceMin = findSellingPrice.attr("value", "7.81"); | |
var perSaleProfit = sellingPriceVal - baseCost; | |
var formatperSaleProfit = perSaleProfit.toFixed(2); | |
shirtNumTxt.html("25 - 50"); | |
numColor.html("1"); | |
baseTxt.html("7.81"); | |
perProfitTxt.html(formatperSaleProfit); | |
} | |
// 2 colors | |
else if (designColorValue == 2) { | |
var baseCostValue = findBaseCost.attr("value", "9.10"); | |
var setSellingPriceMin = findSellingPrice.attr("value", "9.10"); | |
var perSaleProfit = sellingPriceVal - baseCost; | |
var formatperSaleProfit = perSaleProfit.toFixed(2); | |
shirtNumTxt.html("25 - 50"); | |
numColor.html("2"); | |
baseTxt.html("9.10"); | |
perProfitTxt.html(formatperSaleProfit); | |
} | |
// 3 colors | |
else if (designColorValue == 3) { | |
var baseCostValue = findBaseCost.attr("value", "10.40"); | |
var setSellingPriceMin = findSellingPrice.attr("value", "10.40"); | |
var perSaleProfit = sellingPriceVal - baseCost; | |
var formatperSaleProfit = perSaleProfit.toFixed(2); | |
shirtNumTxt.html("25 - 50"); | |
numColor.html("3"); | |
baseTxt.html("10.40"); | |
perProfitTxt.html(formatperSaleProfit); | |
} | |
// 4 colors | |
else if (designColorValue == 4) { | |
var baseCostValue = findBaseCost.attr("value", "11.60"); | |
var setSellingPriceMin = findSellingPrice.attr("value", "11.60"); | |
var perSaleProfit = sellingPriceVal - baseCost; | |
var formatperSaleProfit = perSaleProfit.toFixed(2); | |
shirtNumTxt.html("25 - 50"); | |
numColor.html("4"); | |
baseTxt.html("11.60"); | |
perProfitTxt.html(formatperSaleProfit); | |
} | |
// 5 colors | |
else if (designColorValue == 5) { | |
var baseCostValue = findBaseCost.attr("value", "12.80"); | |
var setSellingPriceMin = findSellingPrice.attr("value", "12.80"); | |
var perSaleProfit = sellingPriceVal - baseCost; | |
var formatperSaleProfit = perSaleProfit.toFixed(2); | |
shirtNumTxt.html("25 - 50"); | |
numColor.html("5"); | |
baseTxt.html("12.80"); | |
perProfitTxt.html(formatperSaleProfit); | |
} | |
// 6 colors | |
else if (designColorValue == 6) { | |
var baseCostValue = findBaseCost.attr("value", "14.00"); | |
var setSellingPriceMin = findSellingPrice.attr("value", "14.00"); | |
var perSaleProfit = sellingPriceVal - baseCost; | |
var formatperSaleProfit = perSaleProfit.toFixed(2); | |
shirtNumTxt.html("25 - 50"); | |
numColor.html("6"); | |
baseTxt.html("14.00"); | |
perProfitTxt.html(formatperSaleProfit); | |
} | |
} | |
// 50 - 75 shirts 1 color | |
else if(thisValue > 50 && thisValue < 75) { | |
// 1 color | |
if (designColorValue == 1) { | |
var baseCostValue = findBaseCost.attr("value", "7.31"); | |
var setSellingPriceMin = findSellingPrice.attr("value", "7.31"); | |
var perSaleProfit = sellingPriceVal - baseCost; | |
var formatperSaleProfit = perSaleProfit.toFixed(2); | |
shirtNumTxt.html("50 - 75"); | |
numColor.html("1"); | |
baseTxt.html("7.31"); | |
perProfitTxt.html(formatperSaleProfit); | |
} | |
// 2 colors | |
else if (designColorValue == 2) { | |
var baseCostValue = findBaseCost.attr("value", "8.25"); | |
var setSellingPriceMin = findSellingPrice.attr("value", "8.25"); | |
var perSaleProfit = sellingPriceVal - baseCost; | |
var formatperSaleProfit = perSaleProfit.toFixed(2); | |
shirtNumTxt.html("50 - 75"); | |
numColor.html("2"); | |
baseTxt.html("8.25"); | |
perProfitTxt.html(formatperSaleProfit); | |
} | |
// 3 colors | |
else if (designColorValue == 3) { | |
var baseCostValue = findBaseCost.attr("value", "9.15"); | |
var setSellingPriceMin = findSellingPrice.attr("value", "9.15"); | |
var perSaleProfit = sellingPriceVal - baseCost; | |
var formatperSaleProfit = perSaleProfit.toFixed(2); | |
shirtNumTxt.html("50 - 75"); | |
numColor.html("3"); | |
baseTxt.html("9.15"); | |
perProfitTxt.html(formatperSaleProfit); | |
} | |
// 4 colors | |
else if (designColorValue == 4) { | |
var baseCostValue = findBaseCost.attr("value", "9.95"); | |
var setSellingPriceMin = findSellingPrice.attr("value", "9.95"); | |
var perSaleProfit = sellingPriceVal - baseCost; | |
var formatperSaleProfit = perSaleProfit.toFixed(2); | |
shirtNumTxt.html("50 - 75"); | |
numColor.html("4"); | |
baseTxt.html("9.95"); | |
perProfitTxt.html(formatperSaleProfit); | |
} | |
// 5 colors | |
else if (designColorValue == 5) { | |
var baseCostValue = findBaseCost.attr("value", "10.65"); | |
var setSellingPriceMin = findSellingPrice.attr("value", "10.65"); | |
var perSaleProfit = sellingPriceVal - baseCost; | |
var formatperSaleProfit = perSaleProfit.toFixed(2); | |
shirtNumTxt.html("50 - 75"); | |
numColor.html("5"); | |
baseTxt.html("10.65"); | |
perProfitTxt.html(formatperSaleProfit); | |
} | |
// 6 colors | |
else if (designColorValue == 6) { | |
var baseCostValue = findBaseCost.attr("value", "11.35"); | |
var setSellingPriceMin = findSellingPrice.attr("value", "11.35"); | |
var perSaleProfit = sellingPriceVal - baseCost; | |
var formatperSaleProfit = perSaleProfit.toFixed(2); | |
shirtNumTxt.html("50 - 75"); | |
numColor.html("6"); | |
baseTxt.html("11.35"); | |
perProfitTxt.html(formatperSaleProfit); | |
} | |
} | |
// 75 - 100 shirts 1 color | |
else if(thisValue > 75 && thisValue < 100) { | |
// 1 color | |
if (designColorValue == 1) { | |
var baseCostValue = findBaseCost.attr("value", "6.82"); | |
var setSellingPriceMin = findSellingPrice.attr("value", "6.82"); | |
var perSaleProfit = sellingPriceVal - baseCost; | |
var formatperSaleProfit = perSaleProfit.toFixed(2); | |
shirtNumTxt.html("75 - 100"); | |
numColor.html("1"); | |
baseTxt.html("6.82"); | |
perProfitTxt.html(formatperSaleProfit); | |
} | |
// 2 colors | |
else if (designColorValue == 2) { | |
var baseCostValue = findBaseCost.attr("value", "7.48"); | |
var setSellingPriceMin = findSellingPrice.attr("value", "7.48"); | |
var perSaleProfit = sellingPriceVal - baseCost; | |
var formatperSaleProfit = perSaleProfit.toFixed(2); | |
shirtNumTxt.html("75 - 100"); | |
numColor.html("2"); | |
baseTxt.html("7.48"); | |
perProfitTxt.html(formatperSaleProfit); | |
} | |
// 3 colors | |
else if (designColorValue == 3) { | |
var baseCostValue = findBaseCost.attr("value", "8.15"); | |
var setSellingPriceMin = findSellingPrice.attr("value", "8.15"); | |
var perSaleProfit = sellingPriceVal - baseCost; | |
var formatperSaleProfit = perSaleProfit.toFixed(2); | |
shirtNumTxt.html("75 - 100"); | |
numColor.html("3"); | |
baseTxt.html("8.15"); | |
perProfitTxt.html(formatperSaleProfit); | |
} | |
// 4 colors | |
else if (designColorValue == 4) { | |
var baseCostValue = findBaseCost.attr("value", "8.67"); | |
var setSellingPriceMin = findSellingPrice.attr("value", "8.67"); | |
var perSaleProfit = sellingPriceVal - baseCost; | |
var formatperSaleProfit = perSaleProfit.toFixed(2); | |
shirtNumTxt.html("75 - 100"); | |
numColor.html("4"); | |
baseTxt.html("8.67"); | |
perProfitTxt.html(formatperSaleProfit); | |
} | |
// 5 colors | |
else if (designColorValue == 5) { | |
var baseCostValue = findBaseCost.attr("value", "9.18"); | |
var setSellingPriceMin = findSellingPrice.attr("value", "9.18"); | |
var perSaleProfit = sellingPriceVal - baseCost; | |
var formatperSaleProfit = perSaleProfit.toFixed(2); | |
shirtNumTxt.html("75 - 100"); | |
numColor.html("5"); | |
baseTxt.html("9.18"); | |
perProfitTxt.html(formatperSaleProfit); | |
} | |
// 6 colors | |
else if (designColorValue == 6) { | |
var baseCostValue = findBaseCost.attr("value", "9.65"); | |
var setSellingPriceMin = findSellingPrice.attr("value", "9.65"); | |
var perSaleProfit = sellingPriceVal - baseCost; | |
var formatperSaleProfit = perSaleProfit.toFixed(2); | |
shirtNumTxt.html("75 - 100"); | |
numColor.html("6"); | |
baseTxt.html("9.65"); | |
perProfitTxt.html(formatperSaleProfit); | |
} | |
} | |
// 101 - 150 shirts 1 color | |
// STOPPED HERE | |
else if(thisValue > 100 && thisValue < 150) { | |
// 1 color | |
if (designColorValue == 1) { | |
var baseCostValue = findBaseCost.attr("value", "9.00"); | |
var setSellingPriceMin = findSellingPrice.attr("value", "9.00"); | |
var perSaleProfit = sellingPriceVal - baseCost; | |
var formatperSaleProfit = perSaleProfit.toFixed(2); | |
shirtNumTxt.html("100 - 150"); | |
numColor.html("1"); | |
baseTxt.html("9.00"); | |
perProfitTxt.html(formatperSaleProfit); | |
} | |
// 2 colors | |
else if (designColorValue == 2) { | |
var baseCostValue = findBaseCost.attr("value", "11.50"); | |
var setSellingPriceMin = findSellingPrice.attr("value", "11.50"); | |
var perSaleProfit = sellingPriceVal - baseCost; | |
var formatperSaleProfit = perSaleProfit.toFixed(2); | |
shirtNumTxt.html("100 - 150"); | |
numColor.html("2"); | |
baseTxt.html("11.50"); | |
perProfitTxt.html(formatperSaleProfit); | |
} | |
// 3 colors | |
else if (designColorValue == 3) { | |
var baseCostValue = findBaseCost.attr("value", "14.00"); | |
var setSellingPriceMin = findSellingPrice.attr("value", "14.00"); | |
var perSaleProfit = sellingPriceVal - baseCost; | |
var formatperSaleProfit = perSaleProfit.toFixed(2); | |
shirtNumTxt.html("100 - 150"); | |
numColor.html("3"); | |
baseTxt.html("14.00"); | |
perProfitTxt.html(formatperSaleProfit); | |
} | |
// 4 colors | |
else if (designColorValue == 4) { | |
var baseCostValue = findBaseCost.attr("value", "14.25"); | |
var setSellingPriceMin = findSellingPrice.attr("value", "14.25"); | |
var perSaleProfit = sellingPriceVal - baseCost; | |
var formatperSaleProfit = perSaleProfit.toFixed(2); | |
shirtNumTxt.html("100 - 150"); | |
numColor.html("4"); | |
baseTxt.html("14.25"); | |
perProfitTxt.html(formatperSaleProfit); | |
} | |
// 5 colors | |
else if (designColorValue == 5) { | |
var baseCostValue = findBaseCost.attr("value", "14.25"); | |
var setSellingPriceMin = findSellingPrice.attr("value", "14.25"); | |
var perSaleProfit = sellingPriceVal - baseCost; | |
var formatperSaleProfit = perSaleProfit.toFixed(2); | |
shirtNumTxt.html("100 - 150"); | |
numColor.html("5"); | |
baseTxt.html("14.25"); | |
perProfitTxt.html(formatperSaleProfit); | |
} | |
// 6 colors | |
else if (designColorValue == 6) { | |
var baseCostValue = findBaseCost.attr("value", "14.25"); | |
var setSellingPriceMin = findSellingPrice.attr("value", "14.25"); | |
var perSaleProfit = sellingPriceVal - baseCost; | |
var formatperSaleProfit = perSaleProfit.toFixed(2); | |
shirtNumTxt.html("100 - 150"); | |
numColor.html("6"); | |
baseTxt.html("14.25"); | |
perProfitTxt.html(formatperSaleProfit); | |
} | |
} | |
// 151 - 200 shirts 1 color | |
else if(thisValue > 150 && thisValue < 200) { | |
// 1 color | |
if (designColorValue == 1) { | |
var baseCostValue = findBaseCost.attr("value", "9.00"); | |
var setSellingPriceMin = findSellingPrice.attr("value", "9.00"); | |
var perSaleProfit = sellingPriceVal - baseCost; | |
var formatperSaleProfit = perSaleProfit.toFixed(2); | |
shirtNumTxt.html("150 - 200"); | |
numColor.html("1"); | |
baseTxt.html("9.00"); | |
perProfitTxt.html(formatperSaleProfit); | |
} | |
// 2 colors | |
else if (designColorValue == 2) { | |
var baseCostValue = findBaseCost.attr("value", "11.50"); | |
var setSellingPriceMin = findSellingPrice.attr("value", "11.50"); | |
var perSaleProfit = sellingPriceVal - baseCost; | |
var formatperSaleProfit = perSaleProfit.toFixed(2); | |
shirtNumTxt.html("150 - 200"); | |
numColor.html("2"); | |
baseTxt.html("11.50"); | |
perProfitTxt.html(formatperSaleProfit); | |
} | |
// 3 colors | |
else if (designColorValue == 3) { | |
var baseCostValue = findBaseCost.attr("value", "14.00"); | |
var setSellingPriceMin = findSellingPrice.attr("value", "14.00"); | |
var perSaleProfit = sellingPriceVal - baseCost; | |
var formatperSaleProfit = perSaleProfit.toFixed(2); | |
shirtNumTxt.html("150 - 200"); | |
numColor.html("3"); | |
baseTxt.html("14.00"); | |
perProfitTxt.html(formatperSaleProfit); | |
} | |
// 4 colors | |
else if (designColorValue == 4) { | |
var baseCostValue = findBaseCost.attr("value", "14.25"); | |
var setSellingPriceMin = findSellingPrice.attr("value", "14.25"); | |
var perSaleProfit = sellingPriceVal - baseCost; | |
var formatperSaleProfit = perSaleProfit.toFixed(2); | |
shirtNumTxt.html("150 - 200"); | |
numColor.html("4"); | |
baseTxt.html("14.25"); | |
perProfitTxt.html(formatperSaleProfit); | |
} | |
// 5 colors | |
else if (designColorValue == 5) { | |
var baseCostValue = findBaseCost.attr("value", "14.25"); | |
var setSellingPriceMin = findSellingPrice.attr("value", "14.25"); | |
var perSaleProfit = sellingPriceVal - baseCost; | |
var formatperSaleProfit = perSaleProfit.toFixed(2); | |
shirtNumTxt.html("150 - 200"); | |
numColor.html("5"); | |
baseTxt.html("14.25"); | |
perProfitTxt.html(formatperSaleProfit); | |
} | |
// 6 colors | |
else if (designColorValue == 6) { | |
var baseCostValue = findBaseCost.attr("value", "14.25"); | |
var setSellingPriceMin = findSellingPrice.attr("value", "14.25"); | |
var perSaleProfit = sellingPriceVal - baseCost; | |
var formatperSaleProfit = perSaleProfit.toFixed(2); | |
shirtNumTxt.html("150 - 200"); | |
numColor.html("6"); | |
baseTxt.html("14.25"); | |
perProfitTxt.html(formatperSaleProfit); | |
} | |
} | |
// 201 - 300 shirts 1 color | |
else if(thisValue > 200 && thisValue < 300) { | |
// 1 color | |
if (designColorValue == 1) { | |
var baseCostValue = findBaseCost.attr("value", "9.00"); | |
var setSellingPriceMin = findSellingPrice.attr("value", "9.00"); | |
var perSaleProfit = sellingPriceVal - baseCost; | |
var formatperSaleProfit = perSaleProfit.toFixed(2); | |
shirtNumTxt.html("200 - 300"); | |
numColor.html("1"); | |
baseTxt.html("9.00"); | |
perProfitTxt.html(formatperSaleProfit); | |
} | |
// 2 colors | |
else if (designColorValue == 2) { | |
var baseCostValue = findBaseCost.attr("value", "11.50"); | |
var setSellingPriceMin = findSellingPrice.attr("value", "11.50"); | |
var perSaleProfit = sellingPriceVal - baseCost; | |
var formatperSaleProfit = perSaleProfit.toFixed(2); | |
shirtNumTxt.html("200 - 300"); | |
numColor.html("2"); | |
baseTxt.html("11.50"); | |
perProfitTxt.html(formatperSaleProfit); | |
} | |
// 3 colors | |
else if (designColorValue == 3) { | |
var baseCostValue = findBaseCost.attr("value", "14.00"); | |
var setSellingPriceMin = findSellingPrice.attr("value", "14.00"); | |
var perSaleProfit = sellingPriceVal - baseCost; | |
var formatperSaleProfit = perSaleProfit.toFixed(2); | |
shirtNumTxt.html("200 - 300"); | |
numColor.html("3"); | |
baseTxt.html("14.00"); | |
perProfitTxt.html(formatperSaleProfit); | |
} | |
// 4 colors | |
else if (designColorValue == 4) { | |
var baseCostValue = findBaseCost.attr("value", "14.25"); | |
var setSellingPriceMin = findSellingPrice.attr("value", "14.25"); | |
var perSaleProfit = sellingPriceVal - baseCost; | |
var formatperSaleProfit = perSaleProfit.toFixed(2); | |
shirtNumTxt.html("200 - 300"); | |
numColor.html("4"); | |
baseTxt.html("14.25"); | |
perProfitTxt.html(formatperSaleProfit); | |
} | |
// 5 colors | |
else if (designColorValue == 5) { | |
var baseCostValue = findBaseCost.attr("value", "14.25"); | |
var setSellingPriceMin = findSellingPrice.attr("value", "14.25"); | |
var perSaleProfit = sellingPriceVal - baseCost; | |
var formatperSaleProfit = perSaleProfit.toFixed(2); | |
shirtNumTxt.html("200 - 300"); | |
numColor.html("5"); | |
baseTxt.html("14.25"); | |
perProfitTxt.html(formatperSaleProfit); | |
} | |
// 6 colors | |
else if (designColorValue == 6) { | |
var baseCostValue = findBaseCost.attr("value", "14.25"); | |
var setSellingPriceMin = findSellingPrice.attr("value", "14.25"); | |
var perSaleProfit = sellingPriceVal - baseCost; | |
var formatperSaleProfit = perSaleProfit.toFixed(2); | |
shirtNumTxt.html("200 - 300"); | |
numColor.html("6"); | |
baseTxt.html("14.25"); | |
perProfitTxt.html(formatperSaleProfit); | |
} | |
} | |
// 201 - 300 shirts 1 color | |
else if(thisValue > 300) { | |
// 1 color | |
if (designColorValue == 1) { | |
var baseCostValue = findBaseCost.attr("value", "9.00"); | |
var setSellingPriceMin = findSellingPrice.attr("value", "9.00"); | |
var perSaleProfit = sellingPriceVal - baseCost; | |
var formatperSaleProfit = perSaleProfit.toFixed(2); | |
shirtNumTxt.html("300 +"); | |
numColor.html("1"); | |
baseTxt.html("9.00"); | |
perProfitTxt.html(formatperSaleProfit); | |
} | |
// 2 colors | |
else if (designColorValue == 2) { | |
var baseCostValue = findBaseCost.attr("value", "11.50"); | |
var setSellingPriceMin = findSellingPrice.attr("value", "11.50"); | |
var perSaleProfit = sellingPriceVal - baseCost; | |
var formatperSaleProfit = perSaleProfit.toFixed(2); | |
shirtNumTxt.html("300 +"); | |
numColor.html("2"); | |
baseTxt.html("11.50"); | |
perProfitTxt.html(formatperSaleProfit); | |
} | |
// 3 colors | |
else if (designColorValue == 3) { | |
var baseCostValue = findBaseCost.attr("value", "14.00"); | |
var setSellingPriceMin = findSellingPrice.attr("value", "14.00"); | |
var perSaleProfit = sellingPriceVal - baseCost; | |
var formatperSaleProfit = perSaleProfit.toFixed(2); | |
shirtNumTxt.html("300 +"); | |
numColor.html("3"); | |
baseTxt.html("14.00"); | |
perProfitTxt.html(formatperSaleProfit); | |
} | |
// 4 colors | |
else if (designColorValue == 4) { | |
var baseCostValue = findBaseCost.attr("value", "14.25"); | |
var setSellingPriceMin = findSellingPrice.attr("value", "14.25"); | |
var perSaleProfit = sellingPriceVal - baseCost; | |
talSaleProfit | |
var formatperSaleProfit = perSaleProfit.toFixed(2); | |
shirtNumTxt.html("300 +"); | |
numColor.html("4"); | |
baseTxt.html("14.25"); | |
perProfitTxt.html(formatperSaleProfit); | |
} | |
// 5 colors | |
else if (designColorValue == 5) { | |
var baseCostValue = findBaseCost.attr("value", "14.25"); | |
var setSellingPriceMin = findSellingPrice.attr("value", "14.25"); | |
var perSaleProfit = sellingPriceVal - baseCost; | |
var formatperSaleProfit = perSaleProfit.toFixed(2); | |
shirtNumTxt.html("300 +"); | |
numColor.html("5"); | |
baseTxt.html("14.25"); | |
perProfitTxt.html(formatperSaleProfit); | |
} | |
// 6 colors | |
else if (designColorValue == 6) { | |
var baseCostValue = findBaseCost.attr("value", "14.25"); | |
var setSellingPriceMin = findSellingPrice.attr("value", "14.25"); | |
var perSaleProfit = sellingPriceVal - baseCost; | |
var formatperSaleProfit = perSaleProfit.toFixed(2); | |
shirtNumTxt.html("300 +"); | |
numColor.html("6"); | |
baseTxt.html("14.25"); | |
perProfitTxt.html(formatperSaleProfit); | |
} | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment