| 9242 |
kshitij.so |
1 |
#set ($itemDetail = $action.fetchItemDetail())
|
|
|
2 |
|
|
|
3 |
<style>
|
|
|
4 |
* { font-family: Verdana; font-size: 96%; }
|
|
|
5 |
label {
|
|
|
6 |
float: left;
|
|
|
7 |
}
|
|
|
8 |
|
|
|
9 |
#upload > table {
|
|
|
10 |
color: #747474;
|
|
|
11 |
width: 100%;
|
|
|
12 |
}
|
|
|
13 |
|
|
|
14 |
|
|
|
15 |
#upload tbody {
|
|
|
16 |
background: url("/Support/images/center-bcg.png") repeat-y scroll right top #F6F6F6;
|
|
|
17 |
font-weight: bold;
|
|
|
18 |
}
|
|
|
19 |
|
|
|
20 |
.detail {
|
|
|
21 |
background: url("/Support/images/center-blue.png") repeat-y scroll left top #E4EBF8;
|
|
|
22 |
border-bottom: 1px solid #B3C1DB;
|
|
|
23 |
border-right: 1px solid #CED9EC;
|
|
|
24 |
color: #1F3D71;
|
|
|
25 |
height: 25px;
|
|
|
26 |
padding: 10px 0 0 24px;
|
|
|
27 |
}
|
|
|
28 |
|
|
|
29 |
.value {
|
|
|
30 |
border-bottom: 1px solid #B3C1DB;
|
|
|
31 |
border-right: 1px solid #CED9EC;
|
|
|
32 |
height: 24px;
|
|
|
33 |
text-align: center;
|
|
|
34 |
color: #747474;
|
|
|
35 |
}
|
|
|
36 |
|
|
|
37 |
select {
|
|
|
38 |
padding-top: 2px;
|
|
|
39 |
vertical-align: middle;
|
|
|
40 |
direction: ltr;
|
|
|
41 |
font-weight: bold;
|
|
|
42 |
width: 50%;
|
|
|
43 |
height: 22px;
|
|
|
44 |
}
|
|
|
45 |
|
|
|
46 |
input {
|
|
|
47 |
font-size: 12px;
|
|
|
48 |
text-align: center;
|
|
|
49 |
width: 50%;
|
|
|
50 |
font-weight: bold;
|
|
|
51 |
}
|
|
|
52 |
</style>
|
|
|
53 |
<link href="/Support/css/jquery.alerts.css" type="text/css" rel="stylesheet">
|
|
|
54 |
<script type="text/javascript" src="/Support/js/jquery-1.4.2.js"></script>
|
|
|
55 |
<script type="text/javascript" src="/Support/js/jquery.alerts.js"></script>
|
|
|
56 |
<script type="text/javascript">
|
|
|
57 |
$(document).ready(function() {
|
|
|
58 |
$('#cancelbutton').click(function(e) {
|
|
|
59 |
window.location.href = '/Support/snapdeal-list';
|
|
|
60 |
});
|
|
|
61 |
});
|
|
|
62 |
</script>
|
|
|
63 |
<script type="text/javascript">
|
|
|
64 |
function calculateStuff()
|
|
|
65 |
{
|
|
|
66 |
var itemWeight=document.forms["snapdeal-form"]["itemWeight"].value;
|
|
|
67 |
if (itemWeight==0){
|
|
|
68 |
var courierCost =45;
|
|
|
69 |
}
|
|
|
70 |
else{
|
|
|
71 |
var slabs = parseInt((parseFloat(itemWeight)-.001)/.5)
|
|
|
72 |
var courierCost = 45;
|
|
|
73 |
for (var i=0;i<slabs;i++)
|
|
|
74 |
{
|
|
|
75 |
courierCost = courierCost + 35;
|
|
|
76 |
}
|
|
|
77 |
}
|
|
|
78 |
var transferPrice=document.forms["snapdeal-form"]["transferPrice"].value;
|
|
|
79 |
if ( transferPrice==null || transferPrice=="" || isNaN(transferPrice)){
|
|
|
80 |
$('input#sellingPrice').val('0.00');
|
|
|
81 |
$('input#courierCost').val('0.00');
|
|
|
82 |
$('input#commission').val('0.00');
|
|
|
83 |
$('input#serviceTax').val('0.00');
|
|
|
84 |
return false;
|
|
|
85 |
}
|
|
|
86 |
var sellingPrice=(((parseInt(transferPrice) + courierCost*1.1236)/(100 - 3.59*1.1236))*100).toFixed(2);
|
|
|
87 |
var commisionValue=(.0359*sellingPrice + courierCost).toFixed(2);
|
|
|
88 |
var commisionPrice=(((.0359*sellingPrice + courierCost)/sellingPrice)*100).toFixed(2);
|
|
|
89 |
var serviceTax=(commisionValue*.1236).toFixed(2);
|
|
|
90 |
$('input#sellingPrice').val(sellingPrice);
|
|
|
91 |
$('input#courierCost').val(courierCost);
|
|
|
92 |
$('input#commission').val(commisionPrice);
|
|
|
93 |
$('input#serviceTax').val(serviceTax);
|
|
|
94 |
}
|
|
|
95 |
</script>
|
| 9478 |
kshitij.so |
96 |
<script type="text/javascript">
|
|
|
97 |
$('#getMxNlc').live('click', function(){
|
|
|
98 |
var itemId=document.forms["snapdeal-form"]["itemId"].value;
|
|
|
99 |
var warehouseId=document.forms["snapdeal-form"]["warehouseId"].value;
|
|
|
100 |
jQuery.ajax({
|
|
|
101 |
type : "GET",
|
|
|
102 |
url : "/Support/snapdeal-list!ke$ha?itemId="+itemId+"&warehouseId="+warehouseId,
|
|
|
103 |
beforeSend: function(){
|
|
|
104 |
$('#ajax-spinner').show();
|
|
|
105 |
},
|
|
|
106 |
complete: function(){
|
|
|
107 |
$('#ajax-spinner').hide();
|
|
|
108 |
},
|
|
|
109 |
success : function(json){
|
|
|
110 |
var parsedData = JSON.parse(json);
|
|
|
111 |
$('input#maxNlc').val(parsedData.MaxNlc);
|
|
|
112 |
},
|
|
|
113 |
error : function() {
|
|
|
114 |
alert("Unable to get max nlc");
|
|
|
115 |
},
|
|
|
116 |
});
|
|
|
117 |
return false;
|
|
|
118 |
});
|
|
|
119 |
</script>
|
| 9242 |
kshitij.so |
120 |
<form id="snapdeal-form" action="/Support/snapdeal-list!update" enctype="multipart/form-data" method="post">
|
|
|
121 |
<div class="left" style="float: left; width: 48%;">
|
|
|
122 |
<table id="upload" style="text-align: center;width: 100%;height:200px;">
|
|
|
123 |
<thead>
|
|
|
124 |
</thead>
|
|
|
125 |
<tbody>
|
|
|
126 |
<tr>
|
|
|
127 |
<td class="detail">Item Id</td>
|
|
|
128 |
<td class="value"><input id="itemId" name="itemId" value='$itemDetail.getItem_id()'type="text" readonly/></td>
|
|
|
129 |
</tr>
|
|
|
130 |
<tr>
|
|
|
131 |
<td class="detail">Warehouse Id</td>
|
|
|
132 |
<td class="value">
|
| 9478 |
kshitij.so |
133 |
<input id="warehouseId" name="warehouseId" value='$itemDetail.getWarehouseId()' style="width:25%; type="text" />
|
|
|
134 |
<input type="button" id="getMxNlc" value="Get Max Nlc" style="width:25%;">
|
|
|
135 |
</td>
|
| 9242 |
kshitij.so |
136 |
</tr>
|
|
|
137 |
<tr>
|
|
|
138 |
<td class="detail">Snapdeal Selling Price</td>
|
|
|
139 |
<td class="value">
|
|
|
140 |
<input id="sellingPrice" name="sellingPrice" value='$itemDetail.getSellingPrice()'type="text" readonly/></td>
|
|
|
141 |
</tr>
|
|
|
142 |
<tr>
|
|
|
143 |
<td class="detail">Transfer Price</td>
|
|
|
144 |
<td class="value"><input id="transferPrice" name="transferPrice" value='$itemDetail.getTransferPrice()'type="text" onkeyup="calculateStuff()" /></td>
|
|
|
145 |
</tr>
|
|
|
146 |
<tr>
|
|
|
147 |
<td class="detail">Webiste MRP</td>
|
|
|
148 |
<td class="value"><input id="webisteMrp" name="webisteMrp" value='$itemDetail.getMrp()'type="text" readonly/></td>
|
|
|
149 |
</tr>
|
|
|
150 |
<tr>
|
|
|
151 |
<td class="detail">Webiste Selling Price</td>
|
|
|
152 |
<td class="value"><input id="webisteSellingPrice" name="webisteSellingPrice" value='$itemDetail.getWebsiteSellingPrice()'type="text" readonly/></td>
|
|
|
153 |
</tr>
|
|
|
154 |
<tr>
|
| 9478 |
kshitij.so |
155 |
<td class="detail">Max NLC</td>
|
|
|
156 |
<td class="value"><input id="maxNlc" name="maxNlc" value='$itemDetail.getMaxNlc()'type="text"></td>
|
|
|
157 |
</tr>
|
|
|
158 |
<tr>
|
| 9242 |
kshitij.so |
159 |
<td class="detail">Suppress Pricing Feed</td>
|
|
|
160 |
<td class="value">#if ($itemDetail.isSuppressPriceFeed())
|
|
|
161 |
<select name="isSuppressPriceFeed"><option selected="selected" value="True">Active</option><option value="False">InActive</option></select>
|
|
|
162 |
#else
|
|
|
163 |
<select name="isSuppressPriceFeed"><option selected="selected" value="False">InActive</option><option value="True">Active</option></select>
|
|
|
164 |
#end
|
|
|
165 |
</td>
|
|
|
166 |
</tr>
|
|
|
167 |
</tbody>
|
|
|
168 |
</table>
|
|
|
169 |
</div>
|
|
|
170 |
<div class="left" style="float: right; width: 48%;">
|
|
|
171 |
<table id="upload" style="text-align: center;width: 100%;height:200px;">
|
|
|
172 |
<thead>
|
|
|
173 |
</thead>
|
|
|
174 |
<tbody>
|
|
|
175 |
<tr>
|
|
|
176 |
<td class="detail">Suppress Inventory Feed</td>
|
|
|
177 |
<td class="value">#if ($itemDetail.isSuppressInventoryFeed())
|
|
|
178 |
<select name="isSuppressInventoryFeed"><option selected="selected" value="True">Active</option><option value="False">InActive</option></select>
|
|
|
179 |
#else
|
|
|
180 |
<select name="isSuppressInventoryFeed"><option selected="selected" value="False">InActive</option><option value="True">Active</option></select>
|
|
|
181 |
#end
|
|
|
182 |
</td>
|
|
|
183 |
</tr>
|
|
|
184 |
<tr>
|
|
|
185 |
<td class="detail">Snapdeal Listed</td>
|
|
|
186 |
<td class="value">#if ($itemDetail.isIsListedOnSnapdeal())
|
|
|
187 |
<select name="isListedOnSnapdeal"><option selected="selected" value="True">Active</option><option value="False">InActive</option></select>
|
|
|
188 |
#else
|
|
|
189 |
<select name="isListedOnSnapdeal"><option selected="selected" value="False">InActive</option><option value="True">Active</option></select>
|
|
|
190 |
#end
|
|
|
191 |
</td>
|
|
|
192 |
</tr>
|
|
|
193 |
<tr>
|
|
|
194 |
<td class="detail">Exception Price</td>
|
|
|
195 |
<td class="value"><input id="exceptionPrice" name="exceptionPrice" value='$itemDetail.getExceptionPrice()'type="text"/></td>
|
|
|
196 |
</tr>
|
|
|
197 |
<tr>
|
|
|
198 |
<td class="detail">Commission</td>
|
|
|
199 |
<td class="value"><input id="commission" name="commission" value='$itemDetail.getCommission()'type="text" readonly/></td>
|
|
|
200 |
</tr>
|
|
|
201 |
<tr>
|
|
|
202 |
<td class="detail">Service Tax</td>
|
|
|
203 |
<td class="value"><input id="serviceTax" name="serviceTax" value='$itemDetail.getServiceTax()'type="text" readonly/></td>
|
|
|
204 |
</tr>
|
|
|
205 |
<tr>
|
|
|
206 |
<td class="detail">Courier Cost</td>
|
|
|
207 |
<td class="value"><input id="courierCost" name="courierCost" value='$itemDetail.getCourierCost()'type="text" readonly/></td>
|
|
|
208 |
</tr>
|
|
|
209 |
<tr>
|
| 9478 |
kshitij.so |
210 |
<td class="detail">Item Id @ Snapdeal</td>
|
|
|
211 |
#if($itemDetail.getSnapdealItemCode())
|
|
|
212 |
<td class="value"><input id="sdItemCode" name="sdItemCode" value='$itemDetail.getSnapdealItemCode()' type="text"></td>
|
|
|
213 |
#else
|
|
|
214 |
<td class="value"><input id="sdItemCode" name="sdItemCode" value='' type="text"></td>
|
|
|
215 |
#end
|
|
|
216 |
</tr>
|
|
|
217 |
<tr>
|
| 9242 |
kshitij.so |
218 |
<td class="detail">Action</td>
|
|
|
219 |
<td class="value"><input type="submit" value="Update" name="upload" style="width: 25%;">
|
|
|
220 |
<input type="button" style="padding-left: 5px; margin-left: 10px;width: 25%;" id="cancelbutton" name="cancel" value="Cancel">
|
|
|
221 |
</td>
|
|
|
222 |
</tr>
|
|
|
223 |
<tr class="detail" style="display:none;"></td>
|
|
|
224 |
<td>
|
|
|
225 |
<input id="itemWeight" name="itemWeight" value='$itemDetail.getWeight()'type="text"/>
|
|
|
226 |
</td>
|
|
|
227 |
</tr>
|
|
|
228 |
</tbody>
|
|
|
229 |
</table>
|
|
|
230 |
</div>
|
|
|
231 |
</form>
|