| 9242 |
kshitij.so |
1 |
#set ($itemDetail = $action.fetchItemDetail())
|
| 9725 |
kshitij.so |
2 |
#set ($mpDetail = $action.fetchMarketplaceDetail())
|
| 9242 |
kshitij.so |
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 |
|
| 9725 |
kshitij.so |
20 |
.mpUpload > table {
|
|
|
21 |
color: #747474;
|
|
|
22 |
width: 100%;
|
|
|
23 |
}
|
|
|
24 |
|
|
|
25 |
|
|
|
26 |
.mpUpload tbody {
|
|
|
27 |
background: url("/Support/images/center-bcg.png") repeat-y scroll right top #F6F6F6;
|
|
|
28 |
font-weight: bold;
|
|
|
29 |
}
|
|
|
30 |
|
| 9242 |
kshitij.so |
31 |
.detail {
|
|
|
32 |
background: url("/Support/images/center-blue.png") repeat-y scroll left top #E4EBF8;
|
|
|
33 |
border-bottom: 1px solid #B3C1DB;
|
|
|
34 |
border-right: 1px solid #CED9EC;
|
|
|
35 |
color: #1F3D71;
|
|
|
36 |
height: 25px;
|
|
|
37 |
padding: 10px 0 0 24px;
|
|
|
38 |
}
|
|
|
39 |
|
|
|
40 |
.value {
|
|
|
41 |
border-bottom: 1px solid #B3C1DB;
|
|
|
42 |
border-right: 1px solid #CED9EC;
|
|
|
43 |
height: 24px;
|
|
|
44 |
text-align: center;
|
|
|
45 |
color: #747474;
|
|
|
46 |
}
|
|
|
47 |
|
|
|
48 |
select {
|
|
|
49 |
padding-top: 2px;
|
|
|
50 |
vertical-align: middle;
|
|
|
51 |
direction: ltr;
|
|
|
52 |
font-weight: bold;
|
|
|
53 |
width: 50%;
|
|
|
54 |
height: 22px;
|
|
|
55 |
}
|
|
|
56 |
|
|
|
57 |
input {
|
|
|
58 |
font-size: 12px;
|
|
|
59 |
text-align: center;
|
|
|
60 |
width: 50%;
|
|
|
61 |
font-weight: bold;
|
|
|
62 |
}
|
| 9725 |
kshitij.so |
63 |
.top-header {
|
|
|
64 |
background-color: #2789C1;
|
|
|
65 |
display: block;
|
|
|
66 |
height: 27px;
|
|
|
67 |
width: 100%;
|
|
|
68 |
}
|
|
|
69 |
|
|
|
70 |
input[type="text"][readonly] {
|
|
|
71 |
background-color: #D1D1D1;
|
|
|
72 |
}
|
|
|
73 |
|
|
|
74 |
input[type="text"][disabled] {
|
|
|
75 |
background-color: #D1D1D1;
|
|
|
76 |
}
|
| 9734 |
kshitij.so |
77 |
|
|
|
78 |
.border-highlight{
|
|
|
79 |
border : 3px solid #00BFFF;
|
|
|
80 |
}
|
| 9923 |
kshitij.so |
81 |
|
|
|
82 |
.border-highlight-green{
|
|
|
83 |
border : 3px solid green;
|
|
|
84 |
}
|
|
|
85 |
|
|
|
86 |
.border-highlight-red{
|
|
|
87 |
border : 3px solid red;
|
|
|
88 |
}
|
| 9242 |
kshitij.so |
89 |
</style>
|
|
|
90 |
<link href="/Support/css/jquery.alerts.css" type="text/css" rel="stylesheet">
|
|
|
91 |
<script type="text/javascript" src="/Support/js/jquery-1.4.2.js"></script>
|
|
|
92 |
<script type="text/javascript" src="/Support/js/jquery.alerts.js"></script>
|
|
|
93 |
<script type="text/javascript">
|
|
|
94 |
$(document).ready(function() {
|
|
|
95 |
$('#cancelbutton').click(function(e) {
|
|
|
96 |
window.location.href = '/Support/snapdeal-list';
|
|
|
97 |
});
|
|
|
98 |
});
|
|
|
99 |
</script>
|
|
|
100 |
<script type="text/javascript">
|
| 9923 |
kshitij.so |
101 |
$('select').change(function(){
|
|
|
102 |
var optionValue = $(this).val();
|
|
|
103 |
var selectType = parseInt($(this).attr('selectType'));
|
|
|
104 |
switch(selectType)
|
|
|
105 |
{
|
|
|
106 |
case 1:
|
|
|
107 |
if (optionValue=='True'){
|
|
|
108 |
$(this).removeClass().addClass('border-highlight-red');
|
|
|
109 |
}
|
|
|
110 |
else{
|
|
|
111 |
$(this).removeClass();
|
|
|
112 |
}
|
|
|
113 |
break;
|
|
|
114 |
case 2:
|
|
|
115 |
if (optionValue=='False'){
|
|
|
116 |
$(this).removeClass().addClass('border-highlight-red');
|
|
|
117 |
}
|
|
|
118 |
else{
|
|
|
119 |
$(this).removeClass();
|
|
|
120 |
}
|
|
|
121 |
break;
|
|
|
122 |
case 3:
|
|
|
123 |
if (optionValue=='True'){
|
|
|
124 |
$(this).removeClass().addClass('border-highlight-green');
|
|
|
125 |
}
|
|
|
126 |
else{
|
|
|
127 |
$(this).removeClass();
|
|
|
128 |
}
|
|
|
129 |
break;
|
|
|
130 |
}
|
|
|
131 |
});
|
|
|
132 |
</script>
|
|
|
133 |
<script type="text/javascript">
|
| 9242 |
kshitij.so |
134 |
function calculateStuff()
|
|
|
135 |
{
|
| 9923 |
kshitij.so |
136 |
$('input#minPosTp').removeClass();
|
|
|
137 |
$('input#minPosSp').removeClass();
|
|
|
138 |
$('input#transferPrice').removeClass();
|
|
|
139 |
$('input#serviceTax').removeClass();
|
|
|
140 |
$('input#commission').removeClass();
|
|
|
141 |
$('input#margin').removeClass();
|
|
|
142 |
$('input#marginPer').removeClass();
|
| 9725 |
kshitij.so |
143 |
var itemWeight=$('#itemWeight').val();
|
| 9823 |
vikram.rag |
144 |
itemWeight = +itemWeight+.05;
|
| 9242 |
kshitij.so |
145 |
if (itemWeight==0){
|
|
|
146 |
var courierCost =45;
|
|
|
147 |
}
|
|
|
148 |
else{
|
|
|
149 |
var slabs = parseInt((parseFloat(itemWeight)-.001)/.5)
|
|
|
150 |
var courierCost = 45;
|
|
|
151 |
for (var i=0;i<slabs;i++)
|
|
|
152 |
{
|
|
|
153 |
courierCost = courierCost + 35;
|
|
|
154 |
}
|
|
|
155 |
}
|
| 9725 |
kshitij.so |
156 |
//courierCost = ((courierCost+0)*1.1236).toFixed(2);
|
|
|
157 |
var sellingPrice=$('#sellingPrice').val();
|
| 11095 |
kshitij.so |
158 |
var courierCostSnapdeal=$('#courierCostMarketplace').val();
|
| 9725 |
kshitij.so |
159 |
var nlc=$('#maxNlc').val();
|
|
|
160 |
var otherCost=$('#otherCost').val();
|
|
|
161 |
var othCost=parseFloat(otherCost);
|
|
|
162 |
if ( sellingPrice==null || sellingPrice=="" || isNaN(sellingPrice) || nlc==null || nlc=="" || isNaN(nlc)){
|
| 9242 |
kshitij.so |
163 |
$('input#courierCost').val('0.00');
|
|
|
164 |
$('input#commission').val('0.00');
|
|
|
165 |
$('input#serviceTax').val('0.00');
|
| 9734 |
kshitij.so |
166 |
$('input#transferPrice').val('0.00');
|
|
|
167 |
$('input#minPosTp').val('0.00');
|
|
|
168 |
$('input#minPosSp').val('0.00');
|
| 9242 |
kshitij.so |
169 |
}
|
| 9725 |
kshitij.so |
170 |
else{
|
| 9780 |
kshitij.so |
171 |
var serviceTaxRate=$('#serviceTaxRate').val();
|
|
|
172 |
var stRate = serviceTaxRate/100;
|
| 10287 |
kshitij.so |
173 |
var com=$('#commissionRate').val();
|
|
|
174 |
var pgFee=$('#pgFee').val();
|
|
|
175 |
var comRate=(com/100);
|
|
|
176 |
console.log(comRate);
|
|
|
177 |
console.log(pgFee);
|
| 11095 |
kshitij.so |
178 |
console.log(courierCostSnapdeal);
|
| 10287 |
kshitij.so |
179 |
var pgFeeRate=pgFee/100;
|
| 9780 |
kshitij.so |
180 |
var emiFeeRate=$('#emiFee').val();
|
|
|
181 |
var emiFee=emiFeeRate/100;
|
|
|
182 |
var closingFee=parseFloat($('#closingFee').val());
|
|
|
183 |
var returnProvision=parseFloat($('#returnProvision').val());
|
| 9725 |
kshitij.so |
184 |
var margin=$('#margin').val();
|
|
|
185 |
var vatRate=$('#vat').val();
|
|
|
186 |
var vat=vatRate/100;
|
| 10287 |
kshitij.so |
187 |
if (pgFeeRate*parseFloat(sellingPrice)>=20){
|
|
|
188 |
var commisionPrice=((comRate+pgFeeRate)*sellingPrice).toFixed(2);
|
|
|
189 |
}
|
|
|
190 |
else{
|
|
|
191 |
var commisionPrice=(comRate*sellingPrice+20).toFixed(2);
|
|
|
192 |
}
|
| 11095 |
kshitij.so |
193 |
var ourTp=(parseFloat(sellingPrice)-parseFloat(sellingPrice)*(1+stRate)*((comRate)+emiFee)-((+courierCostSnapdeal+closingFee)*(1+stRate))-(Math.max(20,pgFeeRate*parseFloat(sellingPrice))*(1+stRate)));
|
| 10287 |
kshitij.so |
194 |
console.log(ourTp);
|
| 9725 |
kshitij.so |
195 |
var vatValue=(((sellingPrice/(1+vat))-(nlc/(1+vat)))*vat).toFixed(2);
|
| 9780 |
kshitij.so |
196 |
var inHouseCost=(+vatValue+15+((returnProvision/100)*sellingPrice)+othCost);
|
|
|
197 |
console.log(inHouseCost);
|
| 9725 |
kshitij.so |
198 |
var lowestTp=(+nlc+inHouseCost).toFixed(2);
|
| 10287 |
kshitij.so |
199 |
if (pgFeeRate*parseFloat(sellingPrice)>=20){
|
| 11095 |
kshitij.so |
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));
|
| 10287 |
kshitij.so |
201 |
}
|
|
|
202 |
else{
|
| 11095 |
kshitij.so |
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));
|
| 10287 |
kshitij.so |
204 |
}
|
| 9725 |
kshitij.so |
205 |
ourTp = (parseFloat(ourTp)).toFixed(2);
|
|
|
206 |
$('input#minPosTp').val(lowestTp);
|
| 9734 |
kshitij.so |
207 |
$('input#minPosSp').val(parseFloat(lowestSp).toFixed(2));
|
| 9725 |
kshitij.so |
208 |
$('input#transferPrice').val(ourTp);
|
| 11095 |
kshitij.so |
209 |
var serviceTax=(stRate*(+commisionPrice+(+courierCostSnapdeal))).toFixed(2);
|
| 9725 |
kshitij.so |
210 |
lowest_possible_tp=parseFloat(lowestTp);
|
|
|
211 |
newMargin=(ourTp-lowest_possible_tp).toFixed(2);
|
|
|
212 |
marginPercentage=(((ourTp-lowest_possible_tp)/sellingPrice)*100).toFixed(2);
|
|
|
213 |
$('input#marginPer').val(marginPercentage);
|
|
|
214 |
$('input#margin').val(newMargin);
|
| 9242 |
kshitij.so |
215 |
$('input#sellingPrice').val(sellingPrice);
|
|
|
216 |
$('input#courierCost').val(courierCost);
|
|
|
217 |
$('input#commission').val(commisionPrice);
|
|
|
218 |
$('input#serviceTax').val(serviceTax);
|
| 9734 |
kshitij.so |
219 |
$('input#minPosTp').addClass("border-highlight");
|
|
|
220 |
$('input#minPosSp').addClass("border-highlight");
|
|
|
221 |
$('input#transferPrice').addClass("border-highlight");
|
|
|
222 |
$('input#serviceTax').addClass("border-highlight");
|
|
|
223 |
$('input#commission').addClass("border-highlight");
|
|
|
224 |
$('input#margin').addClass("border-highlight");
|
|
|
225 |
$('input#marginPer').addClass("border-highlight");
|
| 9923 |
kshitij.so |
226 |
if (ourTp-lowest_possible_tp < 0){
|
|
|
227 |
$('input#margin').removeClass().addClass("border-highlight-red");
|
|
|
228 |
$('input#marginPer').addClass("border-highlight-red");
|
| 9242 |
kshitij.so |
229 |
}
|
| 9725 |
kshitij.so |
230 |
}
|
| 9923 |
kshitij.so |
231 |
}
|
| 9242 |
kshitij.so |
232 |
</script>
|
| 9478 |
kshitij.so |
233 |
<script type="text/javascript">
|
|
|
234 |
$('#getMxNlc').live('click', function(){
|
| 9725 |
kshitij.so |
235 |
var itemId=$('#itemId').val();
|
|
|
236 |
var warehouseId=$('#warehouseId').val();
|
| 9825 |
kshitij.so |
237 |
var sellingPrice=$('#sellingPrice').val();
|
|
|
238 |
if ( warehouseId==null || warehouseId=="" || isNaN(warehouseId)){
|
|
|
239 |
jAlert('Please enter valid warehouse id', 'ERROR');
|
|
|
240 |
return false;
|
|
|
241 |
}
|
|
|
242 |
if (sellingPrice==0 || sellingPrice=="" || isNaN(sellingPrice)){
|
|
|
243 |
jAlert('Illegal Entry In Selling Price', 'ERROR');
|
|
|
244 |
return false;
|
|
|
245 |
}
|
| 9478 |
kshitij.so |
246 |
jQuery.ajax({
|
|
|
247 |
type : "GET",
|
| 9825 |
kshitij.so |
248 |
url : "/Support/snapdeal-list!ke$ha?itemId="+itemId+"&warehouseId="+warehouseId+"&sellingPrice="+sellingPrice,
|
| 9478 |
kshitij.so |
249 |
beforeSend: function(){
|
|
|
250 |
$('#ajax-spinner').show();
|
|
|
251 |
},
|
|
|
252 |
complete: function(){
|
|
|
253 |
$('#ajax-spinner').hide();
|
|
|
254 |
},
|
|
|
255 |
success : function(json){
|
|
|
256 |
var parsedData = JSON.parse(json);
|
|
|
257 |
$('input#maxNlc').val(parsedData.MaxNlc);
|
| 9825 |
kshitij.so |
258 |
$('input#vat').val(parsedData.VatRate);
|
| 9734 |
kshitij.so |
259 |
calculateStuff();
|
| 9478 |
kshitij.so |
260 |
},
|
|
|
261 |
error : function() {
|
| 9725 |
kshitij.so |
262 |
$('input#warehouseId').val('');
|
| 9780 |
kshitij.so |
263 |
$('input#maxNlc').val('');
|
| 9725 |
kshitij.so |
264 |
alert("Unable to get max nlc possibly wrong warehouse");
|
| 9478 |
kshitij.so |
265 |
},
|
|
|
266 |
});
|
|
|
267 |
return false;
|
|
|
268 |
});
|
|
|
269 |
</script>
|
| 9725 |
kshitij.so |
270 |
<script type="text/javascript">
|
|
|
271 |
$(".top-header").click(function(){
|
|
|
272 |
$(".product-detail").slideToggle("slow");
|
|
|
273 |
});
|
|
|
274 |
</script>
|
|
|
275 |
<script type="text/javascript">
|
|
|
276 |
$(".top-header-inventory").click(function(){
|
|
|
277 |
$(".inventory-details").slideToggle("slow");
|
|
|
278 |
});
|
|
|
279 |
</script>
|
|
|
280 |
<script type="text/javascript">
|
|
|
281 |
$(".top-header-marketplace").click(function(){
|
|
|
282 |
$(".mp-detail").slideToggle("slow");
|
|
|
283 |
});
|
|
|
284 |
</script>
|
|
|
285 |
<!--Product details-->
|
|
|
286 |
<div class="top-header">
|
|
|
287 |
<h2 style="font-weight: bolder; font-size: 20px; border-top: 4px solid rgb(134, 163, 189); background-color: rgb(134, 163, 189);color:white;">
|
|
|
288 |
Product Details
|
|
|
289 |
</h2>
|
|
|
290 |
</div>
|
| 9923 |
kshitij.so |
291 |
<div class="product-detail" style="display: block; min-height: 670px;">
|
| 9242 |
kshitij.so |
292 |
<form id="snapdeal-form" action="/Support/snapdeal-list!update" enctype="multipart/form-data" method="post">
|
|
|
293 |
<div class="left" style="float: left; width: 48%;">
|
|
|
294 |
<table id="upload" style="text-align: center;width: 100%;height:200px;">
|
|
|
295 |
<thead>
|
|
|
296 |
</thead>
|
|
|
297 |
<tbody>
|
|
|
298 |
<tr>
|
|
|
299 |
<td class="detail">Item Id</td>
|
|
|
300 |
<td class="value"><input id="itemId" name="itemId" value='$itemDetail.getItem_id()'type="text" readonly/></td>
|
|
|
301 |
</tr>
|
|
|
302 |
<tr>
|
|
|
303 |
<td class="detail">Warehouse Id</td>
|
|
|
304 |
<td class="value">
|
| 9478 |
kshitij.so |
305 |
<input id="warehouseId" name="warehouseId" value='$itemDetail.getWarehouseId()' style="width:25%; type="text" />
|
|
|
306 |
<input type="button" id="getMxNlc" value="Get Max Nlc" style="width:25%;">
|
|
|
307 |
</td>
|
| 9242 |
kshitij.so |
308 |
</tr>
|
|
|
309 |
<tr>
|
| 9780 |
kshitij.so |
310 |
<td class="detail">Max NLC</td>
|
|
|
311 |
<td class="value"><input id="maxNlc" name="maxNlc" value='$itemDetail.getMaxNlc()'type="text" readonly/></td>
|
|
|
312 |
</tr>
|
|
|
313 |
<tr>
|
| 9568 |
kshitij.so |
314 |
<td class="detail">Weight</td>
|
|
|
315 |
<td class="value">
|
|
|
316 |
<input id="weight" name="weight" value='$itemDetail.getWeight()' type="text" readonly/>
|
|
|
317 |
</td>
|
|
|
318 |
</tr>
|
|
|
319 |
<tr>
|
| 9242 |
kshitij.so |
320 |
<td class="detail">Snapdeal Selling Price</td>
|
|
|
321 |
<td class="value">
|
| 9725 |
kshitij.so |
322 |
<input id="sellingPrice" name="sellingPrice" value='$itemDetail.getSellingPrice()'type="text" onkeyup="calculateStuff()"></td>
|
| 9242 |
kshitij.so |
323 |
</tr>
|
|
|
324 |
<tr>
|
|
|
325 |
<td class="detail">Transfer Price</td>
|
| 9725 |
kshitij.so |
326 |
<td class="value"><input id="transferPrice" name="transferPrice" value='$itemDetail.getTransferPrice()'type="text" readonly/></td>
|
| 9242 |
kshitij.so |
327 |
</tr>
|
|
|
328 |
<tr>
|
|
|
329 |
<td class="detail">Webiste MRP</td>
|
| 9725 |
kshitij.so |
330 |
<td class="value"><input id="webisteMrp" name="webisteMrp" value='$itemDetail.getMrp()'type="text" disabled/></td>
|
| 9242 |
kshitij.so |
331 |
</tr>
|
|
|
332 |
<tr>
|
|
|
333 |
<td class="detail">Webiste Selling Price</td>
|
| 9725 |
kshitij.so |
334 |
<td class="value"><input id="webisteSellingPrice" name="webisteSellingPrice" value='$itemDetail.getWebsiteSellingPrice()'type="text" disabled/></td>
|
| 9242 |
kshitij.so |
335 |
</tr>
|
|
|
336 |
<tr>
|
| 9725 |
kshitij.so |
337 |
<td class="detail">Other Cost</td>
|
|
|
338 |
<td class="value"><input id="otherCost" name="otherCost" value='$mpDetail.getOtherCost()' type="text" onkeyup="calculateStuff()"</td>
|
|
|
339 |
</tr>
|
|
|
340 |
<tr>
|
|
|
341 |
<td class="detail">Minimum Possible SP (Calculated)</td>
|
|
|
342 |
<td class="value"><input id="minPosSp" name="minPosSp" value='$mpDetail.getMinimumPossibleSp()'type="text" readonly/></td>
|
|
|
343 |
</tr>
|
|
|
344 |
<tr>
|
|
|
345 |
<td class="detail">Minimum Possible TP (Calculated)</td>
|
|
|
346 |
<td class="value">
|
|
|
347 |
<input id="minPosTp" name="minPosTp" value='$mpDetail.getMinimumPossibleTp()' type="text" readonly/>
|
| 9242 |
kshitij.so |
348 |
</td>
|
|
|
349 |
</tr>
|
| 9725 |
kshitij.so |
350 |
<tr>
|
|
|
351 |
<td class="detail">Last Updated SP</td>
|
|
|
352 |
<td class="value">
|
|
|
353 |
<input id="currentSp" name="currentSp" value='$mpDetail.getCurrentSp()' type="text" readonly/>
|
|
|
354 |
</td>
|
|
|
355 |
</tr>
|
|
|
356 |
<tr>
|
|
|
357 |
<td class="detail">Last Updated TP</td>
|
|
|
358 |
<td class="value">
|
|
|
359 |
<input id="currentTp" name="currentTp" value='$mpDetail.getCurrentTp()'type="text" readonly/></td>
|
|
|
360 |
</tr>
|
|
|
361 |
#set ($margin = $mpDetail.getCurrentTp() - $mpDetail.getMinimumPossibleTp())
|
| 9923 |
kshitij.so |
362 |
#if ($margin < 0)
|
|
|
363 |
#set ($cls = 'border-highlight-red')
|
|
|
364 |
#else
|
|
|
365 |
#set ($cls='')
|
|
|
366 |
#end
|
| 9725 |
kshitij.so |
367 |
<tr>
|
|
|
368 |
<td class="detail">Margin</td>
|
| 9923 |
kshitij.so |
369 |
<td class="value"><input id="margin" name="margin" class='$cls' value='$action.getRoundOfValue("$margin")'type="text" style="width:20%;" disabled/>
|
| 9734 |
kshitij.so |
370 |
#if($mpDetail.getCurrentSp()==0)
|
|
|
371 |
#set ($marginPercentage = 0)
|
|
|
372 |
#else
|
|
|
373 |
#set ($marginPercentage = ($margin/$mpDetail.getCurrentSp()*100))
|
|
|
374 |
#end
|
|
|
375 |
#set($roundMarginPer = $action.getRoundOfValue("$marginPercentage"))
|
| 9923 |
kshitij.so |
376 |
<span style="font-weight:bold;color:black;">Margin %</span><input id="marginPer" class='$cls' name="marginPer" value='$roundMarginPer' type="text" style="width:20%;" disabled/></td>
|
| 9725 |
kshitij.so |
377 |
</tr>
|
|
|
378 |
<tr>
|
|
|
379 |
<td class="detail">Last Updated Inventory</td>
|
|
|
380 |
<td class="value"><input id="lastUpdatedInventory" name="lastUpdatedInventory" value='$itemDetail.getLastUpdatedInventory()' type="text" disabled></td>
|
|
|
381 |
</tr>
|
|
|
382 |
<tr>
|
|
|
383 |
<td class="detail">Last Updated Inventory TimeStamp</td>
|
|
|
384 |
#if ($itemDetail.getLastUpdatedInventoryTimestamp()==0)
|
|
|
385 |
<td class="value"><input id="lastUpdatedInventoryTimestamp" name="lastUpdatedInventoryTimestamp" value='Not Available' type="text" disabled/></td>
|
|
|
386 |
#else
|
|
|
387 |
<td class="value"><input id="lastUpdatedInventoryTimestamp" name="lastUpdatedInventoryTimestamp" value='$action.getLastUpdatedInventoryTimestamp()' type="text" disabled/></td>
|
|
|
388 |
#end
|
|
|
389 |
</tr>
|
| 9923 |
kshitij.so |
390 |
<tr>
|
|
|
391 |
<td class="detail">Last Updated Price Timestamp</td>
|
| 9725 |
kshitij.so |
392 |
#if ($mpDetail.getLastCheckedTimestamp()==0)
|
|
|
393 |
<td class="value"><input id="lastCheckedPriceTimestamp" name="lastCheckedPriceTimestamp" value='Not Available' type="text" disabled/></td>
|
|
|
394 |
#else
|
|
|
395 |
<td class="value"><input id="lastCheckedPriceTimestamp" name="lastCheckedPriceTimestamp" value='$action.getLastCheckedTimestamp()' type="text" disabled/></td>
|
|
|
396 |
#end
|
|
|
397 |
</tr>
|
| 9923 |
kshitij.so |
398 |
<tr>
|
|
|
399 |
<td class="detail">Maximum Selling Price</td>
|
|
|
400 |
<td class="value">
|
|
|
401 |
<input id="maxSp" name="maxSp" value='$mpDetail.getMaximumSellingPrice()' type="text"></td>
|
|
|
402 |
</tr>
|
| 9242 |
kshitij.so |
403 |
</tbody>
|
|
|
404 |
</table>
|
|
|
405 |
</div>
|
|
|
406 |
<div class="left" style="float: right; width: 48%;">
|
|
|
407 |
<table id="upload" style="text-align: center;width: 100%;height:200px;">
|
|
|
408 |
<thead>
|
|
|
409 |
</thead>
|
|
|
410 |
<tbody>
|
|
|
411 |
<tr>
|
| 9923 |
kshitij.so |
412 |
<td class="detail">Last N Day Sale</td>
|
|
|
413 |
#set($nDaySale=$action.getLastNDaySaleForItem("$itemDetail.getItem_id()","5"))
|
|
|
414 |
<td class="value">
|
|
|
415 |
<input id="lastNDaySale" name="lastNDaySale" value='$action.getnDaySale()' type="text" disabled/></td>
|
|
|
416 |
</tr>
|
|
|
417 |
<tr>
|
|
|
418 |
<td class="detail">Average Sale</td>
|
|
|
419 |
<td class="value">
|
|
|
420 |
<input id="avgSale" name="avgSale" value='$action.getAvgSale()' type="text" disabled/></td>
|
|
|
421 |
</tr>
|
|
|
422 |
<tr>
|
| 9725 |
kshitij.so |
423 |
<td class="detail">Suppress Pricing Feed</td>
|
|
|
424 |
<td class="value">#if ($itemDetail.isSuppressPriceFeed())
|
| 9923 |
kshitij.so |
425 |
<select name="isSuppressPriceFeed" selectType="1" class="border-highlight-red"><option selected="selected" value="True">Active</option><option value="False">InActive</option></select>
|
| 9725 |
kshitij.so |
426 |
#else
|
| 9923 |
kshitij.so |
427 |
<select name="isSuppressPriceFeed" selectType="1"><option selected="selected" value="False">InActive</option><option value="True">Active</option></select>
|
| 9725 |
kshitij.so |
428 |
#end
|
|
|
429 |
</td>
|
|
|
430 |
</tr>
|
|
|
431 |
<tr>
|
| 9242 |
kshitij.so |
432 |
<td class="detail">Suppress Inventory Feed</td>
|
|
|
433 |
<td class="value">#if ($itemDetail.isSuppressInventoryFeed())
|
| 9923 |
kshitij.so |
434 |
<select name="isSuppressInventoryFeed" selectType="1" class="border-highlight-red"><option selected="selected" value="True">Active</option><option value="False">InActive</option></select>
|
| 9242 |
kshitij.so |
435 |
#else
|
| 9923 |
kshitij.so |
436 |
<select name="isSuppressInventoryFeed" selectType="1"><option selected="selected" value="False">InActive</option><option value="True">Active</option></select>
|
| 9242 |
kshitij.so |
437 |
#end
|
|
|
438 |
</td>
|
|
|
439 |
</tr>
|
|
|
440 |
<tr>
|
|
|
441 |
<td class="detail">Snapdeal Listed</td>
|
|
|
442 |
<td class="value">#if ($itemDetail.isIsListedOnSnapdeal())
|
| 9923 |
kshitij.so |
443 |
<select name="isListedOnSnapdeal" selectType="2"><option selected="selected" value="True">Active</option><option value="False">InActive</option></select>
|
| 9242 |
kshitij.so |
444 |
#else
|
| 9923 |
kshitij.so |
445 |
<select name="isListedOnSnapdeal" selectType="2" class="border-highlight-red"><option selected="selected" value="False">InActive</option><option value="True">Active</option></select>
|
| 9242 |
kshitij.so |
446 |
#end
|
|
|
447 |
</td>
|
|
|
448 |
</tr>
|
|
|
449 |
<tr>
|
| 9725 |
kshitij.so |
450 |
<td class="detail">Auto Increment</td>
|
|
|
451 |
<td class="value">#if ($mpDetail.isAutoIncrement())
|
| 9923 |
kshitij.so |
452 |
<select name="isAutoIncrement" selectType="3" class="border-highlight-green"><option selected="selected" value="True">Active</option><option value="False">InActive</option></select>
|
| 9725 |
kshitij.so |
453 |
#else
|
| 9923 |
kshitij.so |
454 |
<select name="isAutoIncrement" selectType="3"><option selected="selected" value="False">InActive</option><option value="True">Active</option></select>
|
| 9725 |
kshitij.so |
455 |
#end
|
|
|
456 |
</td>
|
|
|
457 |
</tr>
|
|
|
458 |
<tr>
|
|
|
459 |
<td class="detail">Auto Decrement</td>
|
|
|
460 |
<td class="value">#if ($mpDetail.isAutoDecrement())
|
| 9923 |
kshitij.so |
461 |
<select name="isAutoDecrement" selectType="3" class="border-highlight-green"><option selected="selected" value="True">Active</option><option value="False">InActive</option></select>
|
| 9725 |
kshitij.so |
462 |
#else
|
| 9923 |
kshitij.so |
463 |
<select name="isAutoDecrement" selectType="3"><option selected="selected" value="False">InActive</option><option value="True">Active</option></select>
|
| 9725 |
kshitij.so |
464 |
#end
|
|
|
465 |
</td>
|
|
|
466 |
</tr>
|
|
|
467 |
<tr>
|
|
|
468 |
<td class="detail">Auto Favourite</td>
|
|
|
469 |
<td class="value">#if ($mpDetail.isAutoFavourite())
|
| 9923 |
kshitij.so |
470 |
<select name="isAutoFavourite" class="border-highlight-green"><option selected="selected" value="True">Active</option></select>
|
| 9725 |
kshitij.so |
471 |
#else
|
|
|
472 |
<select name="isAutoFavourite"><option selected="selected" value="False">InActive</option></select>
|
|
|
473 |
#end
|
|
|
474 |
</td>
|
|
|
475 |
</tr>
|
|
|
476 |
<tr>
|
|
|
477 |
<td class="detail">Manual Favourite</td>
|
|
|
478 |
<td class="value">#if ($mpDetail.isManualFavourite())
|
| 9923 |
kshitij.so |
479 |
<select name="isManualFavourite" selectType="3" class="border-highlight-green"><option selected="selected" value="True">Active</option><option value="False">InActive</option></select>
|
| 9725 |
kshitij.so |
480 |
#else
|
| 9923 |
kshitij.so |
481 |
<select name="isManualFavourite" selectType="3"><option selected="selected" value="False">InActive</option><option value="True">Active</option></select>
|
| 9725 |
kshitij.so |
482 |
#end
|
|
|
483 |
</td>
|
|
|
484 |
</tr>
|
|
|
485 |
<tr>
|
|
|
486 |
<td class="detail">Commission %</td>
|
|
|
487 |
<td class="value"><input id="commissionRate" name="commissionRate" value='$mpDetail.getCommission()'type="text" disabled/></td>
|
|
|
488 |
</tr>
|
|
|
489 |
<tr>
|
| 9242 |
kshitij.so |
490 |
<td class="detail">Exception Price</td>
|
|
|
491 |
<td class="value"><input id="exceptionPrice" name="exceptionPrice" value='$itemDetail.getExceptionPrice()'type="text"/></td>
|
|
|
492 |
</tr>
|
|
|
493 |
<tr>
|
|
|
494 |
<td class="detail">Commission</td>
|
|
|
495 |
<td class="value"><input id="commission" name="commission" value='$itemDetail.getCommission()'type="text" readonly/></td>
|
|
|
496 |
</tr>
|
|
|
497 |
<tr>
|
|
|
498 |
<td class="detail">Service Tax</td>
|
|
|
499 |
<td class="value"><input id="serviceTax" name="serviceTax" value='$itemDetail.getServiceTax()'type="text" readonly/></td>
|
|
|
500 |
</tr>
|
|
|
501 |
<tr>
|
|
|
502 |
<td class="detail">Courier Cost</td>
|
| 11095 |
kshitij.so |
503 |
<td class="value"><input id="courierCost" name="courierCost" value='$itemDetail.getCourierCost()'type="text" style="width:20%;" readonly/>
|
|
|
504 |
<span style="font-weight:bold;color:black;">Snapdeal</span>
|
|
|
505 |
<input id="courierCostMarketplace" name="courierCostMarketplace" value='$itemDetail.getCourierCostMarketplace()'type="text" style="width:20%;" onkeyup="calculateStuff()">
|
|
|
506 |
</td>
|
|
|
507 |
|
| 9242 |
kshitij.so |
508 |
</tr>
|
|
|
509 |
<tr>
|
| 9725 |
kshitij.so |
510 |
<td class="detail">VAT %</td>
|
| 9825 |
kshitij.so |
511 |
<td class="value"><input id="vat" name="vat" value='$mpDetail.getVat()' type="text" onkeyup="calculateStuff()"></td>
|
| 9725 |
kshitij.so |
512 |
</tr>
|
|
|
513 |
<tr>
|
| 9478 |
kshitij.so |
514 |
<td class="detail">Item Id @ Snapdeal</td>
|
| 9479 |
kshitij.so |
515 |
#if($itemDetail.getSkuAtSnapdeal())
|
|
|
516 |
<td class="value"><input id="sdItemCode" name="sdItemCode" value='$itemDetail.getSkuAtSnapdeal()' type="text"></td>
|
| 9478 |
kshitij.so |
517 |
#else
|
|
|
518 |
<td class="value"><input id="sdItemCode" name="sdItemCode" value='' type="text"></td>
|
|
|
519 |
#end
|
|
|
520 |
</tr>
|
|
|
521 |
<tr>
|
| 9568 |
kshitij.so |
522 |
<td class="detail">SUPC Code</td>
|
|
|
523 |
#if($itemDetail.getSupc())
|
|
|
524 |
<td class="value"><input id="supc" name="supc" value='$itemDetail.getSupc()' type="text"></td>
|
|
|
525 |
#else
|
|
|
526 |
<td class="value"><input id="supc" name="supc" value='' type="text"></td>
|
|
|
527 |
#end
|
|
|
528 |
</tr>
|
|
|
529 |
<tr>
|
| 9242 |
kshitij.so |
530 |
<td class="detail">Action</td>
|
|
|
531 |
<td class="value"><input type="submit" value="Update" name="upload" style="width: 25%;">
|
|
|
532 |
<input type="button" style="padding-left: 5px; margin-left: 10px;width: 25%;" id="cancelbutton" name="cancel" value="Cancel">
|
|
|
533 |
</td>
|
|
|
534 |
</tr>
|
|
|
535 |
<tr class="detail" style="display:none;"></td>
|
|
|
536 |
<td>
|
| 9780 |
kshitij.so |
537 |
<input id="itemWeight" name="itemWeight" value='$itemDetail.getWeight()' type="text"/>
|
| 9242 |
kshitij.so |
538 |
</td>
|
|
|
539 |
</tr>
|
| 9780 |
kshitij.so |
540 |
<tr class="detail" style="display:none;"></td>
|
|
|
541 |
<td>
|
|
|
542 |
<input id="returnProvision" name="returnProvision" value='$mpDetail.getReturnProvision()' type="text" disabled/>
|
|
|
543 |
</td>
|
|
|
544 |
</tr>
|
|
|
545 |
<tr class="detail" style="display:none;"></td>
|
|
|
546 |
<td>
|
|
|
547 |
<input id="emiFee" name="emiFee" value='$mpDetail.getEmiFee()' type="text" disabled/>
|
|
|
548 |
</td>
|
|
|
549 |
</tr>
|
|
|
550 |
<tr class="detail" style="display:none;"></td>
|
|
|
551 |
<td>
|
|
|
552 |
<input id="closingFee" name="closingFee" value='$mpDetail.getClosingFee()' type="text" disabled/>
|
|
|
553 |
</td>
|
|
|
554 |
</tr>
|
|
|
555 |
<tr class="detail" style="display:none;"></td>
|
|
|
556 |
<td>
|
|
|
557 |
<input id="serviceTaxRate" name="serviceTaxRate" value='$mpDetail.getServiceTax()' type="text" disabled/>
|
|
|
558 |
</td>
|
| 10287 |
kshitij.so |
559 |
<td>
|
|
|
560 |
<input id="pgFee" name="pgFee" value='$mpDetail.getPgFee()' type="text" disabled/>
|
|
|
561 |
</td>
|
| 9780 |
kshitij.so |
562 |
</tr>
|
| 9242 |
kshitij.so |
563 |
</tbody>
|
|
|
564 |
</table>
|
|
|
565 |
</div>
|
|
|
566 |
</form>
|
| 9725 |
kshitij.so |
567 |
</div>
|
|
|
568 |
<!--product details end-->
|
|
|
569 |
<!--Inventory details -->
|
|
|
570 |
<div class="top-header-inventory">
|
|
|
571 |
<h2 style="font-weight: bolder; font-size: 20px; border-top: 4px solid rgb(134, 163, 189); background-color: rgb(134, 163, 189);color:white;">
|
|
|
572 |
Inventory Details
|
|
|
573 |
</h2>
|
|
|
574 |
</div>
|
|
|
575 |
<div class="inventory-details">
|
|
|
576 |
<table id="inventory-info" style="width: 100%">
|
|
|
577 |
<thead>
|
|
|
578 |
<tr>
|
| 9734 |
kshitij.so |
579 |
<th>Id</th>
|
| 9725 |
kshitij.so |
580 |
<th>Warehouse Desc</th>
|
| 9734 |
kshitij.so |
581 |
<th>Warehouse Location</th>
|
| 9725 |
kshitij.so |
582 |
<th>Warehouse Type</th>
|
|
|
583 |
<th>Inventory Type</th>
|
|
|
584 |
<th>Availability</th>
|
|
|
585 |
<th>Reserved</th>
|
| 9734 |
kshitij.so |
586 |
<th>Ebay Held</th>
|
|
|
587 |
<th>Flipkart Held</th>
|
|
|
588 |
<th>Snapdeal Held</th>
|
| 9725 |
kshitij.so |
589 |
</tr>
|
|
|
590 |
</thead>
|
|
|
591 |
<tbody>
|
|
|
592 |
#set($itemInventory = $action.getItemInventory("$itemDetail.getItem_id()"))
|
|
|
593 |
#set($availability = $itemInventory.getAvailability())
|
|
|
594 |
#set($reserved = $itemInventory.getReserved())
|
|
|
595 |
#set($held = $itemInventory.getHeld())
|
| 9734 |
kshitij.so |
596 |
#foreach( $keyAvailable in $availability.keySet() )
|
|
|
597 |
#if($keyAvailable!=16)
|
|
|
598 |
<tr style="border: 1px">
|
|
|
599 |
#set($whObj = $action.getWarehouse("$keyAvailable","$itemDetail.getItem_id()"))
|
|
|
600 |
#set($holdInventoryMap = $action.getHoldInventoryMapForItem())
|
| 9725 |
kshitij.so |
601 |
#set($warehouseCheck="False")
|
|
|
602 |
#if ($whObj.getWarehouseType()=="OURS" && $whObj.getInventoryType()=="GOOD")
|
|
|
603 |
#set($warehouseCheck="True")
|
|
|
604 |
#end
|
| 9825 |
kshitij.so |
605 |
#set($index = $whObj.getLocation().lastIndexOf(","))
|
|
|
606 |
#set($index = $index+1)
|
| 9734 |
kshitij.so |
607 |
<td style="text-align:center;width:5%;">$keyAvailable</td>
|
|
|
608 |
<td style="text-align:center;width:10%;">$whObj.getDisplayName()</td>
|
| 9825 |
kshitij.so |
609 |
<td style="text-align:center;width:10%;">$whObj.getLocation().substring($index)</td>
|
| 9725 |
kshitij.so |
610 |
<td style="text-align:center;width:10%;">$whObj.getWarehouseType()</td>
|
| 9825 |
kshitij.so |
611 |
<td style="text-align:center;width:8%;">$whObj.getInventoryType()</td>
|
|
|
612 |
<td style="text-align:center;width:8%;">$availability.get($keyAvailable)</td>
|
|
|
613 |
<td style="text-align:center;width:8%;">$reserved.get($keyAvailable)</td>
|
|
|
614 |
<td style="text-align:center;width:8%;">#if($$holdInventoryMap.get(6))$holdInventoryMap.get(6)#{else}0#end</td>
|
|
|
615 |
<td style="text-align:center;width:8%;">#if($$holdInventoryMap.get(8))$holdInventoryMap.get(8)#{else}0#end</td>
|
| 9725 |
kshitij.so |
616 |
<td style="text-align:center;">
|
|
|
617 |
#if ($warehouseCheck=="True")
|
| 9734 |
kshitij.so |
618 |
<input id="heldInventory_$keyAvailable" name="heldInventory" value='#if($holdInventoryMap.get(7))$holdInventoryMap.get(7)#{else}0#end' type="text" style="width:20%;"/>
|
|
|
619 |
<input type="button" class="changeHeld" value="Update" warehouse_id="$keyAvailable" item_id="$itemDetail.getItem_id()" style="width:20%;margin-left:10px;">
|
| 9725 |
kshitij.so |
620 |
#else
|
| 9734 |
kshitij.so |
621 |
<input id="heldInventory_$keyAvailable" name="heldInventory" value='#if($holdInventoryMap.get(7))$holdInventoryMap.get(7)#{else}0#end' type="text" style="width:20%;" readonly/>
|
|
|
622 |
<input type="button" value="Update" style="width:20%;margin-left:10px;" disabled/>
|
| 9725 |
kshitij.so |
623 |
#end
|
|
|
624 |
</td>
|
|
|
625 |
</tr>
|
| 9734 |
kshitij.so |
626 |
#end
|
|
|
627 |
#end
|
| 9725 |
kshitij.so |
628 |
</tbody>
|
|
|
629 |
</table>
|
|
|
630 |
</div>
|
|
|
631 |
|
|
|
632 |
|
|
|
633 |
|
|
|
634 |
|