diff --git a/view/manager/config/distribution_proportion.html b/view/manager/config/distribution_proportion.html index 74682f1..540c328 100644 --- a/view/manager/config/distribution_proportion.html +++ b/view/manager/config/distribution_proportion.html @@ -60,12 +60,22 @@ $("#price").text(0); return false; } - if (agency < consumer) { - + if(agency>0 || consumer>0){ + if (agency < consumer) { + $("#price").text( {$minPrice}+"*"+"(100/"+agency+")" +"="+({$minPrice}*(100/agency))); + }else{ + $("#price").text( {$minPrice}+"*"+"(100/"+consumer+")" +"="+({$minPrice}*(100/consumer))); + } + }else if(agency>0){ $("#price").text( {$minPrice}+"*"+"(100/"+agency+")" +"="+({$minPrice}*(100/agency))); - }else{ + } + else if(consumer>0){ $("#price").text( {$minPrice}+"*"+"(100/"+consumer+")" +"="+({$minPrice}*(100/consumer))); } + else{ + $("#price").text(0); + } + } jsPrice(); \ No newline at end of file diff --git a/view/manager/config/distribution_proportion_user.html b/view/manager/config/distribution_proportion_user.html index 9625fa2..d1b8d52 100644 --- a/view/manager/config/distribution_proportion_user.html +++ b/view/manager/config/distribution_proportion_user.html @@ -18,7 +18,7 @@
- +
@@ -27,7 +27,7 @@
- +
@@ -58,12 +58,21 @@ $("#price").text(0); return false; } - if (distributed < distribution) { - - $("#price").text( {$minPrice}+"*"+"(100/"+distributed+")" +"="+({$minPrice}*(100/distributed))); - }else{ + if(distribution>0 || distributed>0){ + if (distribution < distributed) { + $("#price").text( {$minPrice}+"*"+"(100/"+distribution+")" +"="+({$minPrice}*(100/distribution))); + }else{ + $("#price").text( {$minPrice}+"*"+"(100/"+distributed+")" +"="+({$minPrice}*(100/distributed))); + } + }else if(distribution>0){ $("#price").text( {$minPrice}+"*"+"(100/"+distribution+")" +"="+({$minPrice}*(100/distribution))); } + else if(distributed>0){ + $("#price").text( {$minPrice}+"*"+"(100/"+distributed+")" +"="+({$minPrice}*(100/distributed))); + } + else{ + $("#price").text(0); + } } jsPrice(); \ No newline at end of file