| 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 |
}
|
|
|
50 |
</style>
|
|
|
51 |
<link href="/Support/css/jquery.alerts.css" type="text/css" rel="stylesheet">
|
|
|
52 |
<script type="text/javascript" src="/Support/js/jquery-1.4.2.js"></script>
|
|
|
53 |
<script type="text/javascript" src="/Support/js/jquery.alerts.js"></script>
|
|
|
54 |
<script type="text/javascript">
|
|
|
55 |
$(document).ready(function() {
|
|
|
56 |
$('#cancelbutton').click(function(e) {
|
|
|
57 |
window.location.href = '/Support/snapdeal-list';
|
|
|
58 |
});
|
|
|
59 |
});
|
|
|
60 |
</script>
|
|
|
61 |
<script type="text/javascript">
|
|
|
62 |
function calculateStuff()
|
|
|
63 |
{
|
|
|
64 |
var itemWeight=document.forms["add-new-item"]["itemWeight"].value;
|
|
|
65 |
if (itemWeight==0){
|
|
|
66 |
var courierCost =45;
|
|
|
67 |
}
|
|
|
68 |
else{
|
|
|
69 |
var slabs = parseInt((parseFloat(itemWeight)-.001)/.5)
|
|
|
70 |
var courierCost = 45;
|
|
|
71 |
for (var i=0;i<slabs;i++)
|
|
|
72 |
{
|
|
|
73 |
courierCost = courierCost + 35;
|
|
|
74 |
}
|
|
|
75 |
}
|
|
|
76 |
var transferPrice=document.forms["add-new-item"]["transferPrice"].value;
|
|
|
77 |
if ( transferPrice==null || transferPrice=="" || isNaN(transferPrice)){
|
|
|
78 |
$('input#sellingPrice').val('0.00');
|
|
|
79 |
$('input#courierCost').val('0.00');
|
|
|
80 |
$('input#commission').val('0.00');
|
|
|
81 |
$('input#serviceTax').val('0.00');
|
|
|
82 |
return false;
|
|
|
83 |
}
|
|
|
84 |
var sellingPrice=(((parseInt(transferPrice) + courierCost*1.1236)/(100 - 3.59*1.1236))*100).toFixed(2);
|
|
|
85 |
var commisionValue=(.0359*sellingPrice + courierCost).toFixed(2);
|
|
|
86 |
var commisionPrice=(((.0359*sellingPrice + courierCost)/sellingPrice)*100).toFixed(2);
|
|
|
87 |
var serviceTax=(commisionValue*.1236).toFixed(2);
|
|
|
88 |
$('input#sellingPrice').val(sellingPrice);
|
|
|
89 |
$('input#courierCost').val(courierCost);
|
|
|
90 |
$('input#commission').val(commisionPrice);
|
|
|
91 |
$('input#serviceTax').val(serviceTax);
|
|
|
92 |
}
|
|
|
93 |
</script>
|
|
|
94 |
<script type="text/javascript">
|
|
|
95 |
$('#populateStuff').live('click', function(){
|
|
|
96 |
var itemId=document.forms["add-new-item"]["itemId"].value;
|
| 9478 |
kshitij.so |
97 |
var warehouseId=document.forms["add-new-item"]["warehouseId"].value;
|
|
|
98 |
if ( warehouseId==null || warehouseId=="" || isNaN(warehouseId)){
|
|
|
99 |
jAlert('Please enter valid warehouse id', 'ERROR');
|
|
|
100 |
return false;
|
|
|
101 |
}
|
| 9242 |
kshitij.so |
102 |
jQuery.ajax({
|
|
|
103 |
type : "GET",
|
| 9478 |
kshitij.so |
104 |
url : "/Support/snapdeal-list!getItemDetailsInJson?itemId="+itemId+"&warehouseId="+warehouseId,
|
| 9242 |
kshitij.so |
105 |
beforeSend: function(){
|
|
|
106 |
$('#ajax-spinner').show();
|
|
|
107 |
$('#add-new-item')[0].reset();
|
|
|
108 |
},
|
|
|
109 |
complete: function(){
|
|
|
110 |
$('#ajax-spinner').hide();
|
|
|
111 |
},
|
|
|
112 |
success : function(json){
|
|
|
113 |
var parsedData = JSON.parse(json);
|
|
|
114 |
$('input#itemId').val(parsedData.ItemId);
|
|
|
115 |
$('input#brand').val(parsedData.Brand);
|
|
|
116 |
$('input#modelNumber').val(parsedData.ModelNumber);
|
|
|
117 |
$('input#modelName').val(parsedData.ModelName);
|
|
|
118 |
$('input#color').val(parsedData.Color);
|
|
|
119 |
$('input#itemWeight').val(parsedData.Weight);
|
|
|
120 |
$('input#risky').val(parsedData.Risky);
|
|
|
121 |
$('input#status').val(parsedData.Status);
|
|
|
122 |
$('input#webisteMrp').val(parsedData.MRP);
|
|
|
123 |
$('input#webisteSellingPrice').val(parsedData.SellingPrice);
|
|
|
124 |
$('input#sellingPrice').val('0.0');
|
|
|
125 |
$('input#transferPrice').val('0.0');
|
|
|
126 |
$('input#exceptionPrice').val('0.0');
|
|
|
127 |
$('input#commission').val('0.0');
|
|
|
128 |
$('input#serviceTax').val('0.0');
|
|
|
129 |
$('input#courierCost').val('0.0');
|
| 9478 |
kshitij.so |
130 |
$('input#maxNlc').val(parsedData.MaxNlc);
|
|
|
131 |
$('input#warehouseId').val(warehouseId);
|
| 9242 |
kshitij.so |
132 |
},
|
|
|
133 |
error : function() {
|
| 9478 |
kshitij.so |
134 |
alert("Either item id is already present in snapdeal item or not a valid item Id");
|
| 9242 |
kshitij.so |
135 |
},
|
|
|
136 |
});
|
|
|
137 |
return false;
|
|
|
138 |
});
|
|
|
139 |
</script>
|
|
|
140 |
<form id="add-new-item" action="/Support/snapdeal-list!addNewItem" enctype="multipart/form-data" method="post">
|
|
|
141 |
<div class="left" style="float: left; width: 48%;">
|
|
|
142 |
<table id="upload" style="text-align: center;width: 100%;height:200px;">
|
|
|
143 |
<thead>
|
|
|
144 |
</thead>
|
|
|
145 |
<tbody>
|
|
|
146 |
<tr>
|
|
|
147 |
<td class="detail">Item Id</td>
|
|
|
148 |
<td class="value">
|
|
|
149 |
<input id="itemId" name="itemId" value=''type="text" style="width:25%;">
|
|
|
150 |
<input type="button" id="populateStuff" value="Populate" style="width:25%;">
|
|
|
151 |
</td>
|
|
|
152 |
</tr>
|
|
|
153 |
<tr>
|
|
|
154 |
<td class="detail">Brand</td>
|
|
|
155 |
<td class="value"><input id="brand" name="brand" value='' type="text" readonly/></td>
|
|
|
156 |
</tr>
|
|
|
157 |
<tr>
|
|
|
158 |
<td class="detail">Model Number</td>
|
|
|
159 |
<td class="value"><input id="modelNumber" name="modelNumber" value='' type="text" readonly/></td>
|
|
|
160 |
</tr>
|
|
|
161 |
<tr>
|
|
|
162 |
<td class="detail">Model Name</td>
|
|
|
163 |
<td class="value"><input id="modelName" name="modelName" value='' type="text" readonly/></td>
|
|
|
164 |
</tr>
|
|
|
165 |
<tr>
|
|
|
166 |
<td class="detail">Color</td>
|
|
|
167 |
<td class="value"><input id="color" name="color" value='' type="text" readonly/></td>
|
|
|
168 |
</tr>
|
|
|
169 |
<tr>
|
|
|
170 |
<td class="detail">Risky</td>
|
|
|
171 |
<td class="value">
|
|
|
172 |
<input id="risky" name="risky" value='' type="text" readonly style="text-transform: uppercase;"/></td>
|
|
|
173 |
</td>
|
|
|
174 |
</tr>
|
|
|
175 |
<tr>
|
|
|
176 |
<td class="detail">Status</td>
|
|
|
177 |
<td class="value"><input id="status" name="status" value='' type="text" readonly/></td>
|
|
|
178 |
</tr>
|
|
|
179 |
<tr>
|
|
|
180 |
<td class="detail">Warehouse Id</td>
|
|
|
181 |
<td class="value">
|
|
|
182 |
<input id="warehouseId" name="warehouseId" value='' type="text"/></td>
|
|
|
183 |
</tr>
|
|
|
184 |
<tr>
|
|
|
185 |
<td class="detail">Snapdeal Selling Price</td>
|
|
|
186 |
<td class="value">
|
|
|
187 |
<input id="sellingPrice" name="sellingPrice" value='' type="text" readonly/></td>
|
|
|
188 |
</tr>
|
|
|
189 |
<tr>
|
|
|
190 |
<td class="detail">Suppress Price Feed</td>
|
|
|
191 |
<td class="value">
|
|
|
192 |
<select name="isSuppressPriceFeed"><option selected="selected" value="True">Active</option><option value="False">InActive</option></select>
|
|
|
193 |
</td>
|
|
|
194 |
</tr>
|
| 9478 |
kshitij.so |
195 |
<tr>
|
|
|
196 |
<td class="detail">Max NLC</td>
|
|
|
197 |
<td class="value"><input id="maxNlc" name="maxNlc" value=''type="text"></td>
|
|
|
198 |
</tr>
|
|
|
199 |
<tr>
|
| 9242 |
kshitij.so |
200 |
</tbody>
|
|
|
201 |
</table>
|
|
|
202 |
</div>
|
|
|
203 |
<div class="left" style="float: right; width: 48%;">
|
|
|
204 |
<table id="upload" style="text-align: center;width: 100%;height:200px;">
|
|
|
205 |
<thead>
|
|
|
206 |
</thead>
|
|
|
207 |
<tbody>
|
|
|
208 |
<tr>
|
|
|
209 |
<td class="detail">Suppress Inventory Feed</td>
|
|
|
210 |
<td class="value">
|
|
|
211 |
<select name="isSuppressInventoryFeed"><option selected="selected" value="True">Active</option><option value="False">InActive</option></select>
|
|
|
212 |
</td>
|
|
|
213 |
</tr>
|
|
|
214 |
<tr>
|
|
|
215 |
<td class="detail">Transfer Price</td>
|
|
|
216 |
<td class="value"><input id="transferPrice" name="transferPrice" value='' type="text" onkeyup="calculateStuff()" /></td>
|
|
|
217 |
</tr>
|
|
|
218 |
<tr>
|
|
|
219 |
<td class="detail">Website MRP</td>
|
|
|
220 |
<td class="value"><input id="webisteMrp" name="webisteMrp" value='' type="text" readonly/></td>
|
|
|
221 |
</tr>
|
|
|
222 |
<tr>
|
|
|
223 |
<td class="detail">Website Selling Price</td>
|
|
|
224 |
<td class="value"><input id="webisteSellingPrice" name="webisteSellingPrice" value='' type="text" readonly/></td>
|
|
|
225 |
</tr>
|
|
|
226 |
<tr>
|
|
|
227 |
<td class="detail">Snapdeal Listed</td>
|
|
|
228 |
<td class="value">
|
|
|
229 |
<select name="isListedOnSnapdeal"><option selected="selected" value="True">Active</option><option value="False">InActive</option></select>
|
|
|
230 |
</td>
|
|
|
231 |
</tr>
|
|
|
232 |
<tr>
|
|
|
233 |
<td class="detail">Exception Price</td>
|
|
|
234 |
<td class="value"><input id="exceptionPrice" name="exceptionPrice" value='' type="text"/></td>
|
|
|
235 |
</tr>
|
|
|
236 |
<tr>
|
|
|
237 |
<td class="detail">Commission</td>
|
|
|
238 |
<td class="value"><input id="commission" name="commission" value='' type="text" readonly/></td>
|
|
|
239 |
</tr>
|
|
|
240 |
<tr>
|
|
|
241 |
<td class="detail">Service Tax</td>
|
|
|
242 |
<td class="value"><input id="serviceTax" name="serviceTax" value='' type="text" readonly/></td>
|
|
|
243 |
</tr>
|
|
|
244 |
<tr>
|
|
|
245 |
<td class="detail">Courier Cost</td>
|
|
|
246 |
<td class="value"><input id="courierCost" name="courierCost" value='' type="text" readonly/></td>
|
|
|
247 |
</tr>
|
|
|
248 |
<tr>
|
| 9478 |
kshitij.so |
249 |
<td class="detail">Item Id @ Snapdeal</td>
|
|
|
250 |
<td class="value"><input id="sdItemCode" name="sdItemCode" value='' type="text"></td>
|
|
|
251 |
</tr>
|
|
|
252 |
<tr>
|
| 9242 |
kshitij.so |
253 |
<td class="detail">Action</td>
|
|
|
254 |
<td class="value"><input type="submit" value="Update" name="upload" style="width: 25%;">
|
|
|
255 |
<input type="button" style="padding-left: 5px; margin-left: 10px;width: 25%;" id="cancelbutton" name="cancel" value="Cancel">
|
|
|
256 |
</td>
|
|
|
257 |
</tr>
|
|
|
258 |
<tr class="detail" style="display:none;"></td>
|
|
|
259 |
<td>
|
|
|
260 |
<input id="itemWeight" name="itemWeight" value='0' type="text"/>
|
|
|
261 |
</td>
|
|
|
262 |
</tr>
|
|
|
263 |
</tbody>
|
|
|
264 |
</table>
|
|
|
265 |
</div>
|
|
|
266 |
</form>
|