| 9242 |
kshitij.so |
1 |
<style>
|
|
|
2 |
* { font-family: Verdana; font-size: 96%; }
|
|
|
3 |
label {
|
|
|
4 |
float: left;
|
|
|
5 |
}
|
|
|
6 |
|
|
|
7 |
#upload > table {
|
|
|
8 |
color: #747474;
|
|
|
9 |
width: 100%;
|
|
|
10 |
}
|
|
|
11 |
|
|
|
12 |
|
|
|
13 |
#upload tbody {
|
|
|
14 |
background: url("/Support/images/center-bcg.png") repeat-y scroll right top #F6F6F6;
|
|
|
15 |
font-weight: bold;
|
|
|
16 |
}
|
|
|
17 |
|
|
|
18 |
.detail {
|
|
|
19 |
background: url("/Support/images/center-blue.png") repeat-y scroll left top #E4EBF8;
|
|
|
20 |
border-bottom: 1px solid #B3C1DB;
|
|
|
21 |
border-right: 1px solid #CED9EC;
|
|
|
22 |
color: #1F3D71;
|
|
|
23 |
height: 25px;
|
|
|
24 |
padding: 10px 0 0 24px;
|
|
|
25 |
}
|
|
|
26 |
|
|
|
27 |
.value {
|
|
|
28 |
border-bottom: 1px solid #B3C1DB;
|
|
|
29 |
border-right: 1px solid #CED9EC;
|
|
|
30 |
height: 24px;
|
|
|
31 |
text-align: center;
|
|
|
32 |
color: #747474;
|
|
|
33 |
}
|
|
|
34 |
|
|
|
35 |
select {
|
|
|
36 |
padding-top: 2px;
|
|
|
37 |
vertical-align: middle;
|
|
|
38 |
direction: ltr;
|
|
|
39 |
font-weight: bold;
|
|
|
40 |
width: 50%;
|
|
|
41 |
height: 22px;
|
|
|
42 |
}
|
|
|
43 |
|
|
|
44 |
input {
|
|
|
45 |
font-size: 12px;
|
|
|
46 |
text-align: center;
|
|
|
47 |
width: 50%;
|
|
|
48 |
font-weight: bold;
|
|
|
49 |
}
|
| 9725 |
kshitij.so |
50 |
.top-header {
|
|
|
51 |
background-color: #2789C1;
|
|
|
52 |
display: block;
|
|
|
53 |
height: 20px;
|
|
|
54 |
width: 100%;
|
|
|
55 |
}
|
|
|
56 |
|
|
|
57 |
input[type="text"][readonly] {
|
|
|
58 |
background-color: #D1D1D1;
|
|
|
59 |
}
|
|
|
60 |
|
|
|
61 |
input[type="text"][disabled] {
|
|
|
62 |
background-color: #D1D1D1;
|
|
|
63 |
}
|
| 9242 |
kshitij.so |
64 |
</style>
|
|
|
65 |
<link href="/Support/css/jquery.alerts.css" type="text/css" rel="stylesheet">
|
|
|
66 |
<script type="text/javascript" src="/Support/js/jquery-1.4.2.js"></script>
|
|
|
67 |
<script type="text/javascript" src="/Support/js/jquery.alerts.js"></script>
|
|
|
68 |
<script type="text/javascript">
|
|
|
69 |
$(document).ready(function() {
|
|
|
70 |
$('#cancelbutton').click(function(e) {
|
|
|
71 |
window.location.href = '/Support/snapdeal-list';
|
|
|
72 |
});
|
|
|
73 |
});
|
|
|
74 |
</script>
|
|
|
75 |
<script type="text/javascript">
|
|
|
76 |
function calculateStuff()
|
|
|
77 |
{
|
| 9725 |
kshitij.so |
78 |
var itemWeight=$('#itemWeight').val();
|
|
|
79 |
itemWeight = itemWeight+.05;
|
| 9242 |
kshitij.so |
80 |
if (itemWeight==0){
|
|
|
81 |
var courierCost =45;
|
|
|
82 |
}
|
|
|
83 |
else{
|
|
|
84 |
var slabs = parseInt((parseFloat(itemWeight)-.001)/.5)
|
|
|
85 |
var courierCost = 45;
|
|
|
86 |
for (var i=0;i<slabs;i++)
|
|
|
87 |
{
|
|
|
88 |
courierCost = courierCost + 35;
|
|
|
89 |
}
|
|
|
90 |
}
|
| 9725 |
kshitij.so |
91 |
//courierCost = ((courierCost+0)*1.1236).toFixed(2);
|
|
|
92 |
var sellingPrice=$('#sellingPrice').val();
|
|
|
93 |
var nlc=$('#maxNlc').val();
|
|
|
94 |
var otherCost=$('#otherCost').val();
|
|
|
95 |
var othCost=parseFloat(otherCost);
|
|
|
96 |
if ( sellingPrice==null || sellingPrice=="" || isNaN(sellingPrice) || nlc==null || nlc=="" || isNaN(nlc)){
|
| 9242 |
kshitij.so |
97 |
$('input#courierCost').val('0.00');
|
|
|
98 |
$('input#commission').val('0.00');
|
|
|
99 |
$('input#serviceTax').val('0.00');
|
| 9725 |
kshitij.so |
100 |
$('input#').val('0.00');
|
|
|
101 |
}
|
|
|
102 |
else{
|
|
|
103 |
var comRate=$('#commissionRate').val();
|
|
|
104 |
var margin=$('#margin').val();
|
|
|
105 |
var vatRate=$('#vat').val();
|
|
|
106 |
if ( vatRate==null || vatRate=="" || isNaN(vatRate)){
|
|
|
107 |
jAlert('Please enter VAT Rate for item','ERROR');
|
| 9242 |
kshitij.so |
108 |
return false;
|
|
|
109 |
}
|
| 9725 |
kshitij.so |
110 |
var vat=vatRate/100;
|
|
|
111 |
var commisionPrice=((comRate/100)*sellingPrice).toFixed(2);
|
|
|
112 |
var ourTp=(sellingPrice-sellingPrice*1.1236*(comRate/100)-((courierCost+0)*1.1236));
|
|
|
113 |
var vatValue=(((sellingPrice/(1+vat))-(nlc/(1+vat)))*vat).toFixed(2);
|
|
|
114 |
inHouseCost=(+vatValue+15+((.5/100)*sellingPrice)+othCost);
|
|
|
115 |
var lowestTp=(+nlc+inHouseCost).toFixed(2);
|
|
|
116 |
var lowestSp=((+lowestTp+courierCost)/(1-((comRate/100)*(1+.1236)))).toFixed(2);
|
|
|
117 |
ourTp = (parseFloat(ourTp)).toFixed(2);
|
|
|
118 |
$('input#minPosTp').val(lowestTp);
|
|
|
119 |
$('input#minPosSp').val(lowestSp);
|
|
|
120 |
$('input#transferPrice').val(ourTp);
|
|
|
121 |
var serviceTax=(.1236*commisionPrice).toFixed(2);
|
|
|
122 |
lowest_possible_tp=parseFloat(lowestTp);
|
|
|
123 |
newMargin=(ourTp-lowest_possible_tp).toFixed(2);
|
|
|
124 |
marginPercentage=(((ourTp-lowest_possible_tp)/sellingPrice)*100).toFixed(2);
|
|
|
125 |
$('input#marginPer').val(marginPercentage);
|
|
|
126 |
$('input#margin').val(newMargin);
|
| 9242 |
kshitij.so |
127 |
$('input#sellingPrice').val(sellingPrice);
|
|
|
128 |
$('input#courierCost').val(courierCost);
|
|
|
129 |
$('input#commission').val(commisionPrice);
|
|
|
130 |
$('input#serviceTax').val(serviceTax);
|
|
|
131 |
}
|
| 9725 |
kshitij.so |
132 |
}
|
| 9242 |
kshitij.so |
133 |
</script>
|
|
|
134 |
<script type="text/javascript">
|
|
|
135 |
$('#populateStuff').live('click', function(){
|
| 9725 |
kshitij.so |
136 |
var itemId=$('#itemId').val();
|
|
|
137 |
var whId=$('#warehouseId').val();
|
|
|
138 |
alert(whId);
|
|
|
139 |
if ( whId==null || whId=="" || isNaN(whId)){
|
| 9478 |
kshitij.so |
140 |
jAlert('Please enter valid warehouse id', 'ERROR');
|
|
|
141 |
return false;
|
|
|
142 |
}
|
| 9242 |
kshitij.so |
143 |
jQuery.ajax({
|
|
|
144 |
type : "GET",
|
| 9725 |
kshitij.so |
145 |
url : "/Support/snapdeal-list!getItemDetailsInJson?itemId="+itemId+"&warehouseId="+whId,
|
| 9242 |
kshitij.so |
146 |
beforeSend: function(){
|
|
|
147 |
$('#ajax-spinner').show();
|
|
|
148 |
$('#add-new-item')[0].reset();
|
|
|
149 |
},
|
|
|
150 |
complete: function(){
|
|
|
151 |
$('#ajax-spinner').hide();
|
|
|
152 |
},
|
|
|
153 |
success : function(json){
|
|
|
154 |
var parsedData = JSON.parse(json);
|
|
|
155 |
$('input#itemId').val(parsedData.ItemId);
|
|
|
156 |
$('input#brand').val(parsedData.Brand);
|
|
|
157 |
$('input#modelNumber').val(parsedData.ModelNumber);
|
|
|
158 |
$('input#modelName').val(parsedData.ModelName);
|
|
|
159 |
$('input#color').val(parsedData.Color);
|
|
|
160 |
$('input#itemWeight').val(parsedData.Weight);
|
|
|
161 |
$('input#risky').val(parsedData.Risky);
|
|
|
162 |
$('input#status').val(parsedData.Status);
|
|
|
163 |
$('input#webisteMrp').val(parsedData.MRP);
|
|
|
164 |
$('input#webisteSellingPrice').val(parsedData.SellingPrice);
|
|
|
165 |
$('input#sellingPrice').val('0.0');
|
|
|
166 |
$('input#transferPrice').val('0.0');
|
|
|
167 |
$('input#exceptionPrice').val('0.0');
|
|
|
168 |
$('input#commission').val('0.0');
|
|
|
169 |
$('input#serviceTax').val('0.0');
|
|
|
170 |
$('input#courierCost').val('0.0');
|
| 9478 |
kshitij.so |
171 |
$('input#maxNlc').val(parsedData.MaxNlc);
|
| 9725 |
kshitij.so |
172 |
$('input#warehouseId').val(whId);
|
| 9242 |
kshitij.so |
173 |
},
|
|
|
174 |
error : function() {
|
| 9478 |
kshitij.so |
175 |
alert("Either item id is already present in snapdeal item or not a valid item Id");
|
| 9242 |
kshitij.so |
176 |
},
|
|
|
177 |
});
|
|
|
178 |
return false;
|
|
|
179 |
});
|
|
|
180 |
</script>
|
| 9725 |
kshitij.so |
181 |
<div class="top-header">
|
|
|
182 |
<span style="float: left; padding-left: 10px; padding-top: 2px; font-size: 14px; font-weight: bolder; color: white;">
|
|
|
183 |
ADD NEW PRODUCT
|
|
|
184 |
</span>
|
|
|
185 |
</div>
|
| 9242 |
kshitij.so |
186 |
<form id="add-new-item" action="/Support/snapdeal-list!addNewItem" enctype="multipart/form-data" method="post">
|
|
|
187 |
<div class="left" style="float: left; width: 48%;">
|
|
|
188 |
<table id="upload" style="text-align: center;width: 100%;height:200px;">
|
|
|
189 |
<thead>
|
|
|
190 |
</thead>
|
|
|
191 |
<tbody>
|
|
|
192 |
<tr>
|
|
|
193 |
<td class="detail">Item Id</td>
|
|
|
194 |
<td class="value">
|
|
|
195 |
<input id="itemId" name="itemId" value=''type="text" style="width:25%;">
|
|
|
196 |
<input type="button" id="populateStuff" value="Populate" style="width:25%;">
|
|
|
197 |
</td>
|
|
|
198 |
</tr>
|
|
|
199 |
<tr>
|
|
|
200 |
<td class="detail">Brand</td>
|
|
|
201 |
<td class="value"><input id="brand" name="brand" value='' type="text" readonly/></td>
|
|
|
202 |
</tr>
|
|
|
203 |
<tr>
|
|
|
204 |
<td class="detail">Model Number</td>
|
| 9725 |
kshitij.so |
205 |
<td class="value"><input id="modelNumber" name="modelNumber" value='' type="text" disabled/></td>
|
| 9242 |
kshitij.so |
206 |
</tr>
|
|
|
207 |
<tr>
|
|
|
208 |
<td class="detail">Model Name</td>
|
| 9725 |
kshitij.so |
209 |
<td class="value"><input id="modelName" name="modelName" value='' type="text" disabled/></td>
|
| 9242 |
kshitij.so |
210 |
</tr>
|
|
|
211 |
<tr>
|
|
|
212 |
<td class="detail">Color</td>
|
| 9725 |
kshitij.so |
213 |
<td class="value"><input id="color" name="color" value='' type="text" disabled/></td>
|
| 9242 |
kshitij.so |
214 |
</tr>
|
| 9568 |
kshitij.so |
215 |
<tr class="detail"></td>
|
|
|
216 |
<td class="detail">Weight</td>
|
| 9725 |
kshitij.so |
217 |
<td class="value"><input id="itemWeight" name="itemWeight" value='0' type="text" disabled/></td>
|
| 9568 |
kshitij.so |
218 |
</tr>
|
| 9242 |
kshitij.so |
219 |
<tr>
|
|
|
220 |
<td class="detail">Risky</td>
|
|
|
221 |
<td class="value">
|
| 9725 |
kshitij.so |
222 |
<input id="risky" name="risky" value='' type="text" disabled style="text-transform: uppercase;"/></td>
|
| 9242 |
kshitij.so |
223 |
</td>
|
|
|
224 |
</tr>
|
|
|
225 |
<tr>
|
|
|
226 |
<td class="detail">Status</td>
|
| 9725 |
kshitij.so |
227 |
<td class="value"><input id="status" name="status" value='' type="text" disabled/></td>
|
| 9242 |
kshitij.so |
228 |
</tr>
|
|
|
229 |
<tr>
|
|
|
230 |
<td class="detail">Warehouse Id</td>
|
|
|
231 |
<td class="value">
|
|
|
232 |
<input id="warehouseId" name="warehouseId" value='' type="text"/></td>
|
|
|
233 |
</tr>
|
|
|
234 |
<tr>
|
|
|
235 |
<td class="detail">Snapdeal Selling Price</td>
|
|
|
236 |
<td class="value">
|
| 9725 |
kshitij.so |
237 |
<input id="sellingPrice" name="sellingPrice" value='' type="text" onkeyup="calculateStuff()"></td>
|
| 9242 |
kshitij.so |
238 |
</tr>
|
|
|
239 |
<tr>
|
| 9725 |
kshitij.so |
240 |
<td class="detail">Transfer Price</td>
|
|
|
241 |
<td class="value"><input id="transferPrice" name="transferPrice" value='' type="text" readonly/></td>
|
|
|
242 |
</tr>
|
|
|
243 |
<tr>
|
|
|
244 |
<td class="detail">Other Cost</td>
|
|
|
245 |
<td class="value"><input id="otherCost" name="otherCost" value='0.0' type="text" onkeyup="calculateStuff()"</td>
|
|
|
246 |
</tr>
|
|
|
247 |
<tr>
|
|
|
248 |
<td class="detail">Minimum Possible SP (Calculated)</td>
|
|
|
249 |
<td class="value"><input id="minPosSp" name="minPosSp" value='' type="text" readonly/></td>
|
|
|
250 |
</tr>
|
|
|
251 |
<tr>
|
|
|
252 |
<td class="detail">Minimum Possible TP (Calculated)</td>
|
| 9242 |
kshitij.so |
253 |
<td class="value">
|
| 9725 |
kshitij.so |
254 |
<input id="minPosTp" name="minPosTp" value='' type="text" readonly/>
|
| 9242 |
kshitij.so |
255 |
</td>
|
|
|
256 |
</tr>
|
| 9478 |
kshitij.so |
257 |
<tr>
|
| 9725 |
kshitij.so |
258 |
<td class="detail">Website MRP</td>
|
|
|
259 |
<td class="value"><input id="webisteMrp" name="webisteMrp" value='' type="text" disabled/></td>
|
|
|
260 |
</tr>
|
|
|
261 |
<tr>
|
|
|
262 |
<td class="detail">Website Selling Price</td>
|
|
|
263 |
<td class="value"><input id="webisteSellingPrice" name="webisteSellingPrice" value='' type="text" disabled/></td>
|
|
|
264 |
</tr>
|
|
|
265 |
<tr>
|
| 9478 |
kshitij.so |
266 |
<td class="detail">Max NLC</td>
|
| 9569 |
kshitij.so |
267 |
<td class="value"><input id="maxNlc" name="maxNlc" value=''type="text" readonly/></td>
|
| 9478 |
kshitij.so |
268 |
</tr>
|
| 9242 |
kshitij.so |
269 |
</tbody>
|
|
|
270 |
</table>
|
|
|
271 |
</div>
|
|
|
272 |
<div class="left" style="float: right; width: 48%;">
|
|
|
273 |
<table id="upload" style="text-align: center;width: 100%;height:200px;">
|
|
|
274 |
<thead>
|
|
|
275 |
</thead>
|
|
|
276 |
<tbody>
|
|
|
277 |
<tr>
|
| 9725 |
kshitij.so |
278 |
<td class="detail">Margin</td>
|
|
|
279 |
<td class="value"><input id="margin" name="margin" value=''type="text" disabled/></td>
|
|
|
280 |
</tr>
|
|
|
281 |
<tr>
|
|
|
282 |
<td class="detail">Margin %</td>
|
|
|
283 |
<td class="value"><input id="marginPer" name="marginPer" value='' type="text" disabled/></td>
|
|
|
284 |
</tr>
|
|
|
285 |
<tr>
|
| 9242 |
kshitij.so |
286 |
<td class="detail">Suppress Inventory Feed</td>
|
|
|
287 |
<td class="value">
|
| 9725 |
kshitij.so |
288 |
<select name="isSuppressInventoryFeed"><option value="True">Active</option><option selected="selected" value="False">InActive</option></select>
|
| 9242 |
kshitij.so |
289 |
</td>
|
|
|
290 |
</tr>
|
|
|
291 |
<tr>
|
| 9725 |
kshitij.so |
292 |
<td class="detail">Suppress Price Feed</td>
|
|
|
293 |
<td class="value">
|
|
|
294 |
<select name="isSuppressPriceFeed"><option selected="selected" value="True">Active</option><option selected="selected" value="False">InActive</option></select>
|
|
|
295 |
</td>
|
| 9242 |
kshitij.so |
296 |
</tr>
|
|
|
297 |
<tr>
|
| 9725 |
kshitij.so |
298 |
<td class="detail">Snapdeal Listed</td>
|
|
|
299 |
<td class="value">
|
|
|
300 |
<select name="isListedOnSnapdeal"><option selected="selected" value="True">Active</option><option value="False">InActive</option></select>
|
|
|
301 |
</td>
|
| 9242 |
kshitij.so |
302 |
</tr>
|
|
|
303 |
<tr>
|
| 9725 |
kshitij.so |
304 |
<td class="detail">Manual Favourite</td>
|
|
|
305 |
<td class="value">
|
|
|
306 |
<select name="isManualFavourite"><option value="True">Active</option><option selected="selected" value="False">InActive</option></select>
|
|
|
307 |
</td>
|
| 9242 |
kshitij.so |
308 |
</tr>
|
|
|
309 |
<tr>
|
| 9725 |
kshitij.so |
310 |
<td class="detail">Auto Increment</td>
|
| 9242 |
kshitij.so |
311 |
<td class="value">
|
| 9725 |
kshitij.so |
312 |
<select name="isAutoIncrement"><option value="True">Active</option><option selected="selected" value="False">InActive</option></select>
|
| 9242 |
kshitij.so |
313 |
</td>
|
|
|
314 |
</tr>
|
|
|
315 |
<tr>
|
| 9725 |
kshitij.so |
316 |
<td class="detail">Auto Decrement</td>
|
|
|
317 |
<td class="value">
|
|
|
318 |
<select name="isAutoDecrement"><option value="True">Active</option><option selected="selected" value="False">InActive</option></select>
|
|
|
319 |
</td>
|
|
|
320 |
</tr>
|
|
|
321 |
<tr>
|
| 9242 |
kshitij.so |
322 |
<td class="detail">Exception Price</td>
|
|
|
323 |
<td class="value"><input id="exceptionPrice" name="exceptionPrice" value='' type="text"/></td>
|
|
|
324 |
</tr>
|
|
|
325 |
<tr>
|
| 9725 |
kshitij.so |
326 |
<td class="detail">Commission %</td>
|
|
|
327 |
<td class="value"><input id="commissionRate" name="commissionRate" value='3.59'type="text" disabled/></td>
|
|
|
328 |
</tr>
|
|
|
329 |
<tr>
|
| 9242 |
kshitij.so |
330 |
<td class="detail">Commission</td>
|
|
|
331 |
<td class="value"><input id="commission" name="commission" value='' type="text" readonly/></td>
|
|
|
332 |
</tr>
|
|
|
333 |
<tr>
|
| 9725 |
kshitij.so |
334 |
<td class="detail">VAT %</td>
|
|
|
335 |
<td class="value"><input id="vat" name="vat" value='' type="text" ></td>
|
|
|
336 |
</tr>
|
|
|
337 |
<tr>
|
| 9242 |
kshitij.so |
338 |
<td class="detail">Service Tax</td>
|
|
|
339 |
<td class="value"><input id="serviceTax" name="serviceTax" value='' type="text" readonly/></td>
|
|
|
340 |
</tr>
|
|
|
341 |
<tr>
|
|
|
342 |
<td class="detail">Courier Cost</td>
|
|
|
343 |
<td class="value"><input id="courierCost" name="courierCost" value='' type="text" readonly/></td>
|
|
|
344 |
</tr>
|
|
|
345 |
<tr>
|
| 9478 |
kshitij.so |
346 |
<td class="detail">Item Id @ Snapdeal</td>
|
|
|
347 |
<td class="value"><input id="sdItemCode" name="sdItemCode" value='' type="text"></td>
|
|
|
348 |
</tr>
|
|
|
349 |
<tr>
|
| 9568 |
kshitij.so |
350 |
<td class="detail">SUPC Code</td>
|
|
|
351 |
<td class="value"><input id="supc" name="supc" value='' type="text"></td>
|
|
|
352 |
</tr>
|
|
|
353 |
<tr>
|
| 9242 |
kshitij.so |
354 |
<td class="detail">Action</td>
|
|
|
355 |
<td class="value"><input type="submit" value="Update" name="upload" style="width: 25%;">
|
|
|
356 |
<input type="button" style="padding-left: 5px; margin-left: 10px;width: 25%;" id="cancelbutton" name="cancel" value="Cancel">
|
|
|
357 |
</td>
|
|
|
358 |
</tr>
|
|
|
359 |
</tbody>
|
|
|
360 |
</table>
|
|
|
361 |
</div>
|
|
|
362 |
</form>
|