| Line 139... |
Line 139... |
| 139 |
$('input#serviceTax').removeClass();
|
139 |
$('input#serviceTax').removeClass();
|
| 140 |
$('input#commission').removeClass();
|
140 |
$('input#commission').removeClass();
|
| 141 |
$('input#margin').removeClass();
|
141 |
$('input#margin').removeClass();
|
| 142 |
$('input#marginPer').removeClass();
|
142 |
$('input#marginPer').removeClass();
|
| 143 |
var itemWeight=$('#itemWeight').val();
|
143 |
var itemWeight=$('#itemWeight').val();
|
| - |
|
144 |
var packagingCost=$('#packagingCost').val();
|
| - |
|
145 |
console.log(packagingCost);
|
| - |
|
146 |
console.log(typeof packagingCost);
|
| 144 |
itemWeight = +itemWeight+.05;
|
147 |
itemWeight = +itemWeight+.05;
|
| 145 |
if (itemWeight==0){
|
148 |
if (itemWeight==0){
|
| 146 |
var courierCost =45;
|
149 |
var courierCost =45;
|
| 147 |
}
|
150 |
}
|
| 148 |
else{
|
151 |
else{
|
| Line 157... |
Line 160... |
| 157 |
var sellingPrice=$('#sellingPrice').val();
|
160 |
var sellingPrice=$('#sellingPrice').val();
|
| 158 |
var courierCostSnapdeal=$('#courierCostMarketplace').val();
|
161 |
var courierCostSnapdeal=$('#courierCostMarketplace').val();
|
| 159 |
var nlc=$('#maxNlc').val();
|
162 |
var nlc=$('#maxNlc').val();
|
| 160 |
var otherCost=$('#otherCost').val();
|
163 |
var otherCost=$('#otherCost').val();
|
| 161 |
var othCost=parseFloat(otherCost);
|
164 |
var othCost=parseFloat(otherCost);
|
| - |
|
165 |
var pc=parseFloat(packagingCost);
|
| - |
|
166 |
console.log(pc)
|
| - |
|
167 |
console.log(typeof pc);
|
| 162 |
if ( sellingPrice==null || sellingPrice=="" || isNaN(sellingPrice) || nlc==null || nlc=="" || isNaN(nlc)){
|
168 |
if ( sellingPrice==null || sellingPrice=="" || isNaN(sellingPrice) || nlc==null || nlc=="" || isNaN(nlc)){
|
| 163 |
$('input#courierCost').val('0.00');
|
169 |
$('input#courierCost').val('0.00');
|
| 164 |
$('input#commission').val('0.00');
|
170 |
$('input#commission').val('0.00');
|
| 165 |
$('input#serviceTax').val('0.00');
|
171 |
$('input#serviceTax').val('0.00');
|
| 166 |
$('input#transferPrice').val('0.00');
|
172 |
$('input#transferPrice').val('0.00');
|
| Line 191... |
Line 197... |
| 191 |
var commisionPrice=(comRate*sellingPrice+20).toFixed(2);
|
197 |
var commisionPrice=(comRate*sellingPrice+20).toFixed(2);
|
| 192 |
}
|
198 |
}
|
| 193 |
var ourTp=(parseFloat(sellingPrice)-parseFloat(sellingPrice)*(1+stRate)*((comRate)+emiFee)-((+courierCostSnapdeal+closingFee)*(1+stRate))-(Math.max(20,pgFeeRate*parseFloat(sellingPrice))*(1+stRate)));
|
199 |
var ourTp=(parseFloat(sellingPrice)-parseFloat(sellingPrice)*(1+stRate)*((comRate)+emiFee)-((+courierCostSnapdeal+closingFee)*(1+stRate))-(Math.max(20,pgFeeRate*parseFloat(sellingPrice))*(1+stRate)));
|
| 194 |
console.log(ourTp);
|
200 |
console.log(ourTp);
|
| 195 |
var vatValue=(((sellingPrice/(1+vat))-(nlc/(1+vat)))*vat).toFixed(2);
|
201 |
var vatValue=(((sellingPrice/(1+vat))-(nlc/(1+vat)))*vat).toFixed(2);
|
| 196 |
var inHouseCost=(+vatValue+15+((returnProvision/100)*sellingPrice)+othCost);
|
202 |
var inHouseCost=(+vatValue+pc+((returnProvision/100)*sellingPrice)+othCost);
|
| 197 |
console.log(inHouseCost);
|
203 |
console.log(inHouseCost);
|
| 198 |
var lowestTp=(+nlc+inHouseCost).toFixed(2);
|
204 |
var lowestTp=(+nlc+inHouseCost).toFixed(2);
|
| 199 |
if (pgFeeRate*parseFloat(sellingPrice)>=20){
|
205 |
if (pgFeeRate*parseFloat(sellingPrice)>=20){
|
| 200 |
var lowestSp=(+nlc+(+courierCostSnapdeal+closingFee)*(1+stRate)*(1+vat)+(15+othCost)*(1+vat))/(1-(comRate+emiFee+pgFeeRate)*(1+stRate)*(1+vat)-(returnProvision/100)*(1+vat));
|
206 |
var lowestSp=(+nlc+(+courierCostSnapdeal+closingFee)*(1+stRate)*(1+vat)+(pc+othCost)*(1+vat))/(1-(comRate+emiFee+pgFeeRate)*(1+stRate)*(1+vat)-(returnProvision/100)*(1+vat));
|
| 201 |
}
|
207 |
}
|
| 202 |
else{
|
208 |
else{
|
| 203 |
var lowestSp=(+nlc+(+courierCostSnapdeal+closingFee+20)*(1+stRate)*(1+vat)+(15+othCost)*(1+vat))/(1-(comRate+emiFee)*(1+stRate)*(1+vat)-(returnProvision/100)*(1+vat));
|
209 |
var lowestSp=(+nlc+(+courierCostSnapdeal+closingFee+20)*(1+stRate)*(1+vat)+(pc+othCost)*(1+vat))/(1-(comRate+emiFee)*(1+stRate)*(1+vat)-(returnProvision/100)*(1+vat));
|
| 204 |
}
|
210 |
}
|
| 205 |
ourTp = (parseFloat(ourTp)).toFixed(2);
|
211 |
ourTp = (parseFloat(ourTp)).toFixed(2);
|
| 206 |
$('input#minPosTp').val(lowestTp);
|
212 |
$('input#minPosTp').val(lowestTp);
|
| 207 |
$('input#minPosSp').val(parseFloat(lowestSp).toFixed(2));
|
213 |
$('input#minPosSp').val(parseFloat(lowestSp).toFixed(2));
|
| 208 |
$('input#transferPrice').val(ourTp);
|
214 |
$('input#transferPrice').val(ourTp);
|
| Line 295... |
Line 301... |
| 295 |
<thead>
|
301 |
<thead>
|
| 296 |
</thead>
|
302 |
</thead>
|
| 297 |
<tbody>
|
303 |
<tbody>
|
| 298 |
<tr>
|
304 |
<tr>
|
| 299 |
<td class="detail">Item Id</td>
|
305 |
<td class="detail">Item Id</td>
|
| 300 |
<td class="value"><input id="itemId" name="itemId" value='$itemDetail.getItem_id()'type="text" readonly/></td>
|
306 |
<td class="value"><input id="itemId" name="itemId" value='$itemDetail.getItem_id()' type="text" readonly/></td>
|
| 301 |
</tr>
|
307 |
</tr>
|
| 302 |
<tr>
|
308 |
<tr>
|
| 303 |
<td class="detail">Warehouse Id</td>
|
309 |
<td class="detail">Warehouse Id</td>
|
| 304 |
<td class="value">
|
310 |
<td class="value">
|
| 305 |
<input id="warehouseId" name="warehouseId" value='$itemDetail.getWarehouseId()' style="width:25%; type="text" />
|
311 |
<input id="warehouseId" name="warehouseId" value='$itemDetail.getWarehouseId()' style="width:25%; type="text" />
|
| Line 333... |
Line 339... |
| 333 |
<td class="detail">Webiste Selling Price</td>
|
339 |
<td class="detail">Webiste Selling Price</td>
|
| 334 |
<td class="value"><input id="webisteSellingPrice" name="webisteSellingPrice" value='$itemDetail.getWebsiteSellingPrice()'type="text" disabled/></td>
|
340 |
<td class="value"><input id="webisteSellingPrice" name="webisteSellingPrice" value='$itemDetail.getWebsiteSellingPrice()'type="text" disabled/></td>
|
| 335 |
</tr>
|
341 |
</tr>
|
| 336 |
<tr>
|
342 |
<tr>
|
| 337 |
<td class="detail">Other Cost</td>
|
343 |
<td class="detail">Other Cost</td>
|
| - |
|
344 |
<td class="value">
|
| 338 |
<td class="value"><input id="otherCost" name="otherCost" value='$mpDetail.getOtherCost()' type="text" onkeyup="calculateStuff()"</td>
|
345 |
<input id="otherCost" name="otherCost" value='$mpDetail.getOtherCost()' type="text" onkeyup="calculateStuff()" style="width:20%;"/>
|
| - |
|
346 |
<span style="font-weight:bold;color:black;">Packaging Cost</span>
|
| - |
|
347 |
<input id="packagingCost" name="packagingCost" value='$mpDetail.getPackagingCost()' type="text" style="width:20%;" readonly/>
|
| - |
|
348 |
</td>
|
| 339 |
</tr>
|
349 |
</tr>
|
| 340 |
<tr>
|
350 |
<tr>
|
| 341 |
<td class="detail">Minimum Possible SP (Calculated)</td>
|
351 |
<td class="detail">Minimum Possible SP (Calculated)</td>
|
| 342 |
<td class="value"><input id="minPosSp" name="minPosSp" value='$mpDetail.getMinimumPossibleSp()'type="text" readonly/></td>
|
352 |
<td class="value"><input id="minPosSp" name="minPosSp" value='$mpDetail.getMinimumPossibleSp()'type="text" readonly/></td>
|
| 343 |
</tr>
|
353 |
</tr>
|